Configure APACHE2.0.55 + PHP5.1.1 + MYSQL5.0.16 + GD library in Linux
Source: Internet
Author: User
In Linux, configure APACHE2.0.55 + PHP5.1.1 + MYSQL5.0.16 + GD library-Linux Enterprise Application-Linux server application information. For more information, see the following. Configure APACHE2.0.55 + PHP5.1.1 + MYSQL5.0.16 + GD library in redhat linux9.0
First, you must have GCC on the server. Otherwise, you cannot do anything. You can use gcc-v to check whether GCC is installed,
# Gcc-v
Readingspecs from/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs
Configured :.. /configure -- prefix =/usr -- mandir =/usr/share/man -- infodir =/usr/share/info -- enable-shared -- enable-threads = posix -- disable-checking -- with-system-zlib -- enable-_ cxa_atexit -- host = i386-redhat-linux
Thread model: posix
Gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-34)
The above similar information indicates that GCC already exists,
If you do not have one, install the CD first.
Download all of the following:
Httpd-2.0.55.tar.gz
MySQL-client-5.0.16-0.i386.rpm
MySQL-server-5.0.16-0.i386.rpm
MySQL-devel-5.0.16-0.i386.rpm
Php-5.1.1.tar.gz
Maybe you don't need so many computers, but you 'd better download them all.
However, you may see a new version of the above software downloaded when you paste it.
Start installation >>>>>>>>>>>>>>>>>>>>>>>>
First install the MYSQL server
# Rpm-ivh MySQL-server-5.0.16-0.i386.rpm
Then the client
# Rpm-ivh MySQL-client-5.0.16-0.i386.rpm
Install mysql-devel
# Rpm-ivh MySQL-devel-5.0.16-0.i386.rpm (without which php5.1.1 cannot be installed)
Try again after installation
# Mysql
Welcome to the MySQL monitor. Commands end with; or \ g.
Your MySQL connection id is 27651 to server version: 4.0.20-standard
Type 'help; 'or' \ H' for help. Type '\ C' to clear the buffer.
Description OK
Change the mysql password.
Install basic GD library package
# Rpm-ivh gd-devel-1.8.4-11.i386.rpm
Install XPM support
# Rpm-ivh xpm-3.4k-2.i386.rpm
Install libxml2 (remember PHP5.1.1 only supports libxml2-2.6.11 or above)
# Tar zxvf libxml2-2.6.11.tar.gz
# Cd libxml2-2.6.11
#./Configure
# Make
# Make install
Start to install GD library support
-------------------------------------------------------
ZLIB
# Tar zxvf zlib-1.2.1.tar.gz
# Cd zlib-1.2.1
#./Configure
# Make
# Make install
JPEGSRC
# Tar zxvf restart src.v6b.tar.gz
# Cd jpegsrc-6b
#./Configure
# Make
# Make install-lib
# Make install
LIBPNG
# Tar zxvf libpng-1.2.5.tar.gz
# Cd libpng-1.2.5
# Cp scripts/makefile. std Makefile
# Make
# Make install
Last is GD2 .*
Gd-2.0.28
# Tar zxvf gd-2.0.28.tar.gz
# Cd gd-2.0.28
#./Configure -- with-png =/usr/local -- with-jpeg =/usr/local -- with-freetype =/usr
# Make
# Make install
----------------------------------------------
If everything above is successful, GD is successfully installed. If there is a problem, it should be a lack of support packages. In short, if there is nothing to download and install.
Next, install APAHCHE2 and PHP5.
# Tar zxvf httpd-2.0.55.tar.gz
# Cd httpd-2.0.55
#./Configure -- prefix =/usr/local/apache2 -- enable-module = so
# Make
# Make install
# Tar zxvf php-5.1.1.tar.gz
# Cd php-5.1.1
#. /Configure -- prefix =/usr/local/php -- with-apxs2 =/usr/local/apache2/bin/apxs -- with-jpeg-dir =/usr/local -- with-png- dir =/usr/local -- with-gd =/usr/local -- enable-trace-vars -- with-zlib-dir =/usr/local-with-mysql =/var/ lib/mysql
# Make
# Make install
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!
I installed them in the/usr/local/apache2 & PHP Directory respectively.
After all the installation work is completed, we will configure it.
Copy the PHP. ini file to the correct location.
Run in the PHP Directory
# Cp php. ini-dist/usr/local/php/lib/php. ini
Edit the apache configuration file httpd. conf.
# Vi/usr/local/apache2/conf/httpd. conf
You need to modify the following items:
Generally
# AddType application/x-tar. tgz
Add a row below
AddType application/x-httpd-php. php
Also found
DirectoryIndex index.html. var
Add index. php to the end to make index. php a response page.
Find
# ServerName
Remove #, and change the following IP address to your IP address.
Find
DocumentRoot "/usr/local/apache2/htdocs"
Change/usr/local/apache2/htdocs to the path where your webpage files are stored.
For example, if I put it in the/myweb directory, I will upload the PHP file and put it in the/myweb directory. Then I will access it with an IP address and you will be able to see the homepage.
This is almost the case. For other apache2 optimizations, see the apache configuration classification in www.phpv.net.
Save the httpd. conf file.
Start it
#/Usr/local/apache2/bin/apachectl start
If no error occurs, write a test page and put it in your webpage directory. What I said above is/myweb.
# Vi/home/easy/index. php
Phpinfo ();
Save. Try IP address in the tester to view the PHPINFO page.
Okay. If there is no accident, you can run the PHP script on your machine to connect to mysql now.
Accelerating PHP with ZendOptimizer-2.5.3
# Tar zxvf ZendOptimizer-2.5.3-linux-glibc21-i386.tar.gz
# Cd ZendOptimizer-2.5.3-linux-glibc21-i386
#./Install. sh
By default, it should be fine.
Let's look at the test page,
Look for something like this?
This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies with Zend Extension Manager v1.0.3, Copyright (c) 2003-2004, by Zend Technologies with Zend Optimizer v2.5.3, Copyright (c) 1998-2004, by Zend Technologies
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.