fsck -C -av -t ext3 /dev/sdb1
tail -f /var/log/messages
*封IP
iptables -I INPUT -s 119.39.103.34 -j DROP
iptables -I OUTPUT -d 119.39.103.34 -j DROP
iptables -A INPUT -i $EXTIF -p tcp –syn -m connlimit –connlimit-above 20 -j DROP
*关闭开启apache
# /usr/local/apache2/bin/apachectl -k stop
# /usr/local/apache2/bin/apachectl start
(98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
[root@linuxvhost204 ~]# killall -9 httpd
[root@linuxvhost204 ~]# /usr/local/apache2/bin/apachectl start
*过滤字符串
iptables -D INPUT -m string –string “woiit.net” –algo bm -j DROP
iptables -D OUTPUT -m string –string “woiit.net” –algo bm -j DROP
*开启端口
iptables -I INPUT -p tcp –dport 14138 -j ACCEPT
iptables -I OUTPUT -p tcp –dport 2201 -j ACCEPT
*查看列表
iptables -L OUTPUT -n -v –line
vi /etc/fail2ban/fail2ban.conf
*SYN攻击
netstat -ano | grep SYN_RECV
*僵尸进程
ps -A -o stat,ppid,pid,cmd | grep -e ‘^[Zz]‘
kill -9 8310
ps -A -o stat,ppid,pid,cmd | grep -e ‘^[Zz]‘ | awk ‘{print $2}’ | xargs kill -9
*关闭所有httpd进程
killall -9 httpd
/usr/local/zend/apache2/bin/apachectl start
*更改文件属性
chown qlkjcctv.com:ftp -R /www/users/woiit.net
chown -R mysql:mysql /data/woiit.net
chmod -R 777 /www/users/woiit.net
*列出目录数量
ll | grep “^d” | wc -l
*踢出用户
pkill -KILL -t pts/0
*取消bacula备份
bconsole cancel
*MSSQL更新用户名
Use woiitnet
go
sp_change_users_login ‘update_one’,'woiitnet’,'woiitnet’
*重置用户密码
# mysql -u root -p
mysql> grant all privileges on blposuiji.* to blposuiji_f@’%’ identified by “blposuiji”;
mysql> flush privileges;
*手动开启伪静态
<Directory />
Options FollowSymLinks
AllowOverride All
Order deny,allow
Allow from all
</Directory>
ldconfig -v | grep mysql
*判断iptables是否启动如果没启动则启动,已经启动不做操作;
service iptables start && echo ‘iptables is just started !’ || echo ‘iptables has been launched !’| tail -1
*企业邮局
查看队列:mailq
清理队列:postsuper -d ALL
*linux vi 命令
使用“/关键字”,“:20”跳转到第20行
*301重定向
RewriteEngine on
RewriteBase /
RewriteCond %{http_host} ^itnul.com [NC]
RewriteRule ^(.*)$ http://www.itnul.com/$1 [L,R=301]
*window关闭
taskkill /f /im w3wp.exe
# yum list updates
接着来更新升级到centos 6.4了,简单到不敢相信!
# yum update
(责任编辑:IT) |