0%

LAP脚本

前期要准备好部署的依赖包,里面包括各种模块的编译包,还要准备好环境
开始吧!

一、安装apache

1.安装apr
解压apr.1.6.5.tar.gz

1
./configure --prefix=/home/gonglu/modelDb/software/apr

然后make && make install

2.安装apr-util
解压apr-util-1.6.1.tar.gz

1
./configure --prefix=/home/gonglu/modelDb/software/apr-util --with-apr=/home/gonglu/modelDb/software/apr

然后make && make install

3.安装pcre
解压pcre-8.42.tar.gz

1
./configure --prefix=/home/gonglu/modelDb/pcre --with-apr=/home/gonglu/modelDb/pcre

然后make && make install

4.安装iconv
解压apr-iconv-1.2.2

1
./configure --prefix=/home/gonglu/modelDb/apr-iconv --with-apr=/home/gonglu/modelDb/software/apr

然后make && make install

5.最后安装httpd
解压httpd-2.4.35.tar.gz

1
./configure --prefix=/home/gonglu/modelDb/apache-modelDb --with-pcre=/home/gonglu/modelDb/pcre --with-apr=/home/gonglu/modelDb/software/apr --with-apr-util=/home/gonglu/modelDb/software/apr-util --with-apr-iconv=/home/gonglu/modelDb/apr-iconv

然后make && make install

二、安装PHP

1.先安装PHP的依赖包

1
yum -y install libxml2 libxml2-devel openssl openssl-devel curl-devel libjpeg-devel libpng-devel freetype-devel libmcrypt-devel libxslt libicu-devel libxslt-devel

2.安装PHP
解压php-7.1.24.tar.gz

1
./configure --prefix=/home/gonglu/modelDb/php --with-apxs2=/home/gonglu/modelDb/apache-modelDb/bin/apxs --with-config-file-path=/home/gonglu/modelDb/php --with-curl --with-freetype-dir --with-gd --with-gettext --with-iconv-dir --with-kerberos --with-libdir=lib64 --with-libxml-dir --with-mysqli --with-openssl --with-pcre-regex --with-pdo-mysql --with-pdo-sqlite --with-pear --with-png-dir --with-jpeg-dir --with-xmlrpc --with-xsl --with-zlib --with-bz2 --with-mhash --enable-fpm --enable-bcmath --enable-libxml --enable-inline-optimization --enable-gd-native-ttf --enable-mbregex --enable-mbstring --enable-opcache --enable-pcntl --enable-shmop --enable-soap --enable-sockets --enable-sysvsem --enable-sysvshm --enable-xml --enable-zip

3.将 php.ini 和 www.conf 复制一份
4.找到解压路径

1
2
3
cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
chmod +x /etc/init.d/php-fpm
chkconfig --add php-fpm

Welcome to my other publishing channels