系统:CentOS release 6.7(Final)64位
Nginx配置问题
- yum安装编译工具及库文件出现No package ‘xxx’ available错误
原因:yum源问题
解决:https://blog.csdn.net/Vourn/article/details/81668843
MySQL配置问题
- No package libmcrypt-devel available.
错误:No package libmcrypt-devel available.
No package libmhash-devel available.
解决方法:yum –y install epel-release #扩展更新包
2. 初始化数据库
① /usr/local/webserver/mysql/scripts/mysql_install_db --defaults-file=/etc/my.cnf --user=mysql
错误提示:
FATAL ERROR: Could not find ./bin/my_print_defaults
If you compiled from source, you need to run 'make install' to
copy the software into the correct location ready for operation.
If you are using a binary release, you must either be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.
解决方法:后加—basedir和—datadir(具体路径看自己的my.cnf配置文件)
/usr/local/webserver/mysql/scripts/mysql_install_db --defaults-file=/etc/my.cnf --user=mysql -- basedir=/usr/local/webserver/mysql --datadir=/www/data_mysql
② The host 'bogon' could not be looked up with /usr/local/webserver/mysql/bin/resolveip.
原因:hosts文件无主机名
解决方法:打开/etc/hosts,添加相应主机名(红框内为添加部分)
重新初始化
3. 问题:MySQL server has gone away
原因:连接超时
方法:在my.cnf文件里添加或修改这两个变量
wait_timeout=2880000
interactive_timeout = 2880000