设为首页 收藏本站
查看: 963|回复: 0

LANMP架构安装支持库和常用编译参数

[复制链接]
累计签到:1 天
连续签到:1 天
发表于 2015-11-19 09:53:16 | 显示全部楼层 |阅读模式
Nginx编译安装参数
./configure --prefix=/usr/local/nginx --group=nginx --user=nginx --with-http_stub_status_module --with-http_ssl_module



MySQL5.6编译安装参数:

cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_UNIX_ADDR=/usr/local/mysql/data/tmp/mysql.sock -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_EXTRA_CHARSETS:STRING=utf8,gbk -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DWITH_READLINE=1 -DENABLED_LOCAL_INFILE=1 -DMYSQL_DATADIR=/usr/local/mysql/data -DMYSQL_USER=mysql -DMYSQL_TCP_PORT=3306

编译器和部分支持库的安装
yum  install –y gcc gcc-c++ gcc-g77 autoconf automake zlib* fiex* libxml* ncurses-devel libmcrypt* libtool-ltdl-devel* cmake




PHP支持库的安装:
yum install -y zlib libxml libjpeg freetype libpng gd curl libiconv zlib-devel libxml2-devel libjpeg-devel freetype-devel libpng-devel gd-devel curl-devel


PHP-5.6编译安装参数:(针对Apache)

./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache-2.2.31/bin/apxs --with-mysql=/usr/local/mysql --with-xmlrpc --with-openssl --with-zlib --with-freetype-dir --with-zlib --with-gd --with-jpeg-dir --with-png-dir --with-iconv=/usr/local/iconv --enable-short-tags --enable-sockets --enable-zend-multibyte --enable-soap --enable-mbstring --enable-static --enable-gd-native-ttf --enable-curl --enable-xsl --enable-ftp --with-libxml-dir

  修改Apache配置文件,增加对PHP的支持。
    AddType application/x-httpd-php .php .phtml .inc .php3
    AddType application/x-httpd-source .phps


PHP-5.6编译安装参数:(针对Nginx)

检查支持库
Step1:
    yum install -y zlib libxml libjpeg freetype libpng gd curl libiconv zlib-devel libxml2-devel libjpeg-devel freetype-devel libpng-devel gd-devel curl-devel
Step2:
    tar xf libiconv.tar.gz
    ./configure --prefix=/usr/local/libiconv
    make && make install
Step3:
    tar xf libmcrypt.tar.gz
    ./configure
    make && make install



./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-xmlrpc --with-openssl --with-zlib --with-freetype-dir --with-zlib --with-gd --with-jpeg-dir --with-png-dir --with-iconv=/usr/local/iconv --enable-short-tags --enable-sockets  --enable-soap --enable-mbstring --enable-static --enable-gd-native-ttf --enable-ftp --with-libxml-dir --enable-fpm  --with-mhash --enable-pcntl  --with-fpm-user=nginx --with-fpm-group=nginx --with-libxml --enable-bcmath --disable-rpath --enable-safe-mode --enable-shmop --enable-sysvsem --enable-inline-optimization --enable-mbregex --enable-zip --with-mcrypt=/usr/local/libmcrypt --with-libdir=lib64


./configure --prefix=/usr/local/php --enable-fpm --enable-pcntl --enable-mysqlnd --enable-opcache --enable-sockets --enable-sysvmsg --enable-sysvsem  --enable-sysvshm --enable-shmop --enable-zip --enable-ftp --enable-soap --enable-xml --enable-mbstring --disable-rpath --disable-debug --disable-fileinfo --with-mysql=/usr/local/mysql --with-pdo-mysql --with-pcre-regex --with-iconv --with-zlib --with-mcrypt=/usr/local/libmcrypt --with-gd --with-openssl --with-mhash --with-xmlrpc --with-curl --with-imap-ssl --with-fpm-user=nginx --with-fpm-group=nginx




configure: WARNING: unrecognized options: --enable-zend-multibyte, --enable-curl, --enable-xsl, --with-libxml, --enable-safe-mode, --with-curlwrappers




老男孩版本
./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-iconv-dir=/usr/local/libiconv --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbreget --enable-fpm --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --enable-short-tags --enable-zend-multibyte --enable-static --with-xsl --with-fpm-user=nginx --with-fpm-group=nginx --enable-ftp


ln -s /usr/local/mysql/lib/libmysqlclient.so.18 /usr/lib64/


--with-zlib-dir=DIR  --with-pcre-dir --with-libzip=DIR   
--with-zlib-dir=DIR --with-pcre-dir  --with-libzip=DIR


\cp -frp /usr/lib64/libltdl.so* /usr/lib/

\cp -frp /usr/lib64/libXpm.so* /usr/lib/


赵荣涛终极版本(Nginx)

./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-pdo-mysql=/usr/local/mysql --with-gd --with-png-dir --with-jpeg-dir --with-freetype-dir --with-xpm-dir --with-zlib-dir --with-iconv=/usr/local/iconv --enable-libxml --enable-xml --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --enable-opcache --enable-mbregex --enable-fpm --enable-mbstring --enable-ftp --enable-gd-native-ttf --with-openssl --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --enable-session --with-mcrypt --with-curl --enable-ctype --with-fpm-user=nginx --with-fpm-group=nginx


--with-apxs2=/usr/local/apache2/bin/apxs



赵X版本修改版(针对apache)
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --with-mysql-sock --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-fpm --with-ncurses --enable-soap --with-libxml-dir --with-XMLrpc --with-openssl --with-mcrypt --with-mhash --with-pcre-regex --with-sqlite3 --with-zlib --enable-bcmath --with-iconv --with-bz2 --enable-calendar --with-curl --with-cdb --enable-dom --enable-exif --enable-fileinfo --enable-filter --with-pcre-dir --enable-ftp --with-gd --with-openssl-dir --with-jpeg-dir --with-png-dir --with-zlib-dir  --with-freetype-dir --enable-gd-native-ttf --enable-gd-jis-conv --with-gettext --with-gmp --with-mhash --enable-json --enable-mbstring --disable-mbregex --disable-mbregex-backtrack --with-libmbfl --with-onig --enable-pdo --with-pdo-mysql --with-zlib-dir --with-pdo-sqlite --with-readline --enable-session --enable-shmop --enable-simplexml --enable-sockets --enable-sqlite-utf8 --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --with-libxml-dir  --with-xsl --enable-zip --enable-mysqlnd-compression-support --with-pear

实测成功的192.168.0.71编译安装参数(Apache)
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache-2.2.31/bin/apxs --with-mysql=/usr/local/mysql --with-xmlrpc --with-openssl --with-freetype-dir --with-zlib --with-gd --with-jpeg-dir --with-png-dir --with-iconv=/usr/local/iconv --enable-short-tags --enable-sockets --enable-zend-multibyte --enable-soap --enable-mbstring --enable-static --enable-gd-native-ttf --enable-curl --enable-xsl --enable-ftp --with-libxml-dir



运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-141048-1-1.html 上篇帖子: xampp下新增virtualhost出现access denied 下篇帖子: LAMP运行环境搭建及部署php程序软件
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表