1、 操作系统
  CentOS release 6.5(final)
  2、 安装mysql
  # yum install mysql-server
  #vi /etc/my.cnf +default-character-set=utf8
  #chkconfig --add mysqld chkconfig --level 35 mysqld on//开机启动 查看#chkconfig --list | grep mysql*
  #service mysqld stop //停止restart//重启 start//启动
  #mysqladmin -u root password 123456 //设置管理员密码
  #UPDATE user SET `Host` = '%' WHERE `User` = 'root' LIMIT 1;FLUSH PRIVILEGES;//所有主机root连接
  #vi /etc/sysconfig/iptables
  增加:-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
  #service iptables restart
  3、 安装nginx
  先安装nginx的yum源
  http://nginx.org/en/linux_packages.html#stable 找到链接,安装:
  #rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
  查看:
  #yum info nginx
  安装:
  #yum install nginx
  #service nginx start
  默认配置:/etc/nginx/conf.d/
   
  4、 安装php
  #wget http://cn2.php.net/get/php-5.6.23.tar.gz/from/this/mirror
  #tar –zxvf php-5.6.23.tar.gz
   
  #yum install epel-release
  或者
  #rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
   
   
  #yum install gcc bison bison-devel zlib-devel libmcrypt-devel mcrypt mhash-devel openssl-devel libxml2-devel libcurl-devel bzip2-devel readline-devel libedit-devel sqlite-devel libpng-devel
   
  #cd php-5.6.23
   
  #./configure \
  --prefix=/usr/local/php56 \
  --with-config-file-path=/usr/local/php56/etc \
  --enable-inline-optimization \
  --disable-debug \
  --disable-rpath \
  --enable-shared \
  --enable-opcache \
  --enable-fpm \
  --with-fpm-user=nginx \
  --with-fpm-group=nginx \
  --with-mysql=mysqlnd \
  --with-mysqli=mysqlnd \
  --with-pdo-mysql=mysqlnd \
  --with-gettext \
  --enable-mbstring \
  --with-iconv \
  --with-mcrypt \
  --with-mhash \
  --with-openssl \
  --enable-bcmath \
  --enable-soap \
  --with-libxml-dir \
  --enable-pcntl \
  --enable-shmop \
  --enable-sysvmsg \
  --enable-sysvsem \
  --enable-sysvshm \
  --enable-sockets \
  --with-curl \
  --with-zlib \
  --enable-zip \
  --with-bz2 \
  --with-gd \
  --with-readline --with-freetype-dir=/usr/include/freetype2/freetype 
   
  #make -j8
  #make install
   
  配置 PHP
   
  配置文件:
   
  # cp php.ini-development /usr/local/php56/etc/php.ini
  php-fpm 服务
   
  # cp /usr/local/php56/etc/php-fpm.conf.default /usr/local/php56/etc/php-fpm.conf
  # cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm56
  # chmod +x /etc/init.d/php-fpm56
  启动 php-fpm
   
  # service php-fpm56 start
  Starting php-fpm done
  php-fpm 可用参数 start|stop|force-quit|restart|reload|status
   
  添加 PHP 命令到环境变量
   
  编辑 ~/.bash_profile,将:
   
  PATH=$PATH:$HOME/bin
  改为:
  PATH=$PATH:$HOME/bin:/usr/local/php56/bin
  使 PHP 环境变量生效:
   source  ~/.bash_profile
  # . ~/.bash_profile
  查看看 PHP 版本
   
  # php -v

1、mysql 选项

./configure --prefix=/data/local/php \
--with-config-file-path=/data/local/php/etc \
--with-mysql=/data/local/mysql \
--with-mysqli=/data/local/mysql/bin/mysql_config \
--with-pdo-mysql=/data/local/mysql \

2、去除ts(zend load gard) ./configure 不加入 maintainer-zts

3、php.ini文件加载

/data/local/php54/sbin/php-fpm -c /data/local/php54/etc/php.ini

4、扩展安装

查看扩展http://pecl.php.net/package/redis

/usr/local/php54/bin/pecl install redis-2.2.8

 

http://www.linuxidc.com/Linux/2016-04/130117.htm
http://www.centoscn.com/image-text/install/2015/1222/6560.html
http://www.centoscn.com/mysql/2016/0315/6844.html
systemctl start mysqld
vi /etc/sysconfig/iptables

自己整理lnmp安装的更多相关文章

  1. 服务器运行环境(LNMP)安装说明

    服务器运行环境(LNMP)安装说明 因为公司需要一套流程标准,所以写了如下步骤. 先下载文件environment.tar,将文件上传到服务器. 使用命令解压文件,tar xvf environmen ...

  2. LNMP安装Let’s Encrypt 免费SSL证书方法:自动安装与手动配置Nginx

    前几天介绍了最新StartSSL免费SSL申请与配置,很多人看到部落介绍SSL证书安装时总是推荐了OneinStack,因为OneinStack提供了一键添加和配置Let's Encrypt 免费SS ...

  3. LNMP安装,FastCGI说明

    1.1.工作原理讲解说明 1. 用户请求的静态文件,由nginx服务器处理,根据静态的location配置进行处理 用户请求的动态文件,由php服务进行处理,根据动态的location配置进行处理 2 ...

  4. LNMP安装201812012237

    发表这篇文章最初的意愿是想做个最新版的zabbix使用,后来看了下好多“软件”都升级了(如nginx.mysql等),就想干脆做个最新版本的LNMP环境得了,再单独做zabbix的最新版本省得以后升级 ...

  5. LNMP安装目录及配置文件

    LNMP安装目录及配置文件位置 LNMP相关软件安装目录Nginx 目录: /usr/local/nginx/MySQL 目录 : /usr/local/mysql/MySQL数据库所在目录:/usr ...

  6. WDCP,LNMP安装PHP缓存加速扩展eAccelerator,xcache和memcached

    VPS主机性能配置如果太差,则在运行Wordpress博客和Discuz! 论坛等高消耗程序时能够明显感觉出VPS有些吃力.另外,即使VPS主机的CPU.内存.硬盘I/O等性能足够好,但是在面对大流量 ...

  7. centos LNMP第一部分环境搭建 LAMP LNMP安装先后顺序 php安装 安装nginx 编写nginx启动脚本 懒汉模式 mv /usr/php/{p.conf.default,p.conf} php运行方式SAPI介绍 第二十三节课

    centos  LNMP第一部分环境搭建 LAMP安装先后顺序  LNMP安装先后顺序 php安装 安装nginx  编写nginx启动脚本   懒汉模式  mv   /usr/local/php/{ ...

  8. lnmp安装exif扩展

    lnmp安装exif扩展 1.找到位置 cd /usr/local/lnmp1.4-full/src 2.解压php sudo bzip2 -d php-5.6.31.tar.bz2 sudo tar ...

  9. inception安装步骤---自己整理的安装步骤

    inception安装步骤---自己整理的安装步骤2015-09-18 15:51 6185人阅读 评论(1) 收藏 举报 分类: inception相关版权声明:本文为博主原创文章,未经博主允许不得 ...

随机推荐

  1. 杂项:GitHub

    ylbtech-杂项:GitHub gitHub是一个面向开源及私有软件项目的托管平台,因为只支持git 作为唯一的版本库格式进行托管,故名gitHub. gitHub于2008年4月10日正式上线, ...

  2. display:inline block inline-block 的区别

    原文地址:http://blog.csdn.net/jly036/article/details/5506182 display:block就是将元素显示为块级元素. block元素的特点是: 总是在 ...

  3. 1073 Scientific Notation (20 分)

    1073 Scientific Notation (20 分) Scientific notation is the way that scientists easily handle very la ...

  4. ue4 多相机分屏与小地图效果实现教程

    转自:http://blog.csdn.net/shenmifangke/article/details/51940007  通过使用ue4的UI和rendertarget来实现 优点就是可以随意设置 ...

  5. python + docker, 实现天气数据 从FTP获取以及持久化(五)-- 利用 Docker 容器化 Python 程序

    背景 不知不觉中,我们已经完成了所有的编程工作.接下来,我们需要把 Python 程序 做 容器化 (Docker)部署. 思考 考虑到项目的实际情况,“持久化天气”的功能将会是一个独立的功能模块发布 ...

  6. Bogart BogartAutoCode.vb

    Imports System.Data.SqlClient Imports System.Data Public Class BogartAutoCodeDataBase Private Conn A ...

  7. 类继承-super, 私有变量

    多继承 class A: def ces(self): print('a-ces') class B(A): def ces(self): print('b-ces') class C(A): def ...

  8. 网络层-IP地址

    以下内容是IPv4 IP地址长度32位,Java里面一个int的长度,总共分为5类IP地址 1:分类编址 A类IP地址0开头:           A类有31个位置可以变化,总数是2^31个, [(0 ...

  9. Django静态图片参数解析

    使用Django静态设置时,遇到很多问题,经过艰苦的Baidu, stack overflow, Django原档阅读,终于把静态图片给搞出来了.特记录下来. 关键的概念:Django中,静态资源的存 ...

  10. linux的基础

    vmtools 的安装:作用 ——>共享linux和windows的文件夹 reboot 重启 远程登录 : 远程登录时要打开sshd(监视22端口) 怎么设施sshd: 打开远端,输入setu ...