0. "Pre-installation preparations:"
1) chkconfig iptables off or service iptables stop disable firewall (CENTOS6)
Systemctl Disable Firewalld.service or systemctl stop firewalld.services (CENTOS7)
2) Turn off SELinux
Vim/etc/selinux/config
Zhong Selinux=permisssive
Setenforce 0
Getenforce Validation is valid
3) Remove all HTTP-related packages: Yum remove httpd
Remove all FTP-related packages: Yum remove vsftpd
Available RPM-QA filename query to ensure the server does not pack
1 "Implement multi-system Yum Server (VSFTPD version)"
Server-side configuration:
1) rpm-ivh/misc/cd/packages/vsftpd-2.2.2-24.el6.x86_64 installed VSFTPD server
2) Rpm-qa vsftpd confirm the installation, such as installation, with service VSFTPD start start service (CENTOS6) systemctl start vsftpd (CENTOS7)
3) Ss-ntl See if 21 port is open, vsftpd default 21 port
4) Create the Yum repository directory madir-p/var/ftp/pub/centos/{6,7}
Copy to FTP server
Here, the server-side configuration is complete!
Client Configuration:
1) Vim/etc/yum.repo.d/base.repo
Modify to [base]
Name=centos
baseurl=ftp://192.168.75.196/pub/centos/$releasever/
Gpgcheck=0
Enable=1 (also change other URLs to 0 disabled)
The FTP server Test configuration is successful!
2. "Yum Warehouse httpd Configuration"
Server-side configuration:
1) rpm-ivh/misc/cd/packages/httpd-2.2.15-59.el6.centos.x86_64.rpm
If you have dependencies, install yum-y installed httpd with Yum
2) Start httpd service httpd start (CENTOS6), verify with ss-ntl whether to open 80 port; systemctl start httpd (CENTOS7)
3) Create httpd working directory Mkdir-p/var/www/html/app
Copy RPM package to app directory
4) Create meta-data repodate package, Createrepo/var/www/html/app
Here, the server-side configuration is complete
Client Configuration:
1) Vim/etc/yum.repo.d/base.repo
Change to [app]
Name=app
Baseurl=ftp://192.168.75.196/app
Gpgcheck=0
Enable=1 (also change other URLs to 0 disabled)
2) vim/var/www/html/index.html Edit Web content
To this HTTPD server test success! You can try the configured Yum source to install some RPM packages, such as Tree,screen try!
Simple installation test for FTP server and HTTP server