标签:
#!/bin/bash#author:chenyanbo#name:批量解压缩包cd /usr/local/srcls *.tar.gz > ls.logfor i in $(cat ls.log)dotar -zxf $i &>/dev/nulldonerm -rf /usr/local/src/*.tar.gzrm -rf /usr/local/src/ls.log
2、安装 pcre:[root@localhost src]# cd pcre-8.38/
./configuremake && make install
检查编译环境:
测试apache服务器:./configure \--prefix=/usr/local/apache2/ \--sysconfdir=/etc/httpd \--with-zlib=/usr/local/src/zlib-1.2.8 \--with-included-apr \--enable-so \--enable-deflate=shared \--enable-expires=shared \--enable-rewrite=shared \--enable-static-supportmake && make install
./configure \ //执行当前目录下软件自代的配置命令
--prefix=/usr/local/php \ //设置PHP7 的安装路径
--with-config-file-path=/usr/local/php/etc \ //指定PHP7配置文件存入的路径
--with-apxs2=/usr/local/apache2/bin/apxs \ //告诉PHP查找Apache 2的地方
--with-pdo-mysql=/usr/local/mysql \ //指定MySQL的安装目录
--with-libxml-dir=/usr/local/libxml \ //告诉PHP放置libxml2库的地方
--with-png-dir=/usr/local/libpng \ //告诉PHP放置libpng库的地方
--with-jpeg-dir=/usr/local/libjpeg \ //告诉PHP放置jpeg库的地方
--with-freetype-dir=/usr/local/freetype \ //告诉PHP放置freetype库的地方
--with-zlib-dir=/usr/local/src/zlib-1.2.8 \ //告诉PHP放置zlib库的地方
--with-mcrypt=/usr/local/mcrypt \ //告诉PHP放置mcrypt库的地方
--with-mysqli=/usr/local/mysql/bin/mysql_config \ //变量激活新增加的MySQLi功能--with-iconv-dir=/usr/local/libiconv \--with-gd=/usr/local/libgd \--with-curl=/usr/local/curl \--with-openssl=/usr/local/openssl \--enable-soap \ //变量激活SOAP和Web services支持
--enable-mbstring=all \ //使多字节字符串支持--enable-sockets \ //变量激活socket通讯特性--enable-zip \ 打开对zip的支持
--enable-ftp \ 打开ftp的支持
./configure --prefix=/usr/local/php \--with-config-file-path=/usr/local/php/etc \--with-apxs2=/usr/local/apache2/bin/apxs \--with-pdo-mysql=/usr/local/mysql \--with-libxml-dir=/usr/local/libxml \--with-png-dir=/usr/local/libpng \--with-jpeg-dir=/usr/local/libjpeg \--with-freetype-dir=/usr/local/freetype \--with-zlib-dir=/usr/local/src/zlib-1.2.8 \--with-mcrypt=/usr/local/mcrypt \--with-mysqli=/usr/local/mysql/bin/mysql_config \--with-gd=/usr/local/libgd \--with-curl=/usr/local/curl \--with-xpm-dir=/usr/share/doc/libXpm-3.5.10 \--enable-soap \--enable-mbstring=all \--enable-sockets \--enable-zip \--enable-ftpmake && make install
vi /etc/httpd/httpd.conf //使用vi编辑apache配置文件AddType application/x-httpd-php .php .phtml #添加这一条
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
AcceptPathInfo On //加入这行代码就OK了
</Directory>
#LoadModule rewrite_module modules/mod_rewrite.so
将前面的#去掉
标签:
原文地址:http://www.cnblogs.com/chenyanbo/p/5832258.html