Apache + Mysql + PHP + GD + Zend + MMCache Installation

xiaoxiao2021-03-06  70

Purpose APAHE and MySQL, install PHP to support GIF, PNG, JPEG, FreeType, MySQL, require more powerful graphics processing capabilities to install imageMagic.

You can analyze the large-flow website log (greater traffic website recommended Webalizer, but the interface is simple: -,), install MMCache Zend to accelerate two, install the environment Description Operating system: GNU Linux Kernel 2.4.20-8 Web server: Apache httpd-2.0.50 Download: http://apache.linuxForum.Net/dist/httpd/httpd-2.0.50.tar.gz Database Server: MySQL-Standard-4.0.20-PC-Linux-i686.tar. GZ Download: http://dev.mysql.com/get/downloads/mysql-4.0/mysql-standard-4.0.20-pc-linux-i686.tar.gz/from/http: //mysql.ihostUnit.com / Script Program Language: PHP-4.3.8.tar.gz Download: http://cn2.php.net/get/php-4.3.8.tar.gz/from/en.php.net/mirror Other Library Files : Zlib: Zlib-1.2.1.tar.gz Download: http://www.zlib.net/zlib 1.2.1.tar.gz freetype: freetype-2.1.9.tar.gz http: // sourceforge. Net / Projects / FreeType / Download: http://umn.dl.sourceForge.Net/sourceForge/FreetyPe/Freetype-2.1.9.tar.gz PNG: libpng-1.2.5.tar.gz http: //prdownloads. Sourceforge.net/png-mng/libpng-1.2.5.tar.gz?download jpeg: jpegsrc.v6b.tar.gz http://freshmeat.net/projects/libjpeg/ Download: http://freshmeat.net/ Redir / libjpeg / 5665 / url_tgz / jpegsrc.v6b.tar.gz GD: GD-2.0.28.tar.gz Download: http://www.boutell.com/gd/http/gd-2.0.28.tar. GZ has supported GIF MMCache: http: //turck-mmcache.sourceforge.net/index_old.html Download: http://sourceforge.net/project/showfiles.php? Group_id = 69426 Zend: www.zed.com III, Installation Steps 1. Install MySQL (due to installation Mysql is relatively simple, omitted) installed in / usr / local / mysql directory 2. Installing Apache 2. Install Apache ./configure --prefix = / usr / local / apache --with-mysql = / usr / local / mysql - Enable-track-vars --enable-cgi --enable-so --enable-mods-shared = all --with-config-file-path = / usr / local / apache / conf --prefix = / usr / local / apache specifies to install the APAHCE to the / usr / local / apache directory; --Nable-CGI supports CGI; --with-config-file-path =

/ usr / local / apache / confed specifies that the Apache's formulation file is placed in / usr / local / apache / confal; such as httpd.conf formulated files in this directory; --enable-track-vars is starting cookie GET / post and other tracking functions --Nable-SO DSO feature --enable-mods-shared = all contains all modules for DSO If you need more options, you may be viewed by the following command ;./configure --help make make INSTALL is set to boot from the /etc/rc.d/rc.local file to join a line / usr / local / apache / bin / apachectl Start After each restart system, Apache will start with the system. 3. Installing PHP a First Install Support Pack (Note Installation Order) Establish Initial Directory: MKDIR / USR / LOCAL / MODULES #JPEG Directory MKDIR / USR / LOCAL / MODULES / JPEG6 MKDIR / USR / LOCAL / MODULES / JPEG6 / BIN MKDIR / USR / Local / MODULES / JPEG6 / LIB MKDIR / USR / local / modules / jpeg6 / include mkdir / usr / local / modules / jpeg6 / man mkdir / usr / local / modules / jpeg6 / man / man1 A1, install Zlib Tar Xzvf Zlib- 1.2.1.tar.gz CD ZLIB-1.2.1 # Do not use the -prefix custom installation directory, affect the installation of the GD ./configure make make install A2, install the FreeType tar xzvf freetype-2.1.5.tar.gz CD FreeType-2.1.5 ./configure --prefix = / usr / local / modules / freetype make make install A3, install libpng tar xzvf libpng-1.2.5.tar.gz # Do not use --PREFIX custom installation directory, influence GD installation CD libpng-1.2.5 cp scripts / makefile.std makefile make test Make Install A3, Installing JPEG TAR XZVF JPEGSRC.V6B.TAR.GZ ./configure --prefix = / usr / local / modules / jpeg6 --enable-shared --enable-static make make install A4, install GD TAR XZVF GD -2.0.28.tar.gz ./configure --prefix = / usr / local / modules / gd --with-jpeg = / usr / local / modules / jpeg6 --with-png --with-zlib --with -Freetype = / usr / local / modules / freeType make make install b, install PHP TAR XZVF PHP-4.3.8.Tar.gz CD PHP-4.3.8 ./configure --prefix = / usr / local / PHP - WITH-GD = / usr / local / modules / gd --with-jpeg-dir = / usr / local / modules / jpeg6 --with-zlib --with-png --with-freetype-dir = / usr / local / MODULES / FREETYPE --ENABLE-MAGIC-quotes --with-mysql = / usr / local / mysql --with-apxs2 =

/ usr / local / apache / bin / apxs --enable-track-vars --enable-force-cgi-redirect --Nable-ftp --with-config-file-path = / usr / local / php / etc Description: --prefix = / usr / local / php Specifies to install PHP-4.3.8 into the / usr / local / php directory; --with-mysql = / usr / local / mysql Specifies the location of the mysql data server installation; --with-apxs2 = / usr / local / apache / bin / apxs This is where joining Apache is the location of the DSO module; -enable-track-vars is a trace function such as Get / Post-With-Config-File for launching cookie. -path = / usr / local / php / etc> Specifies the directory where the PHP formulated file is stored is / usr / local / php / etc directory, after we installed, you must copy php.ini to this directory. Make make install cp php.ini-dist /usr/local/php/etc/php.ini Change Apache's formulation file: Get a few lines, the purpose is to let Apache explain the PHP program. Find the AddType Application / X-Tar .tgz line, add addtype application / x-httpd-php .php addtype application / x-httpd-php .php3 addtype application / x-httpd-php .phtml addtype application / x-httpd -php-source .phps finds the following line plus INDEX.PHP, which means that the default page of the website can also configure the configuration of the PHP.ini file for Index.php DirectoryIndex index.html index.html.var index.php safe_mode = Off, change safe_mode = On 1) Find max_execution_time = 30, change max_execution_time = 600 (2) locate max_input_time = 60, change max_input_time = 600 (3) Find memory_limit = 8M, change memory_limit = 20M (4) Find display_errors = On, change display_errors = Off (5) Find register_globals = Off, changes to register_globals = On (6) Find post_max_size = 8M, change post_max_size = 20M (7) to find upload_max_filesize = 2M, change upload_max_filesize = 20M ( 8) Find session.auto_start = 0, change to session.auto_start = 1 Execute: wq! Command After saving, complete the configuration of the php.ini file.

C Installing MMCache Step 1. Compiling Turck MMCache Export PHP_PREFIX = "/ USR / local / php" $ PHP_PREFIX / BIN / PHPIZE ./CONFIGURE --NABLE-MMCACHE = Shared --with-PHP-Config = PHP_PREFIX / BIN / PHP -config make Tip: You must specify the real prefix where PHP is installed in the "export" command It may be "/ usr" "/ usr / local", or something else Step 2. Installing Turck MMCache make install Step 3.. . Configuring Turck MMCache Turck MMCache can be installed both as Zend or PHP extension, so you need to edit your php.ini file (usually /etc/php.ini) to install as Zend extension:. zend_extension = "/ usr / lib / PHP4 / MMCache.so "mmcache.shm_size =" 16 "mmcache.cache_dir =" / tmp / mmcache "mmcache.Enable =" 1 "mmcache.optimizer =" 1 "mmcache.check_mtime =" 1 "mmcache.debug =" 0 "Mmcache.filter =" "mmcache.shm_max =" 0 "mmcache.shm_ttl =" 0 "mmcache.shm_prune_period =" 0 "mmcache.shm_only =" 0 "mmcache.compress =" 1 "if you use thread Safe Build of PHP You Must Use "Zend_extension_ts" instead of "Zend_extension". To Install As php extension: extension = "mmcache.so" mmcache.shm_size = "16" mmcache.cache_dir = "/ tmp / mmcache" mmcache.enable = "1" mmcache.optimizer = "1" mmcache.check_mtime = "1" MMCache .debug = "0" mmcache.filter = "" mmcache.shm_max = "0" mmcache.shm_ttl = "0" mmcache.shm_prune_period = "0" mmcache.shm_only = "0" mmcache.compress = "1"

转载请注明原文地址:https://www.9cbs.com/read-91788.html

New Post(0)