Vous êtes sur la page 1sur 33

RHCE (Red Hat Certified Engineer)

Linux is an open source operating system made by Linus Benedict Torvalds, a young man !o as in second year of computer science at t!e "niversity of Helsin#i in $%%$& T!e Linux operating system is ritten in t!e C programming language& Linux is implementation of "'()& Linux uses *'" tools, a set of freely available standard tools for !andling

Linux Distribution :
T!ere are more t!an $++ Linux distributions (distribution Companies) some of t!em are, Red Hat -ebian Linux .".E Linux /andriva (former mandra#e soft) 0noppix, an operating system t!at runs from your C-1R2/ .lac# are Linux "buntu Linux, an 2. t!at runs from C-R2/ (Live) and Hard -rive& Topology, -esigned to run on top of /icrosoft 3indo s does not need any partition c!anges 4las! Linux, 5 distribution t!at can fit onto a 678 /B ".B flas! drive Corel Linux, etc for more information about distribution visit, !ttp,99en& i#ipedia&org9 i#i9list:of:Linux:distributions

Red Hat Linux 9.0


Red Hat Linux is t!e production of Red Hat company !ic! !as stopped producing it on 5pril ;+, 6++< t!e Red Hat company no produces t o editions one fedora Core !ic! is free, 5nd second Red Hat Enterprise Linux (RHEL) !ic! is for business purpose&

RHCE (Red Hat Certified Engineer)

Red Hat Linux 9.0 Hardware Requirements:


R M !Min" R M !Rec" )rocessor !Rec" +mpartation Dis, -pace Text Mode #$ M%s '00 MH* !)entium class" Graphical Mode &'( M%s &9' M%s $00 MH* !)entium '" $G%

Linux Modes:
Text or .L+ !command Lin +nter/ace" G0+ !Graphical 0ser inter/ace"

G0+ Modes:
0-E *'2/E

.L+ Modes
C .!ell Bas! (-efault) Borne 0 .!ell

Linux +nstallation Modes


Text (CL() /ode installation (from t!ree C-s) *rap!ical (*"() mode installation (from t!ree C-s)
6

RHCE (Red Hat Certified Engineer)

T!roug! 4T= installation T!roug! HTT= installation Red Hat Linux Has t!ree installation C-s !ic! includes all soft are Built1in E&g& proxy server, .>L server, -HC=, -'., /ail server& 2pen office &org&etc

Linux /ile s1stem !comparison with 2indows":


2indows 45T $8 45T;6 'T4. Linux Ext6 (not in use no ) Ext; (current file system)

%oot Loaders:
Boot loader is used operating system selection Boot loader is stored in /BR in t!e Hard -rive Linux !as t o boot Loaders *rub Boot loader Lilo Boot Loader 3indo s !as one boot loader& 3indo s !as one boot loader 3!en e install indo s (t formats t!e /BR and remove every t!ing in it and Linux doesn?t format t!e /BR it adds it Boot Loader t!ere& T!erefore e s!ould first install indo s t!en Linux&

)artition:
=artition layout and types, T!ere are t o #inds of ma@or partitions on a Linux system, Data partition : normal Linux system data& (ncluding t!e boot partition containing al t!e data to start up and run t!e system -wap partition: Expansion of t!e computer As p!ysical memory & extra memory on !ard dis#&

)artition Methods:
-uring t!e installation of Red Hat Linux you ill be as#ed to start !ic! partition met!od& utomatic: Manual ! throu3h dis, druid"
;

RHCE (Red Hat Certified Engineer)

utomatic: t!is ill remove all data on your !ard drive and ill partition your !ard drive & if you are selection t!is met!od be sure you !ave no saved data& Manual !dis, druid": dis# druid is soft are !ic! is used for manually partition& .: D: Hard Dri4e "n partition space <+++/Bs( depend upon t!e pac#ages and users data)

)artitions:
5ame 9 9boot 9!ome swap space ;+++/Bs (B+C space) $++ /Bs 7++/Bs(depend upon users data T ice of R5/ Description Root directory ( -rive C) /ain directory ( 3indo s folder) "sers data and users -is# >uota Dirtual /emory

Red Hat Linux 9.0 installation steps


$& (nsert C- $ 6& Boot from C;& 5 text mode ill come press t!e enter button to start grap!ical mode installation& To start text mode installation& 3riteE Linux textE and press Enter button& <& Clic# o# button of you ant to c!ec# C-s of don?t clic# on s#ip to cancel C-s c!ec#& 7& Clic# on t!e next button or press f$6 8& .elect Language F& 'ext B& .elect 0eyboard %& 'ext $+&.elect /ouse $$&'ext $6&.elect custom Box $;&'ext $<&.elect manually partition it! dis# druid $7&'ext $8& partitionin3: .elect free space at t!e top clic# on ne select AE9E in t!e mount point enter siGe for it e&g&;+++ /Bs clic# on o# clic# on o# clic# on continue save procedure for 9 HbootE and H9!omeE for s ap select free space
<

RHCE (Red Hat Certified Engineer)

at t!e top clic# on ne select s ap in t!e file system type field enter siGe for s ap 2#& =artitions are madeI &6.5ext &(.5ext &9.5ext '0.select no /irewall at the top '&.5ext ''.select lan3ua3e '7.next '$.select time settin3 '8.5ext '#.9nter password /or root ccount ! dministrator ccount " '6.5ext '(.5ext '9.5ext 70.-elect required so/tware !or select /irst tow pac,a3es and unchec, all others below" 7&.5ext 7'.5ext 77.+nstallation will be started and required .Ds will be as,ed. 7$.+nstallation is completed:

Linux Terminals
Linux is a multi user operating system t!erefore it !as seven terminals so e can logon to a Linux mac!ine t!roug! seven users accounts at a time .ix of t!em can login to Text (CL() /ode and one can login to *rap!ical (*L() mode&

Terminal ; users lo3on rea Multi users <Linux 6 Terminals #; Text !.L+" mode &; Graphical !G0+" mode
7

RHCE (Red Hat Certified Engineer)

3e can c!ange terminal by pressing 5ltJCtrlJf$, f6&f;&f<, f7, f8,fF 5ltJCtrlJf$ 5ltJCtrlJf6 5ltJCtrlJf; 5ltJCtrlJf< 5ltJCtrlJf7 5ltJCtrlJf8 Text (CL() mode 5ltJCtrlJfF *rap!ical (*"() /ode

Linux Director1 -tructure


5o & ' 7 $ 8 # 6 ( 5ame =%oot =root =home =bin =sbin =de4 =etc =4ar Description T!e directory !ere t!e operating system boots from T!e administrative user?s !ome directory Contains t!e !ome directories of normal user?s users? dis# Kuota Contains executable programs Contains executable programs Contains drivers for !ard are devices Contains important configuration files of several program .torage for variable files and temporary files created by users, suc! as log files t!e mail Kueue, t!e print spooler area space for temporary files do nloaded from t!e internet, or to #eep an image of a C- before burning it& Contains dynamic library modules Contains information about system resources Lou can access C-1R2/, 4loppy, indo s drives, flas! drives -igital camera drive and net or# drive !ere& Contains temporary files =rogram libraries, documentation etc& file all user1 related program& 5 partition for t!ird party and extra sot are

9 &0 && &' &7 &$

=lib =proc =mnt =tmp =user =opt

Linux %asic .ommands


-hutdown Command (nit + .!utdo n t!e system
8

RHCE (Red Hat Certified Engineer)

Halt .!utdo n:1!:no .!utdo n:1!:7 Restart Command (nit 8 Reboot 5ltJCtrlJ-el .!utdo n:1r:7 Lo3o// Command Exit Logout CtrlJd .lear screen Command Clear CtrlJl(L) >ind Command 4ind91name fname 4ind 91nameEMboo#M *rep boo#9root

.!utdo n t!e system .!utdo n t!e system no .!utdo n t!e system in 7 minutes -escription n t!e system n t!e system n t!e system n t!e system in 7 minutes

.!utdo .!utdo .!utdo .!utdo

-escription Logout t!e current user Logout t!e current user Logout t!e current user -escription Clear t!e screen Clear t!e screen -escription .earc! for file named HfnameE inE 9Edirectory .earc! for file containing text Hboo#EinE9Edirectory .earc! for file containing t!e specified text in text H9rootE directory

>ile =Director1 %asics


Command /#dir name Touc! name Touc! &fname Rmdir name Rm name Rm1rname Rm1rf name /ore name Cat name -escription /a#es a folder (directory) Creates a file Creates a !idden file Remove an empty folder (directory) Removes a file or an empty folder (directory) Removes a file or an full folder (directory) it! confirmation Removes a file or an full folder (directory) it!out confirmation 2pens t!e file read1only mode page by page 2pens t!e file in read Nonly mode
F

RHCE (Red Hat Certified Engineer)

Cp fname9!ome Cp fname 9 !ome9a Cp fname fnamel Cp1r fname 9!ome /v fname9!ome /v fname linux (s (s Na (s N4 (s1$ = d Cd&& Cal Cal 6++F more Cd9!ome General .ommands Command -ate "sers 3!o !oami !istory History1c /an command Command1!elp .tartx updated )term

Copy file named HfnameE to H9!omeE directory Copy file named HfnameE toE9!omeEdirectory it! ne name HaE Copy file named HfnameEto t!e same directory it! ne HfnamelE Copy folder named HfnameE toE 9!omeE directory Cut file or folder named HfnameE to H9!omeE directory Rename file or folder named HfnameE to HlinuxE .!o s t!e contents of t!e current directory it! out !idden files colors,3!iteOfile, BlueO folder, *reen Ofull permission& Red Ocompressed files& .!o s !idden files it!in t!e current directory .!o s t!e contents of t!e current directory it! files types .!o s files and directories it! permissions (t s!o present or#ing directory C!ange directory one step bac# .!o calendar of t!e mont! .!o calendar of t!e year page by page *o to H9!omeE directory -escription (t s!o present date and time (t s!o s current logged in users .!o s current user .!o s all logged in users .!o s $+++ previously used commands Clears !istory .!o s !elp about t!e specified command .!o s a s!ort !elp about t!e specified command .tarts x indo system "pdate t!e database of files on all file .ystem attac!ed to t!e Linux root directory 3!en you run t!is command at grap!ical terminal& (t opens t!e blac# P !ite terminal

/ounting P "nmounting -rives


Mountin3 ? 0nmountin3 .DR<M Dri4e B

RHCE (Red Hat Certified Engineer)

Command /ount9mnt9cdrom or mount9dev9cdrom9mnt9cdrom /ount9mnt9cdrom$ 2R /ount9mnt9cdrom$9mnt9cdrom$ "nmount 9mnt9cdrom, umount9mnt9cdrom$ E@ect or e@ect Nt9dev9cdrom, e@ect9mnt9cdrom,e@ect cdrom E@ect Nt or e@ect Nt9dev9cdrom, E@ect1t9mnt9cdrom,e@ect Nt cdrom "sermount

-escription /ounts C-1R2/ -rive /ounts secondary C-1 R2/ drive "nmounts C-1R2/ -rive E@ects C-1R2/ Close C-1R2/ tray Launc!es a grap!ical application for mounting

5ote: you can use cdrom$,6, and ; instead of C-rom in t!e commands for secondary and ot!er C-1R2/ drives& Mountin3 ? 0nmountin3 >lopp1 Dri4e Command -escription /ount9mnt9floppy or /ount9dev9fdo9mnt9floppy /ounts floppy drive /ount9mnt9floppy 4do (for drive 5)4d$ (for drive B,) "mount9mnt9floppy "nmounts floppy drive Mountin3 ? 0nmountin3 0-% dri4e Command -escription Cd9mnt Create a directory in9mnt directory /#dir flas! mount9dev9sda or sdal9mnt9flas! /ount ".B drive to 9 mnt9flas! directory "nmount9dev9sda or sdal "nmounts ".B drive 5ote. (f t!e ".B drive (flas! drive& -igital camera drive &etc) is in ".B pot $ mount it t!roug! sda& (f t!e it is in port 6 mount it t!roug! sda $& Mountin3 ?0nmountin3 2indows > T dri4es Command -escription Cd9mnt /#dir cdrive Create a directory in9mnt directory 4dis#1$ .!o s file system list /ount9dev9!dc$9mnt9cdrive /ount !dc$ to9mnt9cdrive directory "nmount9dev9!dc$ "nmounts !dc$
%

RHCE (Red Hat Certified Engineer)

5ote. Hdc$ contrary on t!e drive you ant to mount& (t mig!t be !dc6 for drive -& you can see t!e file system list for information

utomount
(f you ant you Linux 29. to automatically mount your indo s 45T drive so do t!e follo ing open 9etc9fstab file and rite t!e first command at t!e end or t!e file 9dev9!dc$ 9mnt9c auto defaults $$ 9dev9cdrom 9 mnt9cdrom auto defaults $$ To amount cdrom use t!e second command& @+ 9ditor T!is is one of t!e L('") standard text editors t!e text editors or# as indo s notepad T!ere are t!ree text editors in Linux, D( Dim, t!is stands for D( improved, it is D( but it! an ) interface& (t is still po erful but menus, (C2' and buttons ma#e it easier to use& Emacs, t!is editor !as become a standard next to D( it is also very complex but !as a ) interface so it is easier to learn it can bro ser t!e eb send and c!ec# e1mail @i editor commands Command -escription Di abc To create and open a ne file in vi editor or to edit in a created file9 ( To go to insert mode (editing mode) E.C To Kuite insert mode& ) Clic# under t!e c!aracter and press x to delete it& <x Lines x to delete specified letters& (&e & < x Lines x to delete a complete ord& <d Lines d to delete specified ord (&e&< -d To delete a complete line < dd Lines dd to delecte specified lines &(&e&<dd -e To delete t!e coming text of t!e ord 9linux To searc! for ard Qlinux To searc! bac# ard ' To searc! again CtrlJg .!o t!e name of current file being edited
$+

RHCE (Red Hat Certified Engineer)

ggD* " < s!ift Jg Ly < yy = , K , ,KI

.elect all To "ndo Line number s!iftJg to go t!e specified line&(&e&< s!iftJg Lines yy to copy current line Lines yy to copy specified lines (&e&<yy To paste copied lines To save and exit .aves t!e file To exit t!e file it!out saving

0ser ccount ? 3roup Mana3ement 0ser accounts ? 3roup t1pes .uper user account P group (Built Nin user 5ccount P groups) 'on built1in user accounts P groups .ystem user account P group -uper user accounts ? 3roups .uper user account P groups are t!ose !ic! are automatically created& Root O 5dministrator 'obody O *uest 5on %uiltAin user accounts ? Groups 'on built Nin user accounts P groups are t!ose !ic! e manually create (&e&ali, 5!mad -1stem user accounts ? Groups .ystem user accounts P groups are t!ose !ic! are automatically generated it! installation of different services R+Ds "ser accounts P *roups Root 'obody .ystem user accounts 'on built1in user accounts 0sers and 3roups /iles
$$

R(-s + %% $1<%% 7++187,+++

RHCE (Red Hat Certified Engineer)

4ile -escription 9etc9pass d .!o s all created users it! t!eir R(-s 9etc9s!ado .!o s all created users it! encrypted pass ords 9etc9group .!o s all created groups it! t!eir R(-s 9etc9s#el T!is is li#e t!e all users folder in indo s 3!en you open9etc9pass d file t!e user record ill be save as t!e follo ing, 5li,x,7++,comment,9!ome9ali,bin,bas! 5liO"95,)Opass ord exist, 7++ O "(-, 7++ O *(-, comment, 9!ome9aliOprofile, To remove a user pass ord @ust remove t!e x from user record

0ser account ? 3roup commands Command -escription "seradd a!mad Creates user named a!mad& 3!en an user is created it creates a group it! t!e same name and member t!e user of t!e group =ass d a!mad To give pass ord to user named a!mad =ass d To c!ange pass ord of current logged in user&

"serdel a!mad "sermod1$ ali a!mad L (login) *roupadd abc *roupdel abc "seradd1g root abc "sermod1g root abc "sermod1* root,nobody abc *roups abc =ass d1$ Gabee! =ass d1 u Gabee!

-eletes user named a!mad -eletes user named a!mad Creates group named abc -eletes group named abc Creates user named abc and ma#e it member of root and nobody groups /oves user named abc to root group /oves user named abc to root and nobody groups .!o user As group members!ip To loc# a usern account To unloc# an user account

0ser Dis, Buota "ser dis# Kuota is used to set a limited amount of dis# to user&
$6

RHCE (Red Hat Certified Engineer)

-is# Kuota is divided into to parts, Hard >uota .oft >uota Hard dis# >uota is used to set a limited amount of -is# to a user -is# Kuota is divided into t o parts, Hard >uota .oft >uota Hard Buota Hard Kuota is limited and can not be exceeded -o/t quota Limited, but can be exceeded -teps /or settin3 dis, Buota $& open t! fstab file Hvi9etc9fstabE 6& riteE,usrKuota Hnear defaults, L5BELO9!ome 9!ome ext; defults, usrKuota ;& *o to H9!omeE directory and created a file name HaKuota&userE& RC-9!ome Rtouc! aKuota&user O file !ere t!e Kuota information ill be saved in encrypted form <& mount1o rmount9!ome O refres! information in fsttab 7& >outac!ec#1auv O scan and updates Kuota set on users 8& edKuota1u a!mad OTo set Hard or soft Kuota on user a F& edKuota1t O To set grace time Executed it! t!e command edKuto1fE&grace period is a time limit before t!e soft limit is enforced for a file system it! Kuota enabled time units of sec(onds), min(utes), !our(s), day(s), ee#(s), and mont! (s) can be used to set grace time rite time, min or time minutes under t!e grace E&g& $,min&$+& minutes B& Kuotaon1 auv O To turn on dis# >uota

>uotaoff Nauv O To turn off dis# >uota& RepKuota N a O .!o report about -is# >uota >uota O 3!en a user is logged on t!e Kuota Command s!o s t!e current user dis# Kuota limit, used dis# Kuota by user and grace time& Red Had )ac,a3e Mana3ement .ommand Description
$;

RHCE (Red Hat Certified Engineer)

.!o all installed pac#ages C!ec# pac#age !et!er installed or not .!o pac#ages contains Gip .!o all installed pac#ages (order by last installed pac#age) Rpm1Ks #udGu -isplay t!e states of file in t!e pac#age t!e state of eac! file is one of normal, not installed or replaced& Rpm1Ki Gip To s!o information about t!e pac#age Rpm NKl gGip .!o all installed files Rpm N Kd bGip6 .!o document file Rpm N Kc named .!o configuration file Rpm Ne #udGu To remove t!e pac#age Rpm NeSnodeps #udGu To remove t!e pac#age by forexe 5ote: &rpm (Red Hat pac#age manager) is t!e Binary pac#age in Red Hat Linux )ac,a3in3 and compression )ac,a3in3 so/tware Tar Tip(bot! pac#age and compress t!e file) .ompression so/tware *Gip BGip6 Tip(bot! pac#age and compress t!e file)

Rpm Niv! pac#agename&rpm Rpm Niv! N nodeps pac#age&rpm Rpm1iv! Noldpac#age name&rpm Rpm N"v! N oldpac#age name&rpm Rpm1Ka Rpm NKa gGip Rpm1Ka grep Gip Rpm1Ka1list

To install t!e pac#age -on?t do a dependency c!ec# before installing 5llo an upgrade to replace a ne er pac#age it! an older one To upgrade t!e pac#age

)ac,a3in3
$<

RHCE (Red Hat Certified Engineer)

Command Tar cvf abc,tar $ 6 ; < 7 8 Tar tvf abc&tar

-escription =ac#age files named $ 6 ; < 7 8 in abc&tar Die contents of t!e file named abc&tar

(f e ant to use gGip and bGip6 compression t!e files first s!ould be pac#aged using tar& G*ip compression command *Gip&abc&tar BunGip6 ac&tar&gG %*ip' compression .ommand %*ip' abc.tar %un*ip abc.tar.3* -escription Compress t!e pac#age named abc&tar using gGip "ncompress t!e file named abc&tar&gG Description Compress t!e pac#age name abc&tar using bGip6 "ncompress t!e file named abc&tar&bG6

*ip pac,a3in3 and compression .ommand Description Tip xyG&Gip $ 6 ; < 7 8 Compress and pac#age t!e file named $ 6 ; < 7 8 it! a name xyG Gip soft are "nGip xyG&Gip "ncompress t!e file named xyG&Gip -i*e chec,in3 .ommand -u #!an -u1! #!an -is# usage -u N! 9bin -f N! 9 !ome -is# free Description s!o s siGe of file or directory named #!an .!o s siGe of file or directory named #!an on 0Bs, /Bs, *Bs .!o siGe of 9bin directory on 0Bs, /Bs, *Bs .!o fie system, total& "sed and free space of 9!ome directory

Run Le4els T!ere are F run levels in Linux Run levels -escription 9etc9rc&d9init + .!utdo n mode 9etc9rc&d9init $ .ingle user mode (pass ord recovery ,etc) 9etc9rc&d9init 6 Text mode it!out net or#ing 9etc9rc&d9init ; Text mode it! net or#ing 9etc9rc&d9init < "ndefined (empty) 9etc9rc&d9init 7 *"( mode 9etc9rc&d9init 8 Reboot mode
$7

RHCE (Red Hat Certified Engineer)

Eac! of t!em could be accessed from CL( mode by riting simply initUor complete line9etc9rc&d9init +& 3!en e start t!e Linux it starts t!e *"( mode automatically if you ant to c!ange it to CL( mode& 2pen9etc9inittab file and searc! for id,7, initdefault and t!en c!ange t!e 7 to ; to start CL( mode automatically& -er4ices Mana3ement Mana3in3 ser4ices .ommand C!#config Nlist more C!#config Nlist grep #udGu C!#configS#udGu on C!#config #udGu off C!#config N level ;7 #udGu on C!#configSlevel ;7 #udGu off .ervice net or# start 9stop9restart 9etc9init&d9#udGu start 9stop9restart Description s!o service disabled or enable in modes .!o s specific service 2n service in all modes 2ff service in all modes 2n t!e service in specific modes (Run Levels) 2ff t!e service in specific modes (Run Levels) .tart stop or restart a service in t!e current mode temporarily .tart stop or restart a service in t!e current mode temporarily

-in3le 0ser Mode .ingle user mode is used !en a service causes starting t!e 29. and you ant to stop t!e service or recovery your rootAs pass ord &etc (f t!e Bind service causes to start t!e 29. turn it off as t!e follo ing, Cch,con/i3 named o// )assword reco4er1 (f you lost your root account pass ord you can recovery it t!roug! t!e follo ing ay& $& start t!e computer select Red Hat Linux in grub and press HEE 6& .elect second line (#ernel9) and press HEE again ;& press t!e space button and rite single t!e press t!e enter button and press HBE to boot into single user mode (init6) <& !en t!e single user mode starts rite pass d press t!e enter button and rite ne pass ord and confirm pass ord -hA'.08C passwd
$8

RHCE (Red Hat Certified Engineer)

The password has been reco4er1:

)rocess Mana3ement !)s and Dill .ommands" .ommand Description Top .!o s all running tas#s live it! =(-,/emory usage ,C=" usage etc CtrlJc to close it ps .!o a snaps!ot current terminal As processes pstree .!o a snaps!ot all terminals? processes it! a tree s!ape =s 1aux .!o a snaps!ot all terminals processes it! user =(- memory usage, C=" usage& =rocess name etc 0ill ;$%+ To stop t!e ;$%+ process (end tas#) 0ill K ;6$% To stop t!e ;6$% process immediately 5etwor, .ommands Description netconfig to assign t!e primary (= to t!e =C 'etconfig 1 1 device et!+, $,6, etc To assign more (=s to t!e computer 9etc9init&d9net or# start T!e stacdard command for start, stop or 9stop9restart restarting a service (fconfig .!o o n (= address (fconfig et!+ $+&+&+&$ net or# To assign t!e primary (= to t!e =C and 677&+&+&+ up start t!e net or# service =ing $+&+&+&6 To ping a computer (fdo n9up et!+ To disable or enable t!e L5' card (fdo n et!+,$,6, etc To disable secondary (=s 9etc9sysconfig9net or#1 T!e (=, sudnet mas# and gate ay are save scripts9iffg et!+ !ere 9etc9resolv& conf Contains -'. information 9etc9!osts T!e !ostname& 4>-', and (= of t!e =C are c!anged from !ere !ostname .!o current !ostname Hostname corvit To c!ange t!e !ostname
$F

.ommand

RHCE (Red Hat Certified Engineer)

nsloo#up Traceroute 'etstat Nan

&ya!oo&com

To c!ec# -'. server .!o s (= of t!e ya!oo ebsite .!o s =orts and (=s

-ource compilation Red Hat for t!e first time created executable pac#ages called&rpm file as t!e &exe of indo s most of t!e soft are doesn?t come in t!is type executable file &you ill find most of t!e Linux soft are in source code(C or CJJ code)compiling source is called source compilation Compiling source code !as t!ree steps& Requirements *cc *libc1devel *cc1cJJ LibstdcJJ1devel ma#e #ernel1!eaders .ompilation .ource code comes it! a compressed pac#age so uncompress t!e pac#age and t!en go to t!e uncompressed directory and follo t!e bello commands& Runnin3 E.on/i3ureF /ost of t!e pac#ages comes it! a HconfigureE script !ic! c!ec#s if t!e program can be compiled on t!e current system if an t!ing is missing it ill inform you about t!at& Lou can run t!is script by typing t!e follo ing command in t!e directory of a source code& R&9configure (ta#es a fe minutes)

Runnin3 Ema,eF (f t!e HconfigureE script as successful you can go a!ead by typing t!e ma#e command in t!e source codes? directory for compiling t!e code& Rma#e Rma#e install (ta#es a fe minutes) (ta#es a fe minutes)

$B

RHCE (Red Hat Certified Engineer)

for uninstalling t!e program go to t!e source codes? folder and rite t!e follo ing command& Rma#e uninstall (ta#es a fe minutes)

>iles and >olders )ermission 'umerical /et!od Read O < 3rite O 6 Execute O $ To 3i4e /ull permission add all o/ the them. 9.3. $G'G&;6 To show /ile t1pe and permissions set on users. 0se is Hl Cis A&

<wner -ame Group 0sers D rwx 4ile type rwx rwx ot!er users

To set permission on a file or folder use c!mod command& 2t!ers Rc!mod F 7 7 file or folder 2 ner *roup <J6J$OF means full permission& <J$O7 means t!e rite and executes permissions& .ymbolic /et!od Read O r 3rite O Execute O x To set /ull permission write all to3ether .9.3. rwx
$%

RHCE (Red Hat Certified Engineer)

2 ner O o 2t!er users O u *roup O g To set permission on a /ile /older use chmod command. To set permission on can be o u. Cchmod 3Grwx /ile or /older >ull permission Cchmod Gx /ile or /older .an be r w Ma,e the /ile or /older executable to all users. <wnership To ta#e or give o ners!ip of a file or folder to a user e use t!e follo ing command T!e user to !ic! you ant to give o ners!ip of t!e file or folder& Rc!o n ali,guest fileorfolder 5 group to !ic! you ant to give o ners!ip too& (f you donVt specify group t!e o ners!ip ill be given to t!e specified user and t!e group !ic! t!e user is member of& Rclo n ali fileorfolder 0ser account !password" policies T!e pass ord policies could be accessed in t!e belo files& 9etc9login&defs T!ere are four pass ord policies, =5..:/5):-5L. =5..:/(':-5L. =5..:/(':LE' =5..:35R':5*E
6+

RHCE (Red Hat Certified Engineer)

=5..:/5):-5L.O /aximum pass ord age& =5..:/(':-5L.O /inimum days allo ed bet een pass ord c!anges, =5..:/(':LE'O /inimum pass ord lengt! to be accepted& =5..:35R':5*EOnumber of days !en t!e 2. starts arning before a pass ord expires&

@->T) (Dery .ecured 4ile Transfer =rotocol) D.4T= is t!e 4T= server of Linux& =ac#age DsftpdUUUU&rpm T!e pac#age is in C-; Configuration 4ile 9etc9vsftpd&conf (t contains all configuration of D.4T=-efault file storage Location 9var9ftp T!is is t!e default location for 4T= file storage& .teps for installation P configuration $& insert C-; and install D.4T=-UU&rpm pac#ages 6& *o to9var9ftp and put files ;& .tart 4T= service

Rservice vsftpd start To start t!e vsftpd service temporarily Rc!#config vsftpd on 3!en computer start t!e vsftpd service automatically starts& 5ccessing 4T=
6$

RHCE (Red Hat Certified Engineer)

To access 4T= server go to explorer in Linux or eit!er in indo s mac!ine and rite& ftp,99ip of ftp server e&g& ftp,99$+&+&+&$

Linux so/tware Router T!e soft are to router is used for @oining different subnets Configuration $& 5ssign (=s from every subnet to t!e computer 6& 2pen t!e configuration file& Rvi9etc9sysctl&conf and c!ange t!e Gero to one net&ipv<:for ardO + $ ;& (f you ant to prevent restarting t!e =C to ta#e effect& T!en open anot!er configuration file Rvi9proc9sys9net9ip:for ard and c!ange t!e Gero to one& <& 2n client sides give t!e (= of server of same range as t!e client in get ay&

66

RHCE (Red Hat Certified Engineer)

-amba ser4er .amba server is used for Linux to indo s files and !ard are s!aring =ac#ages .amba&&&rpm .amba1commonUrpm .amba1clientUrpm T!e pac#ages are in C- $ Configuration file 9etc9samba9smb&conf .teps for installation P Configuration $& insert C- $ and install .amba pac#ages sambaUrpm, samba1commonU rpm, samba1clientUrpm 6& 2pen t!e configuration file and configure t!e samba as follo ing, Rvi9etc9samb9samb&conf
2or, 3roup;wor,3roup
Rsearc! for security and c!ange user s!are .ecurityOs!are Rsearc! for WtmpX Y WtmpX Y =at! O 9tmp Y read only O no Y public O yes Rremove all semicolons from tmp and belo text Rt!e tmp directory !as been s!ared& 'o !en you put a folder in t!e tmp directory it ill be s!ared& To s!are C-R2/ and floppy @ust searc! for mnt&and remove t!e semicolons& To s!are your o n folder from a specific location, W=cX Rs!are name =at! O9!ome9pc Rlocation of t!e folder Read onlyO no R not read1only =ublic Oyes R allo ed to everyone 3ritable1yes R rites permission RRemember, a folder in t!e root directory cannot be s!ared& Rsave t!e file , K 6;

RHCE (Red Hat Certified Engineer)

;& .tart t!e .amba service& Rservice smb start <& accessing Linux s!ared folders from indo s RunZ [[$+&+&+&$ R(= of Linux mac!ine 7& 5ccessing indo sip1" administrator R s!o indo s s!aring enter pass ord of t!e 5dministrator account Rsumclient 99 indo sip9folder1" administrator R2pen s!ared folder enter pass ord of T!e administrator account 5>!5etwor, /ile s1stem" '4. server is used for Linux to Linux files and Hard are s!aring& =ac#ages 'fs1utilsUrpm Red!at1config1nfsUrpm(for *"( /ode) T!e pac#ages are in C- $ Configuration file 9etc9exports -teps /or installation ? con/i3uration 4or s!aring C-R2/ and 4loppy, (nsert C$ and install 9mnt9cdrom $+&+&+&+9B (ro) '4. pac#ages nfs1utilsUrpm and red!at1config1nfsUrpm 9mnt9floppy $+&+&+&+9B ) ;& 2pen t!e(r configuration file and configure t!e '4. as follo ing, $+&+&+&+9B t!e net or# (= for !ic! t!e s!are is allo ed 9B is prefix Rvi9etc9exports /as# means t!e net or# Bits in class 5& 9$8 for class B& 96< for class c& (r ) read and rite permissions&(ro) read only permission
4or s!aring a specific folder 9tmp9info $+&+&+&+9B (r ) 9!ome9info $+&+&+&$9B (ro) Rt!e s!are is available to t!e specific (= only Remember: if you don not specify t!e (= class or specific (= s!are ill be available to every one& 5nd a folder in t!e root directory cannot be s!ared 6< Rsave t!e file , K

RHCE (Red Hat Certified Engineer)

6& .tart t!e '4. service& Rservice nfs start ;& .tart t!e '4. service on client& Rservice nfs strat <& accessing ot!ers s!aring Rs!o mount Ne $+&+&+&$ Rs!o s s!aring of $+&+&+&$ Rmount Nt nfs $+&+&+&$,9mnt9cdrom a!mad Rmount (map) remote C-R2/ to folder named a!mad Rumount $+&+&+&$,9mnt9cdrom Runmounts t!e remote C-R2/ Rmount $+&+&+&$,9tmp9info aa Rmounts (map) remote folder to aa

D5- !%ind" (-omain 'ame .ystem) *"L -'. is a very ell #no n protocol& (t is used for resolving Hostnames and -omain names to (= addresses =ac#ages Bind1utiles1%U&rpm Bind1%U&rpm Red!at1config1bindU&rpm T!e first t!ree pac#ages are in C- $ and t!e Last pac#age is in C-6 Configuration file 4ile 9etc9resolv&conf 9etc9named&conf -tep /or installation ? con/i3uration
67

-escription .etting files for client .etting files for -'. server

RHCE (Red Hat Certified Engineer)

$& (nstall Bind (-'.) pac#ages 6& .et (= to your computer& E&g& $%6&$8B&+&$ ;& C!ange computer name& R!ostname Linux T!e open t!is fileY9etc9!osts\& 3rite (=, 4>-' and Hostname of your computer (=\$%6&$8B&+&$\ N 4>-B \Linux&red!at&com\ N Hostname \Linux\ <& Configuration -'. (Bind) can be configured bot! from text mode and *rap!ical mode e are going to configure it from *rap!ical mode& $& Clic# on Red Hat /ain menu and select system settings& .elect server settings clic# on -omain name service 6& 2r RunZ bindconf Mar,in3 >orward Loo,up Ione !/orward Master Ione" $& Clic# on t!e ne button 6& .elect master loo#up Tone and rite t!e Gone name\red!at&com\ and clic# o# ;& (n .25 field rite \]\ and clic# edit <& clic# add in name server field and rite t!e !ostname \Linux\ 7& Clic# 20 and again clic# 20 8& Clic# 5dd go to !ost tab rite !ostname in !ost field and (= 5ddress in 5ddress field& Host name \Linux\ &(= address \$%6&$8B&+&$\& and clic# 20 F& Clic# add go to 5lias tab and rite 5lias \ second field \Linux\ B& Clic# 20 and again clic# 20 Mar,in3 re4erse Loo,up Ione ! Re4erse Master Ione" $& Clic# on t!e ne button& .elect reverse master Gone rite t!ree octets of (=\$%6&$8B&+\ clic# 20 6& (n .25 field rite\]\ ;& Clic# add in servers field riter t!e Hostname \Linux\ and Clic# 20 <& Clic# 5dd in reverse address table field rite 4>-' and (= address 4>-' \Linux&red!at&com\ (= address \$%6&$8B&+&$\ 7& Clic# 2# and again Clic# 20 8& Clic# .ave to save t!e -'. configuration and Close t!e 3indo 8& .tart t!e -'. service Rservice named start Rc!#config named on
68

\ t!en rite !ostname in

RHCE (Red Hat Certified Engineer)

F& C!ec#ing -'. -'. could be c!ec#ed t!roug! several commands t!e best t!e dig & Rnsloo#up Z &linux&com or (= 3rite \nsloolup\ and t!en rite t!e 4>-' or (= Rdig &linux &com R!ost &linux&com or (=

DH.) -er4er (-ynamic Host Configuration =rotocol) -HC= allo s bosts on a TC=9(= net or# to reKuest and be assigned (= addresses, and also to discover information about t!e net or# to !ic! t!ey are attac!ed )ac,a3e -!cp1;UUUUrpm T!e pac#age is in C-6 .on/i3uration /ile 9etc9d!cpd&conf
-ns1update1style interimY (gnore client NupdatesY .ubnet $+&+&+&+ netmas# 677&+&+&+ ^ R2ptional 2ption routers $+&+&+&$Y 2ption domain1name1server $+&+&+&$ 2ption subnet1mas# 677&677&677&+ 2ption \saif#!an&com\ 3e illdomain1name1server created t!e configuration file it

ouldnVt be available before e create it 9usr9s!are9docs9d!cp1;&+p$$9d!cpd&conf&sample RRange -efining (s t!e ready made -HC= configuration Range dynamic1bootp $+&+&+&6 $+&+&+&$++Y file
-efault1lease1time 6$8++Y -tep /or installation /ax1less1time <;6++Y? .on/i3uration

$& insert C- 6 and install d!cp1;U& Rpm pac#ages, Rreservation 6& 2pen configuration file and configuration t!e -HC= server it! t!e Host max^ follo ing Code ;& Rvi9etc9d!cpd&conf R Client /5C address
Hard are Et!ernet ++,$$,+7,B+,f<,;T 4ixed1address $+&+&+6 _ _ R .ave t!e 4ile , 3K

6F

RHCE (Red Hat Certified Engineer)

<& .tart t!e -HC= service Rservice -HC=- start Rc!#config service d!cpd on To c!ec# t!e list of assigned (=s by -HC= R vi9var9lib9d!cp9d!cp&leases

-amba )D. !)rimar1 Domain .ontroller" .amba =-C is used for to indo s client9server (Linux as server and indo s as client of Linux)&
6B

RHCE (Red Hat Certified Engineer)

=ac#ages .ambaUrpm .amba&1commonUrpm .amba1client Urpm T!e pac#ages are in C- $ Configuration 4ile 9etc9samba9smb&comf .tep for installation P configuration $&(nsert C- $ and install samba pac#ages samba U& Rpm, samba1 common U rpm, samba1client U&rpm 6&2pen t!e configuration file and configure t!e samba as follo ing, Rvi9etc9samba9smb&conf
3or#group O pc&comR rite t!e name of -omain in front of or#group 'etbios name O pc R rite nebios nameO netbios name R searc! for encrypted and c!ange no to yes Encrypted pass ord O yes R .earc! for security and ensure it is user .ecurity Ouser R .earc! for local master and c!ange no to yes Local master O yes R .earc! for domain master and c!ange no to yes -omain master O yes R .earc! for preferred master and c!ange no to yes =referred master Oyes R .earc! for so and c!ange it to 677 .o level O677 R .earc! for WnetlogonX YWnetlogonX R .earc! for domain logon and c!ange no to yes YE)5/=LE -omain logon O yes YE)5/=LE YE)5/=LE YE)5/=LE RRemove all semicolons from 'etlogon and belo text 99 .earc! for WrmpX YWtmpX YE)5/=LE YE)5/=LE YE)5/=LE 6% YE)5/=LE Rremoves all semicolons from tmp and belo text R .ave t!e file , K

RHCE (Red Hat Certified Engineer)

;& .tart t!e samba service& Rservice smb start <& Registering 3indo s client on Linux mac!ine Ruseradd pc6` Oclient computer name it! a ` sign Rsmbpass d1am pc$ O client =C account it!out ` sign 7& C!anging Local Root to -omain root Rsmdpass d N a root T!en enter t!e ne pass ord for domain root account 8& Creating -omain "sers Ruseradd Gabee! Rsmbpass d N a Gabee! Enter t!e pass ord F& "pdate t!e database Rupdated b B& /a#e t!e indo s mac!ine member of Linux -omain and restart t!e =C 3indo s is no client of Linux domain, but you canVt login as Linux user& %& 5llo login on indo s client
;+

RHCE (Red Hat Certified Engineer)

RunZregeditZ H0EL:L2C5L:/5CH('E[.L.TE/[CurrentControl.et[service[netlogn [parameters 2pen t!e string Dalue named reKuiresignorseal and c!ange t!e $ to +clic# 20

5ow 1ou can lo3in s Linux 0ser: pache 2eb -er4er 5pac!e eb server is used for !osting eb sites it!in a L5' as ell on t!e internet =ac#ages Httpd16 U rpm T!e pac#age is in C-$ Configuration file 9etc9!ttpd9conf9!ttpd&conf .teps for installation P configuration 8& insert C- $ and install 5pac!e pac#age !ttpd16 Urpm F& 5ssign different (=s to t!e computer for Dirtual and (= based Hosting& B& C!ange t!e computer 'ame& R!ostname pc$ open t!e follo ing file and rite (=, Hostname and 4>-'& Rvi9etc9!osts %& put or create t!e eb sites in follo ing location& 9var9 9!tml To vreate an Html file rite Rvi index&!tml $+& 2pen t!e configuration file and configure t!e 5pac!e as follo ing, Rvi9etc9!ttpd9conf9!ttpd&conf

;$

RHCE (Red Hat Certified Engineer)

.earc! for B+& *o to t!e start of t!e line and remove R& T!en remove local!ost&localdomain& rite your system 4>-' for example &pc$&com,B+ *o to t!e end of t!e file to add entries Dirtual Hosting 'ame virtual !ost $+&+&+&6 avirtualHostZ .erver name &ya!oo&com -ocument Root \9var9 9!tml9ya!oo\ a9DirtualHostZ ,'ame Dirtual Host $+&+&+&6 (= Based !osting 'ame virtual !ost $+&+&+&; R (t can be accessed by bot! (= and name aDirtual Host $+&+&+&;Z .erver 'ame &Linux&o&g -ocument root \9var9 9!tml9Linux\ a9Dirtual!ostZ Rsave t!e file

Hosting 4T= on 5pac!e 3eb server 5fter installing and configuration 4T= open t!e apac!e configuration file 'ame virtual !ost $+&+&+&6 avirtual !ost $+&+&+6Z .erver name fres!rpns&net -ocument root \9var9ftp\ a9virtual HostZ Rsave t!e file 5dd -'. entry fro 4T= .ite& T!e 4T= site could be accessed as, 4T=,99fres!rpm&net

;6

RHCE (Red Hat Certified Engineer)

8& -'. Configuration 2pen -'. and configuration t!e -'. normal& 5dd for ard /aster Gone for eac! sit& (n Gone name rite site name&i&e urf&net F& .tart t!e 5pac!e and -'. services Rservice named start R-'. Rservice !rrpd start R apac!e T!e sites are no accessible on t!e net or#I

+nstallin3 new hardware To install a ne !ard are e use t!e #udGu command t!e !ard are li#e ".B are automatically detected no installation is needed for t!em 4or installation of a ne device use t!e follo ing command R#udGu 5nd t!en select t!e configure button 4or mouse and printer configuration use t!e Rsetup command& 4or device information in gnome go start Jsystem toolsJ !ard are bro ser

;;

Vous aimerez peut-être aussi