•  

CentOS 7下安装LAMP环境(APACHE 2.4,PHP 7,MYSQL 5.8)

发表于 2018-07-17,阅读 1

一、安装Apache 2.4.27

1、安装依赖

yum  -y  expat-devel

2、安装 apr-1.6.2

tar  -xzvf  apr-1.6.2.tar.gz
cd  apr-1.6.2
./configure  --prefix=/tongfu.net/env/apr-1.6.2
make && make install

3、安装 apr-util-1.6.0

tar  -xzvf  apr-util-1.6.0.tar.gz
cd  apr-util-1.6.0
./configure  --prefix=/tongfu.net/env/apr-util-1.6.0 \
--with-apr=/tongfu.net/env/apr-1.6.2
make && make install

4、安装 httpd-2.4.27

tar  -xzvf  httpd-2.4.27.tar.gz
cd  httpd-2.4.27
./configure --prefix=/tongfu.net/env/httpd-2.4.27 \
--with-apr=/tongfu.net/env/apr-1.6.2 \
--with-apr-util=/tongfu.net/env/apr-util-1.6.0 \
--with-pcre \
--enable-so \
--enable-rewrite
make && make install

二、安装PHP7

1、安装依赖

yum  -y  install  php-mcrypt libmcrypt libmcrypt-devel  autoconf  freetype gd jpegsrc libmcrypt libpng libpng-devel libjpeg libxml2 libxml2-devel zlib curl curl-devel

2、安装jpeg-9b

tar  -xzvf  jpegsrc.v9b.tar.gz
cd  jpeg-9b
./configure  --prefix=/tongfu.net/env/jpeg-9b
make && make install

3、安装libpng-1.6.31

tar  -xzvf  libpng-1.6.31.tar.gz
cd libpng-1.6.31
./configure  --prefix=/tongfu.net/env/libpng-1.6.31
make && make install

4、安装 php-7.1.7

./configure  --prefix=/tongfu.net/env/php-7.1.7 \
--with-apxs2=/tongfu.net/env/httpd-2.4.27/bin/apxs \
--enable-mbstring \
--enable-soap \
--with-curl \
--with-gd \
--with-jpeg-dir=/tongfu.net/env/jpeg-9b \
--with-png-dir=/tongfu.net/env/libpng-1.6.31 \
--enable-fpm \
--enable-mysqlnd \
--with-pdo-mysql \
--with-config-file-path=/etc/ \
--with-mysqli

5、安装模块phpredis-2.2.4

tar  -xzvf  phpredis-2.2.4.tar.gz
cd  phpredis-2.2.4
/tongfu.net/env/php-7.1.7/bin/phpize
./configure  --with-php-config=/tongfu.net/env/php-7.1.7/bin/php-config
make && make install

6、安装模块memcached-3.0.3

tar  -xzvf  memcached-3.0.3.tgz
cd  memcached-3.0.3
/tongfu.net/env/php-7.1.7/bin/phpize
make && make install

6、安装模块phpredis-develop

unzip  phpredis-develop.zip
cd phpredis-develop/
/tongfu.net/env/php-7.1.7/bin/phpize
./configure  --with-php-config=/tongfu.net/env/php-7.1.7/bin/php-config
make && make install

三、安装subversion-1.8.18

1、安装依赖

yum -y install sqlite-devel
yum -y install perl-devel
yum -y install perl-ExtUtils-Embed

2、安装subversion-1.8.18

tar  -xzvf  subversion-1.8.18.tar.gz
cd  subversion-1.8.18
./configure  --prefix=/tongfu.net/env/svn \
--with-apr=/tongfu.net/env/apr-1.6.2 \
--with-apr-util=/tongfu.net/env/apr-util-1.6.0 \
--with-apxs=/tongfu.net/env/httpd-2.4.27-svn/bin/apxs \
--with-apache-libexecdir \
--with-openssl \
--enable-maintainer-mode


鬼谷子叔叔
  • 日志:126
  • 回复:13

进入ta的主页