Redhat 配置yum本地源之一
参考链接:http://jingyan.baidu.com/article/bad08e1e9900ec09c8512105.html
Redhat6.5(红帽6.5)配置yum本地源 百度经验
第一步:创建安装包存放位置
# mkdir -p /yum/packages/6.6
第二步:创建本地yum源
# cd /etc/yum.repos.d
# ls
Base.repoepel.repoepel-testing.reporedhat.repo
# mv Base.repo Base.repo.bak
# ls
Base.repo.bakepel.repoepel-testing.reporedhat.repo
# rm -f *.repo
# ls
Base.repo.bak
# mv Base.repo.bak rhel-6.6.repo
# vim rhel-6.6.repo
name=rhel-6.6
baseurl=file:///yum/packages/6.6
gpgcheck=0
enabled=1
第三步:开机自动挂载
# vim /etc/rc.local
mkdir -o loop /dev/sr0 /yum/packages/6.6
# reboot
第四步:验证挂载
# df
Filesystem 1K-blocks Used Available Use% Mounted on
/home/RHEL6.6.iso 3747454 3747454 0 100% /yum/packages/6.6
# ll -h /yum/packages/6.6/Packages/ | wc -l
3787
# du -sh /yum/packages/6.6/Packages/
3.3G/yum/packages/6.6/Packages/
第五步:通过本地yum源安装vsftpd
# cd /etc/yum.repos.d
# ls
rhel-6.6.repo
# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=00:0C:29:A3:DA:45
TYPE=Ethernet
ONBOOT=yes
BOOTPROTO=static
IPADDR=172.16.0.11
NETMASK=255.255.0.0
# rpm -qa |grep vsftpd
# yum -y install vsftpd
# rpm -qa |grep vsftpd
vsftpd-2.2.2-12.el6_5.1.x86_64
# service vsftpd status
vsftpd is stopped
# service vsftpd restart
Shutting down vsftpd:
Starting vsftpd for vsftpd: [ OK ]
#rpm -qa |grep ftp
# yum -y install ftp > /dev/null
# ftp localhost
Trying ::1...
ftp: connect to address ::1Connection refused
Trying 127.0.0.1...
Connected to localhost (127.0.0.1).
220 (vsFTPd 2.2.2)
Name (localhost:root): ftp
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
227 Entering Passive Mode (127,0,0,1,236,229).
150 Here comes the directory listing.
drwxr-xr-x 2 0 0 4096 Jul 292014 pub
226 Directory send OK.
ftp> cd pub
250 Directory successfully changed.
ftp> ls
227 Entering Passive Mode (127,0,0,1,150,108).
150 Here comes the directory listing.
226 Directory send OK.
ftp>
页:
[1]