The ngx_stream_core_module module is available since version 1.9.0. This module is not built by default, it should be enabled with the --with-stream configuration parameter.升级:可以下载新版本的,可以通过sbin/nginx -V 查看之前编译的的模块,解压新版本,...
grep -v "^$" file.txt
sed '/^$/d' file.txt
awk '!/^$/' file.txt
egrep "\S" file.txt注:^$表示空行。grep -v 表示排除。sed '//d' 表示删除awk '!//' 表示排除或取反。...
nginx禁止指定目录运行php,只需要在server配置段中增加个location规则就可以了。
1、禁止某一个目录执行php
location ~* ^/download/.*\.(php|php5)$
{
deny all;
}
2、禁止多个目录执行php
location ~* ^/(download|down)/.*\.(php|php5)$
{
deny all;
}
注意:...
在nginx的server字段中配置下面内容即可if ($http_user_agent ~* (baiduspider|googlebot|bing|sogou|yahoo)){return 503;}如果单独屏蔽百度蜘蛛就是if ($http_user_agent ~* baiduspider){return 503;}...
physical id 从0到1,说明有2个物理cpu;
processor 从0到7,说明有8个逻辑CPU(如果不支持超线程的话);
支不支持超线程,就看siblings和cpu cores是否相等,如果siblings=cpu cores,则不支持超线程;如果siblings > cpu cores,则支持超线程,此时 逻辑cpu个数 = (...
下载:sendEmail-v1.56.tar.gz安装方式简单,不需要编译,只需把可执行文件添加到环境变量$PATH目录直接使用即可,由于该软件使用Perl开发,所以需要安装Perl。
使用方法:
Synopsis: sendEmail -f ADDRESS [options]
Required:
-f ADDRESS&nb...
1、关闭其它的邮件工具
service sendmail stop
chkconfig sendmail off
service postfix stop
chkconfig postfix off
2、安装mailx
yum install mailx
3、首先在QQ邮箱帐户-设置中开启smtp,开启后会得到一个授权码,这个授权码就代替了密码(自行去QQ...
1.rpm -qa|egrep "sudo|rsyslog"2./etc/sudoersecho "Defaults logfile=/var/log/sudo.log" >> /etc/sudoerstail -1 /etc/sudoersvisudo -c如果是Centos6.4路径为/etc/rsyslog.conf(这里可以不配)echo "local2.debug /var/log/sudo.log&qu...
编辑~/.vimrc(没有就创建)文件,加上如下几行:set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936set termencoding=utf-8set encoding=utf-8...
在linux下,利用定时任务执行一个脚本,把结果输出到文件中,查看文件里面有中文,发现中文是乱码。手动执行测试中文显示就正常。原因:因为Unix/Linux下使用crontab时的运行环境已经不是用户环境了,因此原本用户下的一些环境变量的设置就失效了。解决方法:只需要在脚本最前面加上当前环境的lang环境即可。具体操作:①获取当前语言环境,在linux下输入echo $LANG,例如输出en_US.UTF-8②在执行脚本最前面增加一行export LANG=en_US.UTF...