Professional Documents
Culture Documents
NETWORK ADMINISTRATION
NETWORK ADMINISTRATION
Khoa CNTT H Nng Lm TP. HCM 01/2007 2/18
The Virtual File System Structure
The Virtual File System Structure
VFS nh ngha
tp hop cc chc
nng m mi mt
filesystem phi
c. Giao tip ny
xy dung trn tp
hop cc thao tc
gn lin ti 3 i
tuong l:
1. filesystems,
2. inodes, and
3. open files.
Khoa CNTT H Nng Lm TP. HCM 01/2007 3/18
! th"#$ t%& ti# EXT'
! th"#$ t%& ti# EXT'
-node chi luu nhng thng tin v nhng tp tin v thu muc
uoc trong h thng tp tin. Nhung chng khng luu tn tp tin
v thu muc thuc su. Mi tp tin tao ra s uoc phn b mt
inode luu nhng thng tin sau:
Ngui s hu tp tin.
Cc thu muc trong EXT2 uoc xem nhu nhng tp tin c bit
cha nhng con tr n cc i-node ca cc entry.
Khoa CNTT H Nng Lm TP. HCM 01/2007 4/18
I(N)*e a#* Data +l)c, i# EXT' FS
I(N)*e a#* Data +l)c, i# EXT' FS
Khoa CNTT H Nng Lm TP. HCM 01/2007 5/18
I(N)*e a#* Data +l)c, i# EXT' FS
I(N)*e a#* Data +l)c, i# EXT' FS
m)*e
O-#er I#.)rmati)#
Si/e
Timestam&s
The time that the inode was created and the last
time that it was modified
Data+l)c,s
l# abc habc
l# 7s abc sabc
ls 7i abc habc sabc
12345 abc 12345 habc 12345 sabc
Quyn han th hin (ls l) trn symbolic link khng bao gi thay
i v lun l lr-8r-8r-8. Khi thay i quyn han trn symbolic
link th quyn han s thy i trn original file (tt nhin s thay
i trn tt c hardlinks).
I*e#tities
u the user who owns the file (that is, the owner)
$ the group to which the user belongs
) others (not the owner or the owner's group)
a everyone or all (u, g, and o)
Permissi)#s
r read access
- write access
8 execute access
Acti)#s
= adds the permission
( removes the permission
> makes it the only permission
Khoa CNTT H Nng Lm TP. HCM 01/2007 14/18
<hm)* : Usi#$ a .la$ meth)*
<hm)* : Usi#$ a .la$ meth)*
The total for the user is six, the total for the group is
six, and the total for others is four. The permissions
setting is read as 664.
/etc/group
Khoa CNTT H Nng Lm TP. HCM 01/2007 27/18
A**i#$ a User
A**i#$ a User
To add a user to the system:
1. ssue the useradd command to create a locked user
account:
useradd [options] <username>
2. Unlock the account by issuing the passwd command
to assign a password and set password aging
guidelines:
passwd <username>
Khoa CNTT H Nng Lm TP. HCM 01/2007 28/18
The c)mma#* li#e )&ti)#s .)r usera**
The c)mma#* li#e )&ti)#s .)r usera**
usermod -L username
change -d 0 username
This command sets the value for the date the password
was last changed to the epoch (anuary 1, 1970). This
value forces immediate password expiration. t means
that the user must to set a password the first time the
user log in.
Note, this process does not work if the user logs in using
the SSH protocol.
Khoa CNTT H Nng Lm TP. HCM 01/2007 35/18
A**i#$ a ]r)u&
A**i#$ a ]r)u&
groupadd itgroup
EVCE=eth0
BOOTPROTO=none
ONBOOT=yes NETWORK=10.0.1.0
NETMASK=255.255.255.0
PAR=10.0.1.27
USERCTL=no
EVCE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
Khoa CNTT H Nng Lm TP. HCM 01/2007 47/18
the c)#.i$ura+le &arameters i# a# Ether#et
the c)#.i$ura+le &arameters i# a# Ether#et
i#ter.ace c)#.i$urati)# .ile
i#ter.ace c)#.i$urati)# .ile
/etc/rc.d/init.d/network <action>
NETWORKNG=yes
HOSTNAME=bigboy
GATEWA=192.168.1.1
Some people don't bother with this step and ust place the
route add command in the file /etc/rc.d/rc.local
Khoa CNTT H Nng Lm TP. HCM 01/2007 51/18
\etc\sysc)#.i$\#et-)r,
\etc\sysc)#.i$\#et-)r,
ou can manage the duplex and speed settings of your NC with the
mii-tool command. t is best to use this command with compatible
hardware.
n the example below, we can see the output of the command verbose
-v mode. n this case, negotiation was OK, with the NC selecting
100Mbps, full duplex mode (F).
192.168.1.101 smallfry
ou can also add aliases to the end of the line which will
allow you to refer to the server using other names. Here we
have set it up so that smallfry can also be accessed using
the names tiny and littleguy.
Usually the very first entry in /etc/hosts defines the P address of the
server's virtual loopback interface. This is usually mapped to the name
localhost.localdomain (the universal name used when a server refers
to itself) and localhost (the shortened alias name). By default,
System inserts the hostname of the server between the 127.0.0.1 and
the localhost entries like this:
When the server is connected to the nternet this first entry after the
127.0.0.1 needs to be the fully qualified domain name (FQN) of the
server. For example, bigboy.mysite.com, like this:
Some programs such as Sendmail are very sensitive to this and if they
detect what they feel is an incorrect FQN they will default to using the
name localhost.localdomain when communicating with another
server on the network. This can cause confusion, as the other server
also feels it is localhost.localdomain.
Shell: redhat-config-network
Khoa CNTT H Nng Lm TP. HCM 01/2007 58/18
OYerYie-
OYerYie-
After adding the Ethernet device, you can edit its configuration
by selecting the device from the device list and clicking Edit. For
example, when the device is added, it is configured to start at
boot time by default. To change this setting, select to edit the
device, modify the Activate device when computer starts value,
and save the changes.
f you associate more than one device with an Ethernet card, the
subsequent devices are de7ice aliases. A device alias allows you
to setup multiple virtual devices for one physical device, thus
giving the one physical device more than one P address. For
example, you can configure an eth1 device and an eth1:1
device.
Khoa CNTT H Nng Lm TP. HCM 01/2007 63/18
Ma#a$i#$ DNS Setti#$s
Ma#a$i#$ DNS Setti#$s
Khoa CNTT H Nng Lm TP. HCM 01/2007 64/18
Ma#a$i#$ )sts
Ma#a$i#$ )sts
Khoa CNTT H Nng Lm TP. HCM 01/2007 65/18
Ma#a$i#$ )sts
Ma#a$i#$ )sts
Select the alias and click the Activate button to activate the
alias. f you have configured multiple profiles, select which
profiles in which to include it.
Khoa CNTT H Nng Lm TP. HCM 01/2007 69/18
ActiYati#$ DeYices
ActiYati#$ DeYices
T) Yeri.y that the
alias has +ee#
actiYate*1 use
the c)mma#*
i.c)#.i$0 The
)ut&ut sh)ul*
sh)- the *eYice
a#* the *eYice
alias -ith
*i..ere#t IP
a**ress