Linux does not have the yum source of vsftpd, RHCE experience 3-----based VSFTP-based local YUM source and CD-ROM YUM source construction

YUM local source and CD-ROM source based on VSFTP

etc_17.gif

1. Local source construction of yum environment (based on VSFTP): 1) Install vsftp;

******************************************

[root@service ~]# mount /dev/hdc /mnt

[root@service ~]# cd /mnt/Server/

[root@service Server]# ls |grep vsftp

vsftpd-2.0.5-12.el5.i386.rpm

[root@service Server]# rpm --import /etc/pki/rpm-pgp/RPM- PGP-KEY-redhat-release

[root@service Server]# rpm -ivh vsftpd-2.0.5-12.el5.i386.rpm

[root@service Server]# chkconfig vsftpd on //Turn on the computer to automatically run the vsftpd service

[root@service Server]# service vsftpd restart

****************************************************

2) Move all the files in the installation CD to the /var/ftp/pub directory;

3) Install createrepo and create the relevant yum library files:

*****************************************************

[root@service Server]# ls |grep create

createrepo-0.4.11-3.el5.noarch.rpm

[root@service Server]# rpm -ivh createrepo-0.4.11-3.el5.noarch.rpm

[root@service Server]# createrepo -v /var/ftp/pub //After typing the command, it will be processed after a while ********************** ********************************

4) Edit the /etc/yum.conf file; add the following:

vim /etc/yum.conf

******************************************

[yumok] (name can be written casually)

name=yumok (the name can be written the same as above)

baseurl=ftp://192.168.1.88/pub/Server (fill in the local IP address and related paths, the root here is /var/ftp/; if the YUM server is not the one corresponding to the local machine, you can modify this address)

enabled=1

gpgcheck=1

********************************************

5) Test yum one; for example, we install gcc

Yum list| grep gcc*; List related yum sources.

Yum install gcc.i386 ; The end of yum related package source files are all .i386

6) Uninstall the package source installed by yum;

Yum remove gcc ; when uninstalling the package source, only the specified package will be uninstalled, and the package that needs to be installed synchronously will generally not be removed.

Note: If you use the yum list command to view the list, you cannot view the problem that it is blocked before the fire

1) Firewall problem: open port 20:21: vim /etc/sysconf/iptables

************************************************

... omitted before

-A RH-Firewall-1-INPUT -p tcp —dport 20:21 -j ACCEPT

-A RH-Firewall-1-INPUT -p udp —dport 20:21 -j ACCEPT

...Omit later and add the above two lines

***********************************************

2) The problem of selinux:

************************************************

setebool -P -ftpd_disable_trans on

setsebool -P -allow_ftpd_full_access on

servie vsftpd restart

*********************************************

Two: yum environment CD source construction:

1) Hang on the Redhat linux 5.X CD:

mount /dev/hdc  /mnt

2) Edit /etc/yum.conf and add the following content

************************************

[cdrom]

name=cdrom

baseurl = file: /// mnt/Server

enabled=1

gpgcheck=1

***********************************

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324482420&siteId=291194637