自己整理lnmp安装
| 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 选项
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安装的更多相关文章
- 服务器运行环境(LNMP)安装说明
服务器运行环境(LNMP)安装说明 因为公司需要一套流程标准,所以写了如下步骤. 先下载文件environment.tar,将文件上传到服务器. 使用命令解压文件,tar xvf environmen ...
- LNMP安装Let’s Encrypt 免费SSL证书方法:自动安装与手动配置Nginx
前几天介绍了最新StartSSL免费SSL申请与配置,很多人看到部落介绍SSL证书安装时总是推荐了OneinStack,因为OneinStack提供了一键添加和配置Let's Encrypt 免费SS ...
- LNMP安装,FastCGI说明
1.1.工作原理讲解说明 1. 用户请求的静态文件,由nginx服务器处理,根据静态的location配置进行处理 用户请求的动态文件,由php服务进行处理,根据动态的location配置进行处理 2 ...
- LNMP安装201812012237
发表这篇文章最初的意愿是想做个最新版的zabbix使用,后来看了下好多“软件”都升级了(如nginx.mysql等),就想干脆做个最新版本的LNMP环境得了,再单独做zabbix的最新版本省得以后升级 ...
- LNMP安装目录及配置文件
LNMP安装目录及配置文件位置 LNMP相关软件安装目录Nginx 目录: /usr/local/nginx/MySQL 目录 : /usr/local/mysql/MySQL数据库所在目录:/usr ...
- WDCP,LNMP安装PHP缓存加速扩展eAccelerator,xcache和memcached
VPS主机性能配置如果太差,则在运行Wordpress博客和Discuz! 论坛等高消耗程序时能够明显感觉出VPS有些吃力.另外,即使VPS主机的CPU.内存.硬盘I/O等性能足够好,但是在面对大流量 ...
- 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/{ ...
- 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 ...
- inception安装步骤---自己整理的安装步骤
inception安装步骤---自己整理的安装步骤2015-09-18 15:51 6185人阅读 评论(1) 收藏 举报 分类: inception相关版权声明:本文为博主原创文章,未经博主允许不得 ...
随机推荐
- A request has been denied as a potential CSRF attack错误解决方法
2018-05-30 13:40:50 [http-nio-8081-exec-3] [ERROR] com.opensymphony.xwork2.interceptor.ParametersInt ...
- 数据库启动失败:The server quit without updating PID file
1.可能是/usr/local/mysql/data/mysql.pid文件没有写的权限解决方法 :给予权限,执行 “chown -R mysql:mysql /var/data” “chmod -R ...
- python3+selenium3.13的简单操作
1.浏览器 1.1 浏览器窗口大小位置 driver.set_window_size(self, width, height, windowHandle) 将某个窗口设置为固定大小 driver.se ...
- windows挂载gluseter NFS卷
windows下挂载gluster提供的NFS卷 服务器端的配置: 首先配置好NFS共享,找一台linux试一下,确保挂载成功.linux客户端执行:mount.nfs 10.33.70.20:tes ...
- css position小结
relative:可使top,right,bottom,left等相对于自身位置来进行偏移:若无则这些偏移都不会起作用 absolute:寻找离自己最近position为relative或absolu ...
- django-auth组件的注册,登录,登出,及验证是否已经登入。使用login的属性
1.注册: 1.创建User(django自带的用户model)的form对象 定义form验证返回的错误提示信息 error_msg = { 'username': {'required': '用户 ...
- Java编程最差实践
原文地址:http://www.odi.ch/prog/design/newbies.php 每天在写Java程序, 其实里面有一些细节大家可能没怎么注意, 这不, 有人总结了一个我们编程中常见的问题 ...
- os内置模块
import os 1.os.getcwd() # 获得当前文件路径 2.os.chdir() # 改变当前目录 3.os.curdir # . 表示当前目录 4.os.pardir # 表示上 ...
- ABAP-金额小写转大写
FUNCTION ZSDI0007_CH_LOWERTOUPPER. *"---------------------------------------------------------- ...
- input 提交属性 hidden属性
name名字最好和你后台属性的成员变量对应,否则在参数传递的时候接收不到出现空指针异常.一般表单提交后input会以name的值=value的值的形式传给后台.如:<input type=&qu ...