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

安装lnmp(php73,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 --enablerepo=remi-php73 install php
执行完后可以试试
#php -v
安装一些常用的扩展包
# yum --enablerepo=remi-php73 install php-common php-fpm php-gd php-mbstring php-mysqlnd php-pdo php-soap php-xml
查看支持安装的扩展
#yum --enablerepo=remi-php73 search php | grep php73

第三步安装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.