Showing posts with label Redhat. Show all posts
Showing posts with label Redhat. Show all posts

Creating a Local YUM Repository with ISO

Creating a Local YUM Repository with ISO




In Order to install or Update software in RHEL we need to connect to RHN (RedHat Network). By creating Local Repository we can install software from our own device. It saves things like bandwidth and time. All we need is an iso image (CD/DVD image).
Download the iso file from redhat.com and place it in /iso directory
To Create a local repository; create a configuration file in /etc/yum.repos.d/ as *.repo
vim /etc/yum.repos.d/trs-local.repo
[trstech]
name=This is Local Repository
baseurl=file:///localrepo
gpgcheck=0
enabled=1
In this configuration file we have defined the repo url as a file and it is in /localrepo.
But in order to access that, we have to mount the iso file to that directory.
mkdir /localrepo
mount -o loop,ro /iso/rhel7.iso /localrepo

But this mount is not persistent, for persistent mount we have to edit the /etc/fstab file
vim /etc/fstab
/iso/rhel7.iso /localrepo iso9660 loop,ro 0 0
mount -a
then verify whether you have access to the local repository by giving a command
yum repolist
Now install package and play with the services

How to install and configure SSH server on RHEL 7

How to install and configure SSH server on RHEL 7




Install SSH server

To commence you must install the SSH server (and client). There are many servers that you can choose from, but today we’re going to install OpenSSH, probably the most popular one.
If everything goes well, you will have a SSH server installed and a key for the host configured. Next thing is to enable and start the service using systemd. And next is opening the appropriate firewall port. I assume you’re using firewalld instead of iptables.
This ensures the SSH server is loaded and started at boot time, and start it right now. Ok, end of the story. It can indeed work like this, but you should also take a few minutes to configure your new SSH server. First you should familiarize with the configuration folder: /etc/ssh . You will find a few files inside this folder, the configuration of the server resides however in the sshd_config file.

Configuring SSH server

There are many many configuration options, we’ll cover the most important ones.
This is by no mean a complete list, but shows you the most used (and important) options. If you’re willing here’s the complete list. Be sure to reload sshd for the changes to take effect
Also, changing the port or the address will require a restart of the SSH server.