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-编译安装-记录的更多相关文章

  1. 阿里云centos6.5实践编译安装LNMP架构web环境

    LNMP 代表的就是:Linux系统下Nginx+MySQL+PHP这种网站服务器架构. 本次测试需求: **实践centos6.5编译安装 LNMP生产环境 架构 web生产环境 使用 ngx_pa ...

  2. 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 ...

  3. 阿里云CentOS7.2服务器的安装

    第一步:下载服务器系统ISO安装文件 我使用的是阿里云的镜像:因为阿里云的服务在国内相对比较成熟 服务器镜像下载如下:http://mirrors.aliyun.com/centos/7/isos/x ...

  4. 阿里云 centos7.X mysql数据库安装、配置

    前言 1024阿里云搞活动,ecs云服务新用户促销活动,活动连接就不贴了,买了之后暂时不知道要做啥,想着先安装mysql数据库. 步骤 root用户登录进来 1.配置mysql的yum源,yum lo ...

  5. 阿里云Centos7使用yum安装MySQL5.6的正确姿势

    阿里云Centos7使用yum安装MySQL5.6 阿里云Centos7使用yum安装MySQL5.6 前言:由于某些不可抗力,我要在自己的阿里云服务器上搭建hadoop+hive+mysql+tom ...

  6. centos7源码编译安装lamp/lnmp

    centos7源码编译安装lamp/lnmp 进程:是包工头(相当于是个门,只管开门关门,不管门内的事儿) 线程:是各种工种(cpu调度的是线程) 进程 是一件事情, 线程 是 同一个时间范围内 同时 ...

  7. 阿里云CentOS7.3服务器通过Docker安装Nginx

    前言 小编环境: 阿里云CentOS7.3服务器 docker 下面分享一次小编在自己的阿里云CentOS7.3服务器上使用Docker来安装Nginx的一次全过程 温馨小提示: 如果只是希望单纯使用 ...

  8. 阿里云CentOs7上安装Tomcat

    一.下载安装tomcat8 cd /usr/ #创建tomcat目录 mkdir tomcat #从网上download 压缩包 wget tomcat8 url #解压 tar -zxvf apac ...

  9. 阿里云centos7成功安装和启动nginx,但是外网访问不了的解决方案

    问题环境: 阿里云centos7.4.1708 问题描述:成功配置,启动成功,外网访问不了 解决方案: 经过查阅文档,去阿里云后台查看,原来是新购的服务器都加入和实例安全组. (OMG)立即去配置.加 ...

  10. LNMP编译安装(centos7+nginx1.9+mysql5.6+php5.5)

    LNMP编译安装 # 需先配置IP # 软件包的路径 /usr/local/src yum install -y libjpeg-devel libpng-devel freetype-devel c ...

随机推荐

  1. iOS runtime实用篇--和常见崩溃say good-bye!

    程序崩溃经历 其实在很早之前就想写这篇文章了,一直拖到现在. 程序崩溃经历1 我们公司做的是股票软件,但集成的是第三方的静态库(我们公司和第三方公司合作,他们提供股票的服务,我们付钱).平时开发测试的 ...

  2. matlab server mapreduce

    >> Z = server.rpc('zeros', 2, 3);>> Z = [2x3 double] [2x3 double] >> Z{1}ans = 0 0 ...

  3. Oracle.练习题

    2018-07-31 ---练习3 ---创建sporter表 create table sporter( sporterid ) constraint sport_id primary key, s ...

  4. js编码函数一些区别

    s对文字进行编码涉及3个函数:escape,encodeURI,encodeURIComponent,相应3个解码函数:unescape,decodeURI,decodeURIComponent 1、 ...

  5. day1 计算机硬件基础

    CPU包括运算符和逻辑符 储存器包括内存和硬盘 7200转的机械硬盘一般找到想要的数据需要9毫秒的时间      4+5   5毫秒的时间是磁头到磁盘轨道    4毫秒是平均开始查找想要的数据到找到的 ...

  6. 四:FAQ附录(容器交互,镜像交互,镜像导出)

    1.交互式运行容器的方法: 1>-it进入到操作系统中: 2>另开一个cmd验证: 3>这是在image之上多了一个可写的从:可以运行centos的命令做一些事(touch .yum ...

  7. 踩坑 net core

    webclient   可以替换为 HttpClient 下载获取url的内容: 证书: https://stackoverflow.com/questions/40014047/add-client ...

  8. 4.4 C++虚析构函数

    参考:http://www.weixueyuan.net/view/6373.html 总结: 构造函数是不能声明为虚函数的,析构函数可以被声明为虚函数. 将基类的析构函数声明为虚函数之后,派生类的析 ...

  9. 201621123001《Java程序设计》第1周学习总结

    1. 本周学习总结 认识java的三个层次:java语法 面向对象设计能力 应用 . 学习eclipse创建java文件的方法. 学习markdown的基本语法,了解写博客的几种常用形式. 了解JVM ...

  10. Creating and Destroying Objects

    Consider static factpry methods instead of construction 四个优点两个缺点 One advantage of static factory met ...