How to install YUM Server on CentOS
# mount /dev/cdrom /mnt/
# cd /mnt/Packages/
# rpm -ivh vsftpd-3.0.2-9.el7.x86_64.rpm
Enable and start vsftpd service:
# systemctl enable vsftpd
# systemctl start vsftpd
# rpm -ivh libxml2-python-2.9.1-5.el7.x86_64.rpm
# rpm -ivh deltarpm-3.6-3.el7.x86_64.rpm
# rpm -ivh python-deltarpm-3.6-3.el7.x86_64.rpm
# rpm -ivh createrepo-0.9.9-23.el7.noarch.rpm
# mkdir /var/ftp/pub/localrepo
# cp -ar /mnt/Packages/*.* /var/ftp/pub/localrepo/
# vi /etc/yum.repos.d/localrepo.repo
Localrepo.repo
[localrepo]
name=Unixmen Repository
baseurl=file:///var/ftp/pub/localrepo
gpgcheck=0
enabled=1
Note: Write down those notes in the file and save it.
# createrepo -v /var/ftp/pub/localrepo/
Note: Now the repository building process will start. It will take a little bit time to finish.
# yum repolist
# yum clean all
# yum update
# yum install --disablerepo="*" --enablerepo="localrepo" httpd
# systemctl stop firewalld
# systemctl disable firewalld
# vi /etc/sysconfig/selinux
Selinux
[...]
SELINUX=disabled
[...]
Note: Reboot your server to take effect the changes.
Client-Side Configuration
# vi /etc/yum.repos.d/localrepo.repo
Localrepo.repo
[localrepo]
name=Unixmen Repository
baseurl=ftp://(yum server ip address)192.168.1.101/pub/localrepo
gpgcheck=0
enabled=1
Note: Write down those notes in the file and save it.
# yum repolist
# yum clean all
# yum update
# yum install --disablerepo="*" --enablerepo="localrepo" httpd
No comments:
Post a Comment