1 - First we need to setup a hostname for our new machine.
# hostnamectl set-hostname venom.thread.com
2 - Now you need to set up your IP address as you need.
3 - After all this, you need to configure yum server for package installation.
In order to configure yum, you have three options-
- Standalone Yum
- Network-Based Yum
- Third Party Yum (rpm fusion, epel release)
a- Standalone Yum -
Standalone yum is a type of yum server which will work for one particular machine. If you want to configure standalone yum then follow these instructions-
- First, you need to insert your bootable RHEL 8 DVD in your new redhat machine.
- Mount that DVD under /mnt-
# mount /dev/cdrom /mnt
- Now change your directory inside /etc/yum.repos.d
# touch Appstream.repo BaseOS.repo -you can define your own name.
Now we need to edit these two files now I'm starting with Appstream.repo-
# vim AppStream.repo
[AppStream]
name = AppStream repo
baseurl = file:////mnt/AppStream
enable = 1
gpgcheck = 0
save and exit.
# vim BaseOS.repo
[BaseOS]
name = BaseOS repo
baseurl = file:////mnt/BaseOS
enable = 1
gpgcheck = 0
save and exit.
This configuration is only for a temporary basis-
If you want this configuration permanent then you can copy everything from AppStream and BaseOS to any other directory, and put that entry inside these two repo files.
b - Network-Based Yum -
In order to configure the network-based yum server, we have to download and install "createrepo" package. Previous versions of Redhats come with the pre-installed createrepo package but in this version, we need to install "createrepo" package from external sources.
Now we need to set a static IP address to our server machine-
# nmcli connection add con-name static type ethernet ifname enp2s0 ipv4.addresses 192.168.0.5/24 ipv4.gateway 192.168.0.1 ipv4.dns 192.168.0.1 connection.autoconnect yes ipv4.method manual
# nmcli connection up static
Now we need to install httpd/vsftpd package. After this, we have to copy all packages inside the document root of respective service. I'm gonna show you with httpd service.
# yum install httpd -y
Create a directory under /var/www/html
# mkdir /var/www/html/packages
Now copy all the rpm packages inside /var/www/html/packages
# cp -rv /mnt/AppStream/Packages/* /var/www/html/packages
# cp -rv /mnt/BaseOS/Packages/* /var/www/html/packages
Now we need to create repo file inside yum.repos.d directory.
# vim /etc/yum.repos.d/http.repo
[httpd-yum]
name = httpd based yum server
baseurl = http://192.168.0.5/packages
enable = 1
gpgcheck = 0
save and exit
Now we need to run createrepo command to activate the repository.
# createrepo-v /var/www/html/packages
Now we can check repolist.
# yum repolist all
It's done.
c - Third Party Yum -
We need to download rpm fusion package and epel-release package from official website and install it.
# wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# rpm -ivh epel-release-latest-7.noarch.rpm
Now it's done.
If you have any doubt comment below.
If you want to contact me mail me johntheh4cker
Comments