1 What is the Yum repository
Yum works on a file server that relies on the C/S architecture working mode, and the server stores the packages required for Yum to work. After Yum receives the name of the package that needs to be installed, the File sharing protocol (or File Transfer Protocol) is used to query the required packages in the Yum repository (which can be multiple) in the configuration file. Once found, the package is downloaded to the local Yum cache directory via the file download protocol, and the cache directory is deleted when the installation is complete.
The configuration file location of Yum is/etc/yum.repos.d/base.repo, edited with Vim tool.
Yum Content format:
1 [Base]
2 name=yumck # Yum warehouse Name
3 baseurl=file:///| HTTP | FTP #本地yum仓库所在位置, there are three ways to
4 gpgcheck=0 #不检测pgp秘钥
2 Before you can build an FTP or HTTP service, you first need to turn off firewall and Linux security access mechanisms.
1. Turn off the firewall
1 service iptables Stop #centos6 shut down firewall 23chkconfig iptables off #centos6 Boot disable enable firewall 45systemctl disable firewalld.service #centos7 boot Disable firewall 7 8 systemctl stop firewalld.service #centos7 stopping the Firewall service
2, close Linux internal access mechanism SELinux
1 vim/etc/selinux/config2 selinux=permissive #写文件方式关闭访问机制3 4 setenforce 0 #命令方式关闭访问机制5 6 Getenforce #看返回值是否是Permissive, that is to say success
3 setting up an FTP server
1 chkconfig vsftpd on #创建FTP服务自启 23 service Statr vsftpd #启动FTP服务
4 Ss-ntl #检测FTP服务端口是否正常
4 compiling and installing the HTTP service
1In http://httpd.apache.org/Download the latest Apache source code program, version 2.4 for CENTOS7 use, version 2.2 for CENTOS6 use2 3 tar xvf downloaded packages #解压缩下载的程序包4 5 CD Uncompressed Package folder
Yum Groupinstall "Development tools" #安装开发包组6 7 Cat Install #查看安装说明8 9./configure--prefix=PREFIX--systemcondir=prefix--enable-ssl #生成Makefile (optional installation component visible install file, installation compile always run installation under Unzipped folder)Ten OneDo && make install #编译安装 (run multiple times to see if the bottom two lines have errors, or if you are prompted to install the relevant components)
From establishing a Yum repository to building FTP and HTTP services