日韩黑丝制服一区视频播放|日韩欧美人妻丝袜视频在线观看|九九影院一级蜜桃|亚洲中文在线导航|青草草视频在线观看|婷婷五月色伊人网站|日本一区二区在线|国产AV一二三四区毛片|正在播放久草视频|亚洲色图精品一区

分享

軟件包管理之用aptsynaptic在線安裝或升級Fedoracore4.0...

 sigmon 2012-03-28

作者:北南南北
來自:LinuxSir.Org

提要:apt是輕量級的在線安裝升級的軟件管理系統(tǒng),synaptic 是圖形化的apt軟件包管理工具。能夠管理Fedora core 4.0 系統(tǒng)及升級源的所有的軟件包;是一個極為方便的軟件包管理工具;兩者配合,效果最佳,最適合我等一無所知的菜鳥弟兄;

可能有的弟兄介紹過這個軟件,我也把自己的使用經(jīng)驗和大家分享一下;主要是想為新手弟兄寫一個一步到位的文檔,最好對Linux一無所知的弟兄,也能一路OK 。


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
正文
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


一、apt的安裝和簡單用法;


1、apt的安裝;

#rpm -ivh http://eshrpms.net/pub/fedora/linux/extras/4/i386/apt-0.5.15cnc7-6.fc4.i386.rpm




2、導(dǎo)入GPG簽名;

#rpm --import http://svn.rpmforge.net/svn/branches/rpms/matthias/apt/RPM-GPG-KEY.freshrpms
rpm --import http://rpm./RPM-LIVNA-GPG-KEY




3、加Fedora core 4.0的源;



在/etc/apt/目錄中找到 sources.list,在里面加如下的兩行;
rpm http://ayo. fedora/linux/4/i386 core extras updates freshrpms
rpm http://rpm./ fedora/4/i386 lvn




4.apt 簡單的應(yīng)用;


1]安裝和配置好apt的第一步是執(zhí)行 apt-get update ,目的是來從apt源中取回軟件包的列表;也就是我們上面說的那個sources.list提到的源;

[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. fedora/linux/4/i386 release [1834B]
Fetched 1834B in 8s (222B/s)
Get:1 http://ayo. fedora/linux/4/i386/core pkglist [518kB]
Get:2 http://ayo. fedora/linux/4/i386/core release [151B]
Get:3 http://ayo. fedora/linux/4/i386/extras pkglist [1262kB]
Get:4 http://ayo. fedora/linux/4/i386/extras release [155B]
Get:5 http://ayo. fedora/linux/4/i386/updates pkglist [1107kB]
Get:6 http://ayo. fedora/linux/4/i386/updates release [157B]
Get:7 http://ayo. fedora/linux/4/i386/freshrpms pkglist [65.3kB]
Get:8 http://ayo. fedora/linux/4/i386/freshrpms release [161B]
Fetched 2952kB in 59s (49.9kB/s)
Reading Package Lists... Done
Building Dependency Tree... Done




2]安裝、升級、移除軟件包的用法;

a)軟件包的安裝;

[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. 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




c)對系統(tǒng)全面升級;

[root@localhost beinan]# apt-get upgrade

[root@localhost beinan]# apt-get  dist-upgrade



這兩個功能差不多;

d)常用的參數(shù)選項;



[root@localhost beinan]# apt-get install  -y  軟件包名

比如:

[root@localhost beinan]# apt-get install  -y  gaim



注:如果意外中斷的包下載和安裝,可以用-y參數(shù)來繼續(xù)下載安裝,如上面gaim我下載到10%,可以用上面的命令接著來下載安裝或者升級;


[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下載下來的包存放在 /var/cache/apt/archives目錄中;有時我們中斷一些正在apt-get 的包,這樣的包沒有完全下載下來;我們也可以清理掉;也可以用繼續(xù)接著下載安裝,也可以清理掉;

這樣apt-get clean 就會刪除 已經(jīng)下載完成的位于/var/cache/apt/archives目錄的所有包;也會清理掉下載未完成的包位于/var/cache/apt/archives/partial/

這個功能還是比較有用的,因為apt-get 下載和安裝量極大,要定期清理;

二、synaptic的安裝和用法;

相對 apt-get的命令行操作來說,synaptic的操作還是極為簡單的;synaptic全是點鼠標(biāo)可視化操作;我等菜鳥不必知道什么原理不原理的,原理是早早晚晚都會知道,這有個時間過程;但我們得把自己想要安裝的東西得安裝上,好在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. 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.




2]用法;簡單吧;

想安裝點什么就安裝點什么吧;

建議新手不要大規(guī)模的升級系統(tǒng),要先安裝和升級幾個你想用的包;比如 xmms等;等手熟了,我們再大規(guī)模的升級和安裝,但最好還是不要這樣做,畢竟圖形化的工具,有時會出現(xiàn)崩潰。所以還是小批量的比較好;

后記:希望弟兄們修正和補充,謝謝;

    本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報。
    轉(zhuǎn)藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多