centos6服务器YUM安装LNMP(LINUX+NGINX+MYSQL+PHP)
关闭SELINUX
vi /etc/selinux/config
#SELINUX=enforcing #注释掉
#SELINUXTYPE=targeted #注释掉
SELINUX=disabled #增加
shutdown -r now #重启系统
安装ngnix
安装GCC编译器及相关工具
yum -y install gcc gcc-c++ autoconf automake
安装模块依赖的库
yum -y install zlib zlib-devel openssl openssl–devel pcre pcre-devel
更新系统时间
ntpdate time.nist.gov
让对时服务开机启动
chkconfig ntpd on
如果需要编译安装最新的
获取ngnix版本
wget http://nginx.org/download/nginx-1.0.14.tar.gz
tar zxvf nginx-1.0.14.tar.gz
cd nginx-1.0.14
直接yum安装
yum install -y nginx
将安装在/usr/share/nginx/
启动nginx
service ngnix start
安装PHP
cd /etc/yum.repos.d
wget http://dev.centos.org/centos/5/CentOS-Testing.repo
rpm –import http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing
yum install -y php php-mysql php-gd libjpeg* php-imap php-ldap
php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-bcmath
php-mhash libmcrypt libmcrypt-devel php-fpm
#启动php-fpm
/etc/rc.d/init.d/php-fpm start
设置自动启动
chkconfig php-fpm on
配置nginx支持php
cp /etc/nginx/nginx.conf /etc/nginx/nginx.confbak
vi /etc/nginx/nginx.conf
#修改nginx运行账号为:nginx组的nginx用户
user nginx nginx;
cp /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.confbak
vi /etc/nginx/conf.d/default.conf
#增加index.php
index index.php index.html index.htm;
取消FastCGI server部分location的注释,并要注意fastcgi_param行的参数,改为$document_root$fastcgi_script_name,或者使用绝对路径
配置php-fpm
cp /etc/php-fpm.d/www.conf /etc/php-fpm.d/www.confbak
vi /etc/php-fpm.d/www.conf
#修改用户为nginx
user = nginx
#修改组为nginx
group = nginx
安装MYSQL
yum -y install mysql mysql-server
启动mysql
service mysqld start
chkconfig mysqld on #设为开机启动
为root账户设置密码
mysql_secure_installation
重启所有服务
service mysqld restart
service nginx restart
/etc/rc.d/init.d/php-fpm restart
测试成功
安装ssh服务器和subversion服务器
yum install -y openssh-server
yum install -y subversion
centos6服务器YUM安装LNMP(LINUX+NGINX+MYSQL+PHP)的更多相关文章
- centos7安装Lnmp(Linux+Nginx+MySql+Php+phpMyAdmin+Apache)
centos7安装Lnmp(Linux+Nginx+MySql+Php)及Apache Nginx是俄罗斯人编写的十分轻量级的HTTP服务器,Nginx是一个高性能的HTTP和反向代理服务器,Ng ...
- yum安装 lnmp (linux+nginx+php7.1+mysql5.7)
1.第一步先更新yum update 2.yum安装nginx安装nginx最新源:yum localinstall http://nginx.org/packages/centos/7/noarch ...
- centos 6.5 安装lnmp(linux+nginx+mysql+php)
参考:http://www.cnblogs.com/AloneSword/archive/2013/03/18/2966750.html (总结并简要) 一安装cmake wget -c http:/ ...
- 安装lnmp(linux nginx mysql php)
下载或者在云盘里找lnmp1.2-full.tar.gz 用 tar -zxvf lnmp1.2-full.tar.gz解压 进入 ,运行./install.sh安装.根据提示. 如果出现yum锁定, ...
- 阿里云Linux CentOS8.1 64位服务器安装LNMP(Linux+Nginx+MySQL+PHP)
LNMP环境和软件版本: 名称 版本号 查询命令 Linux系统 CentOS Linux release 8.1.1911 (Core) cat /etc/redhat-release Nginx ...
- LNMP(linux+nginx+mysql+php)服务器环境配置【转载】
本文转载自 园友David_Tang的博客,如有侵权请联系本人及时删除,原文地址: http://www.cnblogs.com/mchina/archive/2012/05/17/2507102.h ...
- LNMP(linux+nginx+mysql+php)服务器环境配置
一.简介 Nginx是俄罗斯人编写的十分轻量级的HTTP服务器,Nginx,它的发音为 “engine X”, 是一个高性能的HTTP和反向代理服务器,同时也是一个IMAP/POP3/SMTP 代理服 ...
- LNMP(Linux+Nginx+MySQL+PHP)centos6.4安装
nginx命令 停止nginx服务:# /etc/init.d/nginx stop 启动nginx服务:# /etc/init.d/nginx start 编辑nginx配置文件:# vim /et ...
- Centos6.8 yum安装LNMP
1.Centos6系统库中默认是没有nginx的rpn包的,所以我们需要先更新下rpm依赖库 (1):使用yum安装nginx,安装nginx库 rpm -Uvh http://nginx.org/p ...
随机推荐
- [基础常识]阿里云ecs从购买到环境搭建和建站!!(phpstudy一件包)
首先如何购买ECS?发现有些人购买5G硬盘,我个人认为买硬盘应该购买20以上!这样以后好处理! 进入http://www.aliyun.com/product/ecs/?spm=5176.7189 ...
- oracle课堂笔记
1.DOS登录1.1.sqlplus 输入用户名.密码1.2.sqlplus /nolog conn 用户名/密码@ip地址/数据库名称 [如果是sys登录则必须加上as sysdba ,as sys ...
- 往sde中导入要素类报错000732
sde可以成功连接,可以在Server中注册. 但是向sde中导入要素类报错000732,如图所示. 点击红色圆圈提示 ERROR 000732. 将路径修改为绝对路径即可,如下图所示.
- Extjs 中column的renderer使用方法
renderer: function(value, cellmeta, record, rowIndex, columnIndex, store) { if (record.get('productT ...
- VMware简介
VMware(中文名威睿”) 虚拟机软件,是全球桌面到数据中心虚拟化解决方案的领导厂商.VMware vSphere 是VMware 的一个虚拟化产品,它包括vCenter,ESX Server,ES ...
- NULL对反连接的影响
测试准备: create table t1(col1 number,col2 varchar2(1)); create table t2(col2 varchar2(1),col3 varchar2( ...
- Leetcode: Battleships in a Board
Given an 2D board, count how many different battleships are in it. The battleships are represented w ...
- iftop命令命令详解
iftop命令命令详解 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 在Linux命令中有很多内置命令,和外置命令,但是内部命令的功能毕竟是有限的,比如ifconfig,它就不能看 ...
- zjuoj 3602 Count the Trees
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3602 Count the Trees Time Limit: 2 Seco ...
- C++之路进阶——codevs1319(玩具装箱)
1319 玩具装箱 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 钻石 Diamond 题目描述 Description P教授要去看奥运,但是他舍不下他的玩具,于是 ...