标签:
1)
2)
3)
4)
5)
安装时可能出现一些软件包未安装
安装方法如下:
tar zxvf apr-1.4.8.tar.gz
cd apr-1.4.8
./configure --prefix=/usr/local/apr //注意路径 安装httpd时免得找不到
make
make install
tar zxvf apr-util-1.5.2.tar.gz
cd apr-util-1.5.2
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make
make install
yum install -y gcc gcc-c++
tar zxvf pcre-8.33.tar.gz
cd pcre-8.33
./configure --prefix=/usr/local/pcre
make
make install
tar zxvf httpd-2.4.6.tar.gz
cd httpd-2.4.6
./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-module=so --with-pcre=/usr/local/pcre
make
make install
yum list libxml2
yum install libxml2-devel.i686
tar zxvf php-5.5.4.tar.gz
cd php-5.5.4
./configure --with-apxs2=/usr/local/apache/bin/apxs --prefix=/usr/local/php5 --with-config-file-path=/usr/local/php5 --with-mysql=shared,mysqlnd
make
make install
Apache
配置文件在/usr/local/apache/conf/httpd.conf
网页文件在/usr/local/apache/htdocs/ php
配置文件在 /etc/php.ini
cp xxx/php.ini-development
/etc/php/ini
vi
/usr/local/apache/conf/httpd.conf
添加 //自动添加了libphp5.so
AddType application/x-httpd-php .php .phtml .php3 .inc
在/usr/local/apache/htdocs/下
vi index.php
- <?php
- phpinfo()
- ?>
- /usr/local/apache/bin/httpd -k restart
- service httpd start
- ps -ef |grep httpd
service
setenforce
此时:
/usr/local/apache/conf/httpd.conf下只有index.html
测试及访问:
修改httpd.conf
vi
重启服务:
service
再次访问:
tar -xvf xdebug-2.4.1.tgz
/usr/local/php5/bin/phpize --执行后出现configuate文件
./configure
make && make install
cd xdebug-2.4.1
yum install autoconf
[xdebug]
zend_extension="/usr/local/php5/lib/php/extensions/no-debug-zts-20121212/xdebug.so"
xdebug.remote_enable = On
xdebug.remote_handler = dbgp
xdebug.remote_host= localhost
xdebug.remote_port = 9000
xdebug.idekey = PHPSTORM
service httpd restart 出现 httpd:unrecognized service 错误
解决:
cp /usr/local/apache2/bin/apachectl /etc/rc.d/init.d/httpd
chmod 700 /etc/rc.d/init.d/httpd
make //no found make //编译时出现
解决:
yum install make
标签:
原文地址:http://www.cnblogs.com/apescode/p/5872921.html