类别:
linux
作者:
sunshine / 2012-9-5 17:38 Wednesday
//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-...
阅读全文>>
类别:
linux
作者:
sunshine / 2012-9-1 15:52 Saturday
将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
阅读全文>>
类别:
linux
作者:
sunshine / 2012-9-1 01:11 Saturday
第一种方法:
安装一个包,即可在右键里面添加一个“打开终端”的菜单。
sudo apt-get install nautilus-open-terminal
第二种方法:
进入主目录的.gnome2/nautilus-scripts目录。新建一个文件,文件名任意(这个文件名会显示在右键菜单里,最好是通俗易懂的,比如“打开终端”或“open-terminal”),文件内容如下。
阅读全文>>
类别:
linux
作者:
sunshine / 2012-8-29 12:24 Wednesday
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
阅读全文>>
类别:
linux
作者:
sunshine / 2012-8-28 15:52 Tuesday
在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...阅读全文>>
类别:
linux
作者:
sunshine / 2012-8-28 12:16 Tuesday
1>History命令语法:
[test@linux]# history [n]
[test@linux]# history [-c]
[test@linux]# history [-raw] histfiles
参数:
n :数字,要列出最近的
n 笔命令列表
-c :将目前的shell中的所有 history
内容全部消除
-a :将目前...
阅读全文>>
类别:
linux
作者:
sunshine / 2012-8-22 09:52 Wednesday
我们可以使用任意一种文字编辑器,比如gedit、kedit、emacs、vi等来编写shell脚本,它必须以如下行开始(必须放在文件的第一行):
#!/bin/sh
...
注意:最好使用“!/bin/bash”而不是“!/bin/sh”,如果使用tc shell改为tcsh,其他类似。
符号#!用来告诉系统执行该脚本的程序,本例使用/bin/sh。编辑结束并保存后,如果要执行该脚本,...
阅读全文>>