rpm -ivh ntp-4.2.2p1-9.el5.centos.2.1.i386.rpm   //安装ntpdate
rpm -ivh为安装,-Uvh为升级,-q为查询,-e为反安装


/usr/sbin/ntpdate 210.72.145.44 >>/var/log/ntpdate_log 2>&1 ; /usr/sbin/hwclock -w   //同步时间的计划任务


在/etc/rc.local添加后,重启服务器有效,重启网卡不起效。    //添加永久路由
格式为 route add -net 10.50.0.0 netmask 255.255.0.0 gw 10.50.10.254
要在/etc/sysconfig/static-routes添加路由
格式为 any net 10.50.0.0/16 gw 10.50.10.254


curl -s http://www.baidu.com   //下载源码
或者wget http://www.baidu.com


date -d '1970-01-01 UTC 1112173761 seconds'   //还原时间


desc 表名;   //mysql查看表结构命令
show columns from 表名;
describe 表名;
show create table 表名;


use information_schema
select * from columns where table_name='表名';


show databases;
use 数据库名;
show tables;


mysqldump -p yacrm>yacrm.sql   //导出数据库
use yacrm     //还原数据库
source /tmp/yacrm.sql 


格式:grant select on 数据库.* to 用户名@登录主机 identified by "密码"   //加数据库访问权限
grant select,insert,update,delete on *.* to test1@"%" Identified by "abc";
例子:
GRANT ALL PRIVILEGES ON *.* TO test1@"%" IDENTIFIED BY "123456";
mysql> flush privileges;


scp 2011-10-14.pcap root@128.0.70.70:/var/www/html/2011-10-14.pcap   //SCP传输文件


route print   //打印路由


tcpdump -i eth0 -s 20000 -w /var/www/html/1.pcap   //对eth0抓包


cat /etc/resolv.conf   //查看DNS
cat /etc/sysconfig/network-scripts/ifcfg-eth0   //查看eth0设置


service  --status-all   //查看所有服务状态