FTP and HTTP Yum Library

Source: Internet
Author: User

Configure the FTP Yum library.

Configure the IP address on the server:

[[Email protected] ~] # Vim/etc/sysconfig/network-scripts/ifcfg-eth0

Device = eth0

Bootproto = none

Onboot = Yes

Hwaddr = 00: 0C: 29: 59: 3C: 4A

Ipaddr = 192.168.1.1

Netmask = 255.255.255.0

[[Email protected] ~] #/Etc/init. d/network restart

Closing interface eth0: [OK]

Disable the loop interface: [OK]

Pop-up loop interface: [OK]

Pop-up page eth0: [OK]

[[Email protected] ~] # Chkconfig network on

Install FTP:

[[Email protected] server] # rpm-Q * vsftpd *

Package vsftpd-2.0.5-28.el5.x86_64.rpm Is Not Installed

[[Email protected] server] # rpm-ivhvsftp *

Start the service:

[Roo [email protected] server] # rpm-qlvsftpd | grepinit

/Etc/rc. d/init. d/vsftpd

[[Email protected] server] #/etc/rc. d/init. d/vsftpd restart

[[Email protected] server] # chkconfigvsftpd on

Mount the RPM package directory to the FTP directory

[[Email protected] # Mount/MISC/CD/var/FTP/pub/RedHat

Set the IP address of the client machine and configure the client yum

Client Yum: baseurl = ftp: // 192.168.1.1/pub/RedHat/Server/

[[Email protected] # Vim/etc/yum. Repos. d/ftpyum. Repo

Verification: input from the client:

[[Email protected] ~] # Yum list | WC-l

3350

FTP Yum configuration is complete.

Configuration: HTTP Yum Library

Similar to the FTP settings, the following link says: for example, if the IP address is used to set the network service to start up, you should configure the local Yum library and install the httpd software from the server:

[[Email protected] server] # Yum-y install HTTP *

[[Email protected] server] # rpm-qlhttpd | grepinit

/Etc/rc. d/init. d/httpd

Start the service:

[[Email protected] server] #/etc/rc. d/init. d/httpd restart

[[Email protected] server] # chkconfighttpd on

Mount the RPM library directory:

[[Email protected] HTML] # Mount -- bind/MISC/CD/var/www/html

Edit this content

[[Email protected] HTML] # Vim/etc/httpd/CONF. d/welcome. conf

Add # To the purpose to shield the welcome page:

# Options-Indexes

Errordocument 403/error/noindex.html

The client Yum library is changed:

[[Email protected] ~] # Vim/etc/yum. Repos. d/ftp. Repo

Baseurl = http: // 192.168.1.1/Server/

Verification:

[[Email protected] ~] # Yum list | WC-l

3350

Error: If the verification fails, restart the HTTPd service.

 

 

 

 

 

 

 

This article is from the "Linux" blog, please be sure to keep this source http://105496232.blog.51cto.com/3895811/1538748

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.