You are on page 1of 31

linux

flynng

1994 Young Mark Ewing Red Hat R
ed Hat Linux Linux Red Hat
Linux Red Hat Linux R
ed Hat Linux Mandrake SOT Best Connectiva Abit Kondara
Red Hat Linux
2001 4 16 Red Hat Red Hat Linux 7.1 Red Hat
Linux

1.1
1 Linux 2.4.2
2
Xfree86 4.0.3
3

4
Big5
5 CPU CPU 4
G PCI 64G

6 USB ZIP
Red Hat Linux 7.1 updfstab

7 Linux apachec
onf, bindconf, printconf GUI
APACHE BIND

8 PCMCIA PCMCIA

10
1.2
Linux
Linux

1 CPU Redhat Linux 7.1 CPU


CPU Intel 80386 80486 AMD 486
5x86 K5 CPU CPU
CPU CPU Intel Celeron Pentium
Pentium II Pentium II Xeon Pentium III Pentium III Xeon Pentium Pro Pentium
with MMX
2 Red Hat Linux 7.1 X86
3 64M 128M
4 CDROM IDE SCSI
5 SCSI Adapterc 152x 154x 274x 284x 294x 394 aic7890-based
SCSI SCSI
6
Linux
X Window

Intel i810 Intel
http://support.intel.com/support/gr...xinstal.htm
7
Red Hat Linux 7.1 Creative Labs Sound Blaster
Live
8 Ne2000 PCI
9
Redhat Linux 7.1 X86
8M 64M
Red Hat
http://hardware.redhat.com/hcl/genp...gi?pagename=7.1

2.1
1 Linux

,

CD-ROM (IDE, SCSI)
SCSI

PS/2
Microsoft,Logitech, MouseMan,


(), ( PCI
.)

Windows ->
2


2 CMOS :
Anti vrius Disable
Swap A,B Disable
Boot Sque CDROM,A,C
Memory Hole:Disable LINUX 16M
3 LINUX
Linux Linux native() Linux Swap()
LINUX LINUX
16~32M 8
16M
200M
DOS \\\\\\'C \\\\\\'
LINUX Linux
Linux hda1

hd IDE sd( S
CSI ) a,b,c,d hda IDE 1
IDE 2 hdc
() 1 4 5 hda3 IDE

Linux
/() /usr
Linux
/()
4 LINUX :
MS-DOS/WIN
LINUX LINUX

1) MSDOS
LINUX
2)
.
. MS-DOS
. FDISK LINUX

.
3)
2.2 CDROM Red Hat Linux 7.1
Red Hat Linux 7.1

1

3
Red Hat Linux 7.1
3

Linu
x Red Hat Linux 7.1

Red Hat

Red Hat Linux 7.1

CDROM

1 Windows
Red Hat

2 text

3 expert
Linux

4 Linux
Linux Linu
x
5 Linux
linux dd


Red Hat Linux 7.1 18 english

Red Hat

us
Red Hat Linux 7.1 Logitech iTouch
104

Red Hat Linux 7.1 Workstation Server Laptop Custom Upgrade Existi
ng

1 Workstation
Linux Linux Windows 98
Windows 98
LILO NT
NT
2
Server System
4


PC
3 Laptop

4 Custom System Linux


Linux Linux
5 Upgrade Existing System Red Hat Li
nux


Disk Druid fdisk Disk Druid
Disk Druid \\\\\\'Current Disk Partitions\\\\\\'
Mount Point -- Linux Device - Requested -- Actual --
Type --
\\\\\\'Drive Summaries\\\\\\'
Drive -- Geom [C/H/S] --

Total -- Used -- Free --


Bar Graph --
Disk Druid Add -- Edit
-- \\\\\\'Current Disk Partitions\\\\\\' Delete -- \\\\\\'Curr
ent Disk Partitions\\\\\\' Ok -- Back -
Linux 64M 128M 256M

Tab Add \\\\\\'Edit New Partition\\\\\\'


Mount Point
/ ()
Size(Megs) Type
Linux Linux native OK
Linux
Linux Linux Mou
nt Point Type Linux Swap


OK
Linux
LILO
LILO Linux Loader Linux Linux
LILO
LILO
1 MBR
2 Linux
LILO Linux
5

Linux


Red Hat Linux 7. 1
1
High High
2
Medium

3
No firewall


China PRC

1 root

2

a. Shadow Passwords
b. MD5
c. NIS NIS
d. LDAP LDAP
e. Kerberos Kerberos

Printer Support
X Window System X Window
GNOME GNOME
KDE KDE
Mail/WWW/News Tools Mail WEB
DOS/Windows Connectivity DOS Windows
Graphics Manipulation
Games
Multimedia Support
Laptop Support
Networked Workstation Telnet FTP
Dialup Workstation
News Server
NFS Server
6

SMB(Samba)Server Samba NetBIOS


IPX/Netware Connectivity IPX
Anonymous FTP Server FTP
SQL Server postgresql MySQL
Web Server WEB Apache
DNS Name Server
Network Management Workstation SNMP
Authoring/Publishing
Emacs
Development
Kernel Development
Utilities Linuxconf
Everything Linux 2400M




Linux

1
LILO Linux Linux
2 MBR LILO Windows
/sbin/lilo
MBR LILO
3
Linux

Linux

/X Window
Red Hat Linux 7.1
XFree86 4.0


800*600*24 1024*768*24
800*600*16 Ctrl+Alt +-
X Window
X Window OK
OK Linux X Window

NO
Linux
X Window startx
7

Red Hat Linux 7.1

Red Hat Linux 7.1 Kudzu


Configure

2.3

1
FTP
2
NFS
3
SMB
4

1. Linux
Linux
1) LINUX /images boot.img
supp.img
2 /images /install /dosutils RAWRITE.EXE
3 RAWRITE.EXE DOS RAWRIT
E:
C:linst>RAWRITE
Enter disk image source file name:
Enter target diskette drive: A
2. FTP

1
FTP
2
FTP
FTP Linux
FTP IP
3. NFS
NFS NFS
Linux NFS NFS

4. SMB
Windows 9x/NT/2000 Linux

5.
Red Hat Linux

2
RedHat
3
RPMS
Linux

3 Red Hat Linux 7.1


3.1
1.
LILO MBR MBR

Linux Linux
Windows Linux vi /etc
lilo.conf default=windows /sbin/lilo LILO
2.
Linux

Linux
1
root Linux root
root
2
Linux
Linux

1

2

root root root
root
root

Red Hat Linux release 7.1 (Seawolf)


Kernerl 2.4.2-2 on an i686
Home login:root
Password:
Password
Linux
Shell Shell DOS
COMMAND.COM Linux Shell bash csh ksh
root #
$

Windows X
Window
/etc inittab
id:3:default
3 5 X Window

3.
Linux passwd

1

2

3

Red Hat Linux 7.1

$ passwd
Changing password for user1
(current) UNIX password:
New UNIX password:
Retype new UNIX password:
Passwd:all authentication tokens updated successfully

root

4.
root

exit

5.
Linux root

1
CTRL+ALT+DEL
2
reboot
3
shutdown -h now
4
halt
Linux

6.
Linux
Linux

ALT F1-F6
ALT+F2 login:
ALT+F1
Linux

3.2
10

Linux
Linux Window
Linux
1.
Windows 9x
255
Windows 9x Linux Windo
w Linux Linu
x I/O
I/O
I/O
2.
Windows Linux Linux
Windows
mount
Linux Mount Point
/
Windows \
/

/home /usr
/home /usr home usr

Linux
/bin Linux
/dev Linux
/home

/lost+found
/mnt cdrom floppy
mount /mnt/cdrom Mo
unt /mnt/cdrom umo
unt /mnt/cdrom mount /mnt/floppy umount /mnt/floppy
/proc
/sbin
/usr
/usr/X11R6 X Window
/usr/bin /usr/sbin
/usr/include /usr/lib /usr/share
/usr/local
/usr/src Linux
/boot Linux
/etc Linux
/lib
/root root
11

/var
/var/log
/var/spool
Linux
Windows
3.
DOS type
Linux type

1
cat
cat type
cat
type

cat
2
more
cat
more cat type /p more

3
less
less more less

b
p

q
more less cat
4
head
head
head
10
5
tail
head tail

tail -f maillog
4.
Red Hat Linux 7 vi
UNIX
vi
vi
i a
ESC
:q! :wq
5.
DOS copy del move
12

Linux
1
cp /
cp []

a D
OS xcopy /s
f
i f Y
p
r cp

cp

$ cp a.txt b.txt /home/user1
a.txt b.txt /home/usr1
2
rm /
rm []

f
r rm
i
rm root r
m /home/tmp rm -rf /home/tmp rm -rf / home/tmp

3
mv /
mv []

f
i
mv






6.
1
mkdir DOS md mkdir
2
rmdir DOS rd rmdir
3 cd DOS cd
cd
cd/
cd..
cd.

cd /
cd ..
cd .
cd


13

4
pwd
5
ls DOS dir
ls [] []

a
c
l

7.
Linux

r w x
r w x




1


d rwx r-x r- d - c
r w x (
)
r - x

- - -

1
/ chmod
Linux


chmod [who] [opt] [mode] /
who
u
g
o
a
opt
+
-
=
14

mode
r
w
x
a.txt
chmod g+rw a.txt

chmod [mode]
mode rwx
1 0 rwx r-x r--
111 101 100
754
a.txt


rw-rw-r-- 110 110 1


00 664
chmod 664 a.txt
2
chown
chown [] /
R

3
chgrp
chgrp
3.3

1.
Linux root
user1
# useradd user1

/home

# useradd -d /home/xf user1
Shell /bin/bash
Shell /bin/false Linu
x
# useradd -s /bin/false user1
Linux
15


# useradd -g user user1
user
# useradd -G user user1
passwd
2.
userdel
userdel -r
3.
She
ll Linux
usermod -g -G -d -s Shell
/etc/passwd

:: ID: ID::: Shell


*
4.
Linux

groupadd
5.

groupdel

6.
/etc/group
newuser softdevelop softdevelop
softdevelop:x:506:user1,user2
newuser
softdevelop:x:506:user1,user2,newuser
Red Hat Linux userconf

3.4
Linux
Linux

Linux
Linux

16

1.
Linux
1


&

2 at cron crontab Windows


man
2.
Linux ps

# ps
PID TTY TIME CMD
16767 pts/1 0:00 ps
18029 pts/1 0:00 bash
PID ID TTY CMD

ps -auxw
3.

1
CTRL+C
2 ps
kill

3.5


1. df
df Disk Free

# df
FileSystem 1k-blocks Used Available Use% Mounted on
/dev/hda5 4134900 1749728 2175124 45% /
/dev/hda6 6048320 5741092 0 100% /home
6
1
FileSystem
2
1k-blocks K
3
Used K
4
Available

17

5
Use%
6
Mounted on
/home
K df -m M

2. du
du disk usage
# pwd
/var/log
# du
4 ./uucp
776 .
du /var/log
uucp 4K /var/log 776K

-a

-b
-c
3.6
Red Hat Linux
1 rpm software-1.2.3-1.i386.rpm Redhat Linux
2
tar software-1.2.3-1.tar.gz UNIX tar
Linux
---

sfotware-1.2.3-1.i386.rpm
software
1.2.3
1
i386 Intel 80x86
rpm rpm
Linux
1 Windows


2
Windows Windows
tar rpm
1. rpm
rpm Redhat Linux
18


rpm -ivh rpm

rpm
-i
-t
-p
-f
-U
-v
RPM
2


rpm -e
software-1.2.
3-1.i386.rpm
rpm -ivh software-1.2.3-1.i386.rpm

rpm -e software
2
tar
1


tar gzip bz2
gz
tar -xvzf

tar -xvf tar


INSTALL README
./configure
make
make install
make clean

Linux Linux
/usr/local/bin
INSTALL README
2

tar
make uninstall
4 . X Window
4.1 X windows
19



UNIX X Window 1984
DEC Athena X Window 1988 1
X X Window Linux Xfree86 Project Inc. L
inux X Window XFree86
X Window
X Window C/S

X Window
GNOME KDE
X Window
X Window
X Window
X Server
X Client X Client
X Server X Window X Server
X Client
X Client
X protocol X Client X Server X protocol
X Window
AIX CDE SUN OpenServer Linux GNOME KDE

4.2 GNOME
GNOME Miguel De Icazq Red Hat
GNU GNU is Not UNIX

1997 8 KDE QT C++


Miguel de Icaza 250 GNO
ME 14 GNOME Linux
Red Hat Go
Gnumeric GNOMEcal PhotoShop Gimp

GNOME KDE Linux


GNOME GNOME

Programs
1. Applications
1
Dia
2
Calendar
3
Address Book
4
GEdit Windows
5
Gnumeric Linux EXCEL
20

6
2.
1
2
3
3.
1
2
3
4.
1
2
3
4
5
5.
1
2
3

Time tracking tools

Games
Gnome Milnes GNOME
Gnibbles
Freecell Windows
Graphics
Electric Eyes GNOME AcdSee
XPDF Linux PDF
The Gimp Photoshop
Internet Internet
Dialup Configuration Tool
gFTP FTP
pine E-Mail
Netscape
Windows
RH Network monitor
Multimedia
Audio Mixer
CD Player CD
XMMS Winamp

4.3 KDE
KDE 1996 10 X-Window
KDE KFM( IE4.0) KPresenter( PowerPoint) KIllustrator(
CorelDraw Illustrator) GUI
Unix/Linux
KDE TrollTech Qt
Qt C++ Qt
License Qt Qt
License Qt
TrollTech Qt License KDE
KDE
K
KDE GNOME
1. Office
Koffice
1
Kword
2
Kspread Excel
3
Kpresenter PowerPoint
4
Kchart
5
Kiiiustrator
2. Develop
1
Kdevelop KDE
21

3. Applications
1
Advanced Editor
2 Emacs GNOME
Emacs
3
Organizer
4. Internet Internet
1
Kppp
2
Kmail Email Outlook
3
Chat Client IRC
4
KPPPLoad
5
Netscape WEB GNOME
4.4
Red Hat Linux 7.1 X Window GNOME
GNOME KDE

1
X Window KDE
# switchdesk KDE
2
KDE GNOME
# switchdesk GNOME
4.5 Red Hat Linux 7.1
1. TrueType
TrueType , xfs , xfs
fonts.dir
root setup Service xfs
1 XF86Config-4
/etc/X11 vi XF86Config-4
Section "Files"
# FontPath "unix/:7100" ;,
FontPath "/usr/X11R6/lib/X11/fonts/misc:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/misc"
FontPath "/usr/X11R6/lib/X11/fonts/Type1"
FontPath "/usr/X11R6/lib/X11/fonts/Speedo"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi"
FontPath "/usr/X11r6/lib/X11/fonts/TrueType"
EndSection
Section "Module"
Load "dbe" # Double-buffering
22

Load "GLcore" # OpenGL support


Load "dri" # Direct rendering infrastructure
Load "glx" # OpenGL X protocol interface
Load "extmod" # Misc. required extensions
Load "v4l" # Video4Linux
Load "xtt" ;
EndSection
2 simsun.ttf
/usr/X11R6/lib/X11/fonts/TrueType Windows mo
unt simsum.ttf
3
cd /usr/X11R6/lib/X11/fonts/TrueType
# ttmkfdir>fonts.dir
# vi fonts.dir ,
simsun.ttf -misc-SimSun-medium-r-normal--0-0-0-0-p-0-ascii-0
simsun.ttf -misc-SimSun-medium-r-normal--0-0-0-0-p-0-fcd8859-15
simsun.ttf -misc-SimSun-medium-r-normal--0-0-0-0-p-0-iso8859-1
simsun.ttf -misc-SimSun-medium-r-normal--0-0-0-0-p-0-gb2312.1980-0
simsun.ttf -misc-SimSun-medium-r-normal--0-0-0-0-p-0-koi8-r
#cp fonts.dir fonts.scale
4 gtk
# vi /etc/gtk/gtkrc.zh_CN
:
style "gtk-default-zh-cn" {
fontset = "-misc-SimSun-medium-r-normal--14-*-*-*-*-*-*-*"
}
class "GtkWidget" style "gtk-default-zh-cn"
2. Chinput 3.0.1
1
Chinput-3.0.1-1.i386.rpm
pth-1.3.7-3.i386.rpm
unicon2-im.tar.gz
2
# rpm -ivh pth-1.3.7-3.i386.rpm
# rpm -ivh Chinput-3.0.1-1.i386.rpm --nodeps
# cp unicon2-im.tar.gz /usr/lib
# cd /usr/lib
# tar vfxz unicon2-im.tar.gz
# rm unicon2-im.tar.gz
# ln -s libstdc++-2-libc6.1-1-2.9.0.so libstdc++-libc6.1-2.so.3
3 Chinput
# cd /usr/lib/ZWinPro
# vi Chinput.ad
23

...
chinput.gblocale=zh_CN.gb2312
chinput.big5locale=zh_CN.gb2312
...
chinput.gbfont=-misc-SimSun-medium-r-normal--14-*-*-*-*-*-gb2312.1980-0
chinput.big5font=-misc-SimSun-medium-r-normal--14-*-*-*-*-*-gb2312.1980-0
...
(:, Tab )
4 ~/.bashrc
export LC_ALL=zh_CN.GB2312
export LANG=zh_CN.GB2312
export XMODIFIERS=@im=Chinput
3. GNOME
startx GNOME P
rogram->->Session->Startup Programs chinput
GNOME
4. KDE
KDE Preferences->Personalization->Country & Language
Look & Feel->Fonts gb2312.1980-0
Autostart ,( Chinput )
.
5

5.1
Red Hat Linux 7.1

1.netconf
netconf Red Hat Linux Linuxconf
consle
X-Window

netconf
BTW X-Window netconf

2.ifconfig
ifconfig Linux if i
nterface

1
IP 192.168.0.1
ifconfig eth0 192.168.0.1
ifconfig IP
2

ifconfig eth0 down

24

ifconfig eth0 up
3
255.255.255.0
ifconfig eth0 netmask 255.255.255.0 ifconfig netmask
IP
ifconfig eth0 192.168.0.1 netmask 255.255.255.0
4
192.168.0.255
ifconfig eth0 -broadcast 192.168.0.255
5

ifconifg eth0 allmulti


ifconfig eth0 -allmulti
6

ifconfig eth0
ifconfig
ifconfig

UP/DOWN DOWN
RX packets errors
TX packets errors
3.route
route Linux

Linux Linux
Internet IP
Linux
1

route add 0.0.0.0 gw


2

route del 0.0.0.0 gw


3

route

1.ping
ping Internet
ICMP ICMP
Ping
ping
www.linuxaid.com.cn
1

ping 192.168.0.1
ping www.linuxaid.com.cn
IP
2
ping 4
Linux ping ICMP
25

-c ping -c 4 192.168.0.1
3
ping
ping
ping
ping -I eth0 192.168.0.1
2.traceroute
ping
traceroute trace route

traceroute IP

1 IP 1 2 3
2 IP 1 2 3

1

2
IP IP
3
1 2 3
3.netstat
Linux netstat
Linux
1
netstat -i

Iface MTU
RX-OK RX-ERR
RX-DRP RX-OVR
TX-OK TX-ERR
TX-DRP TX-OVR
2
netstat -s
IP ICMP TCP UDP TCPEXT

3 TCP
netstat -t

Local Address IP
Foreign Address IP
State LISTEN ESTABLISHED TIME_WAIT
4 UDP
netstat -t

5
26

netstat -r
route
5.2
Red Hat Linux 7.1
1./etc/hosts
IP IP
DNS
2./etc/host.conf

order hosts,bind
/etc/hosts IP
bind
3./etc/resolv.conf
IP
4./etc/protocols
Red Hat Linux 7.1

5./etc/services



5./etc/xinetd.d
Linux inetd cha
rgen echo finger talk telnet wu-ftpd
7.0 /etc/inet
d.conf Red Hat 7.0 xinetd.d
xinetd.d telnet

service telnet
{
socket_type=stream
wait=no
user=root
server=/usr/sbin/in.telnetd
log_on_failure+=USERID
disable=yes
}
telnet
Socket stream TCP

root
/usr/sbin/in.telnetd

telnet disable=no
27

xinetd xinetd
1

/etc/rc.d/init.d/xinetd restart
2

killall -HUP xinetd

5.3
Red Hat Linux 7.1
Red Hat 7.1
ipchains Linux

/etc/sysconfig/ipchains
/etc/rc.d/init.d/ipchains stop
/etc/rc.d/init.d/ipchains status
Linux
5.4 WEB
Linux Apache Red Hat Linux 7.1 Apac
he 1.3.19 WEB Apache
WWW
WEB
1
Red Hat Linux 7.1
# mount /mnt/cdrom
2
apache
# cd /mnt/cdrom/RedHat/RPMS
3
RPM
# rpm -ivh apache-1.3.19-5.i386.rpm
Linux WEB /etc/httpd/co
nf /etc/rc.d/init.d/httpd restart
WEB /var/www/html WEB


1
public_html
# cd
# mkdir public_html
2

# chmod 755
3
localhost/~/
5.5 FTP
Red Hat Linux 7.1 Wu-FTP 2.6.1 FTP
FTP Linux FTP
apache
1
Red Hat Linux 7.1
# mount /mnt/cdrom
28

2 wu-ftp
# cd /mnt/cdrom/RedHat/RPMS
3 RPM
# rpm -ivh wu-ftp-2.6.1-16.i386.rpm
FTP xinetd FTP /etc/xinet
d.d wu-ftpd
service ftp
{
socket_type=stream
wait=no
user=root
server=/usr/sbin/in.ftpd
server_args=-l -a
log_on_success+=DURATION USERID
log_on_failure+=USERID
nice=10
disable=no
}
FTP
1
FTP
FTP
1
root
# ftpshut now
/etc shutmsg FTP

2 /etc/xinetd.d/wu-ftpd disable=no disable=yes xi


netd
2
FTP
FTP
1
/etc/ftpuser
2
/etc/ftpaccess
deny-uid

deny-gid
3
anonymous FTP
anonymous
/etc/ftpuser
5.6
Red Hat Linux 7.1 Samba Windows
SMB Samba
Ready
swat WEB
/RedHat/RPMS/samba-swat-2.0.7-36.i386.rpm
29

xinetd.d swat
service swat
{
port=901
socket_type=stream
wait=no
only_from=127.0.0.1
server=/usr/sbin/swat
log_on_failure+=USERID
disable=yes
}
disable yes swat
disable=no xinted
only_from=127.0.0.1
swat Windows IE

homes SWAT
1
IE Linux IP :901

http://192.168.0.1:901
2 root
root
3
Samba Swat
Swat 7 HOME
GLOBA
LS
SHARES
PRINTERS
STATUS
VI
EW
PASSWORD
4 GLOBALS GLOBALS

BaseOption Workgroup NetBIOS


BaseOption Netbios name
SecurityOption Security SHARE
SecurityOption hosts allow 192.168.0.
SecurityOption hosts deny IP
Commit Changes 7

5
SHARES
Create Share
Create Share
BaseOptions Path /home/smb/test

SecurityOptions writeable Yes


SecurityOptions guest ok Yes
SecurityOptionshosts allow hosts deny IP
BrowseOptionsbrowseable Yes
Commit Changes
Windows 9x Samba
30


STATUS

1 Start smbd
Samba Stop Smbd
Restart smbd
2 Samba Active Connections

X
3 Active Shares
Open
Files
Samba Window NT
Samba

31

You might also like