现在的位置: 首页
2℃

AWstats 分析Nginx访问日志

2012年03月22日 AWStats 
AWstats下载地址:http://nchc.dl.sourceforge.net/project/awstats/AWStats/7.0/awstats-7.0.zip 1、下载后的解压文件并拷贝到/usr/local/awstart/下 2、执行tools 目录中的 awstats_configure.pl 配置向导 [root@zhouda tools]# perl awstats_configure.pl ----- AWStats awstats_configure 1.0 (build 1.9) (c) Laurent Destailleur ----- This tool will help you to configure AWStats to analyze statistics for one web server. You can try to use it to let it do all that is possible in AWStats setup...
阅读全文

0℃

Nagios+139邮件短信通知

2012年04月04日 Nagios 
使用139邮箱一个缺点:短信报警有延时,这个不如飞信机器人及时,测试过宕机,慢的时候十分钟才有短信到手机。关于139邮件自动转到手机还需要先到邮箱中设置下 1、下载SendEmail http://caspian.dotconf.net/menu/Software/SendEmail/ # wget http://caspian.dotconf.net/menu/Software/SendEmail/sendEmail-v1.56.tar.gz 2、安装 # tar xvzf sendEmail-v1.56.tar.gz # cd sendEmail-v1.56/ # cp sendEmail /usr/local/bin # chmod +x /usr/local/bin/sendEmail 3、测试邮件发送 /usr/local/bin/sendEmail -f 1234...
阅读全文
0℃

Cobbler 安装配置

2012年05月17日 CentOS, Linux 系统 
Cobbler系统安装 系统环境:Centos5.5-x86_64 1、安装epel源 # rpm -ivh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm 2、安装cobbler与其他必备服务 # yum -y install cobbler cman tftp-server dhcp httpd xinetd cobbler-web # /etc/init.d/httpd start 3、主配置修改 # vim /etc/cobbler/settings … next_server: 192.168.1.216 server: 192.168.1.216 manage_dhcp: 1 … 4、检查配置(关于报错,参考链接:http://blog.51bbo.com/archives/849) # cobbler check 5、导入ISO文件...
阅读全文
0℃

profile和bashrc 区别

2012年05月16日 CentOS, Linux 系统 
用户登录后加载profile和bashrc的流程如下: 1)/etc/profile--->/etc/profile.d/*.sh 2)$HOME/.bash_profile--->$HOME/.bashrc--->/etc/bashrc 说明: bash首先执行/etc/profile脚本,/etc/profile脚本先依次执行/etc/profile.d/*.sh 随后bash会执行用户主目录下的.bash_profile脚本,.bash_profile脚本会执行用户主目录下的.bashrc脚本 而.bashrc脚本会执行/etc/bashrc脚本 至此,所有的环境变量和初始化设定都已经加载完成. bash随后调用terminfo和inputrc,完成终端属性和键盘映射的设定. 其中PATH这个变量...
阅读全文
0℃

cobbler check 错误排除

2012年05月11日 CentOS 
# cobbler check The following are potential configuration items that you may want to fix: 1 : Must enable a selinux boolean to enable vital web services components, run: setsebool -P httpd_can_network_connect true 2 : you need to set some SELinux content rules to ensure cobbler serves content correctly in your SELinux environment, run the following: /usr/sbin/semanage fcontext -a -t public_content_t "/tftpboot/.*" && /usr/sbin/semanage fcontext -a -t public_content...
阅读全文
0℃

Invalid command ‘WSGIScriptAliasMatch’

2012年05月10日 CentOS, Linux 系统 
[root@localhost cobbler]# /etc/init.d/httpd start Starting httpd: Syntax error on line 10 of /etc/httpd/conf.d/cobbler.conf: Invalid command 'WSGIScriptAliasMatch', perhaps misspelled or defined by a module not included in the server configuration 错误原因:模块mod_wsgi.so未启动,手工开启下:编辑/etc/httpd/conf.d/wsgi.conf ,取消注释"LoadModule wsgi_module modules/mod_wsgi.so"即可
阅读全文
0℃

jetty 遍历目录取消

2012年05月02日 CentOS 
jetty 安装后,默认会存在一个遍历目录问题,不像Nginx默认是开启,所以需要修改下,配置文件在etc/webdefault.xml 将dirAllowed的值改成flase即可 <init-param> <param-name>dirAllowed</param-name> <param-value>false</param-value> </init-param>
阅读全文
0℃

linux下 root邮件的转发指定邮箱

2012年04月28日 CentOS 
在系统出现错误或有重要通知发送邮件给root的时候,让系统自动转送到我们通常使用的邮箱中,这样方便查阅相关报告和日志。 [root@zhouda ~]# vi /etc/aliases   ← 编辑aliases,添加如下行到文尾 root: test@rhce6.com ← 加入自己的邮箱地址 [root@zhouda ~]# newaliases ← 重建aliasesdb(也可以restart sendmail服务来使其生效) /etc/aliases: 77 aliases, longest 16 bytes, 785 bytes total [root@zhouda ~]# echo test | mail root ← 发送测试邮件给root Shell mail命令发信:mail -s "主题" test@rhce6.c...
阅读全文
0℃

centos下 MySQL 5.5.23 CMake 安装

2012年04月25日 Mysql 
Mysql 最新的版本都需要cmake编译安装,在此记录一下 Mysql下载:http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.23.tar.gz/from/http://mysql.he.net/ 一、安装环境:Centos 5.5 x64 Mysql版本:5.5.23 二、安装mysql之前先安装下cmake yum install -y cmake yum install -y ncurses-devel (这个也不能少,mysql需要) 三、开始编译Mysql groupadd mysql useradd -g mysql mysql tar xvf mysql-5.5.23.tar.gz cd mysql-5.5.23/ cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_UNIX_ADDR=/usr...
阅读全文
1℃

/dev/null 2>&1 详解

2012年04月25日 CentOS 
shell中可能经常能看到:>/dev/null 2>&1 dev/null 为系统垃圾箱 &为后台运行 命令的结果可以通过%>的形式来定义输出 分解这个组合:“>/dev/null     2>&1” 为五部分。 1:> 代表重定向到哪里,例如:echo "123" > /home/123.txt 2:/dev/null 代表空设备文件 3:2> 表示stderr标准错误 4:& 表示等同于的意思,2>&1,表示2的输出重定向等同于1 5:1 表示stdout标准输出,系统默认值是1,所以">/dev/null"等同于 "1>/dev/null" 因此,>/dev/null 2>&a...
阅读全文
0℃

Linux 下TCP/IP相关参数说明

2012年04月24日 Iptables 
/proc/sys/net/ipv4/下各项的意义 icmp_timeexceed_rate 这个在traceroute时导致著名的“Solaris middle star”。这个文件控制发送ICMP Time Exceeded消息的比率。 igmp_max_memberships 主机上最多有多少个igmp (多播)套接字进行监听。 inet_peer_gc_maxtime 求助: Add a little explanation about the inet peer storage? Minimum interval between garbage collection passes. This interval is in effect under low (or absent) memory pressure on the pool. Measured in jiffies. inet_peer_gc_mintime 每一遍...
阅读全文
0℃

如何在Linux终端里用Shell和C输出带颜色的文字

2012年04月23日 CentOS 
我们知道,使用ls命令列出文件列表时,不同的文件类型会用不同的颜色显示。那么如何实现这样带颜色的文本输出呢?答案并不复杂,不管是用shell还是C语言。 一、shell下的实现方法       先来讲在shell下,如何实现。用echo命令就可以实现,参看以下例子:       echo  -e  "\033[32mHello, world!"       当你在终端里敲下这条命令后,是不是发现系统用绿色输出了"Hello,world!",不止如此,连之后的命令提示符都变成了绿色?不要着急,听我继续说。echo命令-e选项的作用是激活终端对反斜线转义符(即\)的解释。...
阅读全文
×
腾讯微博