1. Server repo
2. Server client
3. Service ftp --> vsftpd
4. Install createrepo
Configuring server repo
1. Create repo local first in serverrepo :
*mount your DVD or ISO into media/iso
#mount -o loop /tmp/RHEL7.iso /media/iso
*create file with name : local.repo and edit with below :
#vim /etc/yum.repos.d/local.repo
fill the local.repo below :
[localrepo]
name=localrepo
baseurl=file:///media/iso/
enabled=1
gpgcheck=0
2. Install service vsftpd
#yum repolist all
#yum install vsftpd
3. Edit file /etc/vsftpd/vsftpd.conf
#vim /etc/vsftpd/vsftpd.conf
*uncomment below lines :
anonymous_enable=YES
anon_upload_enable=YES
anon_mkdir_write_enable=YES
idle_session_timeout=600
data_connection_timeout=120
4. Install createrepo pkg
#yum install createrepo
5. Copy all files in the /media/iso/Packages to the /var/ftp/pub/
#cp * -rfv /media/iso/Packages/* /var/ftp/pub/
6. After all files copied, make repository by command below :
#createrepo /var/ftp/pub/
#yum repolist
7. After all done please edit your local.repo
#vim /etc/yum.repos.d/local.repo
*fill below :
[localrepo]
name=localrepo
baseurl=ftp://your-svr-ipaddress/pub/
enabled=1
gpgcheck=0
8. Unmount /media/iso/
9. Confirm the repo is already configured correctly
#yum makecache
#yum repolist all
#yum update
#service vsftpd restart
# modprobe ip_conntrack_ftp --> use this command every restart the serverrepo
Then we will configure in the client server side :
In the client side, it will be simple edit. You just need to edit the local.repo
1. Create local.repo
#vim /etc/yum.repos.d/local.repo
*fill below :
[localrepo]
name=localrepo
baseurl=ftp://your-svr-ipaddress/pub/
enabled=1
gpgcheck=0
#yum repolist all
#yum update
2. Done, now you can install all repository from your local svr by FTP.
# modprobe ip_conntrack_ftp --> use this command every restart the serverrepo
Then we will configure in the client server side :
In the client side, it will be simple edit. You just need to edit the local.repo
1. Create local.repo
#vim /etc/yum.repos.d/local.repo
*fill below :
[localrepo]
name=localrepo
baseurl=ftp://your-svr-ipaddress/pub/
enabled=1
gpgcheck=0
#yum repolist all
#yum update
2. Done, now you can install all repository from your local svr by FTP.