阿里云-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 ...
随机推荐
- 如何仅用递归函数和栈操作逆序一个栈——你要先用stack实现,再去改成递归——需要对递归理解很深刻才能写出来
/** * 如何仅用递归函数和栈操作逆序一个栈 * 题目: * 一个栈依次压入1,2,3,4,5,那么从栈顶到栈底分别为5,4,3,2,1. * 将这个栈转置后,从栈顶到栈底为1,2,3,4,5,也就 ...
- AWVS和AppScan使用代理进行扫描教程
一.说明 扫描网站时,一是可能某些网站网络不能直接访问,二是可能不想曝露本机IP.这时要进行处理. 第一个方法是如果有vpn直接登vpn,vpn的话由于是直接修改操作系统层次的网络,扫描器不需要额外做 ...
- Linux网卡性能查看(CentOS)
一.ethtool查看网卡带宽 ethtool eth0 #eth0为网卡名,使用ifconfig查看当前使用的网卡 Speed表示网卡带宽,Duplex表示工作模式,Supported link m ...
- spring自定义xml标签&自定义注解
public class YafBeanDefinitionParser implements BeanDefinitionParser { private BeanDefinitionRegistr ...
- python3线程启动与停止
转自: https://blog.csdn.net/weixin_38125866/article/details/76795462 https://www.cnblogs.com/lcchuguo/ ...
- from…import 语句
- os模块-subprocess 模块- configpaser 模块
一. os 模块 主要用于处理与操作系统相关操作,最常用文件操作 使用场景:当需要操作文件及文件夹(增,删,查,改) os.getcwd() 获取当前工作目录 os.chdir('dirname') ...
- LY.JAVA面向对象编程.封装、this、构造方法
2018-07-07 this关键字 构造方法 /* 我们一直在使用构造方法,但是,我们确没有定义构造方法,用的是哪里来的呢? 构造方法的注意事项: A:如果我们没有给出构造方法,系统将自动提供一个无 ...
- Uva LA 3902 - Network 树形DP 难度: 0
题目 https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_pr ...
- mac系统下安装Composer和laravel
先手动下载Composer 地址:https://getcomposer.org/composer.phar 下载后mv composer.phar /usr/local/bin/composer 这 ...