Ubuntu16.04搭建LAMP环境
作者:互联网
准备工作
sudo apt-get update sudo apt-get install -y language-pack-en-base locale-gen en_US.UTF-8 sudo apt-get install software-properties-common sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php sudo apt-get update
安装Apache
sudo apt-get install -y apache2
安装MySQL
sudo apt-get -y install mysql-server
sudo apt-get -y install mysql-client
安装PHP及模块
sudo apt install -y php7.0 php7.0-mysql php7.0-fpm php7.0-curl php7.0-xml php7.0-mcrypt php7.0-json php7.0-gd php7.0-mbstring php7.0-zip php-mongodb php-memcached php-redis
sudo apt-get -y install libapache2-mod-php7.0 sudo apt-get -y install libaprutil1-dbd-mysql sudo apt-get -y install php7.0-gd sudo apt-get -y install memcached
修改php配置
sudo vim /etc/php/7.0/fpm/php.ini // 将cgi.fix_pathinfo=1这一行去掉注释,将1改为0 sudo vim /etc/php/7.0/fpm/pool.d/www.conf listen = /var/run/php/php7.0-fpm.sock // 更改 sudo service php7.0-fpm restart
标签:Ubuntu16.04,get,sudo,apt,php7.0,LAMP,install,php,搭建 来源: https://www.cnblogs.com/www-php/p/15617918.html