eSayr
A few days ago, when the server was upgraded, because the reason for the GD library. Make couldn't PHP4.3.8, and the PHP5 was installed.
In fact, the installation steps and PHP4 is only a little bit.
If you have a PHP or Apache's RPM or low version in your machine. Please delete first.
First, the server GCC must have, otherwise what can't be done. 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 - Disable-Checking --with-system-zlib --Nable -__ cxa_atexit --host = i386-redhat-linux
Thread Model: Posix
GCC Version 3.2.3 20030502 (Red Hat Linux 3.2.3-34)
There are more information on the same information, and there is GCC.
If you don't, please take the disc installed.
Please download all the following things:
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.0.tar.gz
Zendoptimizer-2.5.3-Linux-glibc21-i386.tar.gz
GD-2.0.28.tar.gz
LIBXML2-2.5.11.TAR.GZ
ZLIB-1.2.1.tar.gz
JPEGSRC.V6B.TAR.GZ
Libpng-1.2.5.tar.gz
XPM-3.4K-2.I386.rpm
GD-devel-1.8.4-11.i386.rpm
Maybe your computer doesn't need so much. But it is best to download it.
These I am in my ftp (ftp:// php_down: down@ftp.phpv.net/) Soft directory, if you can't see the << ftp >> on the left, then you may change, Please see the download information in my forum signature.
but,
Maybe you see this post, there will be the new version of the software download. Look at it.
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
Try can not be used 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
Please change my mysql password yourself
Install GD library basic package
# rpm -ivh gd-deb-1.8.4-11.i386.rpm
Install XPM support
# rpm -ivhxpm-3.4k-2.i386.rpm
Install libXML2 (remember that PHP5 only supports libXML2-2.5.50 or higher)
#tar zxvf libxml2-2.5.11.tar.gz
#CD libxml2-2.5.11
#. / configure
#make
#make install Start loading GD library support
-------------------------------------------------- -----
Zlib
#TAR ZXVF ZLIB-1.2.1.tar.gz
#CD ZLIB-1.2.1
#. / configure
#make
#make install
JPEGSRC
#TAR ZXVF JPEGSRC.V6B.TAR.GZ
#CD JPEGSRC.V6B
#. / configure
#make
#make install-lib
#make install
LibPNG
#TAR ZXVF LIBPNG-1.2.5.tar.gz
#CD libpng-1.2.5
#CP scripts / makefile.linux makefile
#. / configure
#make
#make install-headers
#make install
Finally, 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
----------------------------------------------
Everything above is smooth, GD is successfully installed. If there is a problem, it should be lacking the support package, in short, there is less to download what to install.
Follow it, began to install APAHCHE2 and PHP5
#TAR ZXVF httpd-2.0.50.tar.gz
#CD httpd-2.0.50
#. / configure --prefix = / usr / local / apache2 --enable-module = so
#make
#make install
#tar zxvf php5.0.0.tar.gz
#CD PHP5.0.0
#. / 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 am installing them in / usr / local / apache2 & php directory.
When I was original, I met when Make PHP4.3.8.
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
It is because the Freetype of the GD library is not installed, and later I will download it immediately. There is no mistake.
All installation work is done, then let's configure.
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 Apache configuration file httpd.conf
#vi /usr/local/apache2/conf/httpd.conf
There is a shortest place to change:
Generally
#Addtype coplication / x-tar .tgz
Plus one line
#LoadModule PHP5_Module Modules / Libphp5.so
AddType Application / X-httpd-php .php
If you search for this line without any other place
LoadModule PHP5_MODULE MODULES / LIBPHP5.SO
Please remove the top ##
Also find
DirectoryIndex index.html index.html.var
Add INDEX.PHP back to let it make index.php as the default page
turn up
# don't use group # -1 on these systems!
Change the following username and group to
User apache
GROUP APACHE
(It seems to be nobody)
Find another
#Servername
Remove # 去 i 的 的 的 的 的 的 的 的 的 的 的 的
turn up
DocumentRoot "/ usr / local / apache2 / htdocs"
Change the / usr / local / apache2 / htdocs to your path to the web file
For example, I am placed in the / home / easy directory, so I will upload the php file in the / home / easy directory, and then use IP to access the homepage.
In order to make the Chinese website no garbled
turn up
AddDefaultcharset ISO8859-1
Change the back ISO8859-1 to GB2312
Almost just these, as for other optimizations of Apache2, please see www.phpv.net
The Apache configuration is the classification.
Save the httpd.conf file.
Start it
# / usr / local / apache2 / bin / apachectl start
If there is no error, write a test page to put it in your web directory, mine is what you said above / home / easy
#vi /Home/easy/index.php
PHPINFO ();
Save. Try to play IP in the tester to see PHPINFO page.
Accelerate 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
It should be fine all the way.
Take a look at the test page,
Is it true for finding?
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
Ok, all installations are completed.
The next job is the most important!
That is how to use PHP5 to make a high-efficiency website for us.
Written some chaos, if there is an unknown, please go to the PHP perspective forum http://bbs.phpv.net or Chinese php forum http://club.21php.com/ post
-------------------------------------------------- ------------------------ eSAYR Write on July 29, 2004 1:51