Zabbbix PHP source installation based on LNMP

Source: Internet
Author: User
Tags bz2 gettext soap openssl library pear php server php compiler php error

The parameters behind the./configure are from: Http://www.tuicool.com/articles/ZJfYzyF

./configure--prefix=/usr/local/php--with-config-file-path=/usr/local/php/etc--enable-fpm--with-fpm-user=daemon--with-fpm-group=daemon--with-mysql=mysqlnd-- With-mysqli=mysqlnd--with-pdo-mysql=mysqlnd--with-iconv-dir--with-freetype-dir--with-jpeg-dir--with-png-dir--with-zlib--with-libxml-dir=/USR--enable-xml--disable-rpath--enable-magic-quotes--enable-safe-mode--enable-bcmath--enable-shmop-- Enable-sysvsem--enable-inline-optimization--with-curl--with-curlwrappers--enable-mbregex--enable-mbstring-- With-mcrypt--enable-FTP--WITH-GD--enable-gd-native-ttf--with-openssl--with-mhash--enable-pcntl--enable-sockets--with-xmlrpc--enable-Zip--enable-soap--without-pear--with-gettext--disable-fileinfo--enable-maintainer-zts
./configure.

#configure: warning:unrecognized options:--enable-magic-quotes,--enable-safe-mode,--with-curlwrappers

#这里是我安装是出现的警告

If the added parameters are not supported, such as: configure:WARNING:unrecognized options:--enable-discard-path,--enable-safe-mode,-- enable-fastcgi,--enable-force-cgi-redirect

Stating that these parameters are obsolete

--prefix=/usr/local/php specifying the PHP installation directory
--WITH-APXS2=/USR/LOCAL/APACHE/BIN/APXS Integrated APACHE,APXS function is to use the loadmodule instruction in Mod_so, load the specified module to Apache, request Apache To open the so module--with-config-file-path=/usr/local/php/etcSpecify php.ini location
--with-mysql=/usr/local/mysqlMySQL installation directory, support for MySQL
--with-mysqli=/usr/local/mysql/bin/mysql_configmysqli Extension technology can not only invoke MySQL's stored procedures, handle MySQL transactions, but also make access to the database work more stable.
--enable-safe-mode Open Safe Mode php-5.4.x has removed this option, compile can #./configure--help | grep "Safe-mode" to see, there is no information output, indicating that has been Not supported!
--enable-ftp support for open FTP
--enable-zip opening support for Zip
--with-bz2 opening support for bz2 files
--with-jpeg-dir opening support for JPEG images
--with-png-dir opening support for PNG images
--with-freetype-dir opening support for the FreeType font library
--without-iconv Close Iconv function, conversion between kinds of character sets
--with-libxml-dir opening support for LIBXML2 libraries
--with-xmlrpc Open the C language of Xml-rpc
--with-zlib-dir opening support for zlib libraries
--WITH-GD opening the GD library support
--enable-gd-native-ttf supports TrueType string function libraries
--with-curl Opening the Curl browsing tool support
--with-curlwrappers using the Curl tool to open the URL stream
--with-ttf Open freetype1.* Support, can not add
--with-xsl opens XSLT file support, expands the LibXML2 library, requires LIBXSLT software
--with-gettext Opens the GNU gettext Support, the code library uses the
--with-pear Open the support for Pear command, PHP extension with
--enable-calendar opening the calendar extension feature
--enable-mbstring Multi-byte, string support
--enable-bcmath Open picture resizing, use this module for Zabbix monitoring
--enable-sockets Open Sockets support
meta-data support for--ENABLE-EXIF images
--enable-magic-quotes Magic Reference Support is an extremely deprecated parameter, of course, if you need PHP to do the work for you underneath, in fact he does not have a very thorough problem solving     
--disable-rpath to close additional runtime files
--disable-debug turning off debug mode
--with-mime-magic=/usr/share/file/magic.mime Magic Head File location
parameters for CGI mode installation
--ENABLE-FPMafter the PHP-FPM patch has this parameter, CGI installation of the startup program
--enable-fastcgisupport fastcgi way to start PHP
--enable-force-cgi-redirectREDIRECT start php
--with-ncursesDynamic library that supports ncurses screen drawing and graphical interactive functions based on text terminal
--enable-pcntl FreeTDS need to use, may be linked to MSSQL to use
extension of the Mhash and MCrypt algorithms
--with-mcrypt Algorithm
--with-mhash Algorithm

The above function libraries need to be installed
--WITH-GMP should be supportive of a specification
--enable-inline-optimization Optimizing Threads
--with-openssl OpenSSL support for encrypted transmissions
--enable-dbase establishing a DBA as a shared module
--with-pcre-dir=/usr/local/bin/pcre-config Perl's regular library installation location
--disable-dmalloc
--WITH-GDBM DBA's gdbm support
--enable-sigchild
--enable-sysvsem
--enable-sysvshm
--enable-zend-multibyte Multi-byte support for Zend
--enable-mbregex
--ENABLE-WDDX
--enable-shmop
--enable-soap
after specifying the--WITH-APXS2=/USR/LOCAL/APACHE/BIN/APXS, do not activate--ENABLE-FPM and--ENABLE-FASTCGI,APXS are loaded PHP in PHP module mode.
MySQL after compiling the MySQL development library, you can not specify the path of MySQL.
PHP Compiler has a basic dependency relationship, compiling PHP first needs to install the XML extension, because the PHP5 core opens XML support by default, the other base libraries, the corresponding need:
GD--zlib, Png, JPG, if you need to support other, still need to compile the extension library according to the actual situation, TTF library needs FreeType library support.
--enable-magic-quotes, is an extremely deprecated parameter, of course, if you need PHP to do the work for you underneath, in fact he does not solve the problem very thoroughly.
--with-openssl, the OpenSSL library is required.
mysqli is a MySQL driver provided by the MySQL team, with many useful features and typical features. But he's not the best choice for MySQL on the PHP platform, PDO is proven to be a simple, high concurrency, and easy to create and recycle standard interface. However, PDO also experienced a 5.3 memory overflow problem, and after 5.3, when reading Oracle's LOB resources, the memory is not throttled, but it will still overflow.
if it is a product model, like pear, SHMOP, FTP, etc., are not recommended to use, they want to do things, in C/s, with Java, and even other scripting language, there is a very good and fast choice, not limited to the use of PHP to achieve. Unfamiliar class libraries and infrequently used libraries are also deprecated. Magic-quote, Session.auto_start, PHP server information, PHP error information, etc. after the compilation is completed, the first time should be closed, to avoid exposing the server information.
PHP corresponds to the Web server mode, Module, fastcgi, FPM only need one, the server is not your experimental plot. FastCGI can choose Nginx and lighttpd, in fact, Nginx is also using lighttpd spwan-fcgi for fcgi process management. FPM is the use of PHP itself to manage multiple processes, a bit like a back-end agent. No matter what the mode, in the release of the product server, should do the process and thread tuning, do enough stress testing, find out the best combination of processes.
Choose a php OPCode cache extension, this is also very important, under the Linux 2.6 core, under the fcgi, XCache has good practical experience, the other after the increase in concurrency, the performance attenuation is serious.
If you really want to experience, would rather compile more than a few PHP version, also do not for a version of PHP set up a variety of extensions, adapt to a variety of environments, this will make yourself into a dilemma.

Zabbbix PHP source installation based on LNMP

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.