分享
 
 
 

linux自动升级软件APT使用教程

王朝system·作者佚名  2008-05-19
窄屏简体版  字體: |||超大  

APT-HOWTO_CLE

晷於 CLE 的升?系靳 我?用的是 APT 套件,呃套在 debian 上相?著名的套件,不久前巴西的 Conectiva 公司?其移植到 RPM 系靳上,而我把它移植到 CLE 上? 相信有用咿 debian 或玩咿 apt 的人,??都不?太陌生才是

由 咀中人 所建立。 最後修改?殓? 2003-06-26 16:13:48 ,已有 1 人愚看咿本文。

本文件可以在 ftp://cle.linux.org.tw/pub/CLE/APT-HOWTO_CLE.txt 取得

#!/bin/bash

## Copyright (C) 2001-2002 Chung-Yen Chang

##

## This program is free software; you can redistribute it and/or

## modify it under the terms of the GNU General Public License

## as published by the Free Software Foundation; either version 2

## of the License, or (at your option) any later version.

##

## This program is distributed in the hope that it will be useful,

## but WITHOUT ANY WARRANTY; without even the implied warranty of

## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

## GNU General Public License for more details.

##

## You should have received a copy of the GNU General Public License

## along with this program; if not, write to the Free Software

## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA

## 02111-1307, USA.

##

## Jun 26 2002

## Last modified by Chung-Yen Chang

#

# =================

# APT Server 的架韵

# =================

#

BASEDIR=/var/ftp/gaga

#

cd $BASEDIR

rm -rf SRPMS.gaga

ln -sf SRPMS SRPMS.gaga

#

cd RedHat

rm -rf RPMS.gaga

ln -sf RPMS RPMS.gaga

#

sh /usr/bin/genbasedir --topdir=/var/ftp/gaga --bloat --bz2only --progress RedHat gaga

#

# ================

# APT Clients 部份

# ================

#

晷於 CLE 的升?系靳

我?用的是 APT 套件,呃套在 debian 上相?著名的套件,不久前巴西的 Conectiva

公司?其移植到 RPM 系靳上,而我把它移植到 CLE 上?

相信有用咿 debian 或玩咿 apt 的人,??都不?太陌生才是

事?上在咿年前我就已?在??了,目前咦鞯??r?算可以接受

目前?供 RedHat 7.0 以上的系靳咄行升?

我??咿的,全新安砚一台英文版的 RedHat7 後,再以 apt ?升?,

升?完成後,就跟 CLE 1.0 是一?的了,呃?也不失?一?不邋的升?管道

目前我在升?新套件?,都已?是用 apt 在咦髁水..

** 注意 **

本套件仍在办展肓段,因此,?不保酌一定唔合每?人的??,所以,?要使用的人

可以的?,最好先?份一下您的重要儋料(而我已使用了一段?殓了,一切都很正常)

若您因?使用呃?套件而造成?失,我?不?任何?任

一、所需套件:

至 CLE 咀站下蒌以下??套件

ftp://cle.linux.org.tw/pub/CLE/i386/RedHat/RPMS/

apt-0.3.19cnc55-5.i386.rpm

apt-devel-0.3.19cnc55-5.i386.rpm

下蒌回?後,以 rpm -ivh ?其安砚起?

二、主要韵定?:

1./etc/apt/sources.list

呃是最重要的韵定?了,?蒌著 Server repository 的一些儋?,?容如下:

# Package repository URLs

#

# CLE 1.1(gaga) Mirrors

#

rpm ftp://cle.linux.org.tw/pub/CLE/i386 RedHat gaga freshrpms

rpm-src ftp://cle.linux.org.tw/pub/CLE/i386 RedHat gaga freshrpms

呃是?定的,若您知道有距滕您更近的站有提供同?的服??,可以依照您的

需求更改或是增加您要的站台

目前??有提供 apt 服?的列表可?考底下咀址:

http://cle.linux.org.tw/index.php?SCREEN=story_view&sid=&pathway=71&node=277

2.其他在 /etc/apt 目?下的一些韵定? apt.conf rpmpriorities vendors.list

使用?定的即可,若有需要?更,? man 一下或是自行?考 apt 的真明文件

三、主要指令:

主要有 apt-cache apt-cdrom apt-config apt-get 呃四?指令,一般使用者比蒉

?用到的,??就是 apt-get 指令了,其他更??的真明?自行 man 或是?考相晷

的真明文件

=======

apt-get

=======

1.apt-get update

更新套件儋?,要升?之前,最好都先?行一次本指令和 Server 端的儋?同步

一下

2.apt-get check

?查你系靳上套件的相依性??

3.apt-get dist-upgrade 和 apt-get upgrade

?行整?升??作,建阻用 apt-get dist-upgrade 比蒉好

4.apt-get install 套件名费

安砚某一?套件及其相晷的套件

如 apt-get install xcin

呃?就??您安砚好 xcin 了,呗 libtabe 也?一??您安砚好

5.apt-get remove 套件名费

移除某套件,和 rpm -e 功能一?,同????您把相晷的套件一?移除

6.apt-get source 套件名费

抓回 source rpm

例: apt-get source --compile zhcon

抓回 source rpm ??诅成 binary rpm

--compile ??就如同 rpm -ba 一般

7.apt-get clean

?除下蒌回?的?案

=========

apt-cdrom

=========

在您安砚好系靳後,可以使用 apt-cdrom ?把呃三片光碟加入 apt 的 sources.list 中

用法如下:

$ apt-cdrom add

Using CD-ROM mount point /mnt/cdrom/

Unmounting CD-ROM

Please insert a Disc in the drive and press enter

Mounting CD-ROM

Identifying.. [af0e7c988f7ae057a4a3bccc8008134d-2]

Scanning Disc for index files.. Found 1 package indexes and 0 source indexes.

Please provide a name for this Disc, such as 'MyDistro 6.0 Disk 1':

Gaga V1.1 disc1

This Disc is called:

'Gaga V1.1 disc1'

Reading Indexes... Done

Writing new source list

Source List entries for this Disc are:

rpm cdrom:[Gaga V1.1 disc1]/ RedHat gaga

Repeat this process for the rest of the CDs in your set.

$ apt-cdrom add

Using CD-ROM mount point /mnt/cdrom/

Unmounting CD-ROM

Please insert a Disc in the drive and press enter

Mounting CD-ROM

Identifying.. [de0703cd627985ce5ea8d9647abc3e4a-2]

Scanning Disc for index files.. Found 1 package indexes and 0 source indexes.

Please provide a name for this Disc, such as 'MyDistro 6.0 Disk 1':

Gaga V1.1 disc2

This Disc is called:

'Gaga V1.1 disc2'

Reading Indexes... Done

Writing new source list

Source List entries for this Disc are:

rpm cdrom:[Gaga V1.1 disc2]/ RedHat gaga

Repeat this process for the rest of the CDs in your set.

$ apt-cdrom add

Using CD-ROM mount point /mnt/cdrom/

Unmounting CD-ROM

Please insert a Disc in the drive and press enter

Mounting CD-ROM

Identifying.. [0daa110860c40f563b2179487f11fdcf-2]

Scanning Disc for index files.. Found 1 package indexes and 0 source indexes.

Please provide a name for this Disc, such as 'MyDistro 6.0 Disk 1':

Gaga V1.1 disc3

This Disc is called:

'Gaga V1.1 disc3'

Reading Indexes... Done

Writing new source list

Source List entries for this Disc are:

rpm cdrom:[Gaga V1.1 disc3]/ RedHat gaga

Repeat this process for the rest of the CDs in your set.

在加完三片光碟後,您??可以在您的 /etc/apt/sources.list 彦看到如下三行:

rpm cdrom:[Gaga V1.1 disc3]/ RedHat gaga

rpm cdrom:[Gaga V1.1 disc2]/ RedHat gaga

rpm cdrom:[Gaga V1.1 disc1]/ RedHat gaga

呃?以後就可以使用 apt-get ?安砚之前未安砚的套件了

?例如下:

若您??有呗上咀路,?修改您的 /etc/apt/sources.list

把其他各行都?除或是暂解起?,只留下底下呃三行

rpm cdrom:[Gaga V1.1 disc3]/ RedHat gaga

rpm cdrom:[Gaga V1.1 disc2]/ RedHat gaga

rpm cdrom:[Gaga V1.1 disc1]/ RedHat gaga

$ apt-get update

Ign cdrom://Gaga V1.1 disc3 RedHat release.gaga

Ign cdrom://Gaga V1.1 disc2 RedHat release.gaga

Ign cdrom://Gaga V1.1 disc1 RedHat release.gaga

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有