最近重装了服务器。安装环境的时候百度了很多。为了以后方便,特此整理1.安装Apache//安装sudoaptinstallapache2-y//重启apache/etc/init.dd/apache2restart执行以上操作后,可以在本地输入服务器的ip地址,看是否成功。2.安装mysqludoaptinstallmysql-servermysql-client//查看3306端口是否监听sudonetstat-ano|grep33063.安装phpinstallsudoaptinstallphp7.2-mysqlphp7.2-curlphp7.2-jsonphp7.2-cgiphp7.2libapache2-mod-php7.2查看版本php--versionoutputphpinfovim/var/www/html/phpinfo.php//php文件内容如下访问验证http://Server_IP/phpinfo.php4.远程连接mysql服务器如果无法连接到远程服务器,记得执行以下操作:修改以下文件中的值:将bind-address=127.0.0.1更改为bind-address=0.0.0.0保存并退出vim/etc/mysql/mysql.conf.d/mysqld.cnf5.本地使用navicat或者其他软件远程连接mysql
