Amazon Linux 编译安装 Apache 2.4 + PHP 5.5

发布时间:2020-06-07 12:51:03 作者:raygtr
来源:网络 阅读:805

参考这位兄弟的Centos 下的编译安装过程修改后在Amazon linux 重新编译了一次

http://www.cnblogs.com/cosiray/archive/2012/03/12/2392275.html


安装过程需要的文件可以通过此链接下载:

http://pan.baidu.com/s/1qWn7VOC

过程简略如下:

 

 

·        Install Amazon linux

Install OS through the minimum server auto installation.

·        Install system preparation

sudo  yum install libmcrypt* cmake apr apr-util  gcc gcc-c++ zlib-devel openssl openssl-develpcre-devel gd  kernel keyutils  patch perl kernel-headers compat* mpfr cpp glibc libgomp libstdc++-devel pplcloog-ppl keyutils-libs-devel libcom_err-devel libsepol-devel libselinux-develkrb5-devel zlib-devel libXpm* freetype libjpeg* libpng* php-common php-gdncurses* libtool* libxml2 libxml2-devel patch bzip2* gdbm-*  db4*  db4-devel libedit* libedit-dev* libtidy* libxslt-devel

 

 

#install mysql:

sudo  groupadd mysql  

sudo  useradd -g mysql mysql -s /bin/false 

sudo  mkdir -p /usr/local/mysql

sudo  tar xvzf mysql-5.6.26.tar.gz

cd mysql-5.6.26

sudo cmake .-DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DSYSCONFDIR=/etc

sudo make

sudo make install

sudo  ln -s /usr/local/mysql/lib/mysql/usr/lib/mysql

sudo ln -s/usr/local/mysql/include/mysql /usr/include/mysql

 

#install APR

sudo ./configure--prefix=/usr/local/apr

sudo make

sudo make install

#install APR-UTIL

sudo ./configure--prefix=/usr/local/apr-util --with-apr=/usr/local/apr/bin/apr-1-config

sudo make

sudo make install

#install pcre 8.21

sudo ./configure--prefix=/usr/local/pcre

sudo make

sudo make install

 

 

#install apche

./configure--prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util--with-ssl --enable-ssl --enable-module=so --enable-rewrite --enable-cgid--enable-cgi

 

 

#INSTALL PHP

Handle DBA failed first:

sudo ln -s/usr/include/gdbm/ndbm.h /usr/include/ndbm.h

sudo  ln -s /usr/lib/libgdbm.so /usr/lib/libndbm.so

Install Berkeley DB 4.8 version:

cd build_unix/

sudo ../dist/configure --prefix=/usr/local/db4  --enable-sql_compat --enable-cxx

sudo make

sudo make install

Install PHP 5.5

sudo ./configure--prefix=/usr/local/php5 \

--with-config-file-path=/etc\

--with-apxs2=/usr/local/apache2/bin/apxs  \

--with-mysql=/usr/local/mysql  \

--with-mysqli=/usr/local/mysql/bin/mysql_config\

--with-mysql-sock=/tmp/mysql.sock\

--with-gd  --with-iconv --with-freetype --with-jpeg--with-png --with-zlib \

--with-libxml --enable-xml--enable-discard-path --enable-magic-quotes \

--enable-safe-mode --enable-bcmath--enable-shmop --enable-sysvsem \

--enable-inline-optimization--with-curlwrappers --enable-mbregex \

--enable-fastcgi--enable-force-cgi-redirect --enable-mbstring \

--enable-ftp--enable-gd-native-ttf --with-openssl --enable-pcntl \

--enable-sockets--with-xmlrpc --enable-zip --enable-soap --without-pear \

--with-gettext--with-mime-magic --enable-suhosin --enable-session --with-mcrypt \

--with-pcre-regex=/usr/local/pcre  --mandir=/usr/share/man--infodir=/usr/share/info \

--disable-dependency-tracking--with-kerberos --with-bz2 --enable-calendar --enable-dba --with-db4=/usr/local/db4 \

--disable-cgi--with-gdbm  --with-ndbm=/usr--enable-exif --enable-fpm \

--with-png-dir=no--with-libedit --with-readline --with-snmp  \

--enable-sysvmsg --enable-sysvshm--with-tidy --enable-wddx --with-xsl --enable-zend-multibyte

sudo make

sudo make install

 


推荐阅读:
  1. kali之DNS劫持
  2. 什么是大数据血缘?

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

amazon linux apache2 he zo

上一篇:Windows Server 2008 多站点部署HTTPS

下一篇:网络运维必备

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》