搭建LEMP开发环境

1. 为yum添加IUS 仓库

sudo yum install https://centos7.iuscommunity.org/ius-release.rpm -y

2. Nginx

  • 安装
sudo yum install nginx -y
  • 启动
sudo systemctl start nginx
  • 开机自启:
sudo systemctl enable nginx

3. MariaDB

  • 卸载原装
sudo yum remove mariadb-libs -y
  • 安装
sudo yum install mariadb101u-server -y
  • 开机自启:
sudo systemctl start mariadb
 sudo systemctl enable mariadb
  • 安全配置:
mysql_secure_installation

4. PHP56u

  • 安装php及常用扩展
sudo yum install php56u-fpm php56u-cli php56u-xml php56u-gd php56u-mysqlnd php56u-pdo php56u-mcrypt php56u-mbstring php56u-json php56u-opcache -y
  • php-fpm自启动
sudo systemctl start php-fpm
sudo systemctl enable php-fpm

你可能感兴趣的:(搭建LEMP开发环境)