手把手带你在 Linux 下搭建 lnmp 环境

本贴最后更新于 1343 天前,其中的信息可能已经天翻地覆
安装前的操作
关闭selinux
vi /etc/selinux/config
# 将SELINUX=enforcing修改为SELINUX=disabled然后重启生效
关闭防火墙
chkconfig iptables off
安装下载工具
yum install wget
下载第三方源
wget http://www.atomicorp.com/installers/atomic
安装第三方源
sh ./atomic
更新yum源
yum check-update
安装nginx
yum install -y nginx
设置开机启动
chkconfig nginx on
启动nginx
service nginx start

安装php

rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
yum -y install php56w.x86_64
yum -y --enablerepo=webtatic install php56w-devel
yum -y install php56w-gd.x86_64 php56w-ldap.x86_64 php56w-mbstring.x86_64 php56w-mcrypt.x86_64 php56w-mysqlnd.x86_64 php56w-pdo.x86_64 php56w-opcache.x86_64 php56w-xml.x86_64
安装PHP-FPM
yum -y install php56w-fpm
设置开机启动
chkconfig php-fpm on
启动服务
/etc/init.d/php-fpm start
安装mysql
wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm
rpm -ivh mysql-community-release-el6-5.noarch.rpm
yum repolist all | grep mysql
yum install mysql-community-server y
service mysqld start
不想写了后续更新
回帖
请输入回帖内容 ...