Linux + apache + mysql + php + phpmyadmin + zend + eaccelerator installation document

Source: Internet
Author: User
Optional & nbsp; cdhttpd-2.2.17 & nbsp;./configure -- prefix/usr/local/httpd -- enable-so -- enable-rewri

Environment Centos 5.5 32-bit server address 192.168.1.250
1. install apache
Tar-zxvf httpd-2.2.17.tar.gz
Cd httpd-2.2.17
./Configure -- prefix =/usr/local/httpd -- enable-so -- enable-rewrite -- with-mpm = worker
Make
Make install
/Usr/local/httpd/bin/apachectl start
Echo "/usr/local/httpd/bin/apachectl start &">/etc/rc. d/rc. local

Verify installation
A. Check whether/usr/local/httpd exists.
B. check the compiled modules/usr/local/httpd/bin/apachectl-l (static module view). the output results should contain worker. c and mod_rewrite.c.
C. check whether apache can run normally. run the command:/usr/local/httpd/bin/apachectl-t (check apache syntax). you only need to output Systax OK.
D access http: // 192.168.1.250/View
2. install mysql
For more information, see install mysql.
3. php installation preparation
A curl installation
Tar-zxvf curl-7.15.0.tar.gz
Cd curl-7.15.0
./Configure -- prefix =/usr/local/curl
Make & make install
B expat installation
Tar-zxvf expat-2.0.1.tar.gz
Cd expat-2.0.1
./Configure -- prefix =/usr/local/expat
Make & make install
C gzip installation
Tar-zxvf gzip-1.3.5.tar.gz
Cd gzip-1.3.5
./Configure -- prefix =/usr/local/gzip
Make & make install
D. install libxml2
Tar-zxvf libxml2-2.6.19.tar.gz
Cd libxml2-2.6.19
./Configure -- prefix =/usr/local/libxml2
Make & make install
E. zlib installation
Tar-zxvf zlib-1.2.3.tar.gz
Cd zlib-1.2.3
./Configure
Make & make install
F.jpeg 6 installation
Mkdir-p/usr/local/limit 6
Mkdir-p/usr/local/partition 6/bin
Mkdir-p/usr/local/IPv6/lib
Mkdir-p/usr/local/users 6/include
Mkdir-p/usr/local/IPv6/man
Mkdir-p/usr/local/IPv6/man1
Mkdir-p/usr/local/users 6/man/man1
Tar-zvxf restart src.v6b.tar.gz
Cd jpeg-6b
./Configure -- prefix =/usr/local/configure 6/-- enable-shared -- enable-static
Make & make install
G. install libpng
Tar-zxvf libpng-1.2.37.tar.gz
Cd libpng-1.2.37
./Configure // as described in zlib above, do not include parameters so that it is installed in the corresponding directory by default.
Make & make install
H install freetype
Tar-zvxf freetype-2.3.5.tar.gz
Cd freetype-2.3.5
Mkdir-p/usr/local/freetype
./Configure -- prefix =/usr/local/freetype
Make & make install
I install the libmcrypt encryption and decryption package (to avoid logging in to phpmyadmin and reporting an error)
Tar zxvf libmcrypt-2.5.7.tar.gz
Cd libmcrypt-2.5.7
./Configure
Make & make install
J. install fontconfig
Tar zxvf fontconfig-2.4.2.tar.gz
Cd fontconfig-2.4.2
./Configure -- prefix =/usr/local/fontconfig -- with-freetype-config =/usr/local/freetype/bin/freetype-config
Make & make install
K install gettext-devel
Yum-y install gettext-devel
(If not installed, make gd reports the error 'Am _ iconv' not found in library)
K install gd
Tar-zxvf gd-2.0.35.tar.gz
Cd gd-2.0.35
. /Configure -- prefix =/usr/local/gd -- with-jpeg =/usr/local/resize 6/-- with-png -- with-zlib -- with-freetype =/usr/local /freetype/-- with-fontconfig =/usr/local/fontconfig
Make & make install
4. install php
Tar-zxvf php-5.2.11.tar.gz
Cd php-5.2.11
. /Configure -- prefix =/usr/local/php -- with-gd =/usr/local/gd-- with-apxs2 =/usr/local/httpd/bin/apxs -- enable-mbregex -- enable-bcmath -- with-mysql =/usr/local/mysql-with-zlib-dir -- enable-mbstring = all -- with-pdo-mysql -- with-freetype-dir =/ usr/local/freetype -- with-mcrypt -- enable-sockets
(Configure: error: cannot find MySQL header files under run cp/usr/local/mysql/bin/mysql_config/usr/bin/mysql_config and ln-s/usr/local/mysql/include/mysql. h/usr/include/) and then re-make
Make & make install
Cp php. ini-dist/usr/local/php/lib/php. ini
Description -- with-mcrypt (to avoid logging into phpmyadmin and reporting an error) -- enable-sockets (required by cacti)
 
5. verify installation
A. check whether gd and php are available in/usr/local.
B. check the association between php and apache, including automatically generating libphp5.so in/usr/local/httpd/modules and automatically inserting LoadModule php5_module modules/libphp5.so in the apache Main configuration file.
C. fully check that the content of test. php created under/usr/local/httpd/htdocs is
PHPinfo ();
?>
D slightly modify the apache configuration file in AddType application/x-httpd-php. php. php3. phtml and AddType application/x-httpd-php-source. phps
Modify DirectoryIndex index. php index.html
E. run the apache syntax check/usr/local/httpd/bin/apachectl-t and start the apache service/usr/local/httpd/bin/apachectl start manually.
F check the apache process and listen to lsof-I: 80
G. enter http: // 192.168.1.2/test. php in the browser to check whether it is normal.
H. Upload the index. php I provided to/usr/local/httpd/htdocs/to test mysql (remember to change the attachment name to index. php)
6. install phpmyadmin
Tar-zxvf phpMyAdmin-3.2.2.1-all-languages.tar.gz
Mkdir/usr/local/httpd/htdocs/phpmysql
Mv phpMyAdmin-3.2.2.1-all-languages/*/usr/local/httpd/htdocs/phpmysql/
Cd/usr/local/httpd/htdocs/phpmysql
Cp config. sample. inc. php config. inc. php
7 install ZendOptimizer
Tar-zxvf ZendOptimizer-3.3.0a-linux-glibc21-i386.tar.gz
Cd ZendOptimizer-3.3.0a-linux-glibc21-i386
./Install
Enter the php. ini path/usr/local/php/lib
Apachectl path/usr/local/httpd/bin/apachectl
Click OK for the remaining items or follow the system default
Zend Optimizer Installation
------------------------------------------------------------------------------
+ -------------------------- Zend Optimizer 3.3.0a --------------------------- +
|
| The following configuration changes have been made: |
|
|-The php. ini file has been relocated from/usr/local/php/lib to/usr/local/
Zend/etc |
|-A symbolic link for the php. ini file has been created in/usr/local/php/li
B. |
|-The original php. ini was backed up to |
|/Usr/local/php/lib/php. ini-zend_optimizer.bak |
|
|
|
+ ---------------------------------------------------------------------------- +
| <OK> |
+ ---------------------------------------------------------------------------- +
8. install eaccelerator
Tar-jxvf eaccelerator-0.9.5.2.tar.bz2
Cd eaccelerator-0.9.5.2
/Usr/local/php/bin/phpize
./Configure -- enable-eaccelerator = shared -- with-php-config =/usr/local/php/bin/php-config
Make & make install
Vi/usr/local/php/lib/php. ini
[Eaccelerator]
Extension_dir = "/usr/local/php/lib/php/extensions"
Extension = "/no-debug-zts-20060613/eaccelerator. so"
Eaccelerator. shm_size = "128"
Eaccelerator. cache_dir = "/tmp/eaccelerator"
Eaccelerator. enable = "1"
Eaccelerator. optimizer = "1"
Eaccelerator. check_mtime = "1"
Eaccelerator. debug = "0"
Eaccelerator. filter = ""
Eaccelerator. shm_max = "0"
Eaccelerator. shm_ttl = "300"
Eaccelerator. shm_prune_period = "120"
Eaccelerator. shm_only = "0"
Eaccelerator. compress = "1"
Eaccelerator. compress_level = "9"
Create cache folder
Mkdir/tmp/eaccelerator
Chmod 0777/tmp/eaccelerator
Restart apache to make the configuration take effect
/Usr/local/httpd/bin/apachectl restart
Now the configuration is complete. please click it.

Related Article

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.