常用编译配置

## fast-cgi模式编译php
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-ldap --with-ldap-sasl --with-xmlrpc --enable-zip --enable-soap --without-pear
## 编译安装nginx
./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module

## 编译安装apache
./configure --prefix=/usr/local/apache2 --enable-rewrite=shared --enable-track-vars --enable-cgi --enable-so --enable-mods-shared=all --with-config-file-path=/usr/local/apache2/conf --with-mpm=worker

## 编译安装mysql,安装sphinx插件
./configure --prefix=/usr/local/mysql-sphinx --with-charset=utf8 --with-extra-charsets=all --enable-thread-safe-client --enable-assembler --with-readline --with-big-tables --with-plugins=all --with-tcp-port=3310 --with-unix-socket-path=/usr/local/mysql-sphinx/etc/mysql.sock --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static

注意:--with-plugins=all 表示安装所有插件;--with-plugins=sphinx表示只安装sphinx插件

## 编译安装sphinx
ldconfig /usr/local/mysql-sphinx/lib/mysql
ldconfig /usr/local/mysql-sphinx/include/mysql
./configure --prefix=/usr/local/sphinx --with-mysql=/usr/local/mysql-sphinx

## PHP编译成apache的模块
./configure --prefix=/usr/local/php-apache --with-gd --with-jpeg-dir --with-zlib --with-png-dir --with-freetype-dir --with-mysql=/usr/local/mysql --with-pdo-mysql=/usr/local/mysql --with-iconv-dir=/usr/local --enable-mbstring --with-pear --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/php-apache/etc --with-libxml-dir=/usr/lib

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值