| 安裝路徑 | 含 義 |
|---|---|
| /etc/ | 配置文件安裝目錄 |
| /usr/bin/ | 可執行的命令安裝目錄 |
| /usr/lib/ | 程序所使用的函數庫保存位置 |
| /usr/share/doc/ | 基本的軟件使用手冊保存位置 |
| /usr/share/man/ | 幫助文件保存位置 |
[root@localhost ~]# rpm -ivh 包全名
注意一定是包全名。涉及到包全名的命令,一定要注意路徑,可能軟件包在光盤中,因此需提前做好設備的掛載工作。[root@localhost ~]# rpm -ivh /
/mnt/cdrom/Packages/httpd-2.2.15-15.el6.centos.1.i686.rpm
Preparing...
####################
[100%]
1:httpd
####################
[100%]
[root@localhost ~]# rpm -ivh a.rpm b.rpm c.rpm
[root@localhost ~]# service 服務名 start|stop|restart|status
各參數含義:[root@localhost ~]# service httpd start #啟動apache服務
[root@localhost ~]# netstat -tlun | grep 80
tcp 0 0 :::80:::* LISTEN

[root@localhost ~]# rpm -Uvh 包全名
-U(大寫)選項的含義是:如果該軟件沒安裝過則直接安裝;若沒安裝則升級至最新版本。[root@localhost ~]# rpm -Fvh 包全名
-F(大寫)選項的含義是:如果該軟件沒有安裝,則不會安裝,必須安裝有較低版本才能升級。軟件包卸載和拆除大樓是一樣的,本來先蓋的 2 樓,后蓋的 3 樓,那么拆樓時一定要先拆除 3 樓。
如果卸載 RPM 軟件不考慮依賴性,執行卸載命令會包依賴性錯誤,例如:[root@localhost ~]# rpm -e httpd
error: Failed dependencies:
httpd-mmn = 20051115 is needed by (installed) mod_wsgi-3.2-1.el6.i686
httpd-mmn = 20051115 is needed by (installed) php-5.3.3-3.el6_2.8.i686
httpd-mmn = 20051115 is needed by (installed) mod_ssl-1:2.2.15-15.el6.
centos.1.i686
httpd-mmn = 20051115 is needed by (installed) mod_perl-2.0.4-10.el6.i686
httpd = 2.2.15-15.el6.centos.1 is needed by (installed) httpd-manual-2.2.
15-15.el6.centos.1 .noarch
httpd is needed by (installed) webalizer-2.21_02-3.3.el6.i686
httpd is needed by (installed) mod_ssl-1:2.2.15-15.el6.centos.1.i686
httpd=0:2.2.15-15.el6.centos.1 is needed by(installed)mod_ssl-1:2.2.15-15.el6.centos.1.i686
[root@localhost ~]# rpm -e 包名
-e 選項表示卸載,也就是 erase 的首字母。新聞熱點
疑難解答