Apache

来源:互联网 发布:阿里云oss文件上传 编辑:程序博客网 时间:2024/06/05 11:31

Apache的编译:以下通用的编译选项能满足以后任意模块的安装:
./configure --prefix=/another_driver/apache/ --enable-shared=max --enable-module=most
比如:
./configure --prefix=/home/apache/ --enable-shared=max --enable-module=most


解释:
--prefix=/another_driver/apache/:建议将apache服务安装在另外一个驱动设备上的目的在于硬盘往往是一个系统使用寿命最低的设备,因此:将服务数据和系统完全分开,不仅能提高了数据的访问速度,更重要的,大大方便系统升级,应用备份和恢复过程。

--shared-module=max:使用动态加载方式载入子模块会带来5%的性能下降,但和带来的配置方便相比更本不算什么:比如模块升级方便,系统升级风险降低,安装过程标准化等

--enable-module=most:用most可以将一些不常用的module编译进来。

apache2:
./configure --prefix=/usr/local/apache2 --enable-module=most --enable-shared=max --enable-so --enable-shared=ssl
make
make install

php:
./configure --with-apxs2=/usr/local/apache2/bin/apxs --disable-debug --with-xml --with-mysql=/usr/local/mysql-5.0.4 --enable-track-vars  --with-ldap-sasl --with-ldap
make
make install
cp php.ini-dist /usr/local/apache2/conf/php.ini

vi /usr/local/apache2/conf/httpd.conf
/usr/local/apache2/bin/httpd -k start


 

原创粉丝点击