lamp的编译参数

Apache编译参数注解

./configure   //配置源代码树
--prefix=/usr/local/apache2   //体系无关文件的顶级安装目录PREFIX ,也就Apache的安装目录。
--enable-module=so   //打开 so 模块,so 模块是用来提 DSO 支持的 apache 核心模块
--enable-deflate=shared   //支持网页压缩
--enable-expires=shared   //支持 HTTP 控制
--enable-rewrite=shared   //支持 URL 重写
--enable-cache //支持缓存
--enable-file-cache //支持文件缓存
--enable-mem-cache //支持记忆缓存
--enable-disk-cache //支持磁盘缓存
--enable-static-support   //支持静态连接(默认为动态连接)
--enable-static-htpasswd   //使用静态连接编译 htpasswd - 管理用于基本认证的用户文件
--enable-static-htdigest   //使用静态连接编译 htdigest - 管理用于摘要认证的用户文件
--enable-static-rotatelogs   //使用静态连接编译 rotatelogs - 滚动 Apache 日志的管道日志程序
--enable-static-logresolve   //使用静态连接编译 logresolve - 解析 Apache 日志中的IP地址为主机名
--enable-static-htdbm   //使用静态连接编译 htdbm - 操作 DBM 密码数据库
--enable-static-ab   //使用静态连接编译 ab - Apache HTTP 服务器性能测试工具
--enable-static-checkgid   //使用静态连接编译 checkgid
--disable-cgid   //禁止用一个外部 CGI 守护进程执行CGI脚本
--disable-cgi   //禁止编译 CGI 版本的 PHP
--disable-userdir   //禁止用户从自己的主目录中提供页面
--with-mpm=worker // 让apache以worker方式运行
--enable-authn-dbm=shared // 对动态数据库进行操作。Rewrite时需要


mysql编译参数注解

configure的相关参数:
--prefix=/home/mysql/   /指定安装目录
--without-debug /去除debug模式
--with-extra-charsets=gbk,gb2312,utf8   /添加gbk,gb2312,utf8中文字符支持
--with-pthread /强制使用pthread库(posix线程库)
--enable-assembler /使用一些字符函数的汇编版本
--enable-thread-safe-client /以线程方式编译客户端
--with-client-ldflags=-all-static /以纯静态方式编译客户端
--with-mysqld-ldflags=-all-static /以纯静态方式编译服务端
--without-isam /去掉isam表类型支持,现在很少用了,isam表是一种依赖平台的表
--without-innodb /去掉innodb表支持,innodb是一种支持事务处理的表,适合企业级应用

 


1. 下载最新的apache2..2 http://www.apache.org

2. 配置参数:

./configure
--prefix=/usr/local/httpd2 /
--enable-so /
--disable-include /
--enable-expires /
--enable-usertrack /
--enable-unique-id /
--disable-userdir /
--enable-rewrite

说明: 

--enable-so: 激活动态加载,这样可以以so的方式来编译php
--disable-include / 不需要服务器端包含。
--enable-expires / 可以动态设置每一个文件的过期时间。
--enable-usertrack / 用于用户的跟踪。
--enable-unique-id / 每一次会话都可以产生一个惟一的id。
--disable-userdir / 禁止userdir功能。
--enable-rewrite 打开url重写。

二、安装php

1. 配置参数:

./configure /
--prefix=/usr/local/php5 /
--with-apxs2=/usr/local/httpd2/bin/apxs /
--with-bz2 /
--enable-zip /
--enable-calendar /
--with-mysql=/usr/local/mysql /
--with-pdo-mysql=/usr/local/mysql /
--enable-sqlite-utf8 /
--with-iconv=/usr/local/iconv /
--enable-mbstring /
--with-curl /
--with-snmp /
--with-tidy /
--enable-exif /
--with-gd /
--with-jpeg-dir=/usr /
--with-png-dir=/usr /
--with-zlib-dir=/usr /
--with-xpm-dir=/usr /
--with-ttf=/usr /
--with-freetype-dir=/usr /
--enable-gd-native-ttf /
--with-ming=/usr/local /
--with-xmlrpc /
--enable-soap /
--enable-sockets /
--with-mcrypt /
--with-mhash /
--enable-shmop /
-enable-dba /
--with-gdbm /
--with-db4 /
--with-imap /
--with-imap-ssl /
--with-kerberos /
--with-mcrypt=/usr/local /
--with-mhash=/usr/local /
--enable-pcntl /
说明:

-with-bz2 / 打开对bz2文件的支持。
--enable-zip / 打开对zip的支持。
--enable-calendar / 打开日历扩展。
--with-mysql=/usr/local/mysql / mysql的支持
--with-pdo-mysql=/usr/local/mysql / pdo的mysql支持。
--enable-sqlite-utf8 / 使sqllite支持utf-8
--with-iconv=/usr/local/iconv / 支持iconv
--enable-mbstring / 支持mbstring
--with-curl /
--with-snmp /
--with-tidy /
--enable-exif /
--with-gd /
--with-jpeg-dir=/usr /
--with-png-dir=/usr /
--with-zlib-dir=/usr /
--with-xpm-dir=/usr /
--with-ttf=/usr /
--with-freetype-dir=/usr /
--enable-gd-native-ttf /
--with-ming=/usr/local /
--with-xmlrpc /
--enable-soap /
--enable-sockets /
--with-mcrypt /
--with-mhash /
--enable-shmop /
-enable-dba /
--with-gdbm /
--with-db4 /
--with-imap /
--with-imap-ssl /
--with-kerberos /
--with-mcrypt=/usr/local /
--with-mhash=/usr/local /
--enable-pcntl /

需要单独安装的扩展:

1. gd库。
2. ming的扩展。
3. mhash和mcrypt的扩展。

其他的都是通过rpm安装的。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值