Monthly Archives: January 2018

How to create CentOS Local Repository Server

mkdir /mnt/iso

mount /dev/cdrom /mnt/iso

mkdir /home/repos/LocalRepo/CentOS/7.0/ -p

cp -ar /mnt/iso/Packages/* /home/repos/LocalRepo/CentOS/7.0/

umount /dev/cdrom /mnt/iso

cd /home/repos/LocalRepo/CentOS/7.0/

rpm -i deltarpm-3.6-3.el7.x86_64.rpm

rpm -i libxml2-python-2.9.1-6.el7_2.3.x86_64.rpm

rpm -i python-deltarpm-3.6-3.el7.x86_64.rpm

rpm -i createrepo-0.9.9-28.el7.noarch.rpm

vi /etc/yum.conf

file:///home/repos/LocalRepo/CentOS/7.0

yum install apr-1.4.8-3.el7.x86_64.rpm apr-util-1.5.2-6.el7.x86_64.rpm httpd-tools-2.4.6-67.el7.centos.x86_64.rpm mailcap-2.1.41-2.el7.noarch.rpm httpd-2.4.6-67.el7.centos.x86_64.rpm

systemctl start httpd

systemctl status httpd

systemctl enable httpd

ln -s /home/repos/LocalRepo/CentOS/7.0/ /var/www/html/CentOS7.0

vi localrepo.repo

[localrepo]

name=Custom Repository

baseurl=file:///var/www/html/CentOS7.0

gpgcheck=0

enabled=1

createrepo -v /var/www/html/CentOS7.0/

yum repolist

vi /etc/yum.conf

#file:///home/repos/LocalRepo/CentOS/7.0

systemctl stop firewalld

systemctl disable firewalld

vi /etc/sysconfig/selinux

SELINUX=disabled

yum install vsftpd

systemctl start vsftpd

systemctl status vsftpd

systemctl enable vsftpd

yum repolist

yum install yum-utils.noarch

yum-config-manager –disable “CentOS-7 – Base”