彭哥的IDC私房菜

畅游网络,点滴积累,享受交流、分享的快乐

Entries for the ‘LAMP/LNMP综合交流’ Category

运行Mysql命令提示Ignoring query to other database

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. 运行Mysql命令提示Ignoring query to other database: Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement. MariaDB [(none)]> show engines; Ignoring query to other database MariaDB [(none)]> show databases; Ignoring query to other database 最后发现是在服务器上连接时

Leave a Comment

php脚本中使用date函数提示Warning: date(): It is not safe to rely on the system’s timezone settings.

php脚本中使用date函数提示Warning: date(): 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 the timezone ‘UTC’ for now, but […]

Leave a Comment

MySQL is not running,but lock exists

启动MySQL出错,查看了下状态,发现提示MySQL is not running,but lock exists: 找了下资料,基本上都是说: #chown -R mysql:mysql /var/lib/mysql

Leave a Comment

批量替换 MySQL 指定字段中的特定字符串

网站上面有很多下载连接,之前用的是86端口,现在迁移服务器了,新服务器默认是80端口,没办法因为一个站将Apache的监听端口就给改掉,所以只能改站了。 还好,链接全部都写在MySQL数据库中,于是通过MySQL批量替换指定字段中的端口号,这样很高效。 MySQL指定字段的特定字符串批量替换的具体语法是

Leave a Comment

DocumentRoot does not exist解决方法

重启Apache提示DocumentRoot does not exist,类似如下: Stopping httpd: [ OK ] Starting httpd: Warning: DocumentRoot [/var/www/html/test] does not exist 奇怪的是路径明明已经存在。查了下发现一般是由于启用了SELINUX导致的,解决方法为

Leave a Comment

重启Apache出现Address already in use: make_sock: could not bind to address [::]:80

重启Apache出现Address already in use: make_sock: could not bind to address [::]:80 查看了下端口占用情况

Leave a Comment

CentOS 5.6下安装Nginx

据Netcraft公司统计Nginx的市场占有率位居第三位,排在Apache和IIS之后,是一款越来越受欢迎的Web服务器软件,今天跟大家分享下CentOS 5.6下如何安装Nginx。 一.安装环境准备 首先我们准备好装有CentOS 5.6的机器,同时连网。接下来解决Nginx安装所需要依赖的几个模块问题。 运行 # yum install pcre-devel zlib-devel openssl-devel安装pcre、zlib和openssl,三者缺一不可。 二.下载Nginx 这里我们下载Nginx 0.8.15版本来测试。假设我们将软件都放在/usr/local/software下

Leave a Comment

Nginx的安装及反向代理设置

因为项目的缘故,接触到了Nginx的安装和反向代理设置,和大家分享下。 一.Nginx的下载、安装 cd /home wget http://nginx.org/download/nginx-1.0.5.tar.gz tar -zxvf nginx-1.0.5.tar.gz cd nginx-1.0.5

Leave a Comment

Apache虚拟主机用户禁用mod_security

Apache服务器上如果启用了mod_security模块,而网站的脚本又与这个模块起冲突,就需要我们去关闭这个模块。Apache虚拟主机用户由于没办法编辑Apache配置文件httpd.conf文件,只能通过配置.htaccess文件实现了

Leave a Comment