关闭

用apt+synaptic 在线安装或升级Fedora core 4.0 软件包

1490人阅读 评论(0) 收藏 举报
       
 <script type="text/javascript"><!-- google_ad_client = "pub-2299987709779770"; google_ad_width = 300; google_ad_height = 250; google_ad_format = "300x250_as"; google_ad_type = "text_image"; google_ad_channel =""; google_color_border = "FFFFFF"; google_color_bg = "FFFFFF"; google_color_link = "0000FF"; google_color_url = "008000"; google_color_text = "000000"; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
apt
是轻量级的在线安装升级的软件包管理系统,synaptic 是图形化的apt软件包管理工具。能够管理Fedora core 4.0 系统及升级源的所有的软件包;是一个极为方便的软件包管理工具;两者配合,效果最佳,最适合我等一无所知的菜鸟弟兄;可能有的弟兄介绍过这个软件,我也把自己的使用经验和大家分享一下;主要是想为新手弟兄写一个一步到位的文档,最好对Linux一无所知的弟兄,也能一路OK 。对于如何使用yum进行更新请参考:《Fedora/Redhat 在线安装更新软件包,yum 篇

一、apt的安装和简单用法;

1
apt的安装;
#rpm -ivh http://ftp.freshrpms.net/pub/fedora/linux/extras/4/i386/apt-0.5.15cnc7-6.fc4.i386.rpm

2
、导入GPG签名;
#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

3、加Fedora core 4.0的源;
/etc/apt/目录中找到 sources.list,在里面加如下的两行;
rpm http://ayo.freshrpms.net fedora/linux/4/i386 core extras updates freshrpms
rpm http://rpm.livna.org/ fedora/4/i386 lvn

4.apt 简单的应用;
1]安装和配置好apt的第一步是执行 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.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
 
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.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

c)
对系统全面升级;
[root@localhost beinan]# apt-get upgrade
[root@localhost beinan]# apt-get dist-upgrade
这两个功能差不多;

d)
常用的参数选项;

[root@localhost beinan]# apt-get install -y 软件包名
比如:
[root@localhost beinan]# apt-get install -y gaim
注:如果意外中断的包下载和安装,可以用-y参数来继续下载安装,如上面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 的包,这样的包没有完全下载下来;我们也可以清理掉;也可以用继续接着下载安装,也可以清理掉;
这样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.
2]用法;简单吧;
想安装点什么就安装点什么吧;
建议:新手不要大规模的升级系统,要先安装和升级几个你想用的包;比如 xmms等;等手熟了,我们再大规模的升级和安装,但最好还是不要这样做,毕竟图形化的工具,有时会出现崩溃。所以还是小批量的比较好;
 <script type="text/javascript"><!-- google_ad_client = "pub-2299987709779770"; google_ad_width = 728; google_ad_height = 90; google_ad_format = "728x90_as"; google_ad_type = "text_image"; google_ad_channel =""; google_color_border = "FFFFFF"; google_color_bg = "FFFFFF"; google_color_link = "0000FF"; google_color_url = "008000"; google_color_text = "000000"; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
上一篇:《Fedora/Redhat 在线安装更新软件包,yum 篇
下一篇:《linux / unix 安装配置DHCP服务
<script type="text/javascript"><!-- google_ad_client = "pub-2299987709779770"; google_ad_width = 468; google_ad_height = 15; google_ad_format = "468x15_0ads_al_s"; google_ad_channel =""; google_color_border = "FFFFFF"; google_color_bg = "FFFFFF"; google_color_link = "0000FF"; google_color_url = "008000"; google_color_text = "000000"; //--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:465723次
    • 积分:5064
    • 等级:
    • 排名:第5490名
    • 原创:46篇
    • 转载:98篇
    • 译文:0篇
    • 评论:58条
    最新评论