自己整理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相关版权声明:本文为博主原创文章,未经博主允许不得 ...
随机推荐
- sublime快捷键功能记录
shift+tab 向前缩进 ctrl+shift+k 删除当前行 菜单栏 view--side bar 选项 控制左侧文件展示视图 菜单栏“view”——“hideMiniMap” or &qu ...
- C# winfrom ComboBox 调整下拉菜单的高度
1.设置属性 // 1.属性设置 DrawMode ->OwnerDrawVariable this.cboBoxPostID.DrawMode = System.Windows.Forms.D ...
- 第10课 C++异常简介
1. try-catch语句 (1)try语句处理正常代码逻辑 (2)catch语句处理异常情况 (3)try语句中的异常由对应的catch语句处理 (4)C++通过throw语句抛出异常信息 2. ...
- 第6章 进程控制(3)_wait、exec和system函数
5. 等待函数 (1)wait和waitpid 头文件 #include <sys/types.h> #include <sys/wait.h> 函数 pid_t wait(i ...
- OpenGL chapter4 基础变换
math3d库有两个数据类型,能够表示一个三维或四维向量: M3DVector3f M3DVector4f 4.3 理解投影 正投影 : 正交变换 透视投影 : 透视变换 表4.1 OpenGL变换术 ...
- 报表系统OLAP
实现报表系统可自定义定制: 1.纬度,事实表,用户自定义观察纬度,实现报表自定义(自定义纬度树结构---通过这个树结构,后台自动生成报表SQL,用户仅仅配置纬度关系即可)----报表配置纬度关 系 2 ...
- Configure First SpringMVC project in IntelliJ IDEA(fail)
Configure First SpringMVC project in IntelliJ IDEA 13 The Mechanism of Spring MVC frameworks by Java ...
- (10/24) 图片跳坑大战--处理html中的图片
补充,在前面的服务启动执行命令中,我们在package.json中的配置信息为: "scripts": { "server": "webpack-de ...
- JPA注解@SecondaryTables 实现一个实体映射多张数据库表
参考:http://jingpin.jikexueyuan.com/article/46978.html Annotation Type SecondaryTables(参考:https://docs ...
- Redis hash数据结构
1, 新增一个 hash 或者 新增数据 => hset key field value 2, 获取某个字段值 => hset key field 3, 获取所有字段值 => hge ...