CentOS-7, yum Warehouse setup and FTP and HTTP configuration

Source: Internet
Author: User

Mount disc, CD-ROM into optical drive
# Mkdir/media/cdrom//Create mount directory, personal habits
# mount/dev/cdrom/media/cdrom///Mount
ls/media/cdrom///Check to see if the mount is successful

Installing VSFTP
rpm-ivh/media/cdrom/packages/vsftpd-2.2.2-11.el6.x86_64.rpm
/media/cdrom This directory is a CD-ROM mount directory

When the installation is complete, copy all the files from the CD to the/var/ftp/pub directory.
cp-rf/media/cdrom/ /var/ftp/pub/
This process is a bit slow and patient ....
Delete
. html and TRANS. TBL
rm-rf/var/ftp/pub/*.html//Delete the file Rm-rf/var/ftp/pub/repodata/trans that ends in. html. TBL//Delete trans.tbl file
Install the Createrepo tool to generate the Yum Universal database
Need to install dependent packages deltarpm, Libxml2-python, python-deltarpm
rpm-ivh/var/ftp/pub/packages/deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
rpm-ivh/var/ftp/pub/packages/libxml2-python-2.7.6-4.el6_2.4.x86_64.rpm
rpm-ivh/var/ftp/pub/packages/python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
rpm-ivh/var/ftp/pub/packages/createrepo-0.9.8-5.el6.noarch.rpm

Use the Createrepo tool to generate a Yum universal database
Createrepo-g/media/cdrom/repodata/*-comps.xml/var/ftp/pub/
This process needs to wait patiently ....

VSFTPD, use your browser to verify that the FTP service is working
/ETC/INIT.D/VSFTPD restart
If it appears as shown, the FTP service is built successfully
If you can't access it, turn off the firewall, and SELinux
Service iptables stop//firewall off
Setenforce 0//Turn off SELinux

Here, the server-side FTP Yum service was successfully built, and the client configuration
Client IP Address: 168.160.24.205
Modifying the client Yum configuration file
Vi/etc/yum.repos.d/centos-base.repo
baseurl=ftp://168.160.24.136/pub/

Test if Yum is configured successfully
Yum list//test command, if the following appears, represents a successful
Loaded Plugins:fastestmirror
Loading mirror speeds from cached hostfile

1.yum configuration file location in/etc/yum.repos.d/base.repo, edited with Vim tool.
Yum Content format:

1 [Base]
2 Name=yumck # Yum warehouse Name

3 baseurl=file:///(ftp://) #本地yum仓库所在位置, there can be three ways
Enabled=1 turn on start-up service

4 gpgcheck=0 #不检测pgp秘钥

2 Before you build FTP or HTTP services, you first need to turn off the firewall and Linux security access mechanism features.
1. Turn off the firewall

1 service iptables stop #centos6 shut down the firewall
2
3 chkconfig iptables off #centos6 boot disable firewall enabled
4
5 systemctl Disable Firewalld.service #centos7 boot prohibit boot firewall
7
8 Systemctl Stop Firewalld.service #centos7 stopping the Firewall service

    2, 关闭LINUX内部访问机制selinux

1 vim/etc/selinux/config
2 selinux=permissive #写文件方式关闭访问机制
3
4 Setenforce 0 #命令方式关闭访问机制

5

6 Getenforce #看返回值是否是Permissive, that is to say success

3  

1 chkconfig vsftpd on #创建FTP服务自启
2
3 Service Statr VSFTPD #启动FTP服务

4 Ss-ntl #检测FTP服务端口是否正常
4 compiling and installing the HTTP service

1 Download the latest Apache source code program in http://httpd.apache.org/, 2.4 version for CENTOS7 use, 2.2 version for CENTOS6 use
2
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, Install compilation always run the installation under the extracted folder
10
Make && do install #编译安装 (run multiple times to see if the bottom two lines have errors, or if you are prompted to install the relevant components)

CentOS-7, yum Warehouse setup and FTP and HTTP configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.