可能有的弟兄介紹過這個軟件,我也把自己的使用經驗和大家分享一下;主要是想為新手弟兄寫一個一步到位的文檔,最好對Linux一無所知的弟兄,也能一路OK 。
一、apt的安裝和簡單用法;
1、apt的安裝;
#rpm -ivh http://ftp.freshrpms.net/pub/fedora/linux/extras/4/i386/apt-0.5.15cnc7-6.fc4.i386.rpm
#rpm --import http://svn.rpmforge.net/svn/branches/rpms/matthias/apt/RPM-GPG-KEY.freshrpms
rpm --import http://rpm.livna.org/RPM-LIVNA-GPG-KEY
rpm http://ayo.freshrpms.net fedora/linux/4/i386 core extras updates freshrpms
rpm http://rpm.livna.org/ fedora/4/i386 lvn
[root@localhost beinan]# apt-get update
You don't seem to have one or more of the needed GPG keys in your RPM database.
Importing them now...
Get:1 http://ayo.freshrpms.net fedora/linux/4/i386 release [1834B]
Fetched 1834B in 8s (222B/s)
Get:1 http://ayo.freshrpms.net fedora/linux/4/i386/core pkglist [518kB]
Get:2 http://ayo.freshrpms.net fedora/linux/4/i386/core release [151B]
Get:3 http://ayo.freshrpms.net fedora/linux/4/i386/extras pkglist [1262kB]
Get:4 http://ayo.freshrpms.net fedora/linux/4/i386/extras release [155B]
Get:5 http://ayo.freshrpms.net fedora/linux/4/i386/updates pkglist [1107kB]
Get:6 http://ayo.freshrpms.net fedora/linux/4/i386/updates release [157B]
Get:7 http://ayo.freshrpms.net fedora/linux/4/i386/freshrpms pkglist [65.3kB]
Get:8 http://ayo.freshrpms.net fedora/linux/4/i386/freshrpms release [161B]
Fetched 2952kB in 59s (49.9kB/s)
Reading Package Lists... Done
Building Dependency Tree... Done
[root@localhost beinan]# apt-get install 軟件包名稱
注:不要加版本號,軟件名就好;
比如我們想安裝或者升級firefox ,就可以直接用 apt-get install firefox ;
[root@localhost beinan]# apt-get install firefox
Reading Package Lists... Done
Building Dependency Tree... Done
The following packages will be upgraded
firefox (1.0.4-4 => 1.0.6-1.1.fc4)
1 upgraded, 0 newly installed, 0 removed and 234 not upgraded.
Need to get 19.2MB of archives.
After unpacking 17.0kB of additional disk space will be used.
Get:1 http://ayo.freshrpms.net fedora/linux/4/i386/updates firefox 0:1.0.6-1.1.fc4 [19.2MB]
Fetched 19.2MB in 6m25s (49.8kB/s)
Checking GPG signatures... ########################################### [100%]
Committing changes...
Preparing... ########################################### [100%]
1:firefox ########################################### [100%]
Done.
b)移除軟件包;
[root@localhost beinan]# apt-get remove 軟件包名
舉例:
[root@localhost beinan]# apt-get remove firefox
[root@localhost beinan]# apt-get upgrade
[root@localhost beinan]# apt-get dist-upgrade
[root@localhost beinan]# apt-get install -y 軟件包名
比如:
[root@localhost beinan]# apt-get install -y gaim
[root@localhost beinan]# apt-get install -d 軟件包名
比如:
[root@localhost beinan]# apt-get install -d
注:只是下載軟件包,不解包,也不安裝,下載到本地機的目錄為 /var/cache/apt/archives
3]清理apt-get 後下載下來的包和未完成的包;
[root@localhost beinan]# apt-get clean
這樣apt-get clean 就會刪除 已經下載完成的位於/var/cache/apt/archives目錄的所有包;也會清理掉下載未完成的包位於/var/cache/apt/archives/partial/
這個功能還是比較有用的,因為apt-get 下載和安裝量極大,要定期清理;
二、synaptic的安裝和用法;
相對 apt-get的命令行操作來說,synaptic的操作還是極為簡單的;synaptic全是點鼠標可視化操作;我等菜鳥不必知道什麼原理不原理的,原理是早早晚晚都會知道,這有個時間的過程;但我們得把自己想要安裝的東西得安裝上,好在LinuxSir.Org 灌水啊,哈哈;
1]安裝:
[root@localhost beinan]# apt-get install synaptic
Reading Package Lists... Done
Building Dependency Tree... Done
The following NEW packages will be installed:
synaptic (0.57.2-1.fc4)
0 upgraded, 1 newly installed, 0 removed and 234 not upgraded.
Need to get 1682kB of archives.
After unpacking 4311kB of additional disk space will be used.
Get:1 http://ayo.freshrpms.net fedora/linux/4/i386/extras synaptic 0.57.2-1.fc4 [1682kB]
Fetched 1682kB in 46s (36.2kB/s)
Checking GPG signatures... ########################################### [100%]
Committing changes...
Preparing... ########################################### [100%]
1:synaptic ########################################### [100%]
Done.
想安裝點什麼就安裝點什麼吧;
建議:新手不要大規模的升級系統,要先安裝和升級幾個你想用的包;比如 xmms等;等手熟了,我們再大規模的升級和安裝,但最好還是不要這樣做,畢竟圖形化的工具,有時會出現崩潰。所以還是小批量的比較好;