问轩博客

展开菜单

php安装mysqli扩展

php安装mysqli扩展
先查看php的版本/opt/php/bin/php -v查看得知php版本为PHP 5.5.28然后下载这个版本,进入到这个版本的cd /data/soft/php/php-5.5.28/ext/mysqli再执行/opt/php/bin/phpize./configure --with-php-config=/opt/php/bin/php-config --with-mysqli=/opt/mysql/bin/mysql_configmake报像下面的错误/usr/loc...

简单配置nginx使之支持pathinfo

简单配置nginx使之支持pathinfo
1.pathinfo参考,复制全部,修改域名目录等 server {     listen 80;     server_name   xx.shnne.com;     access_log    /xx/xx/xx/access_shnne.log; &n...

MySql初始化

MySql初始化
mv 数据库data目录 执行全路径 /usr/local/mysql/scripts/mysql_install_db --basedir=/usr/local/mysql --defaults-file=/usr/local/mysql/my.cnf --datadir=/usr/local/mysql/data/ --user=mysql 出现两个ok就可以了 启动数据库 修改数据库密...

nginx平滑升级或者添加新模块

nginx平滑升级或者添加新模块
已安装版本[root@ceshi100 nginx]# /opt/nginx/sbin/nginx -vnginx version: nginx/1.14.0升级版本[root@ceshi100 nginx]# wget http://nginx.org/download/nginx-1.15.0.tar.gz [root@ceshi100 nginx]# tar xf nginx-1.15.0.tar.gz [root@ceshi100 nginx]# cd ng...

nginx stream模块

nginx stream模块
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 查看之前编译的的模块,解压新版本,...

Linux过滤空行

Linux过滤空行
grep -v "^$" file.txt sed '/^$/d' file.txt awk '!/^$/' file.txt egrep "\S" file.txt注:^$表示空行。grep -v 表示排除。sed '//d' 表示删除awk '!//' 表示排除或取反。...

nginx禁止指定目录运行php

nginx禁止指定目录运行php
nginx禁止指定目录运行php,只需要在server配置段中增加个location规则就可以了。 1、禁止某一个目录执行php location ~* ^/download/.*\.(php|php5)$ { deny all; } 2、禁止多个目录执行php location ~* ^/(download|down)/.*\.(php|php5)$ { deny all; } 注意:...

Nginx屏蔽百度谷歌等搜索引擎蜘蛛方法

Nginx屏蔽百度谷歌等搜索引擎蜘蛛方法
‍‍‍‍在nginx的server字段中配置下面内容即可if ($http_user_agent ~* (baiduspider|googlebot|bing|sogou|yahoo)){return 503;}如果单独屏蔽百度蜘蛛就是if ($http_user_agent ~* baiduspider){return 503;}‍‍‍‍...