友情提示:小程序,开发制作。

类别《linux》下的文章:

Nginx环境下supesite discuz wordpress rewrite 规则

//supesite nginx 静态化规则

rewrite ^/([0-9]+)/spacelist(.+)$ /index.php?uid/$1/action/spacelist/type$2 last;

rewrite ^/([0-9]+)/viewspace(.+)$ /index.php?uid/$1/action/viewspace/itemid$2 last;

rewrite ^/([0-9]+)/viewbbs(.+)$ /index.php?uid/$1/action/viewbbs/tid$2 last;

rewrite ^/([0-9]+)/(.*)$ /index.php?uid/$1/$2 last;

rewrite ^/([0-...

阅读全文>>

无缝升级nginx

因为最近作者指出nginx一直以来都存在一个安全漏洞,因此今天升级了nginx

[root@unixhater ~]# cd /opt/nginx/
[root@unixhater nginx]# sbin/nginx -V #查看版本
nginx version: nginx/0.7.61
built by gcc 4.1.2 20080704 (Red Hat 4.1.2-44)
configure arguments: –user=www –group=www –prefix=/opt/nginx –with-http_stub_status_module –with-http_ssl_module #注意这里的编译项
[root@unixh...

阅读全文>>

nginx接入https关键配置

server {
listen 8443;
server_name paycenter.hubs1.net;

ssl on;
ssl_certificate myserver.pem;
ssl_certificate_key key.key;

ssl_session_timeout 5m;

阅读全文>>

将php-fpm设置为系统服务启动

php-fpm设置为服务启动

切换到php源文件目录
[root@test]# cd php-5.4.6/sapi/fpm/
[root@test fpm]# ls

config.m4 CREDITS fpm init.d.php-fpm init.d.php-fpm.in LICENSE Makefile.frag php-fpm php-fpm.8 php-fpm.8.in php-fpm.conf php-fpm.conf.in status.html status.html.in

阅读全文>>

ubuntu右键添加打开终端的快捷菜单

第一种方法:
安装一个包,即可在右键里面添加一个“打开终端”的菜单。

sudo apt-get install nautilus-open-terminal


第二种方法:
进入主目录的.gnome2/nautilus-scripts目录。新建一个文件,文件名任意(这个文件名会显示在右键菜单里,最好是通俗易懂的,比如“打开终端”或“open-terminal”),文件内容如下。

引用
#!/bin/bas...

阅读全文>>

解決 PHP 5.3.0 phpinfo();中的It is not safe to rely on the system’s timezone settings警告


Warning: phpinfo() [function.phpinfo]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'UTC' for '8.0/no DST' instead in D:\apache2.2\htdocs\index.php on line 2
解决方法:

阅读全文>>

linux下php安装pdo_mysql、mysql 扩展

1.确定php环境已经配置好,找到php安装包的pdo_mysql扩展目录,假设你的安装包放在/lamp/php-5.2.6下。

[root@localhost /]# cd /lamp/php-5.2.6/ext/pdo_mysql
[root@localhost pdo_mysql]# pwd
/lamp/php-5.2.6/ext/pdo_mysql

2.假设你的php是安装在/usr/local/php里的。执行/usr/local/php/bin/phpize ,运行命令:

[root@localhost pdo_mysql]# /usr/local/php/bin/phpize

阅读全文>>

Nginx启动出错error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory

 

 

 

在centos5.7 32位上编译安照 nginx-1.1.16 出错

[root@localhost conf]# /usr/local/nginx/sbin/nginx

/usr/local/nginx/sbin/nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file...

阅读全文>>

history命令 添加时间戳

1>History命令语法:

[test@linux]# history [n]
[test@linux]# history [-c]
[test@linux]# history [-raw] histfiles
参数:
  :数字,要列出最近的 n 笔命令列表
-c  :将目前的shell中的所有 history 内容全部消除
-a  :将目前...

阅读全文>>

Shell编程基础

 我们可以使用任意一种文字编辑器,比如gedit、kedit、emacs、vi等来编写shell脚本,它必须以如下行开始(必须放在文件的第一行):

#!/bin/sh
...

注意:最好使用“!/bin/bash”而不是“!/bin/sh”,如果使用tc shell改为tcsh,其他类似。

符号#!用来告诉系统执行该脚本的程序,本例使用/bin/sh。编辑结束并保存后,如果要执行该脚本,...

阅读全文>>