Apache|mysql|php5 Linux to configure the APACHE2.0.50+PHP5.0.3+MYSQL4.0.20+GD library a few days ago, upgrade the server, because of the GD library. Make no PHP4.3.8 so it's a step by step PHP5
In fact, the installation steps and PHP4 only a little bit worse.
If you have a PHP or Apache RPM or a low version installed in your machine, please delete it first.
First of all, server GCC to have, otherwise nothing can do. You can use GCC-V to see if GCC is installed,
#gcc-V
Reading Specs From/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs
Configured with:. /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)
There are similar information that has GCC,
If you do not, please take the installation CD first and put it on.
Please download all of the following items:
Httpd-2.0.50.tar.gz
mysql-client-4.0.20-0.i386.rpm
mysql-server-4.0.20-0.i386.rpm
Php-5.0.3.tar.gz
Maybe your computer doesn't need so much, but it's best to download it.
These I put in my ftp in the soft directory, if you point to the left << FTP >> can not see, it may be the password changed, please see my forum signature download information.
But
Maybe when you see this post, there will be a new version of the software download. Let's see what I can do.
Start loading >>>>>>>>>>>>>>>>>>>>>>>>>
Install MySQL server first
#rpm-IVH mysql-server-4.0.20-0.i386.rpm
Then the client
#rpm-IVH mysql-client-4.0.20-0.i386.rpm
After installation, try to use
#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.
----------------------------------------------
The above everything is very smooth, GD even if the successful installation. If there is a problem, it should be a lack of support packages, in short what to download what to install on.
Follow down and start installing APAHCHE2 and PHP5.
I was installing them in the/usr/local/apache2 & PHP directory, respectively.
When I used to make PHP4.3.8, I met
Ext/gd/gd.lo (. text+0x63a): In function ' ZM_DEACTIVATE_GD ':
/root/software/php-4.3.8/ext/gd/gd.c:385:undefined reference to ' Gdfreefontcache '
Collect2:ld returned 1 exit status
Make: * * * * [Sapi/cli/php]error 1
is because the FreeType of GD library is not installed, then I go to download it to install immediately. There's no mistake.
All the installation work is done, and then we will configure it.
Copy php.ini file to correct location
Run in PHP directory
#cp Php.ini-dist/usr/local/php/lib/php.ini
are generally in
#AddType Application/x-tar. tgz
Add one line to the next
#LoadModule Php5_module modules/libphp5.so
AddType application/x-httpd-php. php
If you search anywhere else, you don't have the following.
LoadModule Php5_module modules/libphp5.so
Please remove the # number above
and find
DirectoryIndex index.html Index.html.var
Add index.php in the back to make it the default page for index.php.
Found it
# don ' t use Group #-1 on these systems!
Change the following user name and group to
User Apache
Group Apache
(It turns out to be nobody)
and find
#ServerName
Remove the # and change the IP back to your IP.
Found it
DocumentRoot "/usr/local/apache2/htdocs"
Change the/usr/local/apache2/htdocs to the path where you store the Web page file
For example, I was placed in the/home/easy directory, so i later upload php files on the/home/easy directory, and then use IP access, you can see the home page
In order to make the Chinese web page is not garbled
Found it
Adddefaultcharset iso8859-1
Change the iso8859-1 back to gb2312.
That's almost all, as for apache2 other optimizations, see the Apache configuration in the Www.phpv.net category.
Save the httpd.conf file.
Start it
#/usr/local/apache2/bin/apachectl Start
If nothing goes wrong, write a test page and put it in your web directory, and mine is the/home/easy
#vi/home/easy/index.php
Phpinfo ();
Save. Try playing IP in the tester and you can see the Phpinfo page.
All right, if there's no accident. You can now safely run PHP scripts on your machine to connect to MySQL.
All the way down to the default should be good.
Look at the test page again,
Look for it, isn't it?
This program makes 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 and Zend Optimizer v2.5.3, Copyright (c) 1998-2004, by Zend Technologies
All right, all the installation is done.
The next job is the most important!
That's how to use PHP5 to create efficient websites for 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.