You are on page 1of 98

Cclnhcnbntronglinux

LnhthngkdunglngthmcLinux
[root@unix1webhostings]#dush*
Bivitnykhngnivcchcitmivochitit,saukhicitxongsdngnhthno.u
tinbncnloginvohthng,bnloginvoviuserroot,mtkhudobntlccit.Userroot
lusercquynticao(hayquyncaonhtivimththngUnix).xdngdnglnhbncn
btcommandshellln,cinytngtnhMSDOScawindows.
[root@hautp~]#
Bnxemthngtinvusermnhangloginbnglnh:id
[root@hautp~]#id
uid=0(root)gid=0(root)groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)
context=root:system_r:unconfined_t:SystemLowSystemHigh
Ccchsuidvgidschobitquynhncabntrnhthng.0lquyncaonhtri.Bygibn
munloginviusermibnsdnglnh:useradd
[root@hautp~]#useraddquantrihethong
vylbncusermilquantrihethongtronghthng.Lnhuseraddcrtnhiuthamskhc
nhau,xemchititbndnglnhman
[quantrihethong@hautproot]$manuseradd
Lctrckhitouserquantrihethongchngtachatomtkhu,bygitomtkhuchouserny,
bnglnhpasswd.
[root@hautp~]#passwdquantrihethong
Changingpasswordforuserquantrihethong.
NewUNIXpassword:
Saunhpmtkhuvo.chuynsangusernybndnglnh:su
[root@hautp~]#suquantrihethong
bnkimtralibngcchnhlnh:id
[quantrihethong@hautproot]$id
uid=501(quantrihethong)gid=501(quantrihethong)groups=501(quantrihethong)
context=root:system_r:unconfined_t:SystemLowSystemHigh
Tiptheolcclnhcbnvithmc:Bncnbithintiangthmcnobndng:pwd

[quantrihethong@hautproot]$pwd
/root
Vyluserquantrihethongangthmc/root.Cclnhvthmctrnunixtngtnhtrn
MSDOScawindows,chcmtsimkhcbit.Lnhlsstngngvidir.
rm:xafile
rmdir:xathmc
mv:dichuynhocitnfile
cp:copyfile,thmc
cd:chuynthmc
Thchnh:
[quantrihethong@hautproot]$ls
ls:.:Permissiondenied
Vylliri,userquantrihethongkhngcquynsdnglnhls.Lctrckhitouserticha
thmshellchousernnuserskhngcquynsdnglnhny.Bygitisthmshellcho
user.Trctincnchuynvuserrootbnglnh:suroot,nshimtkhu>nhpmtkhuca
rootvo.Bndnglnh:usermodthayithngtinngidng,cphpnhsau:
SYNTAX
usermod[options][user]
Bnchabitshellnmu,nncndnglnhwhereisxemvtrcashell
[root@hautp~]#whereisbash
bash:/bin/bash/usr/share/man/man1/bash.1.gz
[root@hautp~]#usermods/bin/bashquantrihethong
Tiptheolisuvuserquantrihethong
[quantrihethong@hautproot]$ls
ls:.:Permissiondenied
aah,vnbli.Vylkhngphiri,lcnytahiusai.Khngphiuserquantrihethongkhngc
quyndngshell,vvndngclnhpwd,...Mluserquantrihethongkhngcquynivith
mc/root

ylimrtkhcbitviwindows,Unixphnquynrtchtchdatheoccquyn:
ReadWriteExecute(cGhiThcthi)
Ccquynnycthhinbngkhiu:rwxhoc421
Vvimtthmcquynscphncho:OwnerGroupothers(ngishunhmngi
khc)
xemquyncathmcroottadnglnhlsvithamsal:
[root@hautp/]#lsal...drwxrx20rootroot4096Nov2814:35root...
Nhnvodngtrntasnhncthngtinnhsau:
Ownerlroot
Grouplroot
drwxrx:quynivingidng,chducnghaylthmc,tiptheolquynca
owner:
rwx:>ownerctonquyntrnthmcny,ownerlrootnnuserrootctonquyntrnthmc
ny.
rx:>groupcquyncvchyfile,khngcquynghivothmcny.
:>otherskhngcquyngivithmcny.
quantrihethongkhngthucgrouprootnnkhngcquyng.
Nithmvcchthhinquynivithmc,nhtrncinivcchthhinccquyn.drwxr
xstngng740,khithmcquyntdonhtlrwxrwxrwx777tclbtkaicngc
yccquynvithmc.thayiquynbndnglnhCHMOD,thayiownerbn
dnglnhchown,thayigroupbndnglnhchgroup.Victquynhnngslcckquan
trngivimththng,khngchUNIX.
Hthngthmctrn*NIX,binytilyvdcthlFedora6.
Khithmcgc/bnnhlssnhnc:
[root@hautp~]#cd/
[root@hautp/]#ls
binbootdevetchomeliblost+foundmediamiscmnt
netoptprocrootsbinselinuxsrvsystmpusrvar

lccthmctrnmththngUnix.
*Thmc/bin
ylthcmccckquantrongca1hthngunix,thmcnychagnnhttccclnhca
hthng.
*Thmc/etc
Thmcnychaccccfileconfilecahthng,cngnhchathngtinvccservicecnkhi
ngkhihiuhnhchy.
ivihiuhnhLinuxthccservicechylckhingscttrongthmcinit.d.
ivihiuhnhSUNSolaristhccservicechylckhingscttrongthmcrc2.d.
Ccthmctrnsthayityhthng.
*Thmc/usr
Thmcnychafilevchngtrnhcaccusertrnhthng.
MtiuthvtrnhthngUnixlttculfile,kccigilthmccngl
file.smile_regular
*Thmc/dev
Khivothmcnynhlnhlsbnsthyrtnhiufilemuvng.
chnhlttcccthitbphncngmhiuhnhdng,trnhthngUnixttculfile,
nhtinitrn.
Vd:cngsl/dev/hda,cthc2loicngIDEvSCSI,nhbndngthngthngl
IDE,SCSIthngcdngchoccmychvdunglngthngl36GB,72GB,...
*Thmc/boot
Thmcnycha"li"cahiuhnhhaycngilkernel.Vdylkernelmycati:
TrnhiuhnhSUNnskhngphilthmc/boot,nlthmc/platform
bitthngtinvkernelbndnglnh:unamean
[root@hautp/]#unamean
Linuxhautp2.6.171.2157_FC5#1TueJul1122:55:46EDT2006i686i686i386GNU/Linux

*Thmcrootthmccauserroot
Khibndngmtuserkhctruynhpvothmcny,bnskhngcquyngvithmcny,
gingnhuserquantrihethongphntrc.
ychnhl"Usershomedirectory"thmcringcauser.TrnhthnhUnixkhimtusermito
ranstokmtheo1thmcchouser.Thngthngccthmcnysnmtrongthmc
/home.Nhntinytinilunvthmc/home.
Thmc/homelthmcchaccthmccangidng:
*Thmc/sbin
Thmcnylmtthmcgiihnquynhn,nchaccchngtrnhkiunhthmc/bin.
Nhngbnkhngthlmgnnc.ChnhngusercquynrootmicthShutdowncc
chngtrnhy.
*Thmc/tmp
Thmcnyngnhtncan,nchaccfiletmdohthngsinhra.Vchiaschobtk
chngtrnhnonnthmcnyctquynhnrtthoimi:
drwxrwxrwt11rootroot4096Nov2904:05tmp
Chcnngcancnggingnhthmctempcawindows.
*Thmc/var
Thmcnychaccfilecththayikchthc(variablesize),nnthngthngtrongth
mcnyschaccdatabasenh:mysql,..haymailserver,...
*Thmc/lib
Liblvitttcalibrary.Thmc/libchaccfilethvinchngtrnh.Mimtchngtrnhs
cthvinringcamnh.
*Ccthmckhc:
/mnt
/cdrom
/floppy
Banuttcccthmcnyurng.KhibncmUSBvonsnmtrong/mnthocbncn
mountnvotrong/mnt(cinynisauhappy).KhichoaCDROMvothdliusctng

mountvothmc/cdrom.Tngtivifloppy.
Phnnynivcch:ttmynhthno?khingnhthno?
*Lnh:shutdown
Sdnglnh:manshutdownxemthngtinvlnhny
SYNTAX
shutdown[options]when[message]
OPTIONS
cCancelashutdownthatisinprogress.
fRebootfast,bysuppressingthenormalcalltofsck
whenrebooting.
hHaltthesystemwhenshutdowniscomplete.
kPrintthewarningmessage,butsuppressactualshutdown.
nPerformshutdownwithoutacalltoinit.
rRebootthesystemwhenshutdowniscomplete.
tsec
Vd:
Ttngaylptc:
shutdownhnow
Khinglingaylptc:
shutdownrnow
Ttmyvolc8ti(pm):
shutdownh20:00
Sau10phtthttmy:
shutdownh+10
*Lnh:halt,reboot,poweroff
Tkernel2.74trvsauny,lnhhalt,rebootkhngcgitrctipmnctchhpvo
tronglnhshutdownnhbnthytrn.Nubndngcckernelcthvndngccclnhny.
rnhsonthovnbn.
Trnwindowscrtnhiutrnhsonthokhcnhaunhoffice,wordpad,notepad...Trn*nixcng

vy,nhngtrnhsonthoathchcllvi.
TrnhsonthonycllphbinnhtvthngdngnhttrncchthngUnixcngtngt
nhnotepadcawindows.
truynhpvitrongcasterminalbnnh:vi
[root@hautp/]#vi
Trnhsonthoshinra.NhbnFedoratiangdngthnthaythvibiVIM:
VIMsontho"thuntayhn"vihappybndngthmxembiggrin
to1filemibnnh:vi<tnfile>
[root@hautp/]#vihello
Bnnhnphm"i"kchhotchInsert,saubnnh"Helloworld!"
ghilifilebnbmphm"ESC"thotkhichInsert.Saunh":qw"lulivthot
rakhivi.
"hello"[New]1L,14Cwritten
[root@hautp/]#morehello
helloworld!
[root@hautp/]#
Chititcclnhcaviclphithchnhnhiumtchtminhc.
Thamkho:
http://www.ss64.com/bash/vi.html
http://www.eng.hawaii.edu/Tutor/vi.html
VIEditorCommands
SwitchtoTextorInsertmode:
Openlineabovecursor
O
Inserttextatbeginningofline
I
Inserttextatcursor
i
Inserttextaftercursor

a
Appendtextatlineend
A
Openlinebelowcursor
o
SwitchtoCommandmode:
Switchtocommandmode
<ESC>
CursorMovement(commandmode):
ScrollBackward1screen
<ctrl>b
ScrollUp1/2screen
<ctrl>u
Gotobeginningofline
0
Gotolinen
nG
Gotoendofline
$
ScrollDown1/2screen
<ctrl>d
Gotolinenumber##
:##
ScrollForward1screen
<ctrl>f
Gotolastline
G
Scrollbysentencef/b()
Scrollbywordf/bwbMoveleft,down,up,righthjkl
Left6chars
6h
DirectionalMovementArrowKeys
Gotoline#6
6G
Deletingtext(commandmode):
Changeword
cw

Replaceonecharacter
r
Deleteword
dw
Deletetextatcursor
x
Deleteentireline(tobuffer)
dd
Deletecurrenttoendofline
D
Delete5lines(tobuffer)
5dd
Deletelines510
:5,10d
Editing(commandmode):
Copyline
yy
Copynlines
nyy
Copylines12/pasteafter3
:1,2t3
Pasteabovecurrentline
P
Pastebelowcurrentline
p
Movelines45/pasteafter6
:4,5m6
Joinpreviousline
J
Searchbackwardforstring
?string
Searchforwardforstring
/stringFindnextstringoccurrencen
%(entirefile)s(searchandreplace)/oldtextwithnew/c(confirm)g(globalall)
:%s/oldstring/newstring/cg
Ignorecaseduringsearch
:setic
Repeatlastcommand
.
Undopreviouscommand

u
Undoallchangestoline
U
SaveandQuit(commandmode):
Savechangestobuffer
:w
Savechangesandquitvi
:wq
Savefiletonewfile
:wfile
Quitwithoutsaving
:q!
Savelinestonewfile
:10,15wfile
Shellslg?
Bncthhiunmnashelll1cchcomputergiaotipvingidnghaynicchkhclcch
computernhnlnhtngidng.ThnthngtrnLinuxdng"bash"shell.
Shelllgipngidnglmvicvimytnhddnghnvinhngculnh"thnthin"mangtnh
chtginh.
Vd:cncopyttcccfiletrongthmcAvothmcBculnhl:cp/A/*/B
*File'.bashrc'
Mimtuserkhictorasc1shellchonnhtiniphntrc,nhnghashellchouser
nmtrongfile.bashrctrongthmc/home/<tnuser>,vdyl/home/hautp
[root@hautp/]#cd/home/
[root@hautphome]#cdquantrihethong/
[root@hautpquantrihethong]#lsal
total56
drwxrxrx2quantrihethongquantrihethong4096Nov2906:00.
drwxrxrx4rootroot4096Nov2814:49..
rwrr1quantrihethongquantrihethong24Nov2814:49.bash_logout
rwrr1quantrihethongquantrihethong191Nov2814:49.bash_profile
rwrr1quantrihethongquantrihethong124Nov2814:49.bashrc
rwrr1quantrihethongquantrihethong120Nov2814:49.gtkrc
rw1quantrihethongquantrihethong35Nov2906:00.lesshst
[root@hautpquantrihethong]#more.bashrc
#.bashrc

#Sourceglobaldefinitions
if[f/etc/bashrc];then
./etc/bashrc
fi
#Userspecificaliasesandfunctions
[root@hautpquantrihethong]#more.bash_profile
#.bash_profile
#Getthealiasesandfunctions
if[f~/.bashrc];then
.~/.bashrc
fi
#Userspecificenvironmentandstartupprograms
PATH=$PATH:$HOME/bin
exportPATH
unsetUSERNAME
Trongfile.bashrccninccaliasdongidngnhngha.#Userspecificaliasesandfunctions
Aliaslg?
aliasthngthngchiulmtcitnkhc.Aliasycnggnnhth.
vdtithmdng:
aliasrm='rmi'
Thiunycnghalkhitinhlnhrmtrongterminalthlnhnyschiulrmiy
chnhlaliascarm.
Vsaolicnnalias?
trntronglnhrmcthamsi,itclinteractive(promptbeforeanyremoval)cnghalkhic
thamxaithbtcfilenobxahiuhnhshixemtacchcchnxakhng.
Nudngthamsf:force(ignorenonexistentfiles,neverprompt)thhiuhnhsxamkhng
cnhi.Khibnmunxanhanhthhydngthamsny.
Vicdngaliasnhmmcchto1"route"chongidng.cbitivinhngmytnhquan
trngnhmychchnghnvicxafilecnphihtscthntrng,nunhbndnglnhsau:rm
Rf*mkhngtoaliasnhtrnskhintonbsfiletrongthmchinticabnbinmt

ngaylptc>mtdinhcibmsmile_confused
Bncthtoaliastmthibngcchdnglnhaliashocxa1aliasbnglnhunalias:
SYNTAX
alias[p][name[=value]...]
unalias[a][name...]
Vylbnhiusquashelllg?
Cclnhcnbntronglinux(tt)

CclnhthngdngtrnhthngUnix
Ticharacclnhkmchcnng,ccthamscanthbncnxemthm.
1.Lnhman,infovapropos:thngtinvlnh
2.Lnhcd:chuynthmc
3.Lnhls:litkfilethngthnghaydnglsalhoclsl
4.Lnhfile:xemthngtinloifileca1filefile<tnfile>
5.Lnhmorevless:xemnidungfilemore<tnfile>
6.Lnhcatvtail:xemnidungfilecat<tnfile>
7.Lnhcp:lnhcopy
8.Lnhmv:lnhdichuynhocitnfile,thmc
9.Lnhmkdir:tothmcmi
10.Lnhrmvrmdir:xafilevxathmcrng
11.Lnhdir:bngvilsl
12.Lnhpwd:xemvtrthmchinthi
13.Lnhdate:xemngy
14.Lnhcal:xemlich,vdcal2006
15.Lnhexit:thotkhiterminal
Cnsauylmtslnhyuthch:
1.Lnhtouch:tofile
2.Lnhfind:tmkim(sc1bivitringvlnhny)
3.Lnhgrep:tmkimnidungfilehtrregularexpression
4.Lnhwho,whoami,whatis,whereis,which:ngnhnghacacctny
5.Lnhecho:hinthnidung1bin,...
Cclnhdnhchoquntrhthng:
1.Lnhlast:hinthccuserlogingny
2.Lnhdf:xemthngtina,thngthnghaydngdfh
3.Lnhdu:xemthngtindunglngfile,thmc
4.Lnhtop:cigingnhtaskmanagercawindows,nshinththngtinvccprocesses
5.Lnhfree:xemtnhhnhbnh
6.Lnhps:xemthngtinprocesses
7.Lnhkill:ttprocess
8.Lnhmountvunmount:
9.Lnhchmod:thayipermissionsivifile
10.Lnhchown:thayingishuivifile
11.Lnhchgrp:thayigroupivifile
12.Lnhchroot
Ngoicclnhtrncncrtnhiulnhkhc,cththamkhotiy:

http://www.ss64.com/bash/
BackupsaolugiliuviUNIX
Cclnhcndng:tar,gzip,gunzip
Vdvitar:
tarczvfMyArchiveSource_file
hoc
tarcreategzipverbosefile=MyArchiveSource_file
tarxzvfMyArchiveSource_file
hoc
tarextractgunzipverbosefile=MyArchiveSource_file
gziplmtphncatar,tuynhingzipvgunzipvndngcclp.
Vicbackupvsaolunnvitthnhccjobhthngtnglm.
VdticnbackupdliucamysqlhngtunvoChnht.
#!/bin/bash
Date=`date'+%a'`
Day=`date'+%m%d'`
if[$Date=='Sun']
then
cd/mysqldata
forixin*
do
if[d$ix]
then
tarczvf/quantrihethong/backup/database_$Day.$ix.tar$ix
fi
done
fi
onscriptbnchovo1file,vd:db_backup.sh
Sauchmod+xchofiledb_backup.shcnghalchofilenycquynchysautoschedulecho
fileny.
Cinyntngtnhscheduletaskcawindows.
toscheduletrnLinuxbndngcrontab.

[root@hautpetc]#lsl|grepcron
rwrr1rootroot329Feb112006anacrontab
drwxrxrx2rootroot4096Feb162006cron.d
drwxrxrx2rootroot4096Aug313:43cron.daily
rwrr1rootroot0Aug313:21cron.deny
drwxrxrx2rootroot4096Dec112005cron.hourly
drwxrxrx2rootroot4096Aug313:18cron.monthly
rwrr1rootroot255Dec112005crontab
drwxrxrx2rootroot4096Aug313:21cron.weekly
[root@hautpetc]#morecrontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
#runparts
01****rootrunparts/etc/cron.hourly
024***rootrunparts/etc/cron.daily
224**0rootrunparts/etc/cron.weekly
4241**rootrunparts/etc/cron.monthly
Ccjobnyscttrongccfiletrnhoctrongthmc:/var/spool/cron/crontabs
Sdngcrontablbitccjobscauserhinti.Nuchacdnglnhcrontabetojobs.
Cphp1dngtrongcrontab:
Minute(059)Hour(023)DayofMonth(131)Month(112orJanDec)DayofWeek(06orSun
Sat)Command
0212*0,6/usr/bin/find
Thamkho:CronandCrontabusageandexamples.

CitvcpnhtphnmmtrongLinux
Trnwindowsccfilecitcnhdng.exe,.msi,.vis,...viccitrtddngbngvicchycc
fileny.Trnunixcngtngtnhth.Tuynhintrongccbivitnytichdngterminal,
khngdngchgiaodin.
Vyviccittrntrnlinuxnhthno?
*RPM:RedHatPackageManager
Ccchngtrnhscui.rpm,cphpnhsau:
rpminew_program.rpm
>citchngtrnhmi(ilvitttcainstall)
rpmqprogram_name>kimtraxem1chngtrnhccihaycha?
VdviFedora5/6:
[root@hautpsysconfig]#rpmqmysql
mysql5.0.182.1
[root@hautpsysconfig]#rpmqfirefox
firefox1.5.0.19
BygicnnngcpnnFirefox2.0
Thamkho:http://fedoraproject.org/wiki/Firefox2
Chylnh:
yumyinstallfirefox
Cclnhcbnviyum:
Cit:yumyinstall<tnphnmm(gi)>
Gb:yumyremove<tnphnmm>
Xemccgici:yumlist<tnphnmm>
Vd:xemccgicicaphp:
[root@web~]#yumlistphp*
Loading"installonlyn"plugin
Settinguprepositories
core100%|=========================|1.1kB00:00

updates100%|=========================|1.2kB00:00
extras100%|=========================|1.1kB00:00
Readingrepositorymetadatainfromlocalfiles
primary.xml.gz100%|=========================|306kB00:01
##################################################1072/1072
InstalledPackages
php.i3865.1.63.1.fc6installed
phpSmarty.noarch2.6.131.fc6installed
phpbcmath.i3865.1.63.1.fc6installed
phpcli.i3865.1.63.1.fc6installed
phpcommon.i3865.1.63.1.fc6installed
phpgd.i3865.1.63.1.fc6installed
phpmbstring.i3865.1.63.1.fc6installed
Chititcclnhviyum:yumh
Khihtswapthtacnthmswapfile,vdcnthm1Gswap:
/usr/sbin/mkfile1024m/swapfile>toswapfile
/usr/sbin/swapa/swapfile>chohthngbitswapfileminmu
nvtnh:kilobytes(k),blocks(b),ormegabytes(m)
Kimtraswapfilemicthmhaycha?
swapl

Ngun:SomeexamplesofusingUNIXfindcommand.
Introduction
ThefindcommandallowstheUnixusertoprocessasetoffilesand/ordirectoriesinafilesubtree.
Youcanspecifythefollowing:
*wheretosearch(pathname)
*whattypeoffiletosearchfor(type:directories,datafiles,links)
*howtoprocessthefiles(exec:runaprocessagainstaselectedfile)
*thenameofthefile(s)(name)
*performlogicaloperationsonselections(oanda)
Searchforfilewithaspecificnameinasetoffiles(name)

find.name"rc.conf"print
Thiscommandwillsearchinthecurrentdirectoryandallsubdirectoriesforafilenamedrc.conf.
Note:Theprintoptionwillprintoutthepathofanyfilethatisfoundwiththatname.Ingeneralprint
wilprintoutthepathofanyfilethatmeetsthefindcriteria.
Howtoapplyaunixcommandtoasetoffile(exec).
find.name"rc.conf"execchmodo+r'{}'\;
Thiscommandwillsearchinthecurrentdirectoryandallsubdirectories.Allfilesnamedrc.confwill
beprocessedbythechmodo+rcommand.Theargument'{}'insertseachfoundfileintothechmod
commandline.The\;argumentindicatestheexeccommandlinehasended.
Theendresultsofthiscommandisallrc.conffileshavetheotherpermissionssettoreadaccess(ifthe
operatoristheownerofthefile).
Howtoapplyacomplexselectionoffiles(oanda).
find/usr/srcnot\(name"*,v"oname".*,v"\)'{}'\;print
Thiscommandwillsearchinthe/usr/srcdirectoryandallsubdirectories.Allfilesthatareoftheform
'*,v'and'.*,v'areexcluded.Importantargumentstonoteare:
*notmeansthenegationoftheexpressionthatfollows
*\(meansthestartofacomplexexpression.
*\)meanstheendofacomplexexpression.
*omeansalogicalorofacomplexexpression.
Inthiscasethecomplexexpressionisallfileslike'*,v'or'.*,v'
TheaboveexampleisshowshowtoselectallfilethatarenotpartoftheRCSsystem.Thisisimportant
whenyouwantgothroughasourcetreeandmodifyallthesourcefiles...but...youdon'twanttoaffect
theRCSversioncontrolfiles.
Howtosearchforastringinaselectionoffiles(execgrep...).
find.execgrep"www.ajaxviet.com"'{}'\;print
Thiscommandwillsearchinthecurrentdirectoryandallsubdirectories.Allfilesthatcontainthe
stringwillhavetheirpathprintedtostandardoutput.
Ifyouwanttojustfindeachfilethenpassitonforprocessingusetheqgrepoption.Thisfindsthe
firstoccurranceofthesearchstring.Itthensignalssuccesstofindandfindcontinuessearchingfor
morefiles.
find.execgrepq"www.ajaxviet.com"'{}'\;print

Thiscommandisveryimportantforprocessaseriesoffilesthatcontainaspecificstring.Youcanthen
processeachfileappropriately.Anexampleisfindallhtmlfileswiththestring"www.athabascau.ca".
Youcanthenprocessthefileswithasedscripttochangethoseoccurrancesof"www.athabascau.ca"
with"intra.athabascau.ca".
aliasCreateanalias
aproposSearchHelpmanualpages(mank)
awkFindandReplacetext,databasesort/validate/index
breakExitfromaloop
builtinRunashellbuiltin
bzip2Compressordecompressnamedfile(s)
calDisplayacalendar
caseConditionallyperformacommand
catDisplaythecontentsofafile
cdChangeDirectory
cfdiskPartitiontablemanipulatorforLinux
chgrpChangegroupownership
chmodChangeaccesspermissions
chownChangefileownerandgroup
chrootRunacommandwithadifferentrootdirectory
cksumPrintCRCchecksumandbytecounts
clearClearterminalscreen
cmpComparetwofiles
commComparetwosortedfileslinebyline
commandRunacommandignoringshellfunctions
continueResumethenextiterationofaloop
cpCopyoneormorefilestoanotherlocation
cronDaemontoexecutescheduledcommands
crontabScheduleacommandtorunatalatertime
csplitSplitafileintocontextdeterminedpieces
cutDivideafileintoseveralparts
dateDisplayorchangethedate&time
dcDeskCalculator
ddDataDumpConvertandcopyafile
declareDeclarevariablesandgivethemattributes
dfDisplayfreediskspace
diffDisplaythedifferencesbetweentwofiles
diff3Showdifferencesamongthreefiles
dirBrieflylistdirectorycontents
dircolorsColoursetupfor`ls'
dirnameConvertafullpathnametojustapath
dirsDisplaylistofremembereddirectories
duEstimatefilespaceusage

echoDisplaymessageonscreen
egrepSearchfile(s)forlinesthatmatchanextendedexpression
ejectEjectremovablemedia
enableEnableanddisablebuiltinshellcommands
envEnvironmentvariables
ethtoolEthernetcardsettings
evalEvaluateseveralcommands/arguments
execExecuteacommand
exitExittheshell
expandConverttabstospaces
exportSetanenvironmentvariable
exprEvaluateexpressions
falseDonothing,unsuccessfully
fdformatLowlevelformatafloppydisk
fdiskPartitiontablemanipulatorforLinux
fgrepSearchfile(s)forlinesthatmatchafixedstring
fileDeterminefiletype
findSearchforfilesthatmeetadesiredcriteria
fmtReformatparagraphtext
foldWraptexttofitaspecifiedwidth.
forExpandwords,andexecutecommands
formatFormatdisksortapes
freeDisplaymemoryusage
fsckFilesystemconsistencycheckandrepair
ftpFileTransferProtocol
functionDefineFunctionMacros
gawkFindandReplacetextwithinfile(s)
getoptsParsepositionalparameters
grepSearchfile(s)forlinesthatmatchagivenpattern
groupsPrintgroupnamesauserisin
gzipCompressordecompressnamedfile(s)
hashRememberthefullpathnameofanameargument
headOutputthefirstpartoffile(s)
historyCommandHistory
hostnamePrintorsetsystemname
idPrintuserandgroupid's
ifConditionallyperformacommand
importCaptureanXserverscreenandsavetheimagetofile
installCopyfilesandsetattributes
joinJoinlinesonacommonfield

killStopaprocessfromrunning
lessDisplayoutputonescreenatatime
letPerformarithmeticonshellvariables
lnMakelinksbetweenfiles
localCreatevariables
locateFindfiles
lognamePrintcurrentloginname
logoutExitaloginshell
lookDisplaylinesbeginningwithagivenstring
lpcLineprintercontrolprogram
lprOfflineprint
lprintPrintafile
lprintdAbortaprintjob
lprintqListtheprintqueue
lprmRemovejobsfromtheprintqueue
lsListinformationaboutfile(s)
lsofListopenfiles
makeRecompileagroupofprograms
manHelpmanual
mkdirCreatenewfolder(s)
mkfifoMakeFIFOs(namedpipes)
mkisofsCreateanhybridISO9660/JOLIET/HFSfilesystem
mknodMakeblockorcharacterspecialfiles
moreDisplayoutputonescreenatatime
mountMountafilesystem
mtoolsManipulateMSDOSfiles
mvMoveorrenamefilesordirectories
netstatNetworkinginformation
niceSetthepriorityofacommandorjob
nlNumberlinesandwritefiles
nohupRunacommandimmunetohangups
passwdModifyauserpassword
pasteMergelinesoffiles
pathchkCheckfilenameportability
pingTestanetworkconnection
popdRestorethepreviousvalueofthecurrentdirectory
prPreparefilesforprinting
printcapPrintercapabilitydatabase
printenvPrintenvironmentvariables
printfFormatandprintdata
psProcessstatus

pushdSaveandthenchangethecurrentdirectory
pwdPrintWorkingDirectory
quotaDisplaydiskusageandlimits
quotacheckScanafilesystemfordiskusage
quotactlSetdiskquotas
ramramdiskdevice
rcpCopyfilesbetweentwomachines.
readreadalinefromstandardinput
readonlyMarkvariables/functionsasreadonly
remsyncSynchronizeremotefilesviaemail
returnExitashellfunction
rmRemovefiles
rmdirRemovefolder(s)
rsyncRemotefilecopy(Synchronizefiletrees)
screenTerminalwindowmanager
scpSecurecopy(remotefilecopy)
sdiffMergetwofilesinteractively
sedStreamEditor
selectAcceptkeyboardinput
seqPrintnumericsequences
setManipulateshellvariablesandfunctions
sftpSecureFileTransferProgram
shiftShiftpositionalparameters
shoptShellOptions
shutdownShutdownorrestartlinux
sleepDelayforaspecifiedtime
sortSorttextfiles
sourceRuncommandsfromafile`.'
splitSplitafileintofixedsizepieces
sshSecureShellclient(remoteloginprogram)
straceTracesystemcallsandsignals
suSubstituteuseridentity
sumPrintachecksumforafile
symlinkMakeanewnameforafile
syncSynchronizedataondiskwithmemory
tailOutputthelastpartoffiles
tarTapeARchiver
teeRedirectoutputtomultiplefiles
testEvaluateaconditionalexpression
timeMeasureProgramrunningtime
timesUserandsystemtimes
touchChangefiletimestamps

topListprocessesrunningonthesystem
tracerouteTraceRoutetoHost
trapRunacommandwhenasignalisset(bourne)
trTranslate,squeeze,and/ordeletecharacters
trueDonothing,successfully
tsortTopologicalsort
ttyPrintfilenameofterminalonstdin
typeDescribeacommand
ulimitLimituserresources
umaskUsersfilecreationmask
umountUnmountadevice
unaliasRemoveanalias
unamePrintsysteminformation
unexpandConvertspacestotabs
uniqUniquifyfiles
unitsConvertunitsfromonescaletoanother
unsetRemovevariableorfunctionnames
unsharUnpackshellarchivescripts
untilExecutecommands(untilerror)
useraddCreatenewuseraccount
usermodModifyuseraccount
usersListuserscurrentlyloggedin
uuencodeEncodeabinaryfile
uudecodeDecodeafilecreatedbyuuencode
vVerboselylistdirectorycontents(`lslb')
vdirVerboselylistdirectorycontents(`lslb')
viTextEditor
watchExecute/displayaprogramperiodically
wcPrintbyte,word,andlinecounts
whereisReportallknowninstancesofacommand
whichLocateaprogramfileintheuser'spath.
whileExecutecommands
whoPrintallusernamescurrentlyloggedin
whoamiPrintthecurrentuseridandname(`idun')
WgetRetrievewebpagesorfilesviaHTTP,HTTPSorFTP
xargsExecuteutility,passingconstructedargumentlist(s)
yesPrintastringuntilinterrupted
.periodRuncommandsfromafile
###Comment/Remark

CcLnhVKhiTo
rlogin:dngiukhinhocthaotclnhtrnmtmykhc.

exit:thotkhihthng(BourneShell).
logout:thotkhihthngCShell.
id:chdanhcangisdng.
logname:tnngisdnglogin.
man:gip.
newgrp:chuynngisdngsangmtnhmmi.
psswd:thayipasswordcangisdng.
set:xcnhccbinmitrng.
tty:tccthngsterminal.
uname:tncahthng(host).
who:chobitnhngaiangthmnhphthng.

*LnhVTrnhBoMnHnh:
echo:hinthdngkthaybin.
setcolor:tmunnvchcamnhnh.
*LnhVDesktop:
bc:tnhbiuthcshc.
cal:mytnhcnhn.
date:hinthvtngy.
mail:ginhnthtnint.
mesg:cm/chophphinththngbotrnmnhnh(biwrite/hello).
spell:kimtralichnht.
vi:sonthovnbn.
write/hello:chophpgidngthngbonnhngngisdngtronghthng.

*LnhVThMc:
cd:ithmc.
cp:saochp2thmc.
mkdir:tothmc.
rm:loibthmc.
pwd:trnhbythmchinhnh.
*Lnhvtptin:
more:trnhbynidungtptin.
cp:saochpmthaynhiutptin.
find:tmvtrcatptin.
grep:tmvtrcachuikttrongtptin.
ls:trnhbytnvthuctnhcacctptintrongthmc.
mv:dichuyn/itnmttptin.
sort:spthtnidungtptin.
wc:msttrongtptin.
cat:hinthnidungmoattptin.
vi:sonthohocsainidungtptin.
*Lnhvqunltintrnh:
kill:hybmttintrnh.
ps:trnhbytnhtrngcacctintrnh.
sleep:ngnghotngmtthigian.
*CcLnhVPhnQuyn:
chgrp:chuynchquyntptin,thmctmtnhmsangmtnhmkhc.
chmod:thayiquynshucatptinhaythmc.
chown:thayingishutptinhaythmc.

*LnhVKimSotIn:
cancel:ngngin.
lp:intiliuramyin.

Khimmtshell,bncnntikhonkchhotvothmcch(thngthngnmtrong
/home/tn_ngi_dng).
Chrngmilnhucnhiutychnringcamnh.xemcctychnchomtlnhc
th,nginbnchcng"man<command>"(trong:manltkha;commandltnlnh).
MtimquantrngcnchltrongcchiuhnhLinux,culnhcphnbitchhoa,ch
thng.Aschiuhnhhiulkhcsovia.
vohthngfile,dng:
pwd:arangoimnhnhthmcanghotng(vd:/etc/ssh).
cd:thayithmc(vd:cd..ramtcpthmchinti;cdviduvothmc/vidu).
ls:aradanhschnidungthmc.
mkdir:tothmcmi(mkdirtn_thumuc).
touch:tofilemi(touchten_file).
rmdir:bmtthmc(rmdirten_thumuc).
cp:copyfilehocthmc(cpfile_ngunfile_ch).
mv:dichuynfilehocthmc;cngcdngtlitnfilehocthmc(mvv_tr_c
v_tr_mihocmvtn_ctn_mi).
rm:loibfile(rmtn_file).
tmkimfile,bncthdng:
find<tiuchuntmkim>:dngchocctnfile.
grep<tiuchuntmkim>:tmnidungtrongfile.
xemmtfile,bncthdng:
more<tnfile>:hinthfiletheotngtrang.

cat<tnfile>:hinthttcfile.
head<tnfile>:hinthccdngutin.
tail<tnfile>:hinthccdngcuicng(cthhuchtrongnhngtrnghpnhkhibn
munxemthngtincuicngcamtfilehthng).
chnhsafile,bnphisdngtrnhsonthotchhpsntrndnglnh.Thngthng,y
lvivcdngvicphp:vi<tnfile>.
giinnmtlutr(thngthngcuitar.gz),bnphidnglnhtarvicphptarxvf
<tn_file>.
inmtfile,dnglnhlpr<tn_file>.Chlbnphicmtsdaemonhotngqunl
myin.Thngthngylcccup(chyulUNIXPrintingSystem)cthsdngchottc
ccphnphichnh.
loibfilekhihngimyin(bncthlndanhschhngibnglnhlpq),sdng
culnhlprm<tn_file>.
lphocgbthitb(thmvohthngfilevivaitrnhmtphngtincphps
dng),dng:
mount/mnt/floppy:lpthmmm.
umount/mnt/floppy:gbmm.
mount/mnt/cdrom:lpCDROM.
mount/mnt/cdrom:gDCROM.
Ccthitbnythngccivchophpsdngmtcchtng.Nhngcthmtngy
ptrinobnliphitmnhthchincngvicnykhiclixyra.nglolng!
tomtphnvng
utin,tomtthmctrong/mnt(mkdir/mnt/_a_mi).Sausdnglnhmount
(mount/dev/source/mnt/_a_mi),trong/dev/sourcelthitb(tcphnvng)bnmun
lpthmvohthngfile.
Numunktnitimthosttxa,sdnglnhssh.Cphplssh<tn_host>.
Qunlhthng:
ps:hinthccchngtrnhhinthiangchy(rthuch:pslcinhntonbvttccc
chngtrnh).

Trongdanhscharakhithchinlnhps,bnsthycsPID(Processidentificationnhn
dngtintrnh).
Consnyschinkhimunngngmtdchvhayngdng,dnglnhkill<PID>.
top:hotngkhgingnhTaskManagertrongWindows.Narathngtinvttcti
nguynhthng,cctintrnhangchy,tcloadtrungbnhLnhtopd<delay>thitlp
khongthigianlmtilihthng.Bncthtbtkgitrno,t.1(tc10miligiy)ti
100(tc100giy)hocthmchlnhn.
uptime:thhinthigiancahthngvtcloadtrungbnhtrongkhongthigian,trc
yl5phtv15pht.
Thngthngtcloadtrungbnhctnhtontheophntrmtinguynhthng(vixl,
RAM,cngvo/ra,tcloadmng)cdngtimtthiim.Nutcctnhtonl
0.37,tcc37%tinguyncsdng.Gitrlnhnnh2.35nghalhthngphiimt
sdliu,khinstnhtonnhanhhn235%mkhnggpphivng.Nhnggiacc
phnphicthkhcnhaumtcht.
free:hinththngtintrnbnhhthng.
ifconfig<tn_giao_din>:xemthngtinchititvccgiaodinmng;thngthnggiao
dinmngethernetctnleth().BncthcitccthitlpmngnhachIPhocbng
cchdnglnhny(xemmanifconfig).Nuciugchachnhxc,bncthstophoc
start(tcngnghockhi_ng)giaodinbngcchdnglnhifconfig<tn_giao_din>
up/down.
passwd:chophpbnthayimtkhu(passwdngi_dng_s_hu_mt_khuhoctnngi
dngkhcnubnngnhphthngvivaitrroot).
useradd:chophpbnthmngidngmi(xemmanuseradd).
Dphnphino,bncngcthdngphmTABtnghonchnhmtlnhhoctnfile.
iunyrthuchkhibnquenvicclnh.Bncngcthsdngccphmln,xung
cunxemcclnhnhp.Bncthdnglnhadngtrnmtdng.Vdnh,numunto
bathmcchtrnmtdng,cphpcthl:mkdirth_mc_1;mkdirth_mc_2;mkdir
th_mc_3.
Mtiuthvkhcnalcclnhdngpipe.Bncthxutmtlnhthngqualnhkhc.V
d:manmkdir|tailsarathngtinccdngcuicngtrongtrangxem"thcng"calnh
mkdir.
Nulcnocyucuphingnhpvitikhongc(tc"siu"admincahthng),
bncthngnhptmthibngcchdnglnhsu.Thams1(su1)dngthayithmc
chvchocclnhhocangdng.Chlbncngscnhcmtmtkhu.

Mcchsdung:
DciththngLinuxphcvchomcchnoinathvndngchungmtbaci
t.Cmtstychnkhicitdl:Dnglmmycnhn(PesonalDesktop),mytrm
tronghthngmng(Workstation)haymych(Server)nu:
DnggianhthchnPesonalDesktop.
DnglmmytrmtrongccmngccbthchnWorkstation
DnglmmychchoccphngmyhayccmngthchnServer
NudunglngachophpthnnchnmcCustomvcittcccpackagesphcvcho
vichctpvtmhiuthmvhthnglinux(Cnymnhkhuynkhchccbnlmnghen)
I.Qutrnhcit:
cuhnhvtybinLinuxthkhphctp,vcrtnhiuthmbncththayic
trongLinuxm.Nhngnucittheochmcnhthlicckngin.Qutrnhcit
ginghtnhthngkuWindows,chkhcmtiuduynhtlbnkhngphinhpSerial
number(SnghnJ))Nubnlngimibtuthccinhvy.
NgoiramtbnLinuxchophpbnkhingngaytrctiptaCDlun(thmchla
mmnan)mkhngcnphicit(nubnlmtchuyngiaththoaikhiphibnna,
victoraccanhthnyqubohn)
ThngthngthtrnccacabnphnphiLinuxvctrnmngInternetuchngdn
khchititvcchcitLinux.Doytuiskhngnirvqutrnhcitnhthno
mccbnhyttmtiliuvthamkhoinh.
Vnch,conngiVitNamtrckhihcLinuxlmquenvcthckinhnghims
dngdngHHWindows98SE,Windows2000,WindowsXP.Ngidngrrlmvicvi
HDHwindowsthhkhngmunmtimitrnglmvicquenthuccamnhcngnh
nhnggtoravcuhnhdithiWindows.Nhngrtmaylkhngnhtthitphinh
mtttcnhngiu.BivtrnmtmytnhcthcngchungsnghabnhhaiHHhoc
hnthna.
Vtrongphamjvibivitny,emssdngphinbnRedHatLinux9.0
RedHadlmthiuhnhctnhlinhhotrtcao.Taisaovy?chnhldoRedHat9.0c
thngnti4.5GBacngcabntuynhinbncngcthciLinuxtrnmtchica
mm(GingnhviMSDOSngyxay).ttcphthucvocchmbncuhnhLinux(ci
cctinch)NuciLinuxnhmtHHmngthcuhnhyuculrtln,nhngngita
cngcthcinhnLinuxvoccthitbcmtay(vibnhrtnh).Tuynhinivibn
RedHad9.0cthchytrntruthcuhnhyucunhsau:
1.CPU:Pentium
ChText:200MHtrln
ChGraphic:400MHtrln
2.Dunglngacng:(Tytheongdngcncit)

Tithiu:475MB
Server:850MB
PesonalDesktop:1,7GB
Workstation:2,1GB
Ttc:5GB
3.Bnh:
ChText:64MBtrln
ChGraphic:128Mbtrln
4Cardmng:
ivimyRedserv.com.vn:01Cardmng
ivimyBlueserv.com.vn:01Cardmng
ivimyFirewall.com.vn:02cardmng
5.CDROM
TmlinubntngcitHHWindowsthvitcitLinuxRedHatcngkhngcgqu
khc.lmciubncntinhnhnhsau:
TrctinbncncmtbciLinuxRedHat9.0
TinhnhkhinghthngtbaCDROMcit(Disk1)
Chnchcit(TexthocGraphic)
Thngquatngbcwizardthitlpccthngsvhthngnh:Bnphm,chut,ngn
nghinthtrongqutrnhcit,giohthng
Chnkiucit
ThitlpphnvngciLinuxRedHat
Citbootloader
CuhnhAccount
Cclulachngiphnmmcit
CuhnhXWindown.
II.Mtviloikhuyntrckhitinhnhcit:
TrckhicitLinuxbnnnthchinmtvithaotcphngxa,vrtcthbnphnvng
lia,thayibnghikhing(BootRecord)vlmvicvicctphtinkhidngcng
nhtptincuhnh.Ccthaotcnykhngphilcnoxungemluktqutheomun.trong
trnghpxu.conPCcabncthkhngkhinglicna.Bitchthatkhitnh
hungnyvphchidliulmtcuhilon.Nhngrivotnhhungnhvyivi
ngimibturtdxyraa.
Chnhvvybcutinlbntomtammkhinghayammgipphchihthng.
Bctiptheo,bncnghilinhngdliucgitr(backup).Cuicnglphichunby
cctptincitcuhthngc(CD,amm).Mtlikhuynquantrngkhclnuxyra
cigngoimunthngnnhoangmang,bnhynnthmicchtmranguynnhn,
kimtralinhiulnthaotccamnhvhycktiliuxemmnhclmgsaithaotc

nohaykhng.
III.Chunbccphnvngtrna:
Likhuynkhitophnvng:Linuxsdngcchtruyxutathngquatptin.Mia
cgnvimttptintrongthmc/dev/.Khiuafdchomm,hdchocng,sddnh
choSCSI.Kta,b,cgnthmvoxcnhccakhcnhaucngloi.Vd:cng
thnhtlhad,cngth2lhdbxcnhccPartitiontrongangitadngccsi
km.Theoquinhpartitionchnhvmrngcgnst14.Ccpartitionlogiccgncc
gitrt5tri.
Vd:NhhnhvtrnlccPartitioncacngthnhthad:C2partitionchnhkhiul
hda1vhda2,mtpartitionmrnglhda3.Trongpartitionmrnghda3c2partitionlogicc
khiulhda6vhda5.
TrongLinuxbtbucphoctithiu2partitionsau:
Partitionchnh(Linuxnativefilesystem)chathmcgc(/)vhtnhn.lnkhang6GBnu
muncitttcccpackagescaRedHatLinux9.0v50100MBdnhchophn/boot(phn
nyphicttiPrimaryPartitioncaHDDkhingHH)
Partitionswap(Linuxswapspace)cdnglmkhnggintaoidliukhivngnhchnh
y.Khngccngthuctinhchnhthcnodnhchophnny,nhngthuangldunglng
chophnnykhanggp2ngp3lndunglngbnhvtlcahthng.Tuynhinch
nndngkhong256MBtrli,nhiuhnnalkhngcnthitvimtmytnhchdngcho
mcchmytnhcnhn.
NucngcitLinuxchungvimthiuhnhkhctrncnghthngthphick
hachtrcchovicphnhocacng,mihiuhnhphittrnmtPrimyPartitionkhc
nhau.
IV.Chngtrnhphnvnga:
Saukhihonthnhkhochphnchiabncnlachncngcakhochnythnhhin
thc.ChngtrnhcbitnnhiunhtlFdisk.Vkhngcnghnnangoichngtrnh
nynuphnchiatrng,khngchabtcdliwujno.Nhngtaangxemxttrnghp
myangcHHnomcnphnchamkhngmtthngtin.Fdiskkhngphhpvi
iu.
Cmtchngtrnhhayvkhnitingtrongvicphnvngnhanhmanton,lPartition
Magic.Thnhtchngtrnhnychophpphnchialiamkhnglmmtthngtin(ttc
nhngcitvcuhnhtrocscghili).Thhai,chngtrnhnycungcpmtgiao
dinhadsdng(ngayctrongDOS),htrdngchut,ccthaotcthayirttrngv
uchinthtrnmnhnh

HngdncitFedoraCore4vigiaodinha
Yucuvvixl
FedoraCorehotngtttrnchipcaIntelvmtshngkhcnhAMD,CyrixvVIA.Fedora
Coreyucumtvixltngng400MHzhoccaohn.
Yucuvdunglngacng
FedoraCorec3lachntrongbcit
BnServeryucu1,1GBcng
BnPersonalDestopyucu2,3GBcng
BnWorkStationyucu3,0GBcng.

NubncittcccgicaFedoraCorethnyucudunglngtithiucacngl7GB.
Yucuvbnh
VigiaodinhaFedoraCoreyucu192MB(nndngmc256MB)
VigiaodindnglnhFedoraCoreyucu64MB.
Chunbbacit
BacitFedoraCoreugm4acnhst14.Trnas1cmttinchnhm
kimtrachtlngtptintrnmia.Nnkhimuaatannsdngtinchnykimtraton
b4anhnloibccacccgitinbli.nnaybnFC4cnhnh.
FC3cgiaodinhatrongqutrnhcitnnchvimtchtkinthcvmytnhlbnc
thcitthnhcngHHny.
MtviimcnlutrongqutrnhcitFedoraCore
a,NubnchacchuynmnsuvHHthnnciFedoraCoretrnmtcngvtlclp.
b,Phighinhpasswordcaroot.
Downloadtiliu
BtuviCDCentOS4.4SingleServer

Gnytiphicitmtmychvittcccthnhphnserverthngthng(Web,mail,file
sharing).Ncnphikhchcchnvngtincy.Khngmundownloadti4GBphnmmtNet
xung(khngbitphimtbaonhiugimixong),tibtuvimtaCDSingleServerca
CentOS.
CentOS(tnvitttcaCommunityENTerpriseOperatingSystem)lmtphnphiLinuxtptrung
volpdoanhnghip,xydngtnhiungunminph(theoGPLvmtsbnquyntngt)
caRedHat.CentOS4datrnnntngRedHatEnterpriseLinux4,htrdngx86(i586vi686),
dngx86_64(AMD64vIntelEMT64),cccutrcIA64,Alpha,S390vS390x.
aSingleServerCDchuhtttcccthnhphncnthitchoqutrnhcitservercbn,
ngoitrGUI(giaodinhongidng).Nphhpchonhngaimuncitchcnngmt
cchnhanhchng.DokhngcgiaodinGUI,bncthchymtservercschviRAM128.
NhngttnhindunglngRAMsphitnglnnucntrinkhaicccsdliuln.
Cit
QutrnhcitSingleServerCDkhddng,nhtlkhibncimtphnphiLinuxkhc.Bn
cndownloadSingleServerCDtmtbnmyccb,ghinvoavkhing(boot)servert
a.
ChodSingleServerCDkhngchagiaodinGUI,qutrnhcitvnsdngmtgiaodin
ho,gipbnddngthaotcvitngphn.Lmtheocchngdntrnmnhnh,cngvictr
nnngin.
Monh:Nuservercabnkhngchabtkdliunokhcvkhnggpphivngkhi
formatlitonba,nnsdngtuchnautomaticallypartition(phnvngtng)khiqu
trnhcitnbcDiskPartitioningSetup.Nsgipbntitkimckhnhiuthigian.
BnnntmngngsdngSELinuxvttchcnngtngla,nhtlkhiserverctanton
bntrongmngccb.Bncththayiccthitlptnglasaunumunvilnhsystem
configsecuritylevel.
Bncthchncitmcnhccgiphnmmmtcchanton.Phngthccitnyscung
cpmththngCentOScbnviWeb,mailvccserverFTP,DNS,chcnngchiasfilequa
Samba.Vimyccuhnhhini,qutrnhcitchmtdi20pht.
KhngphittcccgitrnCDucci.Chnghn,numundngPostgreSQL,bnsphi
citnsauta.MuncitPostgreSQL,aavoc(mount/media/cdrom),dnglnh
yumciccthvinclientvserver:
yumlocalinstall/media/cdrom/CentOS/RPMS/postgresql7*
yumlocalinstall/media/cdrom/CentOS/RPMS/postgresqlserver7*
PHP5vMySQL5
KhnngmnhcaCentOSnmchngtincyvnnh.Ncxydngdatrnccgi

quathnghimchoktquttchkhngdatrnphnmmbleedingedge.Tuynhincngcmt
hnchlmtsphnmmminhtkhngthcitctrnphnphiny.Thiustquantrng
nht,theokincati,lPHP5vMySQL5.Nhngccphnmmnycngctchhpvo
trongCentOSPlusRepository.
Mcnh,CentOS4.4sdngPHP4.3.9.MunnngcplnPHP5,trctinphimbomybn
cktniviInternet,sauchylnh:
yumenablerepo=centosplusupgradephp*
TngtviMySQL.PhinbnmcnhtrongCentOS4.4lMySQL4.1.20.Munnngcpln
MySQL5,dngcclnhsau:
yumenablerepo=centosplusupgrademysql*
yumenablerepo=centosplusinstallmysqlserver5*
Quntrngin
DoCentOS4.4SingleServerCDkhngcgiaodinGUI,bncnthchinttccuhnhquadng
lnh.Diylmtslnhquantrngcbnvccfilegipbncuhnhserver.
khingvngngdchv,dng:
serviceXYZstart
serviceXYZstop
Trong,XYZltnserver,vdnhpostgresql.
cuhnhmng,chylnh:
netconfig
cuhnhmyin,chylnh:
systemconfigprinter
McnhcmtsdchvhthngkhngckhingtrongthigianbooththngnhWeb
server,MySQLserver.Munmbochoccdchvnycchyngaytkhikhingmy,thc
hincclnhsau:
chkconfiglevels235httpdon
chkconfiglevels235mysqlon
chkconfiglevels235smbon
chkconfiglevels235vsftpdon
NucndchvPOP3vIMAP,bncncuhnhdovecotdaemon.Mcnh,dovecotdaemonch

cungcpccdchvIMAP.MuncPOP3,bnphichnhsa/etc/dovecot.confvtvodng:
protocols=imapimapspop3pop3s
Dovecotcngkhngckhingmcnh(nhngccitnhmttrongccgitiuchun).
Mundovecotckhingkhimykhing,glnh:
chkconfiglevels235dovecoton
Saukhimithnhphnccuhnhchnhxc,bnnnkhinglihthng.Khngphibi
Linuxcnkhinglimnginchchcchnrngmithccitphhpvchy
nhmongi.
Ktlun
CentOSlphnphiLinuxmnhvngtincy.SingleServerCDlphinbngntnmc
honhochonhngaitmkimphnphinginnhngchcnngchomtservermkhng
phidownload4hoc6CDtInternetxung.

MtsbnLinuxdsdng
Linuxcrtnhiuphinbnkhcnhau,mibnphhpchonhngitngngidngkhcnhau,
vitrnhvnhucukhcnhau.Xingiithiu4bnLinuxctingldsdngvcthitk
tt,phhpvingidngthngthng.
Linuxcrtnhiuphinbnkhcnhau,mibnphhpchonhngitngngidngkhcnhau,
vitrnhvnhucukhcnhau.Xingiithiu4bnLinuxctingldsdngvcthitk
tt,phhpvingidngthngthng.
Ubuntulphinbnphbinnhthinnay.Tpcitcdunglng700MBcthtiddngqua
ktniADSL(www.ubuntu.com/getubuntu/download)v"nht"vavomtaCD.Viccitch
mtkhong30phtvrtngin.GiaodinUbuntukhpmt,ccmenuctchchpl.
CcphnmmquantrngctchhpbaogmbngdngvnphngOpenOffice,trnhduytweb
Firefox,trnhqunlvgiptinhlnmngFSpot.ngchltheomcnhUbuntukhngth
chimtsnhdngthngmicatpaphngtindokhngcphptchhphtr,do
numunchicctpnybnphicithmphnmmkhc.
Kubuntu(www.kubuntu.org/download.php)cthccoil"anhem"caUbuntu,bichngc
cngmngun.imkhcbitlUbuntusdnggiaodinGnome,cnKubuntusdnggiaodin
KDE.Mcdcnhiuimchung,nhnggiaodinvgiphnmmikmcaKubunturtkhc
bitsoviUbuntu,dophcvnhngnhucurtkhc.DosdngKDE,Kubuntuikmphnln
ccngdngKDE,ngchnhtltrnhduytwebKonquerorthaychoFirefoxphbin.Kmail,
Kopete,Konversation,KaffeinevAmaroklccngdngmcnhchoduytemail,chat,IRC,a
phngtinvchinhc.
PCLinuxOS(www.pclinuxos.com)datrnMandrakeLinux,nhngccitinrtnhiunhmph
hpvingimidngLinux,htrccpluginchotrnhduyt,cccodecchoaphngtin.
PCLinuxOSchophpcuhnhhthngrthiuquvckhophnmmrtphongph.Hnchln
nhtlPCLinuxOSthiultrnhphthnhrrng.
Vinhngngickinhnghimhnchtt,openSUSE(http://download.opensuse.org)cthlmt
lachntt.Cngcgiaodincchmcht,nhngopenSUSEcnctchhpnhngcngc
cuhnhvqunlkhklng,ckhophnmmrtln,tiliuchitit,htrnhiungnng.
Tuynhin,openSUSEcnhcimlbcitrtln(5aCDhoc1aDVDtiquamngrt
mtthigian);ccthitlpvcccngchoqunngn,cthkhinmychychm,nhtl
khikhingvmccngdng.

8imlukhisdnghiuhnhLinux

NnqunlmytnhngunmnycthcitsongsongviWindowstrnmtPC.Khimuns
dng,ngidngcnluchnbcitthchhp,phnmmtngngvkhngphichng
trnhnocngchyctrnhiuhnhny.

1.Bcit
KhibtutmhiuLinux,khngtngiphibirivcqunhiuphinbnLinuxcacct
chcphnphikhcnhau(nhn400bn).Ngidngnncccbivitsosnh,nhnxt
quytnhchnbcino.Vd,bncthdatrnmtstiuchnh:mcchuyndng(dng
chomcchchungcservervclient),smycic(x86,x86_64...),sngisdngvpht
trin,sphnmmhtrtrctip(cbcitrctipkhngcnbinsonmngun),thngtintr
gip,khnngcpnhtvmcminph.Nhngddngphinbnnothbncngcthtty
binvchyphnmmtrnccphinbnkhc.Nullnu,ttnhtbnnnchnphinbnno
ddngnht,vdnhFedoraCore.
2.Cit
BncthciphinbnSuSE,FedoraCore5hayFedoraCore6...Vcbn,giaodinhngdnci
trtthnthin,cthsosnhtngngviWindowsXP.Ccbcchnngdn,partition,
formatcthgybirimtchtvbnquenviccnhdngvcchtchcthmcca
Windows.Nhngmithuddngvtquasaumtlcmym.
Khiviccitktthc,khinglimytnhcthbnchthymtmnhnhens.ldoli
bnciLinuxkhngnhndngngphngiivtnsqutcamnhnhvphichuynsangch
khingdngtextmodechnhsalifilecuhnhbngtay.
3.Giaodinsdng
KhichntrnhqunldesktopGNOME,bnsthyLinuxkhngkhcgWindowsXPnusosnh
vgiaodinho,ccicon,menu,cas...Khnngtybingiaodinrtttvbncthtdola
chnsthanhtaskbarcngnhcckiushortcutttrnn,cchiungtrongsut...ngthi,
ngidngcthchuynqualigianhiumnhnhdesktoptrongmtphinlmvic.Tnhnng
nyrttinkhiscasmraqunhiukhinthanhtaskbarkhngcnchcha.
4.Phnmmcbn
BnLinuxFedoraCore6cccphnmmcbntngngviWindowsXPttrnhqunlfile,
cascommand,trnhduytweb,trnhqunlemail,Calendar,Project...ncctinchnhnh
Calculator,CharacterMap,Paint,Notepad,RemoteDesktop...
Trong,nibtltrnhsonthotextcbnikmlGedit,nhNotepadcaWindowsXPnhng
nhiutnhnnghnvcthtngngviNotepad++.Vtrnhduytweb,khcviWindows
XP,trongbciLinuxcrtnhiutrnhduytwebikm,thmchcctrnhduytchtext
modetinlitrongtrnghpcndebug(gli)chtextmvncnvoweb.Bncthchn

FireFoxlmtrnhduytchnhvncdngnhiuvkhanton.
Trongbciikmrtnhiuphnmmnghenhcvxemphimnhngttcukhnghtrnghe
mp3vmtsnhdngphimthnggp.FedoraCorechbaogmccphnmmmngunm,
khngcccphnmmminphnhngkhngcmngunhocbrngbucmtsiukinbn
quyn.Vitcchlngisdng,bncthtmtrnhnghenhcmp3vxemccnhdngphim
phbinlRealplayervVLC.
Vphnmmchat,trnLinuxcGain,mtchngtrnhmmchytrnnhiugiaothcphbin
hinnaynhYahoo,ICQ,MSN...vcthchatnhiunicktrncnggiaothchaytrnccgiaothc
khcnhau.Giaodinchngtrnhp,dsdng,khnhiutnhnngtindng.Nhcimca
Gainlchachophpchatvoicehaywebcam.HinYahoovSkypecngcphinbnchoLinux
nhngsoviphinbntrnWindowsthcnthiunhiuchcnng.
Vphnmmnnvgiinn,trnLinuxcngcmtchngtrnhchophpnnvgiinnccnh
dng.zip,.tar...vigiaodinhaddng.NhngtrnhgiinncaLinuxkhnggiinnc
file.rar.HincbnWinrarchoLinuxnhnglmvicchcommand,khsdngvbttin.
BncthtmhiubinnthnhmtdngnhpluginchotrnhgiinncaLinuxvcthd
dngnn/giinn/xemnidungfile.rarthngquagiaodinhavchut.
Phnmmsonthovnbn,bngtnhvtrnhchiutrnLinuxcOpenOffice,tngngvi
OfficeXPcaMicrosoftnhngchabngcOffice2003mtstnhnngnhngcngcmts
chcnngmnhnhVBScriptvJavascriptchophplptrnh.Ccfile.doc,.xsl,.pptcsonbng
Office2003vfontArialv.VNTimecthxemvchnhsattnhnggpphivnvfontch.
LinuxsdngTrueTypeFontvcsnmtsfontUnicodenhngtnfontkhcviWindowskhin
ccfilethnghimkhnghinthng.Vncgiiquytnginbngviccopyccfilefont
trnWindowsvothmcfontcaLinux.NhngOpenOfficeWriter(tngngviWord)vn
gpphilich""vifontTCVN3,ccfile.xslv.pptthkhngbliny.
PhnmmgtingVit:TrnLinuxcmtsphnmmchophpgtingVitnhxUnikeyvmt
sphnmmkhc.XUnikeykhisdnggpphirtnhiuli,clckhnggctingVit,c
lccnlmhthngkhngthinputcktno.BncthtmhiuScimm17n,chngtrnh
mmchophpgttcccngnngtrnthgii,miphngthcgcnmtfilecuhnh.Ngi
dngthngquengtingVittheokiuTELEXnhngfilecuhnhgTELEXchoScimchc
thbdungaysaunguynmvnugsaiduthkhngthglidukhcmphixaigli.
ScimcthgtttrnnhiuchngtrnhnhGedit,OpenOffice,Firefoxvbncthtmhiu
sonlifilecuhnhchophhp,chophpbdubtcucatvcthchuynsangdukhc
mkhngcnglit.
Ngoira,cmtsphnmmgilpmitrngWindowstrnLinuxchophpciccphnmm
WindowstrnLinux.VdCrossOver,mtphnmmgilpdatrnphnmmmmWine.Ngi
dngscicFlashget(trnhhtrdownloadtrnWindows)vDUMeter(trnholulng
mngtrnWindows)nhngcthkhngcicWinrar,GifMovieGear...
5.Bomt

HinticrttphnmmditviruschoLinuxvmctncngLinuxchaphbin.Nhnchung,
cLinuxvWindowsukhngthhontonchnglicctncngvbomtcngnhvirus
nhnghinticctncngnhmvoLinuxcnrtt,khngngknnngidngLinuxhunh
khngcnlolngnhiunvnbomtcngnhvirus,tracngkhng"dnh"myvirusYahoo
Messengermtcchngngn.
6.Lptrnh
NgidngcthcicmitrngJavavphnmmsonmJava(IntelliJ),serverJBoss,
TomcattrnLinuxkhngkhkhngvJ2SDKvccphnmmsonJavathngcphinbnh
trchonhiuhiuhnh.NgoiralOracle10gvimtt"mo"vMySQL.
Cnvi.NET,trnLinuxcMonoFramework,mtkhungthayth.NETFrameworkcaMicrosoft.
MctiucaMonolthihnhttccchmvlpca.NETFrameworkdoccchngtrnhvit
bngVisualStudio.NETcaMicrosoft,saukhibindchsangfile.execthchuynsangLinuxv
chythngquaMono,ccfileASP.NETcngcthchyctrnLinuxthngquaMono.Mctiu
lvynhnghintiMonochathihnhcy.NETFrameworknnmtschngtrnhvit
bngVisualStudiovnkhngthchytrnmono.Donuphilmdnlinquann.NETth
bnvnphichuynsangdngWindowsvVisualStudio2005.
7.Phncng
ClyvncnlimyucaLinux.CchngphncnglnthngcdriverchocWindows
vLinuxnnnutrongbciLinuxkhngcsndriverthcthlntrangwebcanhsnxutphn
cngdownv.NhngcchngphncngnhhnthngmichvitdriverchoWindowsvkh
cthnhndngcccthitbnytrnLinux.Vd,ngidngkhngcicwebcamva
CDikmchcdriverchoWindows.
8.Ktlun
Vinhiumcchsdng,LinuxhontoncththaythWindows.Vinhnvinvnphng,
nhngngichcnlmvicviWord,Excel,PowerPointvduytweb,chat...mkhngcnphn
mmqunlchuyndngvitchoWindowshayccthitbngoivichachtrtrnLinuxth
hontoncthchuynsangdngLinux.

10iucnbitvLinux

Hinnay,Windowsvnlhiuhnhcsdngrngri,cbitlVitNam.Tuynhin,xu
hngsdngLinuxcngangtrnnphbinmnulmt"ITPro"thchchnbncng
tngcitvsdngLinux.
1.Cutrcthmc
CutrcthmckhnggingnhtrongWindowsvcchiuhnhkhc,hthngtptintrong
Linuxlmtcyrtln(bigtree).ThmcRoot(/)lthmcgc,cctptinvccakhcch
lnhnhcaRoot.
Vd:nubnc2acngavb,mtammvmtCDROM.Hygisrngathnht
c2phnvng(partition)la1va2,ath2chcmtphnvnglb.
TrongWindows
cnga,phnvnga1(hda1):aC
cnga,phnvnga2(hda2):aD
cngb,mtphnvngb1(hdb1):aE
amm:A
aCDROM:F
Ngcli,trongLinux,miascgnkt(mount)votrongcythmc(TreeDirectory)
gingnhlmtthmcbnhthng:
hda1:/(Root)
hda2:/home
hdb1:/home/user/music
amm:/mnt/floppy
CDROM:/mnt/cdrom
2.Hthngtheomodul
TrongWindows98/2000/XPhayMacOSX...mihiuhnhucmtgiaodinhoGUI
khnggingnhau.TrongLinux,mimodultronghthnglhontonclpvinhau,vvyngi
sdngcthtrnlnvttorahiuhnhchoringmnh.
KhnggingnhhiuhnhWindowscaMicrosoft,mithnhphnuktnivphthucln
nhau.Ngcli,Linuxlicungcpkhnngccchngtrnhlmvicclpvinhau,nuchng
trnhnycgbthccchngtrnhkhcvnhotngttmkhnggynhhngg.Chnhv
khnngphnchiamodulnhvymHHLinuxcphnphibinhngngisdnghaycc
cngtylnnhRedHat,Xandros,SimplyMEPISvSuse...ucthtngthchvinhau.
TrongLinux,ccchngtrnhcngcththayilnnhau,mgiaodinhoGUIcngkhng
philngoil.MuncgiaodingingviWindowsXP?HysdngFVWMvithemeXP.
Munnhanhhn?HydngIceWM.Muncytnhnng?GNOMEhocKDEslthchhp
nht.TtcnhnggiphnmmvgiaodinGUIucnhngthunlivyuimring,nhng
chngcnguhtrngidngtngtcttvichut.

3.Htrphncng,phnmm
Phncng,phnmmvmithtrongLinuxcngmichxuthintrongvinmgny.Vithi
gianchbngmtnasoviWindows,nhngccphnmmchoLinuxmnhmhn,nnhhn,
"ngn"ttinguynhn,vchiphthrhnsovinntngWindows.
Htrphnmm
Tuynhin,iumLinuxcnphiquantmlhinnaychacnhiunhcungcpphnmmhtr
Linux.VdnumunsdngQuickBookcaIntuittrnLinux,thkhngth.Mcd,cngc
nhiudnchophpccngdngWindowscthchytrnLinux,nhCrossOverOffice(chophp
chyOfficetrnLinux)vWine(gilpmitrngWindowsvccngdngWindowscthchy
trnLinux).Nhngccphnmmnykhngthchyttvnnhnhtrongmitrngthcca
n,ngisdngcnphichikhicchngcungcpphnmmchnhthcchuynsangLinuxth
micthsdngttc.
Hinnay,cngngmngunmaradanhsch15000chngtrnhhotngtttrnLinux.Cc
phnmmnyuminph,chtlngthcthkhcnhau,nhnghuhtccchngtrnhuvit
rttuytvivcscitinngch.Nhngphnmmnycthnhpvxutcctptintcc
nhdngcanhngphnmmquenthuc.Chnghn,GNUCashcthcccnhdngca
QuickBookrttt,vOpenOffice.orgcthcttccnhdngtiliucabMicrsoftOffice...
Htrphncng
citphncngtrnccmytnhApplekhngnginnhtrnWindows,viunycng
tngtviLinux.Huhtccphncngcng,RAM,USBFlash,bomchch,cardmngvmy
nhsulmvictt,nhngmtsphncngmihockhngchtrthrtkhcit.
CctrnhiukhinlmvicviphncngcvitchoLinuxuphiccungcpminphcho
cccngngngisdngLinux,miunycchngsnxutphncngkhngmun.Do,c
thylmtimyusoviWindowsbicccngtyphncngcthlmvictrctipvi
Microsoftvtnhtngthch,vcxuhngLinuxttmcchhtrccthitbbihmun
gibnquynvcngnghcaringmnh.Mtthngtinttlccnhcungcpphncngcho
Linuxcngnhphnmmuangcchuynbintchccvnhiucngtycngangdnhtr
Linux.
Kthpgiaphncng,phnmmtrongccmytnhLinuxlnhnhiuhnh(kernel).Nhnh
iuhnh(HH)ktniphncngvphnmm,vnhngcpnhtminhtucsntrn
Internet.NuangsdngphncngmivnhnHHcchahtr,hysdngphinbnmi,
ycnglmtgiiphpsgipbnvtquakhkhn.citnhnHHmicngkhngphi
lquphctp,tuynhinsdngtrnhqunlccgicitsemlisnginhn.
4.Trnhqunlgicit
ThcracrtnhiucchcitccchngtrnhLinux,nhngcchdnhtlsdngtrnhqun
lcitPM(PackageManager).PMmbochcchnrngnhngtptinbmtuccit

livchngtrnhcthchyhontonchnhxc,ngyucu.
CchngcungcpLinuxthngsdngcckhodliutrctuynlutrccchngtrnh.Ci
tccngdngcngddng,chcntmkimccchngtrnhtrongkhodliuvnhnchutvo
Installlxong.KhngthtmIceWMhocMPlayertrongdanhschcit?Cngcnhngcch
khccitmtkhidliuchonhngchngtrnhmbnkhngtmthy,hytruycpvocc
khodliutrctuynnhSynapticchoDebian,YumchoRedHat,YaST2choSuSEvEmergecho
Gentoo.
5.Quyntruycp(Permission)
Linuxcthitkchonhiungisdng,nhngngisdngnylicchiathnhnhiu
nhm.Mingisdngucquync(Read),ghi(Write),hocthcthi(Execute)chonhngtp
tincaringh,vquynhnchuyniquyntruycp.BiLinuxcthitkchonhiungi
sdng,mingisdngucmtkhuring,vgiihnquyntruycpcangisdng
(UserPermissions).
Mtngidngthucvmtnhmhocnhiunhmkhcnhau,vmingisdngctht
quyntruycpcctptin/thmccahcquyncnhngkhngthghi,hockthpcc
R/W/X...
Ngidngquntrroot,cnggingnhAdministratortrongWindows,cquyntruycpvottc
nhngtptinvchnhngngisdngcquynhnmicphpthayinhngthitlph
thng.iunygipnhngngisdngthngthngkhngthcitnhngphnmmginip
vohthngvxonhngtptinquantrng.
6.Thmcngidng
TrongWindowscMyDocuments,nhngbnthng"qung"nhngtiliuchno?Rtnhiu
ngisdngluchngngaytrnDesktopcaWindows.Linuxcngcthlmnhvy,nhngmi
ngisdnguchomtthngidngring,thngtti/home/user.Trongthmcngi
dngbncthlucctiliutrongthmcDocuments(/home/user/documents),cclinktti
chngtrnh,mnhc(/home/user/Music),hocbtcnhnggnumun.Bncthtocctptin
hocccthmc,tchcchngtheocchmmnhthch.
7.Citmcnh
SkhcbitgiaccbnLinuxtcchngphnphinh:cctptincngcluvoccng
dnkhcnhauvccngdngcitchomibnLinuxcngkhcnhau...Nusoschcctptinh
thnggiaRedhatvSuSEcngcskhcbitrtln.Huhtngisdngukhngcnphi
bitnhiutiskhcbitny,nhngnhngnhsnxutphnmmcnphinhnbitriuny.V
vy,khinhsgip,hychongikhcbitrbnangsdngLinuxtnhcungcpno.Nu
gpkhngphinhngrcri,vkhngquantmvskhcbitgianhngcitmcnhny,bn
cyntmsdng,lcchttnhttrnh"nhcu".
8Giaodindnglnh

GiaodindnglnhtrongLinuxCLI(CommandLineInterface),cnggingnhDOScaWindows.
NhngkhnngcaCLIlimnhmvrthuchkhigiiquytnhngscmytnh.Nucntr
giptInternethochiai,bncthsdnggiaodindnglnhgipbnmkhngcnphi
npcctrnhqunlGUI.
9.ThpCtrlAltEscape
NhnthpphmCtrlAltEscape,biutngcontrchutsthayihnhdngthnhbiutngX,
hocmtbiutngno.Trongchny,chcnnhnvocaschngtrnhblihoctreo,
lptcngdngsb"git".ThpphmnycngtngtnhkhisdngTaskManagertrong
Windows.Khii,bnchcnnhnEscthotkhichny.CnggingsdngTask
ManagercaWindows,khisdngsai,rtcthnhnglinghimtrngsxyravkhingli
mylkhngthtrnhkhi.
10.Internetlngibnthn
SdngLinuxcngkhnghngin.Tuynhin,"khngbitthphihi",rtnhiucuhic
aratrnccdinn(Forum)vcchsdngLinux,vnhngcutrli,nhngmnhli...uc
snchobn.Mtachhpdnmbnhyghquanh:www.LinuxQuestions.orglmttrangWeb
lncungcpchobnmtkhodliuvgivLinux.
Lu,trckhiabtcmtcuhinolntrangWebnyhytmkimcccuhitrongtrang
Webbirtcthskhngphiilu,cutrlicsnu.Bncngnncquanhng
cuhivmtvnhocmtgiiphpkhcno,rtcthchngsgipchchovnmbn
anggpphi.
LmquenvicutrcfilecaLinux

Nhn"bni"thcutrcvcchtchcfilecaLinuxcngkhngkhcDOS/WindowsvccH
iuhnhkhclmy.Chcmtimkhcbitlnmbncnphichlcutrcthmcca
LinuxKHNGphnchiathnhcca.Chodbncbaonhiuathttcubtutmt
thmcgcctnl/.Saulivoccthmccon,miacabnsc"map"(nhx)
vomtthmcconringbit(thmcnothcntuvophinbncaLinuxvcngtubnqui
nh).
Thm3imkhcbitnhnambncnphil

TrongngdncaLinux,ccthmccphncchnhanbngkhiu/(trongkhivi
DOS/Windowslkhiu\);
VccthamscalnhtrongLinuxcbtubngdutr()(VD:lsl)trongkhivi
DOS/Windowslkhiu/(VD:dir/a);ccthamscaLinuxcthcdngkthpvinhau
(VD:lsal,lsls...)
Cuicng,LinuxkhcviWindowschLinuxphnbitchhoavchthng,trongLinuxabc
vAbclkhcnhau.
Mtsphm/thpphmbncnbit
CtrlC:bnhynhkthpphmny.Trongtrnghpbncmthy"ccigbtn"xyra,
haylchngtrnhbnchykhngchudngthbnhythnhnthpphmny.99%chng
trnhcaLinuxchytrnchtextucthc/bktthcbngthpphmny.
CtrlAltDel:tngtnhtrongDOS.Thpphmnyskhinglimytnh.
CtrlD:khimtchngtrnhyucubnnhpdliutbnphm,bncthnhnthpphnny
bochochngtrnhbitlqutrnhnhpdliuktthc.ThpphmnysgitnhiuEOF
(EndOfFile)nchngtrnh..NunhnCtrlDmkhngthy"xinh",bnthgvoEOF(bach
ciE,OvF)rinhnEnter(phmEnter).
ESC:ylphmEscgctri,phatrncabnphm,trckhinhnCtrlCktthcchng
trnh,bnhythnhnESCtrcxemsao.
ENTER:ylphmEntertrnbnphm,chcltikhiphigiithiuvchcnngcaphmny
nachnh?
MtslnhcnbncaLinux
CclnhctrnhbysauytiscgngsosnhnvimtlnhtngttrongDOSnunh
bnbitquacclnhcaDOSrithsdhiuhn.Cnnubnchatngbitquacclnhca
DOS?Cngkhngsao,bnsbitcthmcng1lccclnhcaLinuxvDOS.Ch,yl
cclnhtrongchtextvcgtbnphm.Cclnhphicgchnhxc(vLinuxphn

bitgichhoavchthng!).Vdnhinlsaukhigxongmtlnhthbnngqunnhn
EnterLinuxbtuthchinlnh!:)Luthmlnhnggtighigia2ngocnhn(<v
>)lbtbucphic,giahaingocvung(<v>)ltuchn(khngbtbuc).
LnhCngdngCchdngCphp
manyclllnhmbncnphinhk(ngbaogiqun!).LnhnytngtnhlnhHelp
trongDOS.manshinthccthngtinchititvcngdng,cchdngvcphpcamtlnh
khc(dnhinlccthngtinubngtingAnh).
Cphp:man<tn_lnh_khc>
Vd:manls
Vbnhontoncthgmanmanhinthccthngtingipvchnhlnhman!
Lu:thot(ktthc)lnhman,bnhygvokthaichm(1.gifsaugtipktq.Nu
khngthnhcng,bnhynhnphmESCvthlilnna.BncngcthnhnCtrlCthot
khiman.
lslnhnytngtnhlnhdirtrongDOS.lsslitkdanhschttcccfilevthmcnmtrong
mtthmcmbnchnh.
Cphpchung:ls
Nunhbncungcpphnth_mcthlsslitkccfiletrongthmchinti.
Vd:
ls
lsa
lsal/usr
Mtsthamscalsnhsau:
a:litkttcccfile,kcfilen,lnhngfilemtnbtubngduchm(.)
A:litkttcccfile,kcfilen,nhngkhnglitk.v..,ytncathmchintivth
mcchatrongLinux.
l:litkchititvfile(baogmccthngtinnhthigianto,kchthc,thuctnh...).
Bnhytmnhtmhiuthmvccthamskhccalsnh!(dngmanls).Vngqundngman
chocclnhtiptheo.

cdlnhnytngtnhlnhcdtrongDOS.Dngchuyntimtthmckhc.
Cphp:cd
Vd:cd/home
Nubnkhngcungcptn_th_mcthcdsabnvthmc"tm"(homedirectory)cabn.
TrongLinux,mingisdngucmthomedirectory.Nuusernamecabnlnbthanhth
homedirectorycabnsl/usr/nbthanh.Ringaccountrootschomedirectoryl/root.
pwdlnhnytngtnhlnhcd(khngcthams)trongDOS.Lnhnyshinthlnmnhnh
chobnbitlbnhinangthmcno.
Cphp:pwd
mkdirtngtnhlnhmdcaDOS.Lnhnydngtomtthmcmi.
Cphp:mkdir<tn_th_mc_mun_to>
Vd:
mkdirmydir
mkdir/tmp/mydir2
rmdirtngtnhlnhrmtrongDOS,dngxomtthmc.
Cphp:rmdir<th_mc_mun_xo>
Vd:
rmdirmydir
rmdir/tmp/mydir2
rmdir/tmp/*
Lu:bnchcthxocthmcnunhnrng,nghalnkhngchamtfilehocth
mcconnona(ngoi.v..).
cptngtnhlnhcopycaDOS,dngchpfilehocthmctninynnikhc.
Cphp:cp<file_hoc_th_mc_ngun><file_hoc_th_mc_ch>
Vd:

cp/tmp/myfile.txtmyfile.text
cp/home/*.cgi./
cpr/usr/nbthanh1/usr/nbthanh2
Mcnhthcpchchpccfile,nubnthmthamsrthcpschplunccthmc.
rmtngtnhlnhdeltrongDOS,lnhnydngxofile.
Cphp:rm<tn_file_mun_xo>
Vd:
rmmyfile.txt
rm/usr/nbthanh/nbtfile.txt
rm/tmp/*
mvtngtnhlnhmove(ngoitr)caDOS.Lnhnysdichuyn/itnfiletninynni
khc.
Cphp:mv<file_hoc_th_mc_ngun><file_hoc_th_mc_ch>
Vdvdichuyn:
mv/tmp/myfile.txt/usr/nbthanh
mvmyfolder/tmp
mv/usr/*/tmp
Vdvitn,vadichuynvaitn:
mvmyfile1.txtmyfile2.txt
mv/usr/oldfoler./newfolder
cattngtnhlnhtypecaDOS.Lnhnydnghinthnidungca1filelnmnhnh.
Cphp:cat<tn_file_cn_hin_th>
Vd:

catmyfile.txt
cat/tmp/temp.text
Vylxong,titrnhbyvibnmtslnhcnbnnhtcaLinux.Bntmnhrabitpv
thchnhnh!CthbnsthcmcltisaokhngclnhnotngtnhcopycontrongDOS?
Vngnglnhvy,trongLinux,tofilethbnphidngmtchngtrnhcth(nhmt
chngtrnhsonthovnbnchnghn)chkhngclnhtngtnhucopyconcaDOS
LmquenviLinux
Linuxlhiuhnhangidng,nghalnhiungicthtruycpvsdng1mytnhci
Linux.MingimunsdngcmytnhciLinuxthphic1accountcngk.Mt
accoutgmc1usernamev1password.Haingikhcnhausc2usernamekhcnhau(nhng
passwordthcthtrngnhau).cthbtuthaotcvsdng,ngidngphithchinthao
tcngnhp(loginvhthng).Qutrnhnytmgnlil2thaotcnhpvousernamev
password.Usernamevpasswordcngphnbitchhoavchthng.Vkhinhpvopassword,
trnmnhnhskhnghinthbtcktno.
Linuxc1accountcbitlaccountroot.yluserccpcaonht,ctonquyn"sinhst"i
vitonhthng.
MingidngtrnLinuxccpmtthmcring(gilhomedirectory),lmtthmccon
ca/usr.Cdng/usr/username;nghalnuusernamebnlnbthanhthhomedirectorycabnl
/usr/nbthanh.Ringiviaccoutrootthhomedirectoryl/root.Ccusercthcngthucmt
nhm(group)hoclkhcnhm;ccusertrongcngmtnhmthcquynhnnhnhau.Thng
thttcccuseruthucvonhmUser(trrootvccaccountdnhringchohthng).
Userchcquynthaotctronghomedirectorycamnh(vnhngthmckhccphpcah
thng)mthi.Usernykhngthtruycpvohomedirectorycauserkhc(trtrnghpc
chnhuserhocrootchophp).Mitptin(file)vthmctrnLinuxuc"ngkch
quyn",nghalthucvmtuservnhmno.Thngthtptinvthmcctobiuser
nothsthucvuser.VDusernamecabnlnbthanh,bnthucnhmuservbntora1tp
tinctnlmyfile.txtthtptinmyfile.txtscnhdul"ngishu:nbthanh;thucv
nhm:user".Nhnguserkhckhngthtruycpcmyfile.txtnukhngcphpcabn.Bn
hontoncththayi"chshu"catptin/thmcbngcclnhcaLinux.Bnhontonc
thtmyfile.txtthucvusernbthanhnhnglithucvnhmguests(mcdusernbthanhkhng
nmtrongnhmguests).
MtslnhcnbncaLinux
ylcclnhtrongchtextvcgtbnphm.Cclnhphicgchnhxc(vLinux
phnbitgichhoavchthng!).SaukhigxongmtlnhbnngqunnhnEnterLinux
btuthchinlnh!:)Luthmlnhnggtighigia2ngocnhn(<v>)lbtbuc
phic,giahaingocvung(<v>)ltuchn(khngbtbuc).Vcuicng:ngqundng
lnhmanxemthmthngtinhngdnvcclnh

LnhCngdngCchdngCphp
exit
logouttrongtextmode,Linuxcungcpchobn6desktop(tty1...tty6)lmvic.Bncthbt
chuynqualigiaccdesktopbngcchnhnthpphmAltF1...AltF6.Hailnhexitvlogout
ktthcphinlmviccadesktophintivtrvmnhnhlogin.
Cphp:
exit
logout
chownlnhnydngthayi"chshu"ca1tptinhaythmc,tclgnchotptinhoc
thmcchinhthucvquynshucamtuserno.
Cphp:
chownusername<.groupname><tn_file_hoc_th_mc>
chown.groupname<tn_file_hoc_th_mc>
Bncungcpusernamethfile/thmcsctlthucquynshucausername.Nubn
cungcpgroupnamethfile/thmcsthucvnhmgroupname.Haiphnnyclpvinhau,
thayiquynshuuserskhnglmthayiquynshugroupvngcli.
Vd:cfileguestfile.txtthucvuserabcthucvgroupguests,cmtusernbthanhthucvnhm
moderators,filemyfile.txtthucvquynshucanbthanhvthucvnhmmoderator.
__________________

CitccngdngtmnguntrnLinux

CnhiubnkhilnutinnviLinuxcmgicskhkhnvbttincaviccitccng
dngtrnLinux,cbitlccngdngphicittmngunnhxine,openGL...
TrnWindows,bnchcntingdngv,giinnriclickvofilesetuplhonttviccit,
nhngtrnLinuxlmtchuynhontonkhc.Bivitnysnhmmcchhngdnbncc
thaotccitccphnmmngdngtrnLinuxvcungcpcckinthccnbngipbncth
qunlhthngcaringmnh
Bivitsgisrngbnbitcchsdngmtsphnmmqunlginhrpm.ddngth
bivitsgiccphnmmtrnLinuxlccgi(package).Thcttngi'gi'ngnhnvcc
gitrnLinuxcthkhngphilmttrnhngdngnomchlccthvinnnnhthvin
haGtk+hocOpenGL...
1.Giithiu
BncthsthirngtisaoccphnmmtrnLinuxkhngtnggisnchochngtarikhi
xutbnchcntivvcitn.Cutrlinm2vn,vnth1lccphnmmvittrn
LinuxkhnghnchcthchytrnLinuxmcthchytrnnhuhthngkhcnhautrongh
UnixnhSolaris,AIX,HPUX...thmchccphnmmcthchytrnrtnhiuvixlkhc
nhaunhIntel,Motorola,PPC...Ccsannglnhvotnhann(portable)cangn
ngC/C++nhngihichngtaphibindchliphnmmtmngunchohthngmchng
vnhnh.Bnsthiltisaoccnhphttrinlikhngbindchsnchochngtatrnhthng
thngdngnonhLinuxchnghn.
Cutrlilbivccphnmmnylphnmmmngunmvccnhphttrinkhngccch
ghnlliphnbindchchochngta.Tuynhinbnngthtvngvcmtsnhphttrin
rtlttbngcthbindchsnchochngtaraccgicdngrpmvcngvishtrcacng
tyRedHatchngtacngcnhngchngtrnhqunlccphnmmhiuqukhngkmgtrn
WindowsnhRPM(RedhatPackageManager).Mcdlthnhngkhngphilcnoccgimi
nhttccnhphttringcucphinbnbindchsnmthnglmtkhangthigiansau
ccphinbnmiccdidngbindchsn.Bncnhcncrtnhiunhphttrin
khnghbindchsnsnphmcamnhmihingidngphibindch,inhnhltrnh
chiphimvnhcxine.Ccgibindchsnccbnctxineasltccnhphttrinkhc.Do
nubnkhngbnkhngbitcchcitccgitngunlmttrngirtlnchovichiuv
quntrhthngcaringmnh.
2.Cnbncaviccit
iuutinkhibntinhnhcitlbnphicmnguncagitrc.Hylnmngsearch
btkginobnthchnhthvinGtk+hocGnome...Saukhitiv,thngthngcdngl.gz
hoc.bz2,yul2chunnnkhcnhau,saukhigiinnbnggunzipchogzhocbunzip2cho
bz2thccgiscdngmiltar,cnglmtchunnnkhc,bncthgiinnbnglnh,tar
xvf...Thnhngddngvtitkimdunglngathchngtacthgpccculnh
thnh1nhsau:

ivigi.gz:#tarzxvftengoi.gz
ivigi.bz2:#tarjxvftengoi.bz2
SaukhigiinnxongvtmtptinINSTALLccthchophnhngdncit.Thnhng
hunhccgiutuntheoccthaotctuntsau:
#./configure
#make
#makeinstall
Chcvigicbitscringcchcitnhngkhibnnmvngnguyntcchungthdl
cchthcnobncngcthxoayxc.Chngtahyxtnculnhutin,./configure...
Thcchtconfigurelmtshellscriptskimtranhngyucucahthngcabncpng
citgilnkhng,vdnhmtsgiihibnphicsnthvinhaGtk2.4trln
hoclthvingiinnnhcMp3...
Rtnhiugicsphthucnhthchccgikhitivkhnghcsnccgitngngcn
thitchon.Khibnchyconfigurexongktquschobnbitccginocnthitcit.
Nhimvcabnkhngghnlphitmccgiphthuccilnmyrimitiptcvicci
t.NunhhthngcabnthamnyccyucucitthccMakefilesctora.
Makefilelmtfilecbitcatinchmakenhmhngdnbindchmnguncagiradng
thcthi.
Saukhibnthcthilnh'make'xongthtonbmnguncagicbindchsangdngthc
thinhngccfilethcthivncnnmtrnthmchinhnh.Dobncnphithchinthm
lnh'makeinstall'chpccfilethcthisangngvtrcantrnhthng.Nunhkhngc
thngboligxyrathbnhanttviccitgilnhthngcamnh.
3.Tchcccfiletrnhthng
BnhontonbitthmctrnLinuxththmc/usrlthmcquantrngnhtvnschacc
chngtrnhvhmthvintrn.Trongthmc/usr/binlschaccfilethcthichoccgi
bncittrnmy,ccfiletrongthmcnybnsthyccfilertquenthucnhmozilla,
gedit.v.v...Thmc/usr/libschacchmthvin,bnsthyrtnhiufilescphnmrngl
.so(sharedobject)lcchmthvinlinktnghoc.a(archive)hoc.laulcchmthvin
linkttnh.ctnhcnbnca2dngthvinnylhmthvinlinkttnhsclinkt
thngvifilesthcthiluntrongqutrnhlinkt,cnhmthvinlinktngthsclinkt
trongqutrnhthcthi,chonnsaukhichngtrnhcbindchvlinktriccthvintnh
chngtacthbinhngthvinlinktngthbtbucphiikmvichngtrnh.Th
mc/usr/shareschaccicon,manualhocinfocagi.
4.Loibmtgi
Nubnmongmunlaibmtgicittrnhthngthcchduynhtlbnphivolith
mcmnguncagivglnhmake'uninstall'...thngthngbnscccculnhsau:'make
clean''makedistclean'...Ccculnhcngharttngivcnhnghatrongtptin

Makefile,nnutinbncthvi'makeuninstall'ri'makeclean'cicuicng'makedistclean'l
gipbnxahtcctptinbindchthmcngunvngthixaMakefile,bnphichyli
./configuretoliMakefile.
5.Qunlccgi
Dovicxabmtginhtrnrtlphinphcilcbnchngthxabcnunhmtim
ngun,chonnbncththayvcinvothmcmcnhl/usrthbncthcivoccth
mccaringbn,vdnhbncthtothmc'/soft'...Saucigigeditthbntothm
thmc/soft/geditvdnglnh./configure...bnthmtychnsau:
./configureprefix=/soft/gedit
Thkhibngmakeinstallscopytonbsangthmc/soft/gedit.Khibnmunxatonbgith
chnginxaithmcthi.Lulkhibncivothmcringcamnhribnphito2
ngdncho2binmitrng(environmentvariable)LD_LIBRARY_PATHv
PKG_CONFIG_PATH.
LD_LIBRARY_PATHscngdnnthmclibcagivato(vdnh/soft/gedit/lib)cn
PKG_CONFIG_PATHscngdnnthmcpkg_configtrongthmclib(vdnh
/soft/gedit/lib/pkg_config).Bncnhnubnmunchngtrnhgitngthbncngnnthm
vobinPATHchogicamnh.
6.Likt
ivicchcitrnthbnddngqunlccgicamnhnhngiviccdngthvinthbn
nncinvothmc/usrhnlthmcringcamnhvmtsgistmccthvictrnth
mcmcnh/usrv/usr/localhnlccthmcringngidngnnnubncilnthmcring
thilcccthvinskhngctmra.Thngthnglnh./configureiivirtnhiuty
chnchophpbnlachnnhiutnhnngkhcnhau,bnhyg./configurehelpmbity
cctychncagi

SdngcclutrnnRARv7ZiptrongLinux

nhdngfilennRARv7ZipcngungctWindowsvkhngchtrtngtrongUnix
nhGzipvTARtrcy.Nhngvimtphnmmchun,bncthsdngccfilenym
khnggpphiphinphcg.
Trchtchngtalmquenvimtsimcbn.RAR,tnvitttcaRoshalArchive,lnh
dngfilenncbnquyndoEugeneRoshalphttrin.Trc,Roshalbntinchthngmi
ctnWinRARchoWindows,ngthicngcungcpminphbnclientchgiinnchomtsh
iuhnh.
7ZiplmtngdngWindows,cthitkqunlhuhtcckiufilenn.nhdngtnhin
canl7z,sdngmtnhnhthutnnhinicaLZ77.ngdngWindows7zvbphttrin
phnmmuccungcpvitnLGPL.
Haikiunhdngnytotlnntthnnhiuchocckiudliuphbinsovimtsthut
tonc.Chngcnghtrphntchcclutrlnthnhnhiubnhhnnhmdichuynvkhi
phcliddng.Skthpchainhdngkhinchngtrthnhlachnsmtchophnphi
trctuyncaccfilecclnnhnhISO7zvLinux.
7zvLinux
7Ziplngdngmngunm,nhngchdnhchokiufileWindows.VingidngLinux,cc
linktdnvigiclientcommandlinecttnp7zipcungcphaithcthi:7zv7za.Chai
ccngcphpvtuchn,chkhcch7zalngdng"tcha"chcdngcho7zvmts
nhdngUnixchyu(tar,gzip,bzip2,v.v).Cn7zdngcutrcplugin,chophphtrnhiu
nhdngnnbsungkhc.
Cphpcbn:7zfunctionoptionsten_file.7z.giinnmtlutr,dng7zxten_file.7z.Bn
cngcthgiinnfilebngcch:7zeten_file.7z.Trong,hmecthgiinnttcfilevoth
mchintianghotng,cnxduytrngdncachng.
RARvLinux
TrnghpcaRARthphctphnmtchtdoncbnquyncanhdngfile.Trnwebsite
RARLABcungcpphinbnchdnggiinncbnquynnhngminphchokhchhngLinux,
gilunrar.BnnycthitkchophnphiIntel32bittrongchaigiRPM,Slackware;nh
ccmnhphnclpchohthngIntel64bit,PowerPC;vcchthngLinuxARM.Chng
trnhunrarcaRARLABccungcpthnhphnmmminphvphnmmngunmnnbns
khngthybtkphnphiLinuxnoctchhpntronghiuhnh.Bncthdownloadmt
onmnguntarballtrnRARLAB,nhngquynhbnquynkmtheocmbndngnpht
trinbtkchngtrnhmhoRARno.
MtlachnkhclcngcdnglnhcbnquynGPLv2,dodnGna!phttrin.Gna!urar
cthitknhmtbbcquanhunrarlib,thvinmhoRARngunmdoChristianScheurer
vJohannesWinkelmann,nhngngikhngthucGna!phttrin.
ScheurervWinkelmannphttrinthvinunrarlibtmngunRARLABnguynbnbanu,
nhngvnphicnccquyndoEugeneRoshalchophptrthnhphnmmminph.Do,c

thhiuunrarlibcphttrintGPLv2vbnquynbanucaRARLAB.
HpngbnquynnycvlconngthvthchinphnmmchycuiquanhRARLAB
vtochngtrnhmhoRARtinhctmngunbanu,nhngchotinayiunyvncha
dinra.Sheurerkhngcmthythchthvitngny.Tcginirng,anhthchdngccnh
dngngunmtolutrhn."Khngphilcnobncngcthlachnckiunhdng
dliu.Vth,thttuytnuccchthcmtruycpn.Nhngbncthchncchtoramt
lutr.Nukhngmunsdngcccngcnnngunng,cnhiulachnkhcchobn".
Chngtrnhgiinnunrarcbnquynsdngcphpcbnnh7zv7za.giinn,lutr
vduytrngdnfile,gunrarxten_file_luu_tru.rar.TrongGPLunrar,bncnthmmtduni
trcx:unrarxten_file_luu_tru.rar.
Hinnay,thvinunrarlibchhtrphinbn2(version2)canhdngfileRAR.Sptiy,nh
dngRAR3mihncthschtrtrongunrarlib,nhngScheurernirng,anhkhngchcc
thhyvngmtskchhotlitRARLAB.
HtrgiaodinngidngGUI
NubnthchinchuhtmivictrnchngtrnhWindowManagercaLinux,bnthtmay
mn.CGNOMEvKDEucccchngtrnhqunllutrho.FileRollerchoGNOMEv
ArkchoKDE.Huhtmiphinbngnycachaichngtrnhudngcchplugin,htr
nhiunhdnglutrkhcnhauvdatrnp7ziphtrcho7z,datrnGna!unrarhtrcho
RAR.Mcdvy,giiquytvnkhngtngthchcaccfileRAR3mi,bnvncncit
chngtrnhunrarcbnquyntrnmycamnh.
Nhcpnphnu,c7zvRARuhtrphntchccfilelnthnhnhiuphnnh
hn.Nhngtrongchngtrnhkimtra,cFileRoolervArkunhnrarngmtthmcy
viccfilecnhslnltmyfile.7z.001,myfile.7z.002,myfile.7z.003,v.vtomtfile7z
phntchthnhcconckchthctheobite.
Do,cdliubntrong,bncnlinktccfilephntchlithnhmtfilehonchnhtrn
dnglnh,sdnglnhcat:catten_file.7z.001ten_file.7z.002ten_file.7z.003>ten_file.7z.Mtfile
honchnhgnlitccphnscto,ttnlten_file.7z.Tithiim,bncthmlu
trtrongFileRollerhocArk.Nhngsnhanhhnnug7zxten_file.7z.
MtstinchcbnchoLinuxAdmin

1.Quntrpackages
rpm
dnginstall,update,xemthngtin...ccgipackets
vd:rpmivh<package_name.rpm>:cit
rpmUvh<package_name.rpm>:cpnht
rpmqvl<package_name.rpm>:xemthngtinchitit
yum
:trnhdngcit,vcpnhtgitinquamngInternet(yucumybnphiktniInternet,v
cipacketyum,thngfedora,ginyccitheomcnh)
Trckhisdng,bnphieditfile/etc/yum.confchranimyumstmccpackage.
vd:yuminstall<package_name>
yumupdate<package_name>
yumsearch<package_name>
Thamkhothmhttp://www.fedorafaq.org/#installsoftware
Trangch:http://linux.duke.edu/projects/yum/Tips:tmkim.rpm:
http://rpmseek.com:trangtmkim
googlevikeyword:inurl:fedora"indexof"(vipackageschofedora)
installfromsourcecode
Ccchngtrnhtrn*nixthng2dng:mngun(.tar,.tar.bz,.tar.gz...)vdngnggi(
.rpmviRedhat,fedora,.debviDebian)
Trntinivcchcitviloinggi.Gitisnithmvcitquamngun.
Chunb:trckhicitbnphicmnguncachngtrnh,cthtmkimtrnInternet
Tips:http://sourceforge.net
http://freshmeat.net
googlevitkha:inurl:<package_name>"indexof"
Saugiinnvothmc(thngl/tmp).Ccbccitphbinl:
../configure(cthtybinmtsmoduletrnlnhny)
.make
.makeinstall
2.Quntrhthng
netstat

dngxemcc"ktni"tiservercamnh.Ccktninycthtrongcctrngthiestablish,
time_wait,closed_wait,fin_wait,...chititxembi"Bomtngdngphnmmmngunmca
anhmrro)
vd:netstat
netstat|grep80:xemnhngktninport80
netstat|grep80|wcl:tngsktninport80
netstatp|grep0.0.0.0:80|grepLISTENING:xempidcadchvhttpd.
uptime
:hthngchycbaoluvtitrungbnh(loadaverage)
top
:theodiccprocesstrnhthngcngviCPU,memorysdng(processnoangchy,process
noangfree);ngthixemlngCPU,memory,swapsdng,cnfree.
xemhelp,g"top",rin"h".
ps
psgipbnhinthcctintrnhhintiangchy(currentlyrunningprocess)trnhthng.N
cngtngtnh"Task_manager'bnWindows.Bncnhccprocess,pscnghinthcc"process
id"tngng,tccidnybncthstopmtprocessbtkthngqualnhkill(kill<process_id>,
chititg"mankill")
vd:psaux:hinthttcccprocesscngvithngtinchititvn
psU<username>:hinthccprocessckhingbingidngusername
/sbin/service
/sbin/servicegipbnquntrccdchvcittronghthng,vdvsftpd,httpd,snmpd,postfix,
iptables,smb...ccdchvnyclitktrong/etc/rc.d/init.d.
Cutrc(phbin):/sbin/service<service_name>start|stop|restart|status(statusxemdchv
nyangtrngthig,start,haystop)
vd:/sbin/servicehttpdstatus
/sbin/serviceiptablesstart
Note:xemthm"chkconfig"
kill
:cngcnydngkill(dit)tintrnhdavo"processid"can(processiddavonetstatp
haypsauxtrn).Killcnhiumc,mc9lmnhnht(tiskoisauvn,chititbnxem
man)
vd:kill19345

kill919345
/sbin/setup
yltinchchophpbnsetupmtsthaotcquntrquagiaodinmenurttrcquanvd
dng,baogm:thitlpachIP(subnetmask,defaultgateway,dns,...),thitlpfirewall,thitlp
ccxcthc...
ifconfig
yltoolchophpbncuhnhhayhinthcuhnhccachIPchoccinterface(giaodin
mng).HnccbnbitbnWindowsclnhipconfig,thbnLinux,chngtalicifconfig,
nhngifconfigcnlmcnhiuvichn.
vd:ifconfigchophpbngnnhiuachIPlnmtinterface.LnhsausgnthmIP
66.193.175.173vogiaotipeth0
#ifconfigeth0:166.193.175.173netmask255.255.254.0
route
Chophpbnqunlbngnhtuyn,bngnhtuynlg?Ningngnlkhiccpacketstmy
bnmunrangoi,thnphidavobngnhtuynnytmngi"utin"chomnh,
tngtnhci"ca"vy.Tuynhinsaukhirangoithnphithchinmtqutrnhnhtuyn
(routing)inch,ycnglmtvnln,kothtrnhbychitityc.
vd:route>nshinthroutingtable.
cron
Trnhnychophpbnthitlpccschedularjob(cngvictheolch),luldaemoncrondphi
cchy,bncthtmhiurthmyhttp://www.unixgeeks.org/security/ne...ix/cron1.html,
ytixinnumtvdnh:
Mcchcatilc2hsng0phtmingymysthchintngfilebackup.pltrong
/home/linet/script
#crontabe:dngeditfilecron
Thmvodngsau:
002***linet/home/linet/script/backup.pl
chmod,chown,chcon
chmod:thitlpccthuctnhread,write,executecafile,thmcivitngngidng

vd:chmod777myfile.php>chophpttcngidngcquynghi,c,thcthivifileny
chown:thitlpchshucafile,thmc
vd:chownlinet:adminmyfile.php>chshucamyfile.phpllinet(thucnhmadmin)
chcon:thayisecuritycontext,lnhnyticngchahiurlm,nnmimingichgip.
ping,traceroute
ylhailnhkhphbinvimingi,ticngxinnungngnvchng
ping:llnhgiccICMPechorequestnmykhcviccICMPechoreplygiv,nthng
cdngkimtraxemmthostcangchyhaykhng,davostnticaechoreply.
Nhiungisdngpingvingdnglpingflood,tclgiigitinrequestvikchthcrt
lntrongthigianrtnhanhchomykialunphi"trli",tiutntinguyncahthng.
traceroute:(trongWindowsc'tracert')llnhdtmngitmyhintinmych.Lnh
nyhinthraccroutermpacketsphiiquancch.
vd:pinghvaonline.net
traceroutehvaonline.net
df,du
Hinthkhnggiansdngfilesystem
vd:dfh
ls,cat,vi
ylnhnglnhcbnnhtchongidngLinux,nhngcnglnhnglnhthngdngnht,ls
tngtnhdir,catdngxemnidungfile,viltrnhsontho.
more,grep,awk
LnhtrongLinuxconsolecmttnhnngrtmnhlncthkthpnhiulnhtoraktqu.
grep:lcthngtin
vd:psaux|grephttpd>hinthcctintrnhphcvchodchvhttpd(bnhthngpsauxs
hinthttctintrnh)
more:gipchovichinthktqustdoutcphntngtrang,tinchovictheodikhiktququ
di
vd:caterror_log|more
awkhaygawk:ticbitylmtcommandrthay

mc
CcbndngbnWindowscNCthbnLinuxcMC,chcnngvcchdngcngtngtnhau.
Citchngtrnhtronglinux(filerpm)
PhnhngdnnymangtnhchtthngtinthmvccfilePRMvttctont,tychncan.
ChaikiugiRPM:
Filerpmngunviuimrng.src.rpm.
Mnhphnviuimrng:.rpm.
ChaigiucthdngcvilnhRPM.TrongbivitnychngtasnivccfileBINAR
(nhphn),cnkiufilerpmngunbncththamkhocngtheocchtngt.ivinhng
ngimibtu,nnchtiphinbncagiRPM.Nphihpvicutrccamytnhch
(i386,i586,i686,sparc;thngthngldnhchoccmyi386).Huhtccginyuct
chctrnserverFTP.Bnchcntmkimthmcbnphi.
Saukhidownloadfilev,vncitthmcudngnhkhngcnbntmlm.Thmch,
RedHatcncmtthmccbit(DIRECTORY)dnglutrccginytrckhicit.Bn
khngcnphidngnnumytnhcabnlhthngangidng.iucthgipmith
ctnhtchccaohn.
Thmcchngtaangnivcthtmthy/usr/src/redhat/RPMStrnccphnphiRedHat.By
gi,chngtascngbtutmhiuvcchcitccgiRPM.
Nubnlngimibtu,nndnglnh"rpmhelp"xemquattccctychncaRPM.
RPMcrtnhiutychn,bncthphixemti2tranghochn.tmttli,bnnndnglnh
"rpmhelp|less"hocnphmShift+PageUp/PageDowncunln,cunxungtrongkhixem.
LnhcbncitgiRPMl"rpmi".Vd:"rpmidaniel.rpm"scitgidaniel.rpm.Cng
rthuchkhibnthmvocctychnvftrongphnhinththanhtintrnh.Dngthanhtintrnh
ktthcviculnh"rpmivhdaniel.rpm".
ChngtrnhqunlgiRedHat(RedHatPackageManagerRPM)cnghtrUPDATEccfile
bnglnh:"rpmUnew_daniel.rpm".Bncththmphnmrngvftrongthanhtintrnh.Nuc
saistnotrongqutrnhupdate,trlibncbnglnh:"rpmUoldpackage".Vd:"rpmU
oldpackagedaniel.rpm".
NumunUNINSTALL(gb)mtgi,bncthdnglnh:"rpme",vd:"rpme
new_daniel.rpm".Cmtstychnthcshuchchotrnghpny.Vd"nodeps"c
dngtheocphp"rpmenodepsnew_daniel"sgbgi,nhngkhngcnkimtranuccthnh
phngikhcbphhy.BnnndngtychnSIMULATEtheUNINSTALLtrckhithcstin
hnhgb.Culnh"rpmetestnew_danie.rpm"sthhindanhschttcthnhphncnguyc

hhinuqutrnhUNINSTALLxuthinli.
Bncnhcctontny,bncthdngRPMCOMMAND(lnhRPM)chocchotngkhc
nh:
rpmqa#thhinmtdanhschccgiccittrnhthng.
rpmqlnew_daniel#thhinmtdanhschccfilenmtrongginy.
rpmqcnew_daniel#thhinccfilecuhnhcagi"daniel".
rpmqdnew_daniel#thhinccfiletrgip(HELP)cagi.
rpmqinew_daniel#thhinthngtinvgi(kchthc,ngdnurl,mttmtt)
rpmqR#thhinttccclthucgi.
CbnvCrontrnUnix/Linux

TrnUnix/LinuxbnthngnghencitnCron...
VyCronlcignh?TrchtCronlmtchngtrnh.Dostindngvcnthitcanln
cnnglnlmdeadmon.
Vyncchcnngg?ChcbnkhnglgchngtrnhSchedulingAgentchuyncdng
thchincctcvtheonhkclnkhochvthigiantrc.ThCronsthaybnthc
hintnhnngnytrongUnix/Linux.

TrnUnix/LinuxbnthngnghencitnCron...
VyCronlcignh?TrchtCronlmtchngtrnh.Dostindngvcnthitcanln
cnnglnlmdeadmon.
Vyncchcnngg?ChcbnkhnglgchngtrnhSchedulingAgentchuyncdng
thchincctcvtheonhkclnkhochvthigiantrc.ThCronsthaybnthc
hintnhnngnytrongUnix/Linux.
ThngthcronccitmcnhvchytrncchthngUnix/Linuxri.Nuhthngcabn
chaccitCronthbncthDowloadnt:http://www.freshmeat.net/Vcnchokhing
nnhmtdeadmontrnhthngcabnbnglnh:
root@localhost#:crondstart
BygichngtacngbttaycuhnhchoCron.sdngCronbnphi,bncnmtfilecuhnh
dngtext,cngilfile"lch"(lnlchchycaccchngtrnh).Ngoirabnsphidngthm
chngtrnhcrontab(csaukhicicron)ngkfilelchvihthng,xemthngtinvfilelch
causer...
Bncthttnchofilelchljobs.txthocschedule.txthaytngcngc,minnlfile
text.Cutrccafilelchnhsau:
*Filelchgmc2phn,phnulphncuhnh,cdngTN_BIN=GITR
*Phnthhaillchtrnhchycaccchngtrnh
*Ccchthchbtubngkt#
(bnxemthmthngtinqualnhmancrontab)
Phncuhnhcafilelch(cth)nhsau:
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=abc
HOME=/#runparts
Dngutinchobitlbndngshellbashchyccchngtrnh,dngth2thitlpngdn
choccchngtrnh(tuchn),dngth3biuthrngoutputcaccchngtrnhscgiti
emailchouserabc(tuchn,mcnhsgiemailtichouserchshucafilelch,nubn
khngmungiemailthbntMAILTO=""),dngth4sbochocronbitrngphicdvth
mcgctrckhithihnhlnh.

Phnlchtrnhchyccchngtrnhcdngnhsau:
phtgingythngthchng_trnh_cn_chy
Phtcgitrt0n59hocl*
Gicgitrt0n23hoc*
Ngycgitr1n31hoc*
Thngcgitrt1n12hoc*
Thcgitr0(Chnht),1(thhai)...6(th7)hoc*
Vdbnmunchychngtrnhabcvolc2g1'sngngy12thng5(btkth)thlchchynh
sau:
12125*abc
(*biutheverything,tclbtkthno)
Nubnmunchy1filetndeftrongthmc/binvo15gchiuvochnht(btkngythng)
thlchchynhsau:
015**0/bin/def
vnubnmunchy1chngtrnhtnxyzvomigitrongngy(btuphtth8cagi)
th:
8****xyz
cnnubnmunchngtrnhc3ngychy1lnvong4g10'sng?thy:
104*/3**tn_chng_trnh
(*/3biuthccch3nbththchin2ln,vdtrn1nvl1ngynn3ngychng
trnhschy1ln)
Nubnmunchychngtrnhngy3ln(c8tingnghthchy1ln)volc13phthng
tun(trTh7vChnht)th:
13*/8**15tn_chng_trnh
(15biuthtronggiihnt1n5ththchin,vdtrn1lth2,5lth6,15biutht
th2nth6)
Vcuicng,saukhisonthovlulaifilelchdngtext.Bnngkfilelchvihthngqua
lnhcrontab:
crontabschedules.txt
Miusertrnhthnglinuxcabncthto1filelchkhcnhauvngkvihthng,2user
khcnhauscfilelchkhcnhauvkhngsbghidlnnhau.
lnhcrontablslitkfilelchmbnngkvihthng.Nubnngknhiufilelch,th
filesausghilnfiletrc.
lnhcrontabrsrttnfilelchmbnngktrnhthngra(khngngklchna).
DHCPtrnLinux

1.Khinim:
Khiquntrmththngmng,thngtaphicungcpmtachIPchomimytnhkhcnhau
ccmynycthlinlccvinhau.Vimhnhmngtnginh(khong10n20
my),viccungcpIPchomimytnhtrongmngthtngiddngchomtquntrvin,anh
tachvicsdngvithaotcquenthuctrongvicgnccachIP.Nhngnuivimtm
hnhmngln(t20mytrln)thviccungcpIPnhthlthtsmtmivkhkhnri,
thnhthongnucvndichuynthngxuyngianhngmytnhvinhauthylmtcng
vickhphctpvphsc.
Chnhvnhngldonhthmngynay,huhttrnttccchiuhnhucungcpcho
chngtamtdchvgiiquytvncnthittrn,ldchvcungcpachIPngDHCP
(DynamicHostConfigurationProtocol).
KhngnhngcungcpcIPmdchvtrncnarachochngtanhiutnhnngcungcp
nhngyutkhcchoccmyclient,vdnhcungcpachcamytnhdnggiiquyttn
minDNS,achcamtGatewayrouter,achmyWINS.v.v...
ThnhphncamtDHCPserverbaogmbnmcchnhsau:
Options:DngcungcpccyutchophaclientnhachIP,achsubnetmask,ach
Gateway,achDNS.v.v
Scope:MtonachcquynhtrctrnDHCPservermchngtasdnggnchocc
myclient.
Reservation:Lnhngonachdngdnhtrongmtscopemchngtaquynh
trn.
Lease:ThigianchothuachIPivimiclient.
2.Cit:
sdngcdchvDHCPny,bnphicitvohthngthngthngbnggidchvc
sntrnaCDcphnuimrngl.rpm,ngoirachngtacthcitpackagedngsource
codevtiginyvttrangwebcaGNU.Qutrnhcitbaogmnhngbcsauy:
dngphnuimrngl.rpm,tachylnh:
rpmivhdhcp*.rpm
dngsourcecode,tabindchnhsau:
tarxzvfdhcp*.tar.gz
cddhcp*
./configure

make
makeinstall
Saukhihonttxongqutrnhcit,ktipchngtascuhnhdchvnycthhotng
theomuncachngtabngcchtovsaifile/etc/dhcpd.conf.Tptinnyscnhngni
dungsau:
denyclientupdates;
ddnsupdatestyleinterim;
subnet192.168.0.0netmask255.255.255.0{
rangedynamicbootp192.168.0.190192.168.0.240;
optionrouters192.168.0.10;
optionsubnetmask255.255.255.0;
optionnisdomain"mydomain.com";
optiondomainname"mydomain.com";
optiondomainnameservers192.168.0.20;
optionnetbiosnameservers192.168.0.100;
optionntpservers192.168.0.25;
optionsmtpserver192.168.0.35;
defaultleasetime360000;
maxleasetime259200;
}
#Clientdefinitions
hostbigdaddy{
hardwareethernet00:a0:d9:cb:94:8a;
fixedaddress192.168.0.18;
}
Ccdngtrncnghanhsau:
HaidngutinskhngchophpDHCPServercpnhtngDNS.
Dngktiplonachmbncncungcpchohthngccmyconcabn,baogmach
NETIDsvmtonach.(NhtrnServerscpchophamyconmtonachchyt
192.168.0.190n192.168.0.240)
Optionrouterscungcpcnggatewaymcnh.
OptionsubnetmaskSubnetmaskmcnhchophaclient.
OptionnisdomaincungcptnNISDomainServer
OptiondomainnamecungcptndomainmcnhnusdngFQDN
Optiondomainnameserverscungcpnameserverschomngcabn.

OptionnetbiosnameserverscungcpachmcnhcaWINSserver
Optionntpserverscungcpachtimeserver.
Optionsmtpservercungcpachsmtpserver(duynhtch1server)
Dngcuicnglnubndnhcpmtachcnhchomtmynothbnphikhaibo
achMACcamyvIPtngng
VtrckhikhingDHCPServerlnthbnphitomttptincuicngdngxemxtvic
cpphtccachIPchophaclient:
touch/etc/dhcpd.lease
btttdchvDHCPthbnchchyhaiscripttngngnhsau:
/etc/init.d/dhcpdstart
/etc/init.d/dhcpdstop
Chcccbnthnhcngnh
CuhnhBINDchoUnix/Linux

IBINDlg?
TrckhitmhiuvBIND,chngtacngtmhiumtchtvDNS(DomainNameService)...Mt
giaothcphcvvicphngiitnmintrnInternet.Chnhnhnmchngtacccachd
nh:http://www.msn.comorhttp://www.yahoo.comthayvccachIPthtkhnhcan.Vy
hiumtcchnginDNSlmtgiaothcchophptaphngiiatIP==>achthngvc
thngcli.
IBINDlg?
TrckhitmhiuvBIND,chngtacngtmhiumtchtvDNS(DomainNameService)...Mt
giaothcphcvvicphngiitnmintrnInternet.Chnhnhnmchngtacccachd
nh:http://www.msn.comorhttp://www.yahoo.comthayvccachIPthtkhnhcan.Vy
hiumtcchnginDNSlmtgiaothcchophptaphngiiatIP==>achthngvc
thngcli.
BIND(BerkeleyInternetNameDistributed),mtchngtrnhphcvDNStrnnncchthng
AIX/BSD/HPUX/Unix/Linux/VMS...BivitnyshngdnchobncchcuhnhBINDmt
cchcbnnht.
IIBtu
1)Viiucbn.
DotidngLinuxlntidngBINDv8.0forLinux...Cncchthngkhcccchcuhnhcng
tngt...InstallBIND,nginnhtlbnlndngccfile*.rpm(RedhatPackageManager)
nubndngRedhatLinux.Bng:
rpmUvh*.rpm
OK!SaukhiInstallxong,chngtabtu...
NuInstallthnhcngBINDstngtofile/etc/named.conf==>ychnhlfilecuhnhchnh,
quytnhmihotngcaBINDsauny.Nubncnhngyucucaohnmncungcp.Bn
cthtocc/etc/named.confkhcbngcccngccuhnhBINDvsautubinthm.
Lu:phngbttrc,trckhiConfigBINDbnlnsaolutptincuhnhcan
/etc/named.conf
Hinti!TrnLinuxvmtsOSthuchUnixkhccmtcngcnghamangtnBIND
ConfigurationToolnsgipbncuhnhBINDmtcchddnghnthngquamitrngGUI
thayvphiEditfile/etc/named.conf...BncthDownloadn:
http://www.freshmeat.net
http://www.linuxapps.com

2)BINDConfiguratorTool(BCT)
McnhBCTccuhnhhngccZoneti/var/named...VttcccZonefileuthmcny.
NhimvcaBCTlskimtracphpcbnkhinhnggitrcvo.
Vd:NugitrnhpvolmtachIP...Thbnchcthnhpccsphhpvictnhcho
phpcan.
BCTschophpbncuhnhvAddthmmtforwardmasterzone(phngiixui),reversemaster
zone(phngiingc),vslavezone.SaukhiAddthmZonebncthcuhnhhayxochng
tchnhcascuhnhavo.
SaukhihonthnhvicAdd,ConfighayDeleteccZonebnphichnFile=>Applyghiln
/etc/named.confiviccFilecuhnhvZonefiletrongthmc/etc/named.conf.cccuhnh
haysaimictcdngbnphikhingliBINDService.BncthchnFile=>Exitv
nhnYesnunhbnmunmisaicamnhchiulckhithotra.
3)AddingaForwardMasterZone
thmmtForwardMasterZone.BnnhnvontAdd,chnForwardMasterZone.Nhptnca
DomainchoMasterZonetrongkhuvcDomainText.
Mtcasmishinravicctuchnsau:
Name:TncaDomainmbnminhpvocastrn.
FileName:TncafiledliucsDNS,mcnhnm/var/named.
Contact:achmaillinlccangiqunlZoneny.
PrimaryNameServer(SOA):Trngthicabnghiauthority.NchrtnServervinhngti
nguynttvnhngthngtinchoDomainny,gitrmcnhl@.
SerialNumber:SSerialcafilecsdliuDNS.Snyphitngmilnkhifilenycthay
i.NhvySlaveNameServerchoZoneskhiphcdliutrongthigiangnnhtnunh
MasterServercvn.CBTstngdnsnymikhifilecuhnhcthayi.Ncngcth
cthchinbngtaybivickchvontSetgngitrSerial.
TimeSettings:QuinhccgitrthigianchocsdliuDNSnh:Fresh,Retry,Expirev
MinimumTTL(TimeToLive).
Records:Bxung,saivbnghitinguyncaHost,AliasvNameServer.
Nulmbngtaythntngngvivicavo/etc/named.confgitrnhsau:
zone"forward.example.com"{
typemaster;
file"forward.example.com.zone";
};
Vcngcnphitora/var/named/forward.example.com.zoneviccnidungsau:

$TTL86400
@INSOA@root.localhost(
1;serial
28800;refresh
7200;retry
604800;expire
86400;ttl
)
SaukhicuhnhxongForwardMasterZone.BnnhnvoOKquayvcaschnhcaBCT.
ChnFileApplyghinidungvasailn/etc/named.conf.KhingliServicemi
saibxungchiulc.
4)AddingaReverseMasterZone
thmmtReverseMasterZone,bnnhnvontAddchnReverseMasterZonevnhpvo3
lpmngcaachIPutinmbnmunnhhnh.
Vd:NunhbnmunlpcuhnhIPchoBINDtrongkhong192.168.10.0/255.255.255.0thbn
nhpvo192.168.10(3lpIPutin).
Mtcasmishinravicctuchnsau:
IPAddress:3lpmngcaachIPutinmbnnhptrn.
ReverseIPAddress:BnchnmtachIPlpDtrongphmviIPAddresstrnlnixcnh
vtrcaBIND,nhvBIND.
Filename:TncafiledliucsDNS,mcnhnm/var/named.
PrimaryNameServer(SOA):Trngthicabnghiauthority.NchrtnServervinhngti
nguynttvnhngthngtinchoDomainny,gitrmcnhl@.
TimeSettings:QuinhccgitrthigianchocsdliuDNSnh:Fresh,Retry,Expirev
MinimumTTL(TimeToLive).
NameServer:Thm,savxoccNameServerchoReverseMasterServer.Phictnhtmt
NameServerccuhnhvyucu.
ReverseAddressTable:DanhschnhngachIPtrongReverseMasterZonevccHostName
can.
Vd:BnckhongIPl192.168.10choReverseMasterZonevbnmunBINDtolc
192.168.10.0BncthAddvo192.168.10.0trongReverseAddressTablevimttnHost
Namecaniloinhlfoo.example.com.CcHostNamephicktthcbng.chr
rngnlmtHostNameyvhpl.
Nulmbngtaythntngngvivicavo/etc/named.confgitrnhsau:
zone"3.2.1.inaddr.arpa"{
typemaster;

file"3.2.1.inaddr.arpa.zone";
};
VncngtngngvivictoramtFile/var/named/3.2.1.inaddr.arpa.zonecnidungsau:
$TTL86400
@INSOA@root.localhost(
2;serial
28800;refresh
7200;retry
604800;expire
86400;ttk
)
@INNSns.example.com.
1INPTRone.example.com.
2INPTRtwo.example.com.

SaukhicuhnhxongReverseMasterZone.BnnhnvoOKquayvcaschnhcaBCT.
ChnFileApplyghinidungvasailn/etc/named.conf.KhingliServicemi
saibxungchiulc.
Lu:cuhnhhonthinmtDomainNamebnphithchincuhnhcForwardMasterZone
vReverseMasterZone.TngngvivicDomainNamenyckhnngphngixuitDomain
IPAddressvngclitIPAddressDomain.
5)AddingaSlaveZone
AddthmmtSlaveZone(thcchtlmtDomainNameth2trncngmththngdng
BIND,cngcthcdnglmDomaindphngthaythkhiDomainchnhbtrctrc.Ncho
phpmththngcthcuhnhnhiuDomainName).NhnvontAddButtonvchnSlave
Zone.NhptncaDomaintrongkhuvcDomainText.
Mtcasmishinravicctuchnsau:
Name:TncaDomainmbnnhptrn.
MasterList:TncaNameServerngviSlaveZonetrongcsdliucan.Gitrnycnmt
achIPhpl.Bnchcthvonhngsvnhngduchm.TrongkhuvcText.
FileName:TncafiledliucsDNS,mcnhnm/var/named.
Nulmbngtaythntngngvivicavo/etc/named.confgitrnhsau:

zone"slave.example.com"{
typeslave;
file"slave.example.com.zone";
masters{
1.2.3.4;
};
};
File/var/named/slave.example.com.zonectobiNameServicekhintixungdliut
MasterZone.
Cuicng!ngqunnhnvoOKquayvcaschnhcaBCT.ChnFileApplyghini
dungvasailn/etc/named.conf.KhingliServicemisaibxungchiulc.
HyvngquabivitnhnybnphnnonmbtccchcuhnhmtDomainNameServer
trnUnix/LinuxviBIND.
__________________
DNSLinux
Nidung
1.Giithiu
2.CuhnhDNS(bindversion9)
oCachingnameserver
oAuthoritativeDNSservervzonefile
oMaster,slaveserver
3.Thamkho
Giithiu
BivitnygiithiucchdngbindcuhnhDNSchomyLinux.Chrngcuhnhbind
(named.confvzonefile)khngphthucvohiuhnh,cthdngnhngfilecuhnhnycho
nhngHHkhcngoiLinux.CuhnhnyckimtratrnLinux(RH9,FC1,TSL2.1),
FreeBSD(R5.1)vSolaris(Cool.
Ch:ylcuhnhkhngchroot.Xembindchrootphn"Thamkho,thngtinthm".
Btuvit:thng5nm2003.
Thayilncuivolc:SunFeb112:47:44JST2004.
Citvcuhnh
Phn1:Cit
Compiletsource(xemhttp://www.isc.org/index.pl?/sw/bind/),hocdngbinarygisnchomi
distro.
RingchongidngFC:
###
//tRPM

rpmivhbindversion***.rpm
rpmivhcachingnameserverversion***.rpm
//angniInternet
yuminstallbindcachingnameserver
###
RingchongidngTrustix
swupinstallbindcachingnameserver
Phn2:Cachingnameserver
Phnnyghicchlm"cachingnameserver",mtkiuDNSngin,thchhpchonhngaitplm
DNSlnutin,hocnhngaimunlmDNSchomycnhn.Theocuhnhny,mikhicyu
cu(query)vthngtinDNS,serverstmkimtheotht:1)dliutrongbm(cache),nu
khngchocdliuhthnth2)hiDNScpcaonht(rootserver).
Nhngfilecnthit
1./etc/named.conf:filecuhnhDNS
2./var/named/named.ca:danhschrootserver
3./var/named/localhost.zone:localhostzonefile
4./var/named/0.0.127.rev:localhostreversezonefile
RingchongidngFC:Nhngfileghitrnctronggicachingnameserver***.rpm
Chunbfile/etc/named.confnhsau
###
acllocalnet{
127.0.0.1;
};
options{
//nitzonefiles
directory"/var/named";
//chdngtrongmnglocalnet
allowtransfer{localnet;};
allowquery{localnet;};
};
controls{
inet127.0.0.1
allow{localhost;}
keys{rndckey;};
};
zone"."IN{
//hirootserver
typehint;
file"named.ca";
};
zone"localhost"IN{
typemaster;
file"localhost.zone";
allowupdate{none;};

};
zone"0.0.127.inaddr.arpa"IN{
typemaster;
file"0.0.127.rev";
allowupdate{none;};
};
include"/etc/rndc.key";
###
tiptheo,copyfilenamed.cavo/var/named.Filenamed.caldanhschttcnhngDNSrootserver,
thngckmsntrongphnmmbind.Ngoira,cthdownloadfilenamed.ca
http://www.rootservers.org(xemphnthamkho).
sonfilelocalhost.zonevcopyvo/var/named
###
$TTL86400
$ORIGINlocalhost.
@1DINSOA@root(
42;serial(d.adams)
3H;refresh
15M;retry
1W;expiry
1D);minimum
1DINNS@
1DINA127.0.0.1
###
sonfile0.0.127.revvcopyvo/var/named
###
$TTL86400
@INSOAlocalhost.root.localhost.(
1997022700;Serial
28800;Refresh
14400;Retry
3600000;Expire
86400);Minimum
INNSlocalhost.
1INPTRlocalhost.
###
xongkhingDNSdaemon.
ChongidngFC:
1.khing:/etc/init.d/namedstart
2.vdvscriptkhingctronggibind***.rpm
Cchsdng:sonfile/etc/resolve.confcnidungnhsau
#dngmyDNSserver,khngcnDNSservercaISPSmile
nameserver127.0.0.1
sauthmtviquery.Nuthyktqunhsauy,DNSservercabnhotng.
###

//thlocalhost
$hostlocalhost.
localhosthasaddress127.0.0.1
$host127.0.0.1
1.0.0.127.inaddr.arpadomainnamepointerlocalhost.
//thInternet
$nslookupwww.google.com
Server:127.0.0.1
Address:127.0.0.1#53
Nonauthoritativeanswer:
www.google.comcanonicalname=www.google.akadns.net.
Name:www.google.akadns.net
Address:66.102.9.104
Name:www.google.akadns.net
Address:66.102.9.99
###
Phn3:Authoritativeservervzonefile
PhnnyghicchcuhnhmtDNSserverchodomain"domain.name",cthquerytbtkmy
notrongLAN.GisIPcaDNSserverl192.168.1.1,phcvchoLAN192.168.1.0/24.
CuhnhnycngcthdngphcvnhngquerytInternet,nuDNSservercinterfacemang
achglobalIP.Dosantonthngtinvsrrngtrongcuhnhcchtrng(cbits
dng"viewstatement").
Chunbfile/etc/named.conf
###
acllocalnet{
127.0.0.1;
192.168.1.0/24;//privateIP
};
options{
directory"/var/named";
allowtransfer{localnet;};
allowquery{localnet;};
version"";//hidetheversion
};
controls{
inet127.0.0.1
allow{localhost;}
keys{rndckey;};
};
//khnglognhnglameserver
logging{
categorylameservers{null;};

};
//phcvlocalnet
//localnetgmnhngmynhnghabng"acllocalnet"
view"internal"{
matchclients{localnet;};
recursionyes;
zone"."IN{
//hirootserver
typehint;
file"named.ca";
};
zone"localhost"IN{
typemaster;
file"localhost.zone";
allowupdate{none;};
};
zone"0.0.127.inaddr.arpa"IN{
typemaster;
file"0.0.127.rev";
allowupdate{none;};
};
zone"domain.name"IN{
typemaster;
file"internal/domain.zone";
allowupdate{none;};
};
zone"1.168.192.inaddr.arpa"IN{
typemaster;
file"internal/1.168.192.rev";
allowupdate{none;};
};
};
//phcvnhngclientkhngthuclocalnet(vdInternet)
view"global"{
matchclients{any;};
allowquery{any;};
//servernychtrliqueryvdomain.name
recursionno;
//
//nhngdngsauychsdngvi"recursionyes;"
//trlicnhngqueryvnhngdomainkhc
//bngcchhirootDNSservers
//zone"."IN{
//typehint;

//file"named.ca";
//};
//
zone"domain.name"IN{
typemaster;
file"global/domain.zone";
allowupdate{none;};
};
};
###
Nhngzonefilecnthit:(/var/named/internal/)mydomain.zone,1.168.192.rev;
(/var/named/global/)mydomain.zone
domain.zone(internal):
###
$TTL86400
$ORIGINdomain.name.
@INSOAns.domain.name.dnsmaster.domain.name.(
2003051100;tng(vd+1)khithayithngtin
3H;updatethngtintmasterserver
3600;lmli,nukhngconnectcvimaster
1W;thihngithngtincaslave
1D);thihncachecaclient,gim1migiy
INA192.168.1.1
INMX10mail.domain.name.
INNSns.domain.name.
localhostINA127.0.0.1
mailINA192.168.1.3
ntpINA192.168.1.10
wwwINCNAMEChibi.domain.name.
ChibiINA192.168.1.99
INHINFO"Linux""P3500MHz,RAM128MB"
MonsterINA192.168.1.100
INHINFO"Linux""QuadItanium21.5G,32GDDRSDRAM"
###
file1.168.192.rev(internal)
###
$TTL86400
$ORIGIN1.168.192.INADDR.ARPA.
@INSOAns.domain.name.dnsmaster.domain.name.(
2003051500;Serial
10800;Refreshafter3hours
3600;Retryafter1hour

604800;Expireafter1week
86400);MinimumTTLof1day,negativecache
INNSns.domain.name.
1INPTRhydro.domain.name.
2INPTRheli.domain.name.
###
Nhngzonefilethmcglobal:hontontngt.
Cchsdng
//chnhDNSserver:sonfile/etc/resolve.confnhsau
searchdomain.name
nameserver192.168.1.1
sauthmtviquery.Nuthyktqunhsauy,DNSservercabnhotng.
###
//thlocalhost
$hostlocalhost
localhost.domain.namehasaddress127.0.0.1
//thzonefile
$hostmail
mail.domain.namehasaddress192.168.1.3
$hostthinfochibi
chibi.domain.namehostinformation"Linux""P3500MHz,RAM128MB"
//threversezone
$host192.168.1.2
2.17.168.192.inaddr.arpadomainnamepointerheli.domain.name.
//thInternet
$digwww.google.comsoa
//sthyktqu
;<<>>DiG*.*.*<<>>www.google.comsoa
;;globaloptions:printcmd
;;Gotanswer:
;;>>HEADER<<opcode:QUERY,status:NOERROR,id:7662
;;flags:qrrdra;QUERY:1,ANSWER:1,AUTHORITY:1,ADDITIONAL:0
;;QUESTIONSECTION:
;www.google.com.INSOA
;;ANSWERSECTION:
www.google.com.820INCNAMEwww.google.akadns.net.
;;AUTHORITYSECTION:

google.akadns.net.821INSOAasia3.akam.net.
hostmaster.akamai.com.10918428263600300172800900
;;Querytime:7msec
;;SERVER:192.168.1.1#53(192.168.1.1)
;;WHEN:*****
;;MSGSIZErcvd:132
###
Phn4:Master,slaveDNSserver
Cuhnhmaster/slaveDNSserverthngchcnthitchonhnghthngcyucuvtnhanton
vnnh,chonhnghthngcln.
Ch:phnbitmaster/slaveDNSserverviprimary/secondaryDNSserver!
Masterserver(IP192.168.1.1)cadomain.name
zone"domain.name"IN{
typemaster;
file"internal/domain.zone";
};
Slaveserver(IP192.168.1.2)cadomain.name
zone"domain.name"IN{
typeslave;
file"internal/domain.zone";
masters{
192.168.1.1;
}
};
CuhnhloadBalancingDNSRoundRobin
www0INAxxx.xxx.xxx.1
www1INAxxx.xxx.xxx.2
www2INAxxx.xxx.xxx.3
www3INAxxx.xxx.xxx.4
wwwINCNAMEwww0.domaintest.com.
INCNAMEwww1.domaintest.com.
INCNAMEwww2.domaintest.com.
INCNAMEwww3.domaintest.com.
INCNAMEwww4.domaintest.com.
CuhnhDynamicDNSclienttrnLinux
CuhnhDynamicDNSclient
NhngngitruycpInternetbngcchquaysinthoi(dialup)hayADSLthngkhngc
ISPcpachIPcnh(tisao?xemphnthamkho).Milntruycp,haymilntruycplido

ktnibngt,ngidngthngccpmtachIPkhcviachIPcalnktnitrc.
Trongnhngtrnghpny,thayithngtinDNStheocchbnhthng(sazonefilebngtay!)
trabttinvchmchp.Thayvo,ngitacpnhtDNSbngDynamicDNS,cchnyc
nhngcim:
1.cpnhttngmikhicthayi
2.thihncnghacaDNS(xcnhbngnegativecache)b,donhngthayivDNSs
ccpnhtnhanhchng
CnhiunicungcpdchvdynamicDNS(free,hocphimtmtkhontinno),vcnhiu
chngtrnhdynamicdnsclient.Bncthchntdanhschsauy(xemphnthamkhocui
bi).
Bivitnygiithiucchcuhnhddclient,mtDynamicDNSclientchomyLinux.ddlientc
vitbngPerl,cthchychdaemon,thchhpvinhiuloirouter,vcthdngvinhng
accountcaccdchvDynDNS.org,ZoneEdit.
Btuvit:thng5nm2003.
Thayilncuivolc:SunFeb112:47:44JST2004.
Citvcuhnhddclient
Phn1:ngkmtaccountDynDNS.org,hocZoneEdit,nhkimtrauserIDvpasswordtrc
khisangphn2.
Phn2:Citddclient
Download,giinn,vcfileREADME.NuckREADME,bncthtlmcmkhng
cnxemtipnhngiughidiy!
//downloadddclientv3.6.3
$wgethttp://s90389134.onlinehome.us/ddclient/ddclient.tar.gz
//update:ddclientcchuynthnhmtprojectsf.net
//http://sourceforge.net/projects/ddclient
//giinn
$tarzxvfddclient.tar.gz
//hoctarjxvfddclient.tar.bz2
//cfileddclient3.6.3/README!
Copynhngfilecnthitvochthchhp
//chngtrnhchnh

#cpddclient3.6.3/ddclient/usr/sbin
//filecuhnh
#cpsampleetc_ddclient.conf/etc/ddclient.conf
//chunbscriptkhing
#cpsampleetc_rc.d_init.d_ddclient/etc/init.d/ddclient
Cuhnhfile/etc/ddclient.conf
daemon=300#kimtraIP,5pht(300sec)1ln
syslog=yes#ghithayiIPvosyslog
mail=root#thngbothayichoroot
mailfailure=root#thngbolichoroot
pid=/var/run/ddclient.pid#thngtinPID
###chongidngdyndns.org
login=userID#userIDngkvidyndns.org
password=mtkhuDynDNS.org
server=members.dyndns.org,\
protocol=dyndns2\
name1.dyndns.org,name2.homelinux.net
###chongidngZoneEdit
server=www.zoneedit.com,\
protocol=zoneedit1,\
login=userID,\#userIDngkviZoneEdit
password=mtkhuZoneEdit\
domain1.name,domain2.name
###2kiucuhnhphbin
###kiu1
###nuinterfaceppp0ccpglobaldynamicIPaddress
###vd:trnghpADSLmodemhotngnhmtbridge
use=if,if=ppp0#kimtraIPinterfaceppp0
###kiu2
###numyLinuxchcprivateIPaddress
###vd:trnghpADSLmodemhotngnhmtrouter(vNAT)
use=web,web=members.orgdns.org/nic/ip
###update:members.orgdns.orgcvkhngcnhotng
###dngurlsauykimtraIP
###use=web,web=checkip.dyndns.org,webskip=CurrentIPAddress:
Michunbnhvylxong,chcnvickhingddclient

###safile/etc/init.d/ddclient,chchophp
###khinglevel3,xongglnh
/sbin/chkconfigaddddclient
###khngbitcchsafile/etc/init.d/ddclientthlm
chkconfiglevel012456ddclientoff
chkconfiglevel3ddclienton
###nhvy,milnbtmy,ddclientdaemonsckhing
###lnutin,cnkhingddclientbngcch
/etc/init.d/ddclientstart
Thamkho,thngtinthm
1.TlcIPthayinlcDNSccpnht,mtbaonhiuthigian?
*thigiancpnhttia,tnhtlcIPthayi
=chukkimtraIPcaddclientdaemon+thigiancachethngtinDNS(negativecache)
=300+60(caDynDNS.org)=360sec(6pht)
Ch:ybquathigianxlclient,DNSserver(cmilisec),thigiangiantruyndliutrn
Internet(cvitrmmilisec).
2.TisaokhngccpIPcnh(staticglobalIPaddress)?
*cnna
3.NhngnicungcpdchvDynamicDNSviukinsdng
*Danhschcatechnopagan
4.Mtvidynamicdnsclient
*xemdanhschDynDNS.org
(Lyt:http://james.dyndns.ws/)
Websitehutchongidnglinux
http://www.usinglinux.org/
http://www.howtoforge.com/
http://www.linuxquestions.org/
Linuxhtr6runlevel,clutrongfile/etc/inittab.Mirunlevelstngstartmtschcnng,
dchvnhtnh(nhprinting(cups),scheduling(crond),Apache(h
ttpd),Samba(smbd).Vdtrongsingleusermode,chcduynhtmtusercphpktnivih
thng.X11modechyLinuxvigiaodinha
0:halt
1:singleusermode,sdngtrongbackups/restoresvrepair
2:Mutiuser,khonghtrnetworking
3:Multiuser,chtrnetworking
4:khngdng
5:X11,sdngGUIdesktop
6:reboot,khngnndefaulttrong/etc/inittabgitrny

Bnkhngnnsetinitdefault=0,hthngcabnsshutdownkhibootLinux.Bncngkhngnn
setinitdefault=6,Linuxsbooththnglintc
sbin/runlevelxemrunlevelhinti
Chuyndigiaccrunlevel,dnglnh/sbin/initx(xlrunlevelbnmunchuyn)
bitcmtservicethucrunlevelno,bncthdnglnhchkconfig.Lnhnycnchophp
bnthm,xa,vthayiservicetrongdanhschstartup
vd:/sbin/chkconfiglistsendmail
sendmail0:off1:off2:on3:on4:on5:on6:off
sendmailcchyccrunlevel2,3,4v5.NubnmunSendmailservicettrunlevel4,bng
lnh
/sbin/chkconfiglevel4sendmailoff
btliservicebndnglnh
/sbin/chkconfiglevel4sendmailon
Nhngservicecthmslinktithmc/etc/rc.d/.Thmcnygmccthmccon:
init.d
rc0.d
rc1.d
rc2.d
rc3.d
rc4.d
rc5.d
rc6.d
Nudefaultlrunlevel5,trongqutrnhbootprocess,initskimtratrongthmc/etc/rc.d/rc5.d
xemdchv,scriptsnoc"start",scriptsnoc"kill"
bitnhngscriptsnocstart,bnvothmcrc5.d,glnh
lslS*|more
Scriptsnokill,glnh
lslK*|more
Bncthstart,stophocrestartmtdchv,scriptno.Vdnhrestartsmb(samba),bng
lnh
/etc/rc.d/init.d/smbrestart
Misthayitrngthi(start,stop)cascripts,dchvucthchintrnthmc
/etc/rc.d/init.d
NtsysvUtility
Culnhntsysvcchcnnggingnhchkconfig,nhngdsdnghnvigiaodinha.Mc
nh,ntsysvcuhnhrunlevelhinti,thayirunlevelkhc,dngflaglevel
ServiceConfigurationUtility
Glnhserviceconfmutilityny
Sdnggiaodinha
BncththayigiaccrunleveltrongmcEditRunlevel

http://www.hvaonline.net/hvaonline/posts/list/2118.hva

MCLCctoragiithiunhngbivitcathnhvinHVAvnhngbivitc
thnhvinHVAsutptrnkhpni.Nhngbivithngdnhuchcaccbnnglnkhi
triqua1thigiannhtnh,chngtislnltngtiygiithiuchoccthnhvintm
kimddnghn.khiccbivitscchuynivoboxCcbivitgitrcamch
iuhnhvthitbngdng.
Ccbivitgiithiutngqutv*nix
LinuxFAQ
TheUnofficialFedoraFAQ(bndchtingVit)
CitvSdngFedoraCore2
HngdncitFedoraCore4.
HngDnCitFedoraCore6
HngDnCitDebianGNU/Linux
SdngKnoppix
KinthccbnvSlackwareLinux
GiotrnhUNIX
Linuxchongidng
CcbivitvbomtLinux
KsccvDDoSnHVA
Bovmychantonviphnmmtdo
Bomththng*nixviPAM(linet)
TngcnganninhchohthngLinux(Phn1)
TngcnganninhchohthngLinux(Phn2)
SecurityOnLinuxSystem
OpenSSH
HACKLINUX
MhatrongLinuxGiithiuGNUPG
GiithiuvMetasploit
GiiphptheodicuhnhhthngTripwire
MharootfilesystemviFreeBSDgeli
CcbivitvLinuxKernel
TmhiunhncahiuhnhLinux
BindchLinuxkernelphn1
BindchLinuxkernelphn2
BindchLinuxkernelphn3
BindchLinuxkernelphn4
CpnhtkerneltrnUbuntu
BindchmtkerneltrnhthngCentOS
CcbivitvLinuxFirewall
Case1iptablesvmyn
Case2iptablesvmyn
CitAPFFirewalltrnLinuxFedora

TiliuIptablesbngtingVit
CcbivitvWebserver
KinTonBoMtChoApachePhn1
KinTonBoMtChoApachePhn2
LmreverseproxyviLinux+Apachehttpd
ngdngtptinhtaccesstrnmychApache
Sdngvirtualhost(tno)trongApache
ProxyServerWithApache
CitApache+PHP+MySQL
PhthinvchngxmnhpWebServerviModSecurity
CitlighttpdtrnLinux
CcbivitvMailserver
QmailasaMailGatewayPhn1
QmailasaMailGatewayPhn2
QmailasaMailGatewayPhn3
QmailasaMailGatewayPhn4
LmmailserverviPostfixPhn1
LmmailserverviPostfixPhn2
LmmailserverviPostfixPhn3
LmmailserverviPostfixPhn4
LmmailserverviPostfixPhn5
LmmailserverviPostfixPhn6
Citnhanhvcuhnhqmail+vpopmail+procmail+daemontools
CitnhanhvcuhnhQmail+POP3+APOP
LoibspamkhiqmailSMTPbngRBL(NEW)
CcbivitvDNSserver
BINDPhn1
BINDPhn2
BINDPhn3
BINDPhn4(phncui)
ThaythBINDvidjbdnsphn1
ThaythBINDvidjbdnsphn2
ThaythBINDvidjbdnsphn3
ThaythBINDvidjbdnsphn4
ThaythBINDvidjbdnsphn5(phncui)
CcbivitvSNMP/SENSOR
GimsththngbngSNMP
CuhnhSNMP
Cchchnhtcqutcamainboard

CcbivitvSnort
SnortviACID+MySQL
Citnhanhhthngphthinxmnhp
CcbivitvDHCP
CuhnhDHCPserver
CcbivitvSAMBA
CnghcSamba
SAMBA3.0THCHNH
CcbivitvFTP
vsftpwithvirtualuser
CcbivitvLinuxClustering
CngnghclusteringtrnLinux
LinuxVirtualServer
TngbucmttrinkhaihthngCluster
CcbivitvLinuxtunneling
Linuxtunneling
CcbivitvLinuxWireless
SdngWirelessviLinux
LinuxWirelessPhn1
LinuxWirelessPhn2
LinuxWirelessPhn3
Thitkmngkhngdy:DngLinuxlmAccessPoint
Development
uClibcvBusyBox
SdngSYSLINUXlmbootloader
Programing
TmttLinuxShellProgramming
LinuxTips
Thayihostname
SDngTingVitViLaTeX

HngdncitvcuhnhUserModeLinux
SdngGRUB
CitccngdngtmnguntrnLinux
HngdncitngdngtrongLinux
HngdnsdngtingVittrongLinux
MPlayerSMARTRPMBUILD
NngcpUbuntuviAutomatix
SdngwgetthngquaProxyServer
XaLinux(NEW)
Anintroductiontoservices,runlevels,andrc.dscripts(NEW)
ThmHDvoLinux(NEW)
xvnkbchongidngGNOME
DynamicDNSddclient(NEW)
CcbivitvRPM
BndchtiliuRPMGuidefromdocs.fedoraproject.org(NEW)
CchnggiRPM
TofilespecchoccgiRPM
Windows+Linux
HngdncivsdngLinuxvWindowstrncng1PC
TChiasmyingiaWindowsvLinux
DngNTFScaXPtrongLINUXCase1
DngNTFScaXPtrongLINUXCase2
Citvhiuchnhlinuxsongsongviwindows(NEW)
Other
BndchtingVitcaGiyphpCngcngGNU(GPL)
Kinhnghimtrongvicnghincutrinkhaiphnmmmngunm
Linuxcghpdn
Linuxtrongtmtay
http://www.hvaonline.net/hvaonline/posts/list/15093.hva
diachidownloadsach

WirelessforLinux
BculmquenviLinux,mnhlmchoLinuxDesktopkhngkhcgWindows.Mnhcicc
phnmmnhtingVit(Unikey),BtinAnhVit,VitAnh...,YahooMessengervnhiu
thkhcchogingviWindows.NhngmnhnghviccivlmchociWirelesshotnglkh
khnnht(MnhxiNotebook)nnpostlnychomingithamkho,nuaiccchnohay
hnxinchgiovinh.
MnhxiNotebookCentrino,ciFC4,ttnhinthnhphnWirelessslIntelPro/Wireless,my
mnhlIntelPro/Wireless2200BG.Saumthisearchlungtung,cuicngdrivertivcl
ipw22001.0.4.gz.Drivercri,tiptheoltmFirmware,Firmwarelipw2200fw2.3.gz.Bygi
tinhnhcit.
B1:UpdateFirmware.Giinnvchpttcccfiletrongthmcfirmwarevo/lib/firmware/
B2:CiDriverchowirelesstheoccbcsau:
#cd/lib/modules/2.6.111.1369_FC4/kernel/drivers/
net/wireless
#rmrfieee80211ipw2100ipw2200
#cdipw22001.0.4installdir(thmccit)
#makeinstall
#shutdownrnow(Khinglimy)
Giithch:Mymnhxikernel2.6.111369_FC4.Trckhicidrivermithoccdriverc.
B3:CiNetworkManager(ToolnysgiptngscanwirelessaccesspointnhtrongWindows).
Cit:suc'yuminstallNetworkManagerNetworkManagerglibNetworkManagergnome'
Thitlpchymainservicekhikhing:suc'/sbin/chkconfiglevel345NetworkManageron'
Thitlpchydispatcherservicekhikhing:suc'/sbin/chkconfiglevel345
NetworkManagerDispatcheron'
Khingservices:suc'/sbin/serviceNetworkManagerstart;/sbin/service
NetworkManagerDispatcherstart'
Dnglnhnyloadtrayicon:NetworkManagerInfo&
NetworkManagerloadvotrayiconkhikhing,thmdngsau/usr/bin/NetworkManagerInfo
voSystem>Preferences>MorePreferences>Sessions>StartupPrograms
khoaixinpostmtbivccdngndiswrappersdngccWLANNICkhngcsupportcho
linux(nhcidelllaptopcakhoai,dngbroadcomchipset)

Trctin,downloadnidiswrappertihttp://sourceforge.net/projects/ndiswrapper/
Bnstableminht,tithiimvitngy5thng12,2006lndiswrapper1.31.Downloadcfile
ndiswrapper1.31.tar.gz

Titerminal,tinhnhcitndiswrappernhsau:***
Code:

#su
[Nhprootpassword]
#tarzxvfndiswrapper1.31.tar.gz
#cdndiswrapper1.31
#mkdir/root/logs/ndiswrapper1.31
#make|tee/root/logs/ndiswrapper1.31/make
#makeinstall|tee/root/logs/ndiswrapper1.31/install

nytacixongndiswrapper,nukhngcli.Lithngxyranhtkhibuildndiswrapperl
thiukernelsource.ndiswrapperyucucncfile/lib/modules/`unamer`/buildlinknthmc
chasourcecakernel.
Sau,vositehttp://ndiswrapper.sourceforge.net/mediawiki/index.php/ListtmdriverchoWLAN
NIC.Saukhidownloaddriver,giinnnucnthit,lcthtinhnhinstalldriver.ykhoai
dng'BroadcomCorp.BCM4306802.11b/gWirelessLANController',lcardcakhoailmvd.
Code:
#ndiswrapperibcmwl5.inf

BcnycidriverchoNIC.Sau,run
Code:
#lspci
#lspcin

Kimtrarachcahardwarecabn,vdcakhoail14e4:4320.Saurun
Code:
#ndiswrapperd14e4:4320bcmwl5

sdngdriverbcmwl5chohardwaretiach14e4:4320.
Saurun
Code:
#ndiswrapperl

kimtraxemdriver,vachphncngchochnhxc.
Sau,run
Code:
#modprobendiswrapper

loadmodulendiswrapper.ndiswrappersc"alias"thnhwlan0.Bygicthlogoutkhiroot

accountbng
Code:
#exit

Dngcclnhiwlist,iwconfig,route,vifconfigcuhnhvsdngWLANNIC.Chititcho
tnglnhxinmithamkhomanpage.
khoai
***Bcmakekhngnhtthitphidngviquynroot.Khoaichcthiquenteettcoutputra
loglimthi.Tuynhin,ccbctiptheophidngaccountroot,sungaytithiimnyc
lcnghpl.

Linuxtontp

Saumtthigianspamerdqu,naytuiquyttmlmlicucibngcchpostlnbivit
ny(bivitcopyctnhiungun),hivngcxongbncthhiucphnnov
linux.
GiithiuvCentOS
CentOS(tnvitttcaCommunityENTerpriseOperatingSystem)lmtphnphiLinuxtp
trungvolpdoanhnghip,xydngtnhiungunminph(theoGPLvmtsbnquyntng
t)caRedHat.CentOS4datrnnntngRedHatEnterpriseLinux4,htrdngx86(i586v
i686),dngx86_64(AMD64vIntelEMT64),cccutrcIA64,Alpha,S390vS390x.

aSingleServerCDchuhtttcccthnhphncnthitchoqutrnhcitservercbn,
ngoitrGUI(giaodinhongidng).Nphhpchonhngaimuncitchcnngmt
cchnhanhchng.DokhngcgiaodinGUI,bncthchymtservercschviRAM128.
NhngttnhindunglngRAMsphitnglnnucntrinkhaicccsdliuln.
Cit
QutrnhcitSingleServerCDkhddng,nhtlkhibncimtphnphiLinuxkhc.Bn
cndownloadSingleServerCDtmtbnmyccb,ghinvoavkhing(boot)servert
a.
ChodSingleServerCDkhngchagiaodinGUI,qutrnhcitvnsdngmtgiaodin
ho,gipbnddngthaotcvitngphn.Lmtheocchngdntrnmnhnh,cngvictr
nnngin.
Monh:Nuservercabnkhngchabtkdliunokhcvkhnggpphivngkhi
formatlitonba,nnsdngtuchnautomaticallypartition(phnvngtng)khiqu
trnhcitnbcDiskPartitioningSetup.Nsgipbntitkimckhnhiuthigian.
BnnntmngngsdngSELinuxvttchcnngtngla,nhtlkhiserverctanton
bntrongmngccb.Bncththayiccthitlptnglasaunumunvilnhsystem
configsecuritylevel.
Bncthchncitmcnhccgiphnmmmtcchanton.Phngthccitnyscung
cpmththngCentOScbnviWeb,mailvccserverFTP,DNS,chcnngchiasfilequa
Samba.Vimyccuhnhhini,qutrnhcitchmtdi20pht.
KhngphittcccgitrnCDucci.Chnghn,numundngPostgreSQL,bnsphi
citnsauta.MuncitPostgreSQL,aavoc(mount/media/cdrom),dnglnh
yumciccthvinclientvserver:
yumlocalinstall/media/cdrom/CentOS/RPMS/postgresql7*
yumlocalinstall/media/cdrom/CentOS/RPMS/postgresqlserver7*

KhnngmnhcaCentOSnmchngtincyvnnh.Ncxydngdatrnccgi
quathnghimchoktquttchkhngdatrnphnmmbleedingedge.Tuynhincngcmt
hnchlmtsphnmmminhtkhngthcitctrnphnphiny.Thiustquantrng
nht,theokincati,lPHP5vMySQL5.Nhngccphnmmnycngctchhpvo
trongCentOSPlusRepository.
Mcnh,CentOS4.4sdngPHP4.3.9.MunnngcplnPHP5,trctinphimbomybn
cktniviInternet,sauchylnh:
yumenablerepo=centosplusupgradephp*
TngtviMySQL.PhinbnmcnhtrongCentOS4.4lMySQL4.1.20.Munnngcpln
MySQL5,dngcclnhsau:
yumenablerepo=centosplusupgrademysql*
yumenablerepo=centosplusinstallmysqlserver5*
Quntrngin
DoCentOS4.4SingleServerCDkhngcgiaodinGUI,bncnthchinttccuhnhquadng
lnh.Diylmtslnhquantrngcbnvccfilegipbncuhnhserver.
khingvngngdchv,dng:
serviceXYZstart
serviceXYZstop
Trong,XYZltnserver,vdnhpostgresql.
cuhnhmng,chylnh:
netconfig
cuhnhmyin,chylnh:
systemconfigprinter
McnhcmtsdchvhthngkhngckhingtrongthigianbooththngnhWeb
server,MySQLserver.Munmbochoccdchvnycchyngaytkhikhingmy,thc
hincclnhsau:
chkconfiglevels235httpdon
chkconfiglevels235mysqlon
chkconfiglevels235smbon
chkconfiglevels235vsftpdon

NucndchvPOP3vIMAP,bncncuhnhdovecotdaemon.Mcnh,dovecotdaemonch
cungcpccdchvIMAP.MuncPOP3,bnphichnhsa/etc/dovecot.confvtvodng:
protocols=imapimapspop3pop3s
Dovecotcngkhngckhingmcnh(nhngccitnhmttrongccgitiuchun).
Mundovecotckhingkhimykhing,glnh:
chkconfiglevels235dovecoton
Saukhimithnhphnccuhnhchnhxc,bnnnkhinglihthng.Khngphibi
Linuxcnkhinglimnginchchcchnrngmithccitphhpvchy
nhmongi.
HngdnciVMware+LinuxCentOS
Choccbn,hclinuxanglmtnhucucanhiungi,ticngmibtuihcnithi,
blogtitnayscmcmilhclinux,tisvitlinhngcigmtihccchoccbn
xem,cthlihcthnhiunhngtivitlichclkhngylmmongccbnthngcm
nh,tivitlinhngbitihccnglmtcchtinlinhnggmnhhc.
TihcCentOSnnticngsnivCentOSthi,bnxemthngtinvdownloadhiuhnhny
tiwebsitehttp://www.centos.org/
BncthdngmythtciCentos,nhngtikhuynccbnnndngmyo,vnucimy
thtchungwindownuthaotckhngngtonbdliucaccbnsmtht,myoyti
dnglVMwareWorkstation,bnvowebsitehttp://www.vmware.com/xemthmthngtinnh.
BncthrangoitimbnaCDtmmuachngtrnhny.HaycngcthdngVirtualPC
2007caMicrosoft,cinyfree,thamkhotivdownloadti
http://www.microsoft.com/downloads/d...DisplayLang=en,linkdownloadtrctip
http://download.microsoft.com/downlo...0BIT/setup.exe
Cuhnhyucul:cngnntrngt4Gbtrln,ramt256Mbtrln,ttnhtl1Gb,tc
cpukhngcnnhiup31Gbtrlnlcri,ttnhinlcuhnhcngcaocngtt.
NudngmyobnlnwebsitecaCentosdownloadciisocaCentosi,khong3.5Gb,bn
khngcnphighiraDVDlmg,chngtrnhVmwarecthcitfileiso,bndownloadtlink
nyhttp://isoredirect.centos.org/centos/5/isos/i386/,nukhngciukindownloadthratimbn
aCDmuanh,nhngtrnCDdblilccilm.
MibnxembilabcivcuhnhVMwaretilink
http://files.myopera.com/hautp/linux/VMware.htm
DokhngthquayphimtrongVMwarenntiquayphimhngdncilinuxdidngfile.avi,
ccbndownloadchngtrnhKMPlayerxem,cinyhtrrtttxemfile.avivccfilenh
dngkhchttp://www.kmplayer.com/beta/kmp.zip,vticngkhngchostuploadfiennnn
tiuploadlnmegaupload,bncthxemtrnhtcilinuxcentosbngfilm(c3filebnxemln

lcfile123),downloadtihttp://www.megaupload.com/?d=XMI5M9VA(3.15Mb)(dophim
quaynhanhqumongccbnthngcmnh,cnbndngchxemchmliinh,KMPlayer
giiquyttttnhtrngny)
Nubnkhngxemcphimhngdncittrnvqunhanhthhydownloadtrnveoh.com
vxemnh(cthbnxemonlinekhngcthdownloadvxem)
http://www.veoh.com/videos/v554051tHnfcstW

You might also like