美文网首页
Linux环境配置

Linux环境配置

作者: slpcode | 来源:发表于2016-04-22 22:38 被阅读0次
开机启动php,nginx,mysql服务
  1. 在/etc/rc.local中写入
service php-fpm restart
service nginx restart
service mysqld restart
  1. 改php.ini,关闭zend opcache
  2. 改nginx.conf, sendfile off。
连接远端mysql问题
vi /etc/sysconfig/iptables
// iptables配置端口白名单 (/)
-A INPUT -p tcp --dport 80 -j ACCEPT

永久关闭防火墙

chkconfig iptables off

重启防火墙

service iptables restart

添加mysql用户 '%',或者具体ip

mysql -uroot -p 
grant all PRIVILEGES on *.* to '用户名'@'ip地址或%' identified by '密码';

use mysql;
select user,password,host from user; // 查看

相关文章

网友评论

      本文标题:Linux环境配置

      本文链接:https://www.haomeiwen.com/subject/zngglttx.html