centos7 安装lnmp(php71,nginx,mysql5.6)

安装lnmp(php71,nginx,mysql5.6)

第一步先加载源

# yum install epel-release
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
# rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
# rpm -Uvh http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm

第二步安装php7

按装php
# yum install php71W php71w-cli
安装一些常用的扩展包
# yum install php71w-common php71w-fpm php71w-gd php71w-mbstring php71w-mysqlnd php71w-pdo php71w-soap php71w-xml
执行完后可以试试
#php -v
看结果是否安装成功

第三步安装nginx

# yum install nginx
安装完后启用nginx服务
# systemctl enable nginx.service
# systemctl start nginx.service

第四步安装mysql5.6

# yum install mysql-server
安装完后启动
# systemctl start mysqld.service
执行下面命令,初始化root密码(按提示直接回车键下来,除了设置密码)
mysql_secure_installation

Comments are closed.