-
近期文章
近期评论
文章归档
分类目录
功能
好友连接
日历
页面
Category Archives: linux
centos awstats
参考如下文章 http://centoshelp.org/servers/configuring-awstats-multiple-domains-hosted-on-the-same-server/ 首先安装epel 和rpmforge 源 yum install install awstats GeoIP-data perl-Geo-IP cronolog geoip的国家和城市的数据装不了要手动下载 mkdir /var/www/GeoIP; cd /var/www/GeoIP wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz gunzip GeoIP.dat.gz GeoLiteCity.dat.gz vi /etc/httpd/conf/httpd.conf 修改日志格式 CustomLog “|/usr/sbin/cronolog /var/log/httpd/www.xx.com.%Y%m%d.log” combined cp /etc/awstats/awstats.model.conf /etc/awstats/awstats.www.xx.com.conf vi /etc/awstats/awstats.stats.example.com.conf We will be editing … Continue reading
Posted in linux
Leave a comment
centos setup 配置工具
yum install setup system-config-firewall system-config-firewall-tui system-config-services system-config-network-tui ntsysv ntsysv 才能出来配置服务选项
Posted in linux
Leave a comment
centos6 yum 时出现[Errno 14] PYCURL ERROR 6 – “”
[Errno 14] PYCURL ERROR 6 – “” 竟然是nameserver的问题 用google的dns
Posted in linux
Leave a comment
dede挂马处理
一个虚拟主机网站被挂马 dede做的 用php挂的马也删除不掉、发现是在templates里的!!手动删除 重新生成首页
Posted in linux
Leave a comment
nginx 301 域名
server_name www.x.com x.com xy.com www.xy.com yyg.net; if ( $host != ‘www.x.com’) { rewrite ^/(.*)$ http://www.x.com/$1 permanent; } rewrite 目录 rewrite ^/xyw http://www.xx.com permanent;
Posted in linux
Leave a comment
linux中用shell获取昨天、明天或多天前的日期
linux中用shell获取昨天、明天或多天前的日期: 在Linux中对man date -d 参数说的比较模糊,以下举例进一步说明: # -d, –date=STRING display time described by STRING, not `now’ [root@Gman root]# date -d next-day +%Y%m%d #明天日期 20091024 [root@Gman root]# date -d last-day +%Y%m%d #昨天日期 20091022 [root@Gman root]# date -d yesterday +%Y%m%d #昨天日期 20091022 [root@Gman … Continue reading
Posted in linux
Leave a comment
nginx 切割日志的小脚本
#!/bin/sh cd /usr/local/nginx/logs date=$(date -d “yesterday” +%Y%m%d) mv access.log $date.log touch access.log /etc/init.d/nginx restart delday=$(date -d “7 days ago” +%Y%m%d) rm -rf $delday.log
Posted in linux
Leave a comment
查找php木马及隐藏的潜在的风险和木马
grep -r –include=*.php ‘[^a-z]eval($_POST’ . > grep.txt grep -r –include=*.php ‘file_put_contents(.*$_POST\[.*\]);’ . > grep.txt 结合find . -name “*.php” -type f -print0|xargs -0 egrep “(phpspy|c99sh|milw0rm|eval\(gzuncompress\(base64_decode|eval\(base64_decode|spider_bc|gzinflate)”|awk -F: ‘{print $1}’|sort|uniq 查找的更彻底 find -type f -name \*.php -exec chmod 444 {} \; find -mtime … Continue reading
Posted in linux
Leave a comment
centos5.5 nagios nagios-plugin nrpe cacti nsc
安装系统 下载rpmforge http://packages.sw.be/rpmforge-release/ 下载对应版本 yum install httpd mysql-server mysql-devel php php-mysql php-gd gd-devel php-snmp net-snmp net-snmp-utils rrdtool php-mbstring rrdtool-devel gcc gcc-devel gcc-* yum install cacti cd /var/www/cacti chmod 775 -R * vi /etc/crontab wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.3.t ar.gz wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plu gins-1.4.15.tar.gz … Continue reading
Posted in linux
Leave a comment