阿里云-centos7.2-LNMP-编译安装-记录
1. 需要使用yum源自动安装的软件:
yum -y install autoconf bzip2 bzip2-devel curl curl-devel e2fsprogs e2fsprogs-devel zlib* zlib-devel openssl openssl-devel pcre-devel gd gd-devel kernel keyutils patch perl perl-devel perl-ExtUtils-Embed kernel-headers mpfr cpp glibc glibc-devel libgomp libstdc++-devel ppl cloog-ppl keyutils-libs-devel libcom_err-devel libsepol-devel libselinux-devel krb5 krb5-devel zlib-devel libXpm* libvpx libjpeg libjpeg-devel libpng libpng-devel zlib libXpm libXpm-devel t1lib libt1-devel freetype freetype-devel libpng* libpng-devel libpng-devel php-common php-gd ncurses* ncurses-devel libtool* libtool-libs patch glibc glibc-devel glib2 glib2-devel krb5 krb5-devel libevent libevent-devel libidn libidn-devel nss_ldap openldap openldap-clients openldap-devel openldap-servers openssl openssl-devel pspell-devel net-snmp* net-snmp-devel libxml2* libxslt* libgeoip* gmp* readline-devel
2.nginx编译安装参数:
./configure --user=nginx --group=nginx --with-select_module --with-poll_module --with-threads --with-file-aio --with-ipv6 --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module --with-http_xslt_module=dynamic --with-http_image_filter_module --with-http_image_filter_module=dynamic --with-http_geoip_module --with-http_geoip_module=dynamic --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_auth_request_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_slice_module --with-http_stub_status_module --with-http_perl_module=dynamic --with-mail --with-mail=dynamic --with-mail_ssl_module --with-stream --with-stream=dynamic --with-stream_ssl_module --with-cpp_test_module --with-pcre --with-pcre-jit --with-md5-asm --with-sha1-asm --with-debug
3.php编译安装参数:
./configure --prefix=/usr/local/php --with-config-file-path=/etc --with-libdir=lib64 --enable-fpm --with-fpm-user=nginx --with-fpm-group=nginx --enable-inline-optimization --disable-debug --disable-rpath --enable-shared --enable-soap --with-libxml-dir --with-xmlrpc --with-openssl --with-mcrypt=/usr/local/libmcrypt --with-mhash --with-pcre-regex --with-sqlite3 --with-zlib --enable-bcmath --with-iconv --with-bz2 --enable-calendar --with-curl --with-cdb --enable-dom --enable-exif --enable-fileinfo --enable-filter --with-pcre-dir --enable-ftp --with-gd --with-openssl-dir --with-jpeg-dir --with-png-dir --with-zlib-dir --with-freetype-dir --enable-gd-native-ttf --enable-gd-jis-conv --with-gettext --with-gmp --with-mhash --enable-json --enable-mbstring --enable-mbregex --enable-mbregex-backtrack --with-libmbfl --with-onig --enable-pdo --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-zlib-dir --with-pdo-sqlite --with-readline --enable-session --enable-shmop --enable-simplexml --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --with-libxml-dir --with-xsl --enable-zip --enable-mysqlnd-compression-support --with-pear --enable-opcache
4.configure: error: mcrypt.h not found. Please reinstall libmcrypt
解决方法,执行如下脚本:
#!/bin/bash
basedir=`pwd`
liburl="https://github.com/ralphdc/libmcrypt-2.5.8/archive/master.zip"
hashurl="https://github.com/ralphdc/mhash-0.9.9.9/archive/master.zip"
mcryurl="https://github.com/ralphdc/mcrypt-2.6.8/archive/master.zip"
wget $liburl
unzip master.zip
cd "${basedir}/libmcrypt-2.5.8-master"
chmod 755 -R *
./configure --prefix=/usr/local/libmcrypt
make && make install
sleep 2
cd "${basedir}"
if [ -f master.zip ];then
rm -rf master.zip
fi
wget "${hashurl}"
unzip master.zip
cd "${basedir}/mhash-0.9.9.9-master"
chmod 755 -R *
./configure --prefix=/usr/local/mhash
make && make install
sleep 2
cd "${basedir}"
if [ -f master.zip ];then
rm -rf master.zip
fi
wget "${mcryurl}"
unzip master.zip
cd "${basedir}/mcrypt-2.6.8-master"
export LD_LIBRARY_PATH="/usr/local/libmcrypt/lib:/usr/local/mhash/lib"
export LDFLAGS="-L/usr/local/mhash/lib -I/usr/local/mhash/include/"
export CFLAGS="-I/usr/local/mhash/include/"
chmod 755 -R *
./configure --prefix=/usr/local/mcrypt --with-libmcrypt-prefix=/usr/local/libmcrypt
make && make install
cd "${basedir}"
5. configure: error: Don't know how to define struct flock on this system, set --enable-opcache=no
解决方法:
1). /etc/ld.so.conf.d/local.conf 新增配置:
/usr/local/lib64
/usr/local/lib
2).在编译php的时候加上如下参数:
--with-libdir=lib64
5.安装php的时候还遇到了如下错误:
configure: error: Sorry, I was not able to diagnose which libmcrypt version
解决方法:
重新编译libmcrypt,但编译时不要指定路径,而是直接./configure
阿里云-centos7.2-LNMP-编译安装-记录的更多相关文章
- 阿里云centos6.5实践编译安装LNMP架构web环境
LNMP 代表的就是:Linux系统下Nginx+MySQL+PHP这种网站服务器架构. 本次测试需求: **实践centos6.5编译安装 LNMP生产环境 架构 web生产环境 使用 ngx_pa ...
- MySQL-5.7.19 在阿里云 CentOS-7.0 上的安装
工具准备 查看系统是否安装了yum工具: [root@wangbo srv]# rpm -qa | grep yum yum-metadata-parser-1.1.4-10.el7.x86_64 y ...
- 阿里云CentOS7.2服务器的安装
第一步:下载服务器系统ISO安装文件 我使用的是阿里云的镜像:因为阿里云的服务在国内相对比较成熟 服务器镜像下载如下:http://mirrors.aliyun.com/centos/7/isos/x ...
- 阿里云 centos7.X mysql数据库安装、配置
前言 1024阿里云搞活动,ecs云服务新用户促销活动,活动连接就不贴了,买了之后暂时不知道要做啥,想着先安装mysql数据库. 步骤 root用户登录进来 1.配置mysql的yum源,yum lo ...
- 阿里云Centos7使用yum安装MySQL5.6的正确姿势
阿里云Centos7使用yum安装MySQL5.6 阿里云Centos7使用yum安装MySQL5.6 前言:由于某些不可抗力,我要在自己的阿里云服务器上搭建hadoop+hive+mysql+tom ...
- centos7源码编译安装lamp/lnmp
centos7源码编译安装lamp/lnmp 进程:是包工头(相当于是个门,只管开门关门,不管门内的事儿) 线程:是各种工种(cpu调度的是线程) 进程 是一件事情, 线程 是 同一个时间范围内 同时 ...
- 阿里云CentOS7.3服务器通过Docker安装Nginx
前言 小编环境: 阿里云CentOS7.3服务器 docker 下面分享一次小编在自己的阿里云CentOS7.3服务器上使用Docker来安装Nginx的一次全过程 温馨小提示: 如果只是希望单纯使用 ...
- 阿里云CentOs7上安装Tomcat
一.下载安装tomcat8 cd /usr/ #创建tomcat目录 mkdir tomcat #从网上download 压缩包 wget tomcat8 url #解压 tar -zxvf apac ...
- 阿里云centos7成功安装和启动nginx,但是外网访问不了的解决方案
问题环境: 阿里云centos7.4.1708 问题描述:成功配置,启动成功,外网访问不了 解决方案: 经过查阅文档,去阿里云后台查看,原来是新购的服务器都加入和实例安全组. (OMG)立即去配置.加 ...
- LNMP编译安装(centos7+nginx1.9+mysql5.6+php5.5)
LNMP编译安装 # 需先配置IP # 软件包的路径 /usr/local/src yum install -y libjpeg-devel libpng-devel freetype-devel c ...
随机推荐
- pyqt实现滑动开关
https://www.cnblogs.com/feiyangqingyun/p/6035633.html 根据Qt的实现,在PyQt上面实现了滑动开关的控件 import sys from PyQt ...
- Qt调用JS(二)
转自:http://www.cnblogs.com/verstin/p/4908673.html <html> <script language="JavaScript&q ...
- ORM框架(ITDOS实战源码)
ORM提供了实现持久化层的另一种模式,它采用映射元数据来描述对象关系的映射,使得ORM中间件能在任何一个应用的业务逻辑层和数据库层之间充当桥梁. 如以下示例: public int GetSystem ...
- IntelliJ Idea 快捷键列表
最重要:1Ctrl+Alt+Shift+T:查找类2重构3提取父类 Ctrl+Shift + Enter,语句完成“!”,否定完成,输入表达式时按 “!”键Ctrl+E,最近的文件Ctrl+Shift ...
- 1-1Controller之Request
laravel5.5版本 //路由: Route::any('request1',['uses'=>'StudentController@request1']); //控制器中的方法: publ ...
- OOP⑻
1.接口: 类 和 对象 对象 is a 类 例子: 小鸟 is a 动物 飞机 is a 交通工具 子弹 is a 武器 卫星 is a 通讯工具 问题? 01. 小鸟 飞机 子弹 卫星 虽然不是一 ...
- CMOS集成门电路
CMOS集成门电路:mos管构成的集成门电路 CMOS:互补对称金属氧化物半导体器件 CMOS反相器电路是由N沟道MOSFET和P沟道MOSFET互补而成:特点静态功耗近视为0,电源电压可在很宽的范围 ...
- Cracking The Coding Interview4.5
//原文: // // Write an algorithm to find the 'next' node (i.e., in-order successor) of a given node in ...
- ArrayList和LinkedList有什么区别?
---恢复内容开始--- ArrayList和LinkedList都实现了List接口,但是: ArrayList是基于索引的数据接口,底层是数组,能够以O(1)时间复杂度随机访问元素.而Linked ...
- java 移动开发获取多级下拉框json数据的类和mobile-select-area插件
我这里以行政区划做例子 //这个类是把数据库中的行政区划转化为json格式的data @SuppressWarnings("rawtypes")public class XzqhL ...