Linux (X86_64) + Apache2.2.4 + PHP5.2.3 + Mysql5.0.45 + GD2 + Zend configuration Scheme

Source: Internet
Author: User
Linux (X86_64) + Apache2.2.4 + PHP5.2.3 + Mysql5.0.45 + GD2 + Zend configuration solution-Linux Enterprise Application-Linux server application information. For details, refer to the following section. My system environment is: CentOS 64-bit Operating System
The server is a Dell 1950 server.
Most of the installation methods are applicable to other operating systems.
Because of the relationship between CentOS and redhat, it is basically applicable to redhat linux as 5

Download related software
Wget http://www.zlib.net/zlib-1.2.3.tar.gz
Wget ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
Wget http://download.savannah.gnu.org... eetype-2.3.5.tar.gz
Wget ftp://ftp.simplesystems.org/pub/... ibpng-1.2.18.tar.gz
Wget http://www.libgd.org/releases/gd-2.0.35.tar.gz

I downloaded the source code for compilation.
1. Install Mysql first
Groupadd mysql
Useradd-g mysql
Tar zxvf mysql-5.0.45.tar.gz
Cd mysql-5.0.45
./Configure -- prefix =/usr/local/mysql
Make
Make install clean
Cp support-files/my-medium.cnf/etc/my. cnf
Cd/usr/local/mysql
Chown-R mysql. // There is a dot behind it. Pay attention to it!
Chgrp-R mysql. // There is a dot next to it. Pay attention to it!
Bin/mysql_install_db -- user = mysql
Chown-R root.
Chown-R mysql var
Bin/mysqld_safe -- user = mysql &
If no error occurs, Mysql can be started properly.

If the following error occurs during compilation:
Checking for tgetent in-ltermcap... no
Checking for termcap functions library... configure: error: No curses/termcap library found
It indicates that the curses/termcap library is not installed.
Download an ncurses-5.6.tar.gz,
Wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.6.tar.gz
Tar zxvf ncurses-5.6.tar.gz
Cd ncurses-5.6
./Configure -- prefix =/usr -- with-shared -- without-debug
Make
Make install clean
Then re-compile Mysql for installation.

Ii. environment required for installing GD library and GD library
Tar zxvf zlib-1.2.3.tar.gz
Cd zlib-1.2.3
./Configure
Make
Make install clean

If
/Usr/bin/ld:/usr/local/lib/libz. a (crc32.o): relocation R_X86_64_32 against 'a local symplot' can not be used when making a shared object; recompile with-fPIC
/Usr/local/lib/libz. a: cocould not read symbols: Bad value
Error. For solution, click to view

Tar zxvf libpng-1.2.18.tar.gz
Cd libpng-1.2.18
./Configure
Make
Make install clean

Tar zxvf freetype-2.3.5.tar.gz
Cd freetype-2.3.5
./Configure
Make
Make install clean

Tar zxvf restart src.v6b.tar.gz
Cd jpeg-6b
./Configure
Make
Make install-lib
If
/Usr/bin/ld:/usr/local/lib/libjpeg. a (jcapimin. o): relocation R_X86_64_32 against 'a local sympost' can not be used when making a shared object; recompile with-fPIC
Error. For solution, click to view

If the above software is successfully installed, you can start to install GD.
Tar zxvf gd-2.0.35.tar.gz
Cd gd-2.0.35
./Configure -- with-png -- with-freetype -- with-jpeg

You can see the final result during compilation.
** Configuration summary for gd 2.0.35:
Support for PNG library: yes
Support for JPEG library: yes
Support for Freetype 2.x library: yes
Support for Fontconfig library: no
Support for Xpm library: no
Support for pthreads: yes
We can see that png, jpeg, and freetype have been installed.

3. Install Apache2.2.4
Tar zxvf httpd-2.2.4.tar.gz
Cd httpd-2.2.4
. /Configure -- prefix =/usr/local/apache22 -- enable-rewrite = shared -- enable-speling = shared -- enable-track-vars -- enable-cgi -- enable-so -- enable- mod-shared = all
Make
Make install clean
Use/usr/local/apache22/bin/apachectl-k start after installation to start

4. Install PHP5.2.3
Tar zxvf php-5.2.3.tar.gz
Cd php-5.2.3
. /Configure -- prefix =/usr/local/php5 -- with-mysql-dir =/usr/local/mysql -- with-apxs2 =/usr/local/apache22/bin/apxs --- jpeg -- with-freetype -- enable-trace-vars -- with-zlib -- with-gd -- enable-ftp -- enable-sockets
Make
Make install
Make clean
Cp php. ini-dist/usr/local/php5/lib/php. ini
Configure httpd. conf to make apache support PHP
Vi/usr/local/apache/conf/httpd. conf
Find AddType application/x-gzip. gz. tgz and add the following content under it:
AddType application/x-httpd-php. php
AddType application/x-httpd-php-source. phps
Restart Apache
/Usr/local/apache22/bin/apachectl-k restart

Edit a PHP page and test phpinfo. php.
Phpinfo ();
?>

5. Install Zend
Go to the official website to download zendoptimizer-3.3.0a-linux-glibc23-x86_64.tar.gz
Tar zxvf ZendOptimizer-3.3.0a-linux-glibc23-x86_64.tar.gz
Cd ZendOptimizer-3.3.0a-linux-glibc23-x86_64
./Install. sh
Install as prompted
Configure the PHP. ini file path and Apache Apachectl file path.

Complete the installation!

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.