切換到root帳號,安裝軟件包源:?apt-get install software-properties-common
1殖蚕、安裝PHP7.1
add-apt-repository ppa:ondrej/php
apt-get update
apt-get install php7.1-cli php7.1-fpm php7.1-common php7.1-curl? php7.1-xml php7.1-gd php7.1-mysql php7.1-mbstring php7.1-bcmath php7.1-dev php7.1-zip
相關服務命令:
service php7.1-fpm start/stop/restart
2着绊、安裝Nginx
add-apt-repository ppa:ondrej/nginx
apt-get update
apt-get install nginx-full
配置站點php-fpm
vim /etc/nginx/sites-available/default
fastcgi_pass? unix:/run/php/php7.1-fpm.sock;
相關服務命令:
service nginx start/stop/restart
3钞瀑、安裝Mysql5.7
add-apt-repository ppa:ondrej/mysql
apt-get update
apt-get install mysql-server-5.7
配置遠程鏈接
創(chuàng)建遠程鏈接帳號
mysql -u root -h localhost -p
mysql> GRANT ALL PRIVILEGES ON *.* TO 'remote_root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
mysql> FLUSH PRIVILEGES;
修改cnf配置
vim? /etc/mysql/mysql.conf.d/mysqld.cnf
將bind-address? ? = 127.0.0.1
設置成bind-address? ? = 0.0.0.0(設備地址)
重啟mysql
service mysql restart