Debian How to 编译安装apache
来源:互联网 发布:网络割接流程视频 编辑:程序博客网 时间:2024/06/03 01:54
Debian How to 编译安装Apache
软件获取:http://httpd.apache.org/
wget http://mirror.vmmatrix.net/apache/httpd/apache_1.3.34.tar.gz
tar apache_1.3.34.tar.gz
cd apache_1.3.34
修改src/include/httpd.h 增大最大线程数
#define HARD_SERVER_LIMIT 1024
改成
#define HARD_SERVER_LIMIT 2560
保存退出编译apache
./configure /
--prefix=/usr/local/share/vmail/apache /
--enable-module=so /
--enable-module=rewrite /
--enable-shared=max /
--htdocsdir=/usr/local/share/vmail/www /
--server-uid=vmail /
--server-gid=vmail &&
make &&
make install
启动服务
/usr/local/share/vmail/apache/bin/apachectl start
浏览:http://server-ip/
日志:/usr/local/share/vmail/apache/logs/error_log
安装PHP
软件获取:http://www.php.net/downloads.php
wget http://cn2.php.net/get/php-4.4.2.tar.gz/from/cn.php.net/mirror
tar -xzvf php-4.4.2.tar.gz
cd php-4.4.2
apt-get install zlib1g zlib1g-dev
apt-get install libgdbm-dev
apt-get install libjpeg62-dev
apt-get install libpng3-dev
apt-get install libfreetype6-dev
./configure /
--prefix=/usr/local/share/vmail/php /
--with-mysql=/usr/local/share/vmail/mysql /
--enable-force-cgi-redirect /
--with-freetype-dir=/usr /
--with-png-dir=/usr /
--with-gd --enable-gd-native-ttf /
--with-ttf /
--with-gdbm /
--with-gettext /
--with-iconv /
--with-jpeg-dir=/usr /
--with-png /
--with-zlib /
--with-xml /
--enable-calendar /
--with-apxs=/usr/local/share/vmail/apache/bin/apxs
make
make install
- 建立 php.ini 文件
cp /usr/local/share/vmail/software/php-4.4.2/php.ini-dist /usr/local/share/vmail/php/lib/php.ini
修改php.ini文件
register_globals = On
- 编辑 httpd.conf 来加载 PHP 模块。在 LoadModule 语句右边的路径必须指向系统中
PHP 模块所在的路径。上面的 make install 步骤可能已经添加了,但还是检查确认一下。
对 PHP 4:
LoadModule php4_module libexec/libphp4.so
对 PHP 5:
LoadModule php5_module libexec/libphp5.so
* 在 httpd.conf 中加入 AddModule 部分,在 ClearModuleList 下面的某处,加上这一句:
对 PHP 4:
AddModule mod_php4.c
对 PHP 5:
AddModule mod_php5.c
* 告诉 Apache 将哪些后缀作为 PHP 解析。例如,让 Apache 把 .php 后缀的文件解析为
PHP。可以将任何后缀的文件解析为 PHP,只要在以下语句中加入并用空格分开。这里以
添加一个 .phtml 来示例。
AddType application/x-httpd-php .php .phtml
为了将 .phps 作为 PHP 的源文件进行语法高亮显示,还可以加上:
AddType application/x-httpd-php-source .phps
* 用通常的过程启动 Apache(必须完全停止 Apache 再重新启动,而不是用 HUP 或者
USR1 信号使 Apache 重新加载)。
编辑 httpd.conf
DirectoryIndex index.html index.htm index.shtml index.cgi index.php
- Debian How to 编译安装apache
- Debian How to 编译安装MYSQL
- debian下源码编译安装apache
- Debian APT How To
- How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Debian
- How to Install PHP 7 with Apache and MariaDB on CentOS 7/Debian 8
- How to Install Sun Java on Debian
- Another How to Install MogileFS - Debian Sarge
- How To Install Git on Debian 7
- how to use systemctl on linux(debian)
- How to change debian desktop wallpaper
- Debian:从源码安装Apache
- How to Uninstall Apache Server
- Debian 下编译安装Nginx
- Debian下编译安装内核
- Debian下编译安装MPlayer
- debian 手动编译安装 emacs24
- 在Debian Lenny上安装Apache Tomcat
- 在win32汇编中动态链接库的使用
- 如何查找 JAVA 内存溢出
- 九寨沟之旅
- 正则表达式
- lucene....highlight应用
- Debian How to 编译安装apache
- Test My Blog
- Debian How to 编译安装MYSQL
- GIS数据建库基本思想(上)
- 摄影_测试
- GIS数据建库基本思想(下)
- ^_^疼爱女友之36六计(搞笑版)
- 并查集 (Union-Find Sets)及其应用
- N 个 ASP.net DropDownList 无刷新联动菜单