<!–
* @Author: starkwang
* @Contact me: https://shudong.wang/about
* @Date: 2019-09-25 11:38:25
* @LastEditors: starkwang
* @LastEditTime: 2019-09-26 14:43:04
* @Description: file content
–>
怎么删除 user.ini
chattr -i .user.ini
安装 zsh
apt-get update
apt-get install zsh git -y
使用ake
sh -c "$(curl -fsSL https://raw.githubusercontent.com/wsdo/ake/master/install.sh)"
mysql 远程连接
1. 允许远程ip连接
mysql -u root -p
mysql>use mysql;
mysql>update user set host = '%' where user = 'root';
mysql>flush privileges;
mysql>exit;
root可以换成你的用户名
如果没有创建用户,执行grant all PRIVILEGES on 数据库名.* to 用户名@'%' identified by '密码'
2. 关闭防火墙
iptables -L -n --line-numbers
iptables -D INPUT 7 #(代表3306端口的)
生成 ssh-keygen
ssh-keygen -t rsa -C "wsd312@163.com"
laravel 安装
composer install --optimize-autoloader --no-dev
cp .env.example .env
注意事项
- 首先开启php.ini中的错误提示:display_error=on; 这个环境中默认是off
vim /usr/local/php/etc/php.ini/display_error 查找到修改
-
storage,bootstrap/cache目录可写权限
chmod +x storage
chmod +x bootstrap/cache -
修改禁用函数
php.ini把这个proc_open 干掉
- fastcgi.conf 里面的open_basedir 注释掉 (public禁止访问外层)
/usr/local/nginx/conf/fastcgi.conf
#fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/";
-
删除 .user.ini
chattr -i .user.ini rm .user.ini -
重启:lnmp reload
nginx 重启
lnmp nginx reload
php-fpm 重启
lnmp php-fpm reload
都重启
lnmp reload