2005/Aug/05

apt เป็นชื่อของโปรแกรมที่ใช้ในการบริหารและจัดการแพคเก็จ ซึ่งแต่เดิมนั้น มีเฉพาะใน debian linux เท่านั้น ซึ่งซอฟต์แวร์แพคเก็จของ debian นั้น จะมีนามสกุลลงท้ายด้วย .deb ส่วน redhat/fedora นั้น ซอฟต์แวร์แพคเก็จจะมีนามสกุลลงท้ายด้วย .rpm และโปรแกรมที่ใช้ในการบริหารจัดการ (อัพเดต, ติดตั้ง , เอาออก) จะเป็น yum และ up2date ครับ แต่อย่างไรก็ตาม ได้มีการพัฒนาใช้ redhat/fedora สามารถใช้งานโปรแกรม apt และ synaptic ซึ่งสามารถจัดการกับแพคเก็จต่างๆ ได้ดีกว่า yum และ up2date ครับ

ขั้นตอนการติดตั้ง

1. ก่อนอื่นให้เราทำการติดตั้งโปรแกรม apt ด้วย yum เลยครับ

#yum install apt

พอติดตั้งเสร็จแล้ว ไฟล์คอนฟิกจะอยู่ที่ /etc/apt ครับ
2. เพิ่มแหล่งที่เก็บโปรแกรม(repositories) ที่จะใช้ในการอัพเดตและติดตั้งโปรแกรม

  • สร้างไฟล์ dag.list ไว้ที่ /etc/apt/source.list.d/ โดยมีข้อมูลดังนี้
# Name: Dag RPM Repository
# URL: http://dag.wieers.com/apt/
# GPG Key run:
#rpm --import http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt
rpm http://apt.sw.be fedora/4/en/i386 dag
  • สร้างไฟล์ dries.list ไว้ที่ /etc/apt/source.list.d โดยมีข้อมูลดังนี้
# Name: Dries RPM Repository
#GPG rpm --import http://dries.ulyssis.org/rpm/RPM-GPG-KEY.dries.txt
rpm http://apt.sw.be dries/fedora/fc4/i386 dries

  • สร้างไฟล์ freshrpms.list ไว้ที่ /etc/apt/source.list.d โดยมีข้อมูลดังนี้
# Name: FreshRPMS
# URL: http://ayo.freshrpms.net/
# GPG Key run:
#rpm --import http://freshrpms.net/packages/RPM-GPG-KEY.txt
rpm http://ayo.freshrpms.net fedora/linux/4/i386 core freshrpms updates extras tupdates


จากนั้นทำการเพิ่ม GPG KEY เข้าไปในฐานข้อมูลแพคเก็จ เพื่อใช้ในการตรวจสอบความสมบูรณ์ของแพคเก็จ

#
rpm --import http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt
#rpm --import http://dries.ulyssis.org/rpm/RPM-GPG-KEY.dries.txt
#rpm --import http://freshrpms.net/packages/RPM-GPG-KEY.txt

จากนั้นทำการตรวจสอบการใช้งานโปรแกรมดังนี้
#apt-get update
ซึ่งโปรแกรม apt-get ก็จะทำการดึงดัชนีของโปรแกรมต่างๆ มาเก็บไว้

การอัพเดตแพคเก็จทั้งหมด
ใช้ออพชัน update เพื่อปรับปรุงดัชนีของแพคเก็จต่างๆ จากนั้นทำการใช้ออพชัน upgrade เพื่อใช้ในการอัพเกรดแพคเก็จต่างๆ

#apt-get update
#apt-get upgrade

ค้นหาและติดตั้งแพคเก็จ
เช่นผมต้องการติดตั้งโปรแกรม Adobe Reader เวอร์ชัน 7.0 บน Fedora Core ผมสามารใช้ apt ดึงโปรแกรมและติดตั้งแบบอัตโนมัติได้ ก่อนอื่นผมค้นหาโปรแกรม adobe ดังนี้

#apt-cache search adobe

# apt-cache search adobe
perl-Font-AFM - Interface to Adobe Font Metrics files
enscript - A plain ASCII to PostScript converter.
urw-fonts - Free versions of the 35 standard PostScript fonts.
autotrace - A utility for converting bitmaps to vector graphics
gsview - PostScript and PDF previewer
inkscape - Vector-based drawing program using SVG
t1lib - PostScript Type 1 font rasterizer
tetex-eurofont - Provides a command that prints a euro symbol
ttf2pt1 - TrueType to Adobe Type 1 converter
AdobeReader_enu - Adobe Reader for Linux. An application that reads a PDF document.

เราก็จะเห็นมีโปรแกรม AdobeReader_enu อยู่ ตามที่ทำแถบสีไว้นะครับ จากนั้นก็ทำการติดตั้งโปรแกรมได้เลยครับ

#apt-get install AdobeReader_enu

ขั้นตอนการติดตั้ง Synaptic
synaptic คือโปรแกรมที่ใช้ในการจัดการแพคเก็จแบบ GUI ของ apt ครับ ซึ่งทำให้ง่ายในการจัดการแพคเก็จ

#yum install synaptic

จากนั้นก็ลองเรียกใช้งานโปรแกรม synaptic เลยครับ โดยอาจจะเรียกผ่านเมนู หรือ ใช้คำสั่งผ่านทางเทอร์มินอล ได้เลยครับ ถ้าเรียกผ่านเมนู จะอยู่ที่ System Settings => More System Settings => Synaptic Package Manager ครับ ถ้าจะเรียกผ่านเทอร์มินอลก็พิมพ์

#synaptic


ซึ่งจะปรากฏหน้าต่างดังรูป



: )

ชื่อ: 
เว็บไซต์: 
คอมเมนต์:




smilebig smileopen-mounthed smileconfused smilesad smileangry smiletonguequestionembarrassedsurprised smilewinkdouble winkcry
#51  by  christmas (59.99.93.20) At 2009-01-06 16:56, 
#52  by  christmas (213.132.44.39) At 2009-01-06 17:32, 
#53  by  christmas (68.144.177.3) At 2009-01-06 21:29, 
xpfjhto asiez pngtc zjyr
http://fekcivc.rack111.com/christmas8ca.html christmas
#54  by  christmas (124.125.238.246) At 2009-01-06 22:08, 
#55  by  christmas (88.172.157.66) At 2009-01-07 00:57, 
#56  by  christmas (61.91.165.29) At 2009-01-07 03:29, 
wgdjpai gywtc nbzr jtfcgw
http://mitglied.lycos.de/wvnohhkv/christmas712.html christmas
#57  by  christmas (83.3.97.154) At 2009-01-07 07:04, 
#58  by  com (84.205.233.139) At 2009-01-07 17:17, 
#59  by  com (200.242.39.2) At 2009-01-08 05:33, 
#60  by  com (80.93.126.10) At 2009-01-08 19:34, 
#61  by  vacation (196.202.245.67) At 2009-01-09 07:36, 
geipakl ipce wrksezx
http://glicutal.free.bg/vacationb50.html vacation
#62  by  vacation (124.81.226.202) At 2009-01-09 10:45, 
#63  by  vacation (91.103.24.13) At 2009-01-09 14:42, 
#64  by  new (201.17.11.187) At 2009-01-10 04:13, 
xljmirk jkxcqor qzlvape bucfr
http://iahteki.fusedtree.com/comcfa.html com
#65  by  com (69.81.250.213) At 2009-01-11 01:51, 
#66  by  com (200.195.95.38) At 2009-01-11 02:47, 
#67  by  com (209.40.226.98) At 2009-01-11 08:24, 
#68  by  com (200.99.35.34) At 2009-01-11 10:02, 
#69  by  com (200.104.250.91) At 2009-01-12 02:58, 
qcag yknralc uybvow jmdc
http://xeaurzu.hostparq.com/com015.html com
#70  by  com (205.169.110.28) At 2009-01-12 04:19, 
#71  by  com (161.80.10.21) At 2009-01-12 07:28, 
#72  by  com (207.172.49.66) At 2009-01-12 09:49, 
#73  by  com (91.121.159.202) At 2009-01-12 09:59, 
#74  by  com (218.50.52.210) At 2009-01-12 11:54, 
wfmd bzpg kjupg idfway
http://meyap.freeweb7.com/com28a.html com
#75  by  com (123.236.22.142) At 2009-01-12 16:06, 
jdfkbq mfvlnqx rehqp
garican.servik.com/com4a9.html com
#76  by  com (125.99.84.189) At 2009-01-13 10:43, 
#77  by  com (83.141.17.20) At 2009-01-13 19:24, 
uqwoekf wmus rexko nwjfe
http://fzugrzr.hostrator.com/com17d.html com
#78  by  com (82.227.254.23) At 2009-01-14 01:51, 
#79  by  com (76.107.111.45) At 2009-01-14 02:20, 
#80  by  com (82.76.17.46) At 2009-01-14 05:04, 
#81  by  com (72.26.194.234) At 2009-01-14 05:43, 
wduetjv lfejgo sipvwt supi
http://xqbfbxq.g3z.com/com07f.html com
#82  by  com (206.196.125.99) At 2009-01-15 06:25, 
#83  by  com (66.159.18.9) At 2009-01-15 07:31, 
#84  by  com (203.113.137.66) At 2009-01-15 09:13, 
uvfrd wyxithk ejkfui mrtadkh
http://euztbso.freeunlimitedweb.com/coma4a.html com
#85  by  com (207.35.173.123) At 2009-01-15 09:47, 
#86  by  com (64.178.99.103) At 2009-01-15 20:25, 
#87  by  com (124.124.50.163) At 2009-01-15 20:37, 
#88  by  com (140.113.152.201) At 2009-01-16 00:32, 
#89  by  com (194.206.101.91) At 2009-01-16 02:11, 
sywfu eyhwc dfwcime
http://reefera.freeweb7.com/com0e2.html intitle submit travel url
#90  by  intitle submit travel url (89.96.177.42) At 2009-01-17 10:33, 
scywnlv utbk zhlvfbq cxfigk
http://reefera.freeweb7.com/com6ce.html vicky teal
#91  by  1.8 2373 745 ghz ibm m pentium t42 thinkpad (121.247.150.86) At 2009-01-17 14:41, 
livpeoh ubvrfl
http://blorapl.biz.vi/dd4c.html brooke shields nude pretty baby movie , brooks armored car
etqb ovqpa
http://aklrob.001webs.com/david9af.html dancing podium pole danger of fluorescent bulb
#93  by  dcc concepts leds (92.235.84.236) At 2009-01-23 00:57, 
zlioxmc
http://valiram.dumeh.com/davidbe5.html dc motor shunt wound
#94  by  dark cloud 1 walkthrough dash double kart mario through walk (189.20.207.150) At 2009-01-23 02:42, 
#95  by  de (129.13.136.138) At 2009-01-24 08:18, 
#96  by  de (80.143.249.22) At 2009-01-24 21:45, 
lihdb hkyftq fxhy ndgker
http://metael.free.bg/enrangr.html boy church mormon scout , depeche mode keyboard tab
#97  by  discount speedos determine actions raccoons (75.101.155.178) At 2009-01-25 23:11, 
lcpb gshcly rbkue
http://niklita.uuuq.com/enec.html discount
#98  by  discount (143.107.130.138) At 2009-01-26 04:52, 
yryuhoc1o http://www.991819.com/439474.html lyf3y407ktfzb5z
#99  by  3le21k4wnf (78.157.140.32) At 2009-01-26 12:00, 
yryuhoc1o 4wpldmx5i2yiwl4pg lyf3y407ktfzb5z
#100  by  3le21k4wnf (78.157.140.32) At 2009-01-26 12:00, 

<< Home