PHP--コンパイルインストール
小Q:今日は最新バージョンでlnmpアーキテクチャを再構築し、ちょうど私のブログのモジュールを統合しました.
1、コンパイルパラメータの詳細とコンパイルパラメータのインストール;
2、構成ファイルをコピーする;
3、出たエラー;
--------------------------------------------------------------------------------------------------------
1、コンパイルパラメータの詳細とコンパイルパラメータのインストール;
ソースコードのインストールなので、ダウンロードして解凍して言わないで、直接重点を言います;
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --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 --with-zlib --enable-pdo --with-pdo-mysql --with-mysql
--with-mysqli=/usr/bin/mysql_config
make && make install
2、プロファイル
cp php.ini-production/usr/local/php/etc/php-ini
cp sapi/fpm/init.d.php-fpm/etc/init.d/php-fpm
chmod 755/etc/init.d/php-fpm
chkconfig --add php-fpm
chkconfig php-fpm on
/usr/local/php/sbin/php-fpm -t
/etc/init.d/php-fpm start
3、エラーの簡略化
a. error: wrong mysql library version or lib not found. Check config.log for more information.
解決:上のラベルの赤いコンパイルパラメータを削除し、その後、このモジュールをアクティブにコンパイルします.with-mysqli=/usr/bin/mysql_config
b. ERROR: [pool www] cannot get uid for user 'php-fpm'
解決:useradd-s/sbin/nologin php-fpm
c./lib64/liblber-2.4.so.2: could not read symbols: Invalid operation
解決:Makefileファイルにアクセスし、EXTRAの先頭を見つけます.LIBS=、最後に-llberを付ければいい
1、コンパイルパラメータの詳細とコンパイルパラメータのインストール;
2、構成ファイルをコピーする;
3、出たエラー;
--------------------------------------------------------------------------------------------------------
1、コンパイルパラメータの詳細とコンパイルパラメータのインストール;
ソースコードのインストールなので、ダウンロードして解凍して言わないで、直接重点を言います;
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --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 --with-zlib --enable-pdo --with-pdo-mysql --with-mysql
--with-mysqli=/usr/bin/mysql_config
make && make install
--prefix=/usr/local/php
php
--with-apxs2=/usr/local/apache/bin/apxs
apache,apxs mod_so LoadModule , apache, apache SO
--with-config-file-path=/usr/local/php/etc
php.ini
--with-MySQL=/usr/local/mysql
mysql , mysql
--with-mysqli=/usr/local/mysql/bin/mysql_config
mysqli MySQL 、 MySQL , 。
--enable-safe-mode
--enable-ftp ftp
--enable-zip zip
--with-bz2 bz2
--with-jpeg-dir jpeg
--with-png-dir png
--with-freetype-dir freetype
--without-iconv iconv ,
--with-libXML-dir libxml2
--with-XMLrpc xml-rpc c
--with-zlib-dir zlib
--with-gd gd
--enable-gd-native-ttf TrueType
--with-curl curl
--with-curlwrappers curl url
--with-ttf freetype1.* ,
--with-xsl XSLT , libXM2 , libxslt
--with-gettext gnu gettext ,
--with-pear pear ,PHP
--enable-calendar
--enable-mbstring ,
--enable-bcmath , zabbix
--enable-sockets sockets
--enable-exif
--enable-magic-quotes
--disable-rpath
--disable-debug
--with-mime-magic=/usr/share/file/magic.mime
CGI
--enable-fpm
PHP-fpm ,CGI
--enable-fastCGI
fastcgi PHP
--enable-force-CGI-redirect
PHP
--with-ncurses
ncurses
--enable-pcntl freeTDS , mssql
mhash mcrypt
--with-mcrypt
--with-mhash
--with-gmp
--enable-inline-optimization
--with-openssl openssl ,
--enable-dbase DBA
--with-pcre-dir=/usr/local/bin/pcre-config perl
--disable-dmalloc
--with-gdbm dba gdbm
--enable-sigchild
--enable-sysvsem
--enable-sysvshm
--enable-zend-multibyte
zend
--with-openssl, openssl 。
2、プロファイル
cp php.ini-production/usr/local/php/etc/php-ini
cp sapi/fpm/init.d.php-fpm/etc/init.d/php-fpm
chmod 755/etc/init.d/php-fpm
chkconfig --add php-fpm
chkconfig php-fpm on
/usr/local/php/sbin/php-fpm -t
/etc/init.d/php-fpm start
3、エラーの簡略化
a. error: wrong mysql library version or lib not found. Check config.log for more information.
解決:上のラベルの赤いコンパイルパラメータを削除し、その後、このモジュールをアクティブにコンパイルします.with-mysqli=/usr/bin/mysql_config
b. ERROR: [pool www] cannot get uid for user 'php-fpm'
解決:useradd-s/sbin/nologin php-fpm
c./lib64/liblber-2.4.so.2: could not read symbols: Invalid operation
解決:Makefileファイルにアクセスし、EXTRAの先頭を見つけます.LIBS=、最後に-llberを付ければいい