apache2.2.x+php5.5安装部署-创新互联
1.安装apr,apr-util
成都创新互联公司专注于贵溪企业网站建设,响应式网站设计,商城网站建设。贵溪网站建设公司,为贵溪等地区提供建站服务。全流程按需求定制开发,专业设计,全程项目跟踪,成都创新互联公司专业和态度为您提供的服务tar -zxf apr-1.4.5.tar.gz
cd apr-1.4.5
./configure --prefix=/usr/local/apr
make && make install
tar -zxf apr-util-1.3.12.tar.gz
cd apr-util-1.3.12
./configure --prefix=/usr/local/apr-util -with-apr=/usr/local/apr/bin/apr-1-config
make && make install
2.安装pcre
unzip -o pcre-8.10.zip
cd pcre-8.10
./configure --prefix=/usr/local/pcre
make && make install
3.安装其他依赖
yum install –y zlib zlib-devel openssl openssl-devel
4.编译安装apache
tar zxf httpd-2.2.31.tar.gz
cd httpd-2.2.31
./configure \
--prefix=/usr/local/apach-2.2.31 \
--with-apxs2=/usr/local/apache-2.2.31/bin/apxs \
--enable-deflate \
--enable-expires \
--enable-headers \
--enable-modules=most \
--enable-so \
--with-ssl \
--enable-ssl \
--enable-cgid \
--enable-cgi \
--with-apr-util=/usr/local/apr-util \
--with-mpm=worker \
--enable-rewrite \
--with-pcre=/usr/local/pcre \
--with-included-apr
make && make install
5.安装php依赖
yuminstall –y zlib-devel libxml2-devel libjpeg-devel freetype-devel libpng-devel libxml2*libcurl* libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel xml2xml2-devel libxslt-devel
6.安装libiconv
tar -zxf libiconv-1.14.tar.gz
cd libiconv-1.14
./configure --prefix=/usr/local/libiconv
make
make install
7.编译安装php5.5
tar -zxf php-5.5.20.tar.gz
cd php-5.5.20
./configure \
--prefix=/usr/local/php5.5.20 \
--enable-mysqlnd \
--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--enable-bcmath \
--with-gettext \
--with-xmlrpc \
--with-openssl \
--with-zlib \
--with-freetype-dir \
--with-gd \
--with-jpeg-dir \
--with-png-dir \
--with-iconv=/usr/local/libiconv \
--enable-short-tags \
--enable-sockets \
--enable-soap \
--enable-mbstring \
--enable-static \
--enable-gd-native-ttf \
--enable-zip \
--with-curl \
--with-xsl \
--enable-ftp \
--with-gettext \
--enable-opcache \
--with-libxml-dir
ln -s /usr/local/php5.5.20 /usr/local/php
cp php.ini-production /usr/local/php/lib/php.ini
8.配置apache支持php
1)添加主持.php后缀名
DirectotyIndex index.html index.php
2)找到如下两行
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
在后面添加
AddType application/x-httpd-php .php.phtml
AddType application/x-httpd-php-source.phps
另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
网站名称:apache2.2.x+php5.5安装部署-创新互联
本文地址:http://azwzsj.com/article/jesgp.html