??xml version="1.0" encoding="utf-8" standalone="yes"?>
SW1
int port-channel 1
switchport mode trunk //*两个交换Z用二层etherchannel相连
int f0/1 //*作etherchannel的口
switchport mode trunk
channel-group 1 mode on
int f0/2
switchport mode trunk
channel-group 1 mode on
interface Vlan100
ip address 192.168.0.10 255.255.255.0
standby 1 ip 192.168.0.1
standby 1 priority 150 //hrsp 默认优先U是100 q里讄优先Uؓ150
standby 1 preempt
interface Vlan200
ip address 192.168.1.10 255.255.255.0
standby 2 ip 192.168.1.1
standby 2 preempt
//*HSRP部分
SW2
interface Port-channel1
switchport mode trunk
int F0/1
switchport mode trunk
channel-group 1 mode on
int F0/2
switchport mode trunk
channel-group 1 mode on
interface Vlan100
ip address 192.168.0.20 255.255.255.0
standby 1 ip 192.168.0.1
standby 1 preempt
interface Vlan200
ip address 192.168.1.20 255.255.255.0
standby 2 ip 192.168.1.1
standby 2 priority 150
standby 2 preempt
R1(config)#ip domain-name prince.com //配置本地域名Q用于生成证书。证书包含了公钥
R1(config)#
R1(config)#crypto key generate rsa //配置使用RSAQ生成一对密?nbsp;
The name for the keys will be: R1.prince.com //密钥的名U?br />
Choose the size of the key modulus in the range of 360 to 2048 for your
General Purpose Keys. Choosing a key modulus greater than 512 may take
a few minutes.
How many bits in the modulus [512]: //选择密钥的长度。默?12?当前路由器的允许范围?60?048位的长度
% Generating 512 bit RSA keys, keys will be non-exportable...[OK]
R1(config)#
R1(config)#aaa new-model //配置AAA模式
R1(config)#
R1(config)#username prince secret 820929 //配置账号和密码,用于SSH客户端登?
R1(config)#
R1(config)#ip ssh time-out 30 //配置SSH的客L的空闲超时时间ؓ30U?br />
R1(config)#ip ssh authentication-retries 3
R1(config)#ip ssh time-out 120 //配置SSH的客L的失败次数。如果尝试失败次数超q指定端?br />
//则默认停止响?20U。下面一条命令配|停止响应时?br />
R1(config)#
R1(config)#line vty 0 4
R1(config-line)#transport input ssh //配置VTY的线路,接受SSH的接?br />
R1(config-line)#end
2.查看在monitor下可用的interface
monitor> interface
3.发现刚才配置好的6h口能正常使用
Using 1: i82559 @ PCI(bus:0 dev:3 irq:255), MAC: 000e.0c6d.e537
4.指定PIX防火墙接口的IP地址
monitor> address 172.16.0.254
address 172.16.0.254
5.指定tftp-server服务器地址Q安装tftp的PC机IP地址Q?br />
monitor> server 172.16.0.100
server 172.16.0.100
6.ping试一下tftp
monitor> ping 172.16.0.100
Sending 5, 100-byte 0xe2b8 ICMP Echoes to 172.16.0.100, timeout is 4 seconds:
!!!!!
Success rate is 100 percent (5/5)
7.指名tftp-server内的pixos映像文g名字
monitor> file pix724.bin
file pix721.bin
8.最后启动tftpQ开始灌pixos
monitor>tftp
9配置接口ip
inter e0
nameif inside
security-level 0
ip add x.x.x.x 255.255.255.0
no shutdown
10.查启动文件是否已l写入flashQ?br />
#show flash:
如果配置文g没有pix724.bin文g则操?1?2步骤Q如果有直接操作13步骤
11.上传pix
copy tftp://x.x.x.x/pix724.bin flash:
12.讄启动路径
(config)#boot system flash:pix724.bin
13.保存配置
#wr
SW1
int port-channel 1
switchport mode trunk //*两个交换Z用二层etherchannel相连
int f0/1 //*作etherchannel的口
switchport mode trunk
channel-group 1 mode on
int f0/2
switchport mode trunk
channel-group 1 mode on
interface Vlan100
ip address 192.168.0.10 255.255.255.0
standby 1 ip 192.168.0.1
standby 1 priority 150 //hrsp 默认优先U是100 q里讄优先Uؓ150
standby 1 preempt
interface Vlan200
ip address 192.168.1.10 255.255.255.0
standby 2 ip 192.168.1.1
standby 2 preempt
SW2
interface Port-channel1
switchport mode trunk
int F0/1
switchport mode trunk
channel-group 1 mode on
int F0/2
switchport mode trunk
channel-group 1 mode on
interface Vlan100
ip address 192.168.0.20 255.255.255.0
standby 1 ip 192.168.0.1
standby 1 preempt
interface Vlan200
ip address 192.168.1.20 255.255.255.0
standby 2 ip 192.168.1.1
standby 2 priority 150
standby 2 preempt
end
wr
1、用控制U连接交换机console口与计算Z?/span>1Q用带有xmodem功能的终端Y件连接(win2000 and xp的超U终端就带这功能Q?/span>
2、设|连接方式ؓ串口1Q如果连接的是其他串口就选择其他串口Q,速率9600Q无校验Q无控Q停止位1。或者点击默认设|也可以?/span>
3、连接以后计机回R出现交换机无ios的界面,一般的提示W是Q?/span>switch:
4、拔掉交换机后的甉|UK新启动交换机
5、在l端输入Q?/span>
switch:flash_init
会出现如下提C:
Initializing Flash...
6?/span>switch:load_helper
装入E序
无提C?/span>
7、更ҎL特率提高传输速度
set BAUD 115200 Q更改的目的Q提高写入速率Q用原?600大约一个小Ӟ
原始gؓ9600
更改后需重新q接Q否则出Cؕ码,使用新的波特率?/span> 115200
8、输入拷贝指令:
switch:copy xmodem: flash:image_filename.bin
出现如下提示Q?/span>
Begin the Xmodem or Xmodem-1K transfer now...
9、系l提CZ断出?/span>Cq个字母可以开始传文g?/span>
10、点击超U终端菜单:传?/span>---发送文Ӟ在协议选项中选择Xmodem或?/span>Xmodem-1K协议Q然后选择ios的媄像文Ӟ*.binQ,开始传送?/span>
11、传送得很慢Q请耐心{待?/span>
12、传送完毕后提示Q?/span>
File "xmodem:" successfully copied to ....
switch:
13、在提示W下输入
switch:boot
启用新的iospȝ
14、进入新?/span>ios后,q行如下操作Q将波特率修改ؓ原?/span> 9600
Q?/span>1Q?/span>Switch#copy flash:config.text tftp:
Address or name of remote host []? Lip地址
Destination filename [config.text]?
!!
1249 bytes copied in 1.065 secs (1173 bytes/sec)
Q?/span>2Q修攚w|文?/span>
删除配置文gline con 0下面波特率ؓ115200的一?/span>
Q?/span>3Q重C传配|文?/span>
Switch#copy tftp: flash:config.text
Address or name of remote host []? 10.227.81.160
Source filename []? config.text
Destination filename [config.text]?
Accessing tftp://10.227.81.160/config.text...
Loading config.text from 10.227.81.160 (via Vlan11): !
[OK - 1328 bytes]
1328 bytes copied in 0.134 secs (9910 bytes/sec)
Q?/span>4Q查看配|文件是否修?/span>
switch#more flash:config.text
line con 0
line vty 0 4
login
line vty 5 15
login
!
Line con 0下面无Q何配|?/span>
OK
15、重新加电完成恢复工作?/span>
1.首先是去ADOBE官方站下?/span>FlashPlayer9.(www.adobe.com首页里点get Adobe Flash Player).
2.解压flash_player_9_solaris_x86.tar.bz2
#cd /home/prince
#bzip2 -d flash_player_9_solaris_x86.tar.bz2
#tar -xvf flash_player_9_solaris_x86.tar
3.解压后?/span>flash_player_9_r124_x86里的文g拯?/span>/usr/sfw/lib/mozilla/plugins/?/span>
#cd /flash_player_9_r124_x86
#cp * /usr/sfw/lib/mozilla/plugins/
4、重新启?br /> #init 6W?列表C分??9 每分钟用*或?*/1表示
W?列表C小??3Q?表示0点)
W?列表C日??1
W?列表C月??2
W?列标识号星期0?Q?表示星期天)
W?列要q行的命?/span>
crontab文g的一些例子:
30 21 * * * /usr/local/etc/rc.d/lighttpd restart
上面的例子表C每晚的21:30重启apache?/span>
45 4 1,10,22 * * /usr/local/etc/rc.d/lighttpd restart
上面的例子表C每??0?2日的4 : 45重启apache?/span>
10 1 * * 6,0 /usr/local/etc/rc.d/lighttpd restart
上面的例子表C每周六、周日的1 : 10重启apache?/span>
0,30 18-23 * * * /usr/local/etc/rc.d/lighttpd restart
上面的例子表C在每天18 : 00?3 : 00之间每隔30分钟重启apache?/span>
0 23 * * 6 /usr/local/etc/rc.d/lighttpd restart
上面的例子表C每星期六的11 : 00 pm重启apache?/span>
* */1 * * * /usr/local/etc/rc.d/lighttpd restart
每一时重启apache
* 23-7/1 * * * /usr/local/etc/rc.d/lighttpd restart
晚上11点到早上7点之_每隔一时重启apache
0 11 4 * mon-wed /usr/local/etc/rc.d/lighttpd restart
每月?号与每周一到周三的11炚w启apache
0 4 1 jan * /usr/local/etc/rc.d/lighttpd restart
一月一L4炚w启apache
名称 : crontab
使用权限 : 所有用?
使用方式 :
crontab file [-u user]-用指定的文g替代目前的crontab?
crontab-[-u user]-用标准输入替代目前的crontab.
crontab-1[user]-列出用户目前的crontab.
crontab-e[user]-~辑用户目前的crontab.
crontab-d[user]-删除用户目前的crontab.
crontab-c dir- 指定crontab的目录?
crontab文g的格式:M H D m d cmd.
M: 分钟Q?-59Q?
HQ小Ӟ0-23Q?
DQ天Q?-31Q?
m: 月(1-12Q?
d: 一星期内的天(0~6Q?为星期天Q?
cmd要运行的E序Q程序被送入sh执行Q这个shell只有USER,HOME,SHELLq三个环境变?/span>
说明 :
crontab 是用来让使用者在固定旉或固定间隔执行程序之用,换句话说Q也是cM使用者的时程表?u user 是指讑֮指定
user 的时E表Q这个前提是你必要有其权限(比如说是 root)才能够指定他人的时程表。如果不使用 -u user 的话Q就是表C
定自q时程表?
参数 :
crontab -e : 执行文字~辑器来讑֮时程表,内定的文字编辑器?VIQ如果你想用别的文字~辑器,则请先设?VISUAL 环境变数
来指定用那个文字编辑器(比如?setenv VISUAL joe)
crontab -r : 删除目前的时E表
crontab -l : 列出目前的时E表
crontab file [-u user]-用指定的文g替代目前的crontab?/span>
时程表的格式如下 :
f1 f2 f3 f4 f5 program
其中 f1 是表C分钟,f2 表示时Qf3 表示一个月份中的第几日Qf4 表示月䆾Qf5 表示一个星期中的第几天。program 表示要执
行的E序?
?f1 ?* 时表C每分钟都要执行 programQf2 ?* 时表C每时都要执行E序Q其馀cL
?f1 ?a-b 时表CZW?a 分钟到第 b 分钟q段旉内要执行Qf2 ?a-b 时表CZW?a 到第 b 时都要执行Q其馀cL
?f1 ?*/n 时表C每 n 分钟个时间间隔执行一ơ,f2 ?*/n 表示?n 时个时间间隔执行一ơ,光cL
?f1 ?a, b, c,... 时表C第 a, b, c,... 分钟要执行,f2 ?a, b, c,... 时表C第 a, b, c...个小时要执行Q其馀cL
使用者也可以所有的讑֮先存攑֜档案 file 中,?crontab file 的方式来讑֮时程表?
例子 :
#每天早上7Ҏ行一?/bin/ls :
0 7 * * * /bin/ls
?12 月内, 每天的早?6 点到 12 点中Q每?个小时执行一?/usr/bin/backup :
0 6-12/3 * 12 * /usr/bin/backup
周一到周五每天下?5:00 寄一信l?alex@domain.name :
0 17 * * 1-5 mail -s "hi" alex@domain.name < /tmp/maildata
每月每天的午?0 ?20 ? 2 ?20 ? 4 ?20 ?...执行 echo "haha"
20 0-23/2 * * * echo "haha"
注意 :
当程序在你所指定的时间执行后Q系l会寄一信l你Q显CE序执行的内容,若是你不希望收到q样的信Q请在每一行空一g
后加?> /dev/null 2>&1 卛_
例子2 :
#每天早上6?0?
10 6 * * * date
#每两个小?
0 */2 * * * date
#晚上11点到早上8点之间每两个时Q早??
0 23-7/2Q? * * * date
#每个月的4号和每个C拜的礼拜一到礼拜三的早?1?
0 11 4 * mon-wed date
#1月䆾日早??
0 4 1 jan * date
范例
$crontab -l 列出用户目前的crontab.
使用方式 : chmod [-cfvR] [--help] [--version] mode file...
说明 : Linux/Unix 的档案存取权限分ZU?: 档案拥有者、群l、其他。利?chmod 可以藉以控制档案如何被他人所存取?
把计 :
mode : 权限讑֮字串Q格式如?: [ugoa...][[+-=][rwxX]...][,...]Q其中u 表示该档案的拥有者,g 表示与该档案的拥有者属于同一个群?group)者,o 表示其他以外的hQa 表示q三者皆是?
+ 表示增加权限? 表示取消权限? 表示唯一讑֮权限?
r 表示可读取,w 表示可写入,x 表示可执行,X 表示只有当该档案是个子目录或者该档案已经被设定过为可执行?
-c : 若该档案权限实已经更改Q才昄其更改动?
-f : 若该档案权限无法被更改也不要昄错误讯息
-v : 昄权限变更的详l资?
-R : 对目前目录下的所有档案与子目录进行相同的权限变更(即以递回的方式逐个变更)
--help : 昄辅助说明
--version : 昄版本
范例 :档?file1.txt 设ؓ所有h皆可d :
chmod ugo+r file1.txt
档?file1.txt 设ؓ所有h皆可d :
chmod a+r file1.txt
档?file1.txt ?file2.txt 设ؓ该档案拥有者,与其所属同一个群体者可写入Q但其他以外的h则不可写?:
chmod ug+w,o-w file1.txt file2.txt
?ex1.py 讑֮为只有该档案拥有者可以执?:
chmod u+x ex1.py
目前目录下的所有档案与子目录皆设ؓM人可d :
chmod -R a+r *
此外chmod也可以用数字来表C权限如 chmod 777 file
语法为:chmod abc file
其中a,b,c各ؓ一个数字,分别表示User、Group、及Other的权限?
r=4Qw=2Qx=1
若要rwx属性则4+2+1=7Q?
若要rw-属性则4+2=6Q?
若要r-x属性则4+1=7?
范例Q?
chmod a=rwx file
?
chmod 777 file
效果相同
chmod ug=rwx,o=x file
?
chmod 771 file
效果相同
若用chmod 4755 filename可此程式具有root的权?
一、安装和配置openssh server:
1 安装软g包(略)?br>2 OpenSSH服务器配|文Ӟ/etc/ssh/sshd_config
3 penSSH服务器状态:#service sshd status
4 启动/停止/重启enSSH serverQ?service sshd start/stop/restart
5 讄OpenSSH server默认启动Q?br>#chkconfig --level 35 sshd on
#ls /etc/rc3.d/|grep sshd
二、scpQ从q程L复制文g到本?br>#scp root@192.168.3.119:/etc/passwd .
三、sftpQ用ssh协议的ftp
a. q入Linux救援模式(resuce mode): 用光盘引导系l,?"boot>" 提示W后输入 "linux rescue" q回车即可?/p>
b. 如果没有使用md5 加密Q?则直接查?修改 "/mnt/sysimage/boot/grub/grub.conf" ?"password xxxxxx" * 的密码或者直接删除这一句即? 如果是md5 加密q, 则修?"password --md5 xxxxxxxxxxxxxxxxxx" 为明文密?修改?"password xxxxxx")或直接删除这一句即可?/p>
c. ?"exit" 命o退?shell 后, pȝ自动重启Q?新设|即可生效?/p>
* 当然Q?如果你运行了 "chroot /mnt/sysimage" 命o重设了根分区的话Q?对应路径则ؓ "/boot/grub/grub.conf"?
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux AS (2.6.9-11.EL)
root (hd0,0)
kernel /vmlinuz-2.6.9-11.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-11.EL.img
password 明文讄密码
修改?
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
password=prince(prince讄的密?
hiddenmenu
title Red Hat Enterprise Linux AS (2.6.9-11.EL)
lock(q入linux旉要输入密?
root (hd0,0)
kernel /vmlinuz-2.6.9-11.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-11.EL.img
?q里GRUB密码讄为prince,lock意思是q入linux旉要输入密?/p>
lgrub加密密码
利用非明文加密,也就是md5 128位加?
md5加密方式
q行
# /sbin/grub-md5-crypt (在grub中用Q?md5crypt)
输入你的密码Q如prince
生成一串东东, 是随即生的,要记下来.
然后d?grub.conf
改grub.conf成如?/p>
CODE:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
password --md5 $1$GexO3$iHhcfqlRE84s.2TyHN2l10 (加密后的密码)
hiddenmenu
title Red Hat Enterprise Linux AS (2.6.9-11.EL)
lock
root (hd0,0)
kernel /vmlinuz-2.6.9-11.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-11.EL.img
SUPPORTED="zh_CN.UTF-8:zh_CN:zh"
SYSFONT="latarcyrheb-sun16"
修改成以下内容:
LANG="zh_CN.GB18030"
LANGUAGE="zh_CN.GB18030:zh_CN.GB2312:zh_CN"
SUPPORTED="zh_CN.GB18030:zh_CN:zh:en_US.UTF-8:en_US:en"
SYSFONT="latarcyrheb-sun16"
镉K项必须用的参数在用短选项时也是必ȝ?br> -a, --all 包括大小?0 个块的文件系l?br> -B, --block-size=大小 块以指定<大小>的字节ؓ单位
-h, --human-readable 以容易理解的格式印出文gpȝ大小 (例如 1K 234M 2G)
-H, --si cM -hQ但?1000 的次方而不?1024
-i, --inodes 昄 inode 信息而非块用量
-k ?--block-size=1K
-l, --local 只显C本机的文gpȝ
--no-sync 取得使用量数据前不进?sync 动作 (默认)
-P, --portability 使用 POSIX 输出格式
--sync 取得使用量数据前先进?sync 动作
-t, --type=cd 只印出指?lt;cd>的文件系l信?br> -T, --print-type 印出文gpȝcd
-x, --exclude-type=cd 只印Z是指?lt;cd>的文件系l信?br> -v (此选项不作处理)
--help 昄此帮助信息ƈd
--version 昄版本信息q离开
路由器:
Cisco 2621
交换机: Cisco 1912
PC 机:两台
路由?/span> FastEthernet0/0 口—?/span> > 交换?/span> Fast Ethernet0/26 ?/span>
交换?/span> e0/2 口—?/span> >PC1
交换?/span> e0/3 口—?/span> >PC2
配置信息Q?/span>
讑֤
|
IP
地址
|
Cisco 2621 Route |
F0/0.1(10.227.80.1/24) F0/0.2(10.227.81.1/24) |
Cisco 1912 Switch |
VLAN 10 (10.227.80.0/24) —?/span> E0/2 ?/span> VLAN 20 (10.227.81.0/24) —?/span> E0/3 ?/span> Trunk 口—?/span> F0/26 ?/span> |
PC1 |
10.227.80.11 255.255.255.0 |
PC2 |
10.227.81.11 255.255.255.0 |
路由器配|信息:
Router#show run
Building configuration...
!
Version 12.1
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Router
!
!
!
ip subnet-zero
!
!
!
!
!
!
!
!
interface Serial0/0
no ip address
no ip directed-broadcast
shutdown
!
interface FastEthernet0/0
no ip address
no ip directed-broadcast
bandwidth 100000
!
interface FastEthernet0/0.1
encapsulation isl 10
ip address 10.227.80.1 255.255.255.0
!
interface FastEthernet0/0.2
encapsulation isl 20
ip address 10.227.81.1 255.255.255.0
!
interface FastEthernet0/1
no ip address
no ip directed-broadcast
bandwidth 100000
shutdown
!
!
ip classless
no ip http server
!
!
!
!
line con 0
transport input none
line aux 0
line vty 0 4
!
no scheduler allocate
end
交换机配|:
Building configuration...
Current configuration:
!
!
!
vlan 10 name VLAN0010
vlan 20 name VLAN0020
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Ethernet0/1
!
interface Ethernet0/2
vlan-membership static 10
!
interface Ethernet0/3
vlan-membership static 20
!
interface Ethernet0/4
!
interface Ethernet0/5
!
interface Ethernet0/6
!
interface Ethernet0/7
!
interface Ethernet0/8
!
interface Ethernet0/9
!
interface Ethernet0/10
!
interface Ethernet0/11
!
interface Ethernet0/12
!
interface FastEthernet0/26
!
!
trunk On
!
interface FastEthernet0/27
!
!
line console
!
End
PC 机配|:
PC1 Q?/span>
Boson BOSS 5.0 IP Configuration
Ethernet adapter Local Area Connection:
IP Address. . . . . . . . . . . . : 10.227.80.11
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.227.80.1
PC2 Q?/span>
Boson BOSS 5.0 IP Configuration
Ethernet adapter Local Area Connection:
IP Address. . . . . . . . . . . . : 10.227.81.11
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.227.81.1
--删除数据?prince
drop database prince
--创徏?users
CREATE TABLE users
(
ID int IDENTITY (3,1) PRIMARY KEY,
username nvarchar (50),
password varchar(100),
SiteCount int
)
注:
IDENTITY(3,1) 自动~号自增Q从3开始,每次自增1
PRIMARY KEY 表示该字Dؓ主键
--删除?br /> drop table users
已l存在的表users删除
--表结构修?br /> 1、在已存在的表中增加新列
alter table users add
question nvarchar(100),
answer nvarchar(100)
2、在已存在的表中删除一?br /> alter table users drop column
answerQ?br /> question
删除answer,question两列
3、修改表中一个字D늚属?br /> alter table users alter column answer int null
--查找表中的记?br /> select * from users
列出users表中所有字D和所有数?/font>
select username,password from users
列出users表中username,password字段的所有记?/font>
select * from users where username='prince'
列出users表中usernamegؓprince的所有记?/font>
--d记录
insert into users (username,password) values(prince,520929)
向users表中d一条记录,更新username,password两个字段。id动编P不能d
--修改记录
update prince set password='520618' where username='prince'
修改username字段gؓprince的password字段Q将其D|ؓ520618
--删除表中记录
delete from users
删除表中所有记?/font>
delete from users where username='prince'
删除username字段gؓprince的所有字D?br />
局域网分布范围,投资,配置单等Q具有如下特征:
1Q传输速率高:一般ؓ1Mbps--20MbpsQ光U高速网可达100MbpsQ?000MbpS
2Q支持传输介质种cd?br /> 3Q通信处理一般由|卡完成?br /> 4Q传输质量好Q误码率低?br /> 5Q有规则的拓扑结构?br />
二、局域网的组成:
局域网一般由服务器,用户工作站,传输介质四部分组成?br /> 1Q服务器Q?br /> q行|络0SQ提供硬盘、文件数据及打印机共享等服务功能Q是|络控制的核心?br /> 从应用来说较高配|的普?86以上的兼Ҏ都可以用于文件服务器Q但从提高网l的整体性能Q尤其是从网l的pȝE_性来_q是选用专用服务器ؓ宜?br /> 目前常见的NOS主要有NetwareQUnix和Windows NT三种?br /> NetwareQ?br /> 行版本V3.12QV4.11QV5.0Q对g要求低,应用环境与DOS怼Q技术完善,可靠Q支持多U工作站和协议,适于局域网操作pȝQ作为文件服务器Q打印服务器性能好?br /> UnixQ一U典型的32位多用户的NOSQ主要应用于型机,大型ZQ目前常用版本有Unix SUR4.0。支持网l文件系l服务,提供数据{应用,功能强大Q不易掌握,命o复杂Q由AT&T和SCO公司推出?br /> Windows NT Server 4.0Q?br /> 一U面向分布式囑Ş应用E序的完整^台系l,界面与Win95怼Q易于安装和理Q且集成了Internet|络理工具Q前景广阔?br /> 服务器分为文件服务器Q打印服务器Q数据库服务器,在Internet|上Q还有WebQFTPQE—mail{服务器?br /> |络0S朝着能支持多U通信协议Q多U网卡和工作站的方向发展?br /> 2Q工作站Q可以有自己?SQ独立工作;通过q行工作站网lYӞ讉KServer׃n资源Q常见有DOS工作站,Windows95工作站?br /> 3Q网卡:工作站式服务器q到|络上,实现资源׃n和相互通信Q数据{换和电信号匹配?br /> |卡(NTC)的分c:
(1)速率Q?0MbpsQ?00Mbps
(2)ȝcdQISAQPCI
(3)传输介质接口Q?br /> 单口QBNC(l缆)或RJ一45(双绞U?
4Q传输介质:目前常用的传输介质有双绞U,同u늼Q光U等?br /> (1)双绞U?TP)Q?br /> 一对以上的双绞U封装在一个绝~外套中Qؓ了降低干扎ͼ每对怺扭绕而成。分为非屏蔽双绞U?UTP)和屏蔽双l线(STP)Q局域网中UTP分ؓ3c,4c,5cd?cdU?br /> 以AMP公司ZQ?br /> 3c:10MbpsQ皮薄,皮上注“cat3’,׃注?cZ,305cI,400元/?br /> 4c:|络中用的不?br /> 5c:(?c?100MbpsQ?0MbpsQ皮厚,匝密Q皮上注“cat5”,׃?c,305cI,600?00元/?每段100cI?个中l器Q最?00c?
接线序Q?正常Q?白桔 ?白绿 ?白蓝 l?白棕 ?br />1 2 3 4 5 6 7 8
集联Q?白绿 l?白桔 ?白棕 ?白蓝 ?br />1 2 3 4 5 6 7 8
STPQ内部与UTP相同Q外包铝,AppleQIBM公司|络产品要求使用STP双绞U,速率高,hc?br /> (2)同u늼Q?br /> ׃根空心的外圆柱导体和一根位于中心uU的内导U组成,两导体间用绝~材料隔开?br /> 按直径分为粗~和l缆?br /> _缆Q传输距长Q性能高但成本高,使用于大型局域网q线Q连接时两端需l接器?br /> A._缆与外部收发器相连?br /> BQ收发器与网卡之间用AUI늼相连?br /> CQ网卡必LAUI接口Q每D?00cI100个用P4个中l器可达2500cI收发器之间最?.5cI收发器电~最?0c?br /> l缆Q传输距ȝQ相对便宜,用T型头Q与BNC|卡相连Q两端安50Ƨ终端电阅R?br /> 每段185cI4个中l器Q最?25cI每段30个用PT型头之间最?.5c?br />按传输频带分为基带和宽带传输?br /> 基带Q数字信P信号占整个信道,同一旉内能传送一U信受?br /> 宽带Q传送的是不同频率的信号?br /> (3)光纤Q?br /> 应用光学原理Q由光发送机产生光束Q将电信号变为光信号Q再把光信号导入光纤Q在另一端由光接收机接收光纤上传来的光信Pq把它变为电信号Q经解码后再处理。分为单模光U和多模光纤。绝~保密性好?br /> 单模光纤Q由Ȁ光作光源Q仅有一条光通\Q传输距长Q?公里以上?br /> 多模光纤Q由二极发光,低速短距离Q?公里以内?br /> 三、计机|络软g体系Q?br /> 四、局域网的几U工作模式:
1Q专用服务器l构Q?Server—Baseb)
又称为“工作站Q文件服务器”结构,pq台微机工作站与一台或多台文g服务器通过通信U\q接hl成工作站存取服务器文gQ共享存储设备?br /> 文g服务器自然以׃n盘文gZ要目的?br />对于一般的数据传递来说已l够用了Q但是当数据库系l和其它复杂而被不断增加的用户用的应用pȝ到来的时候,服务器已l不能承担这Ld了,因ؓ随着用户的增多,为每个用h务的E序也增多,每个E序都是独立q行的大文gQ给用户感觉极慢Q因此生了客户机/服务器模式?br /> 2Q客h/服务器模式:(clientQserver)
其中一台或几台较大的计机集中q行׃n数据库的理和存取,UCؓ服务器,而将其它的应用处理工作分散到|络中其它微ZdQ构成分布式的处理系l,服务器控制管理数据的能力q文g理方式上升为数据库理方式Q因此,C/Sq服务器也UCؓ数据库服务器Q注重于数据定义及存取安全后备及q原Qƈ发控制及事务理Q执行诸如选择索和索引排序{数据库理功能Q它有够的能力做到把通过其处理后用户所需的那一部分数据而不是整个文仉过|络传送到客户机去Q减M|络的传输负荗CQSl构是数据库技术的发展和普遍应用与局域网技术发展相l合的结果?br /> 3.对等式网l:QPeer—to—Peer)
在拓扑结构上与专用Server与CQS相同。在对等式网l结构中Q没有专用服务器Q每一个工作站既可以v客户Z用也可以h务器作用?/font>
AIX常用命o |
---|
AIXpȝ日常理1Q 文件系l是否满 |
---|