簡單的來說yum工具就相當於Windows下的什麼360軟件管家。所以說先裝上yum然後裝軟件非常方便了。
yum工具有很多的參數可供使用,如下:
yum install 軟件名1 [軟件名2] [...]
yum update [軟件名1][軟件名2] [...]
yum check-update
yum upgrade [軟件1] [軟件2] [...]
yum remove | erase 軟件名1 [軟件名2] [...]
yum list [...]
yum info [...]
yum provides | whatprovides feature1 [feature2] [...]
yum clean [ packages | headers | metadata | dbcache | all ]
yum makecache
yum groupinstall 軟件組1 [軟件組2] [...]
yum groupupdate 軟件組1 [軟件組2] [...]
yum grouplist [hidden] [groupwildcard] [...]
yum groupremove group1 [group2] [...]
yum groupinfo 軟件組名 [...]
yum search 字符串1 [字符串2] [...]
yum shell [文件名]
yum resolvedep 依賴關系1 [依賴關系2] [...]
yum localinstall rpm包1 [rpm包2] [...]
yum localupdate rpm包1 [rpm包2] [...]
yum reinstall 軟件包1 [軟件包2] [...]
yum downgrade 軟件包1 [軟件包2] [...]
yum deplist 軟件包1 [軟件包2] [...]
yum repolist [all|enabled|disabled]
yum help [command]
以上就是yum全部的可用參數了,自動分析依賴性關系是它最好的一個特點,也是目前最方便的安裝方法
首先用虛擬機掛載光盤,然後
創建文件夾路徑
# mkdir -p /media/repo/RedHat
#cd /media/repo/Redhat
將光盤掛載到這個路徑下
Redhat#mount /dev/cdrom /media/repo/Redhat
Redhat#cd ..
Repo# rpm -ivh /media/repo/Server/createrepo-0.4.11-3.e.15.noarch.rpm
Repo#vi /etc/yum.conf
.
.
.
#gpgcheck=0
Plagins=1
[local_cdrom]
Baseurl=file:///media/repo
name=my local_cdrom
:x
Repo#createrepo -g /media/repo/Redhat/Server/repodata/repomd.xml .
安裝阿帕奇測試:
Repo#yum install httpd* -y
repo#cd /var/www/html
Html#vi index.html
Dfdfdfdf
Dfdf
:x
html#yum install vsftpd* -y
Html#cd /etc/selinux
Selinux#vi /etc/selinux/config
SELINUX=disabled
html#service httpd start
html#service vsftpd start
用客戶端訪問ftp://192.168.1.1 http://192.168.1.1