Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Configure APACHE2.0.50+PHP5.0.3+MYSQL4.0.20+GD library under linux (transfer)

2025-03-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Configure APACHE2.0.50+PHP5.0.3+MYSQL4.0.20+GD library under linux [@ more@] A few days ago, when upgrading the server, PHP5 was installed step by step because of the GD library. Make can't PHP4.3.8.

In fact, the installation steps are only a little different from PHP4.

If you have a RPM or earlier version of PHP or APACHE in your machine. Please delete first

First of all, the server GCC must have, otherwise nothing can 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-- 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 don't have it, please install it with the installation CD first.

Please download all of the following:

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

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's best to download them all.

I put all these in the soft directory in my FTP. If you click the > on the left, it may be a change of password. Please see the download information in my forum signature.

But,

Maybe you will have a new version of the above software download when you see this post. It's up to you.

Start pretending >

Install the 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 to use it 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.

Explain OK

Please change the password of mysql yourself.

Install the basic package of GD library

# rpm-ivh gd-devel-1.8.4-11.i386.rpm

Install XPM support

# rpm-ivh xpm-3.4k-2.i386.rpm

Install libxml2 (remember that PHP5 only supports libxml2-2.5.10 and above)

# tar zxvf libxml2-2.5.11.tar.gz

# cd libxml2-2.5.11

#. / configure

# make

# make install

Start installing 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-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.linux Makefile

#. / configure

# make

# make install-headers

# make install

And 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

-

If all goes well above, GD will be installed successfully. If there is a problem, it should be the lack of support package, in short, download what is missing to install.

Follow up and start installing 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 php-5.0.3.tar.gz

# cd php-5.0.3

#. / 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 separately in the / usr/local/apache2 & PHP directory

When I was in 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

Because the freetype of the GD library is not installed, I immediately went to download it and install it. There will be no mistakes.

All the installation work is done, and then we will configure it.

Copy the PHP.INI file to the correct location

Run under the PHP directory

# cp php.ini-dist / usr/local/php/lib/php.ini

Edit apache profile httpd.conf

# vi / usr/local/apache2/conf/httpd.conf

There are several changes to be made as follows:

Usually in

# AddType application/x-tar .tgz

Add a line below

# LoadModule php5_module modules/libphp5.so

AddType application/x-httpd-php .php

If you search elsewhere, there is no following line.

LoadModule php5_module modules/libphp5.so

Please remove the # from the top

And find out

DirectoryIndex index.html index.html.var

Add index.php at the end to make index.php as the default page

find

# don't use Group #-1 on these systems!

Change the following user name and group to

User apache

Group apache

(it seems to be nobody)

Look again.

# ServerName

Remove the # and change the back IP to your IP.

find

DocumentRoot "/ usr/local/apache2/htdocs"

Change / usr/local/apache2/htdocs to the path where you store the web files

For example, I put it in the / home/easy directory, so I will upload the PHP file in the / home/easy directory, and then visit it with IP to see the home page.

In order to keep the Chinese web pages free from garbled codes

find

AddDefaultCharset iso8859-1

Change the following iso8859-1 to gb2312

That's pretty much it.

Save the httpd.conf file.

Start it.

# / usr/local/apache2/bin/apachectl start

If there is no mistake, write a test page and put it in your web page directory. Mine is the / home/easy mentioned above.

# vi / home/easy/index.php

Phpinfo ()

Save it. Try typing IP in the tester and you can see the PHPINFO page.

Okay。 If there is no accident. You can now safely run the PHP script on your machine to connect to mysql.

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 to acquiesce all the way.

Take a look at the test page.

Find out if this is the case?

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

All right, all the installation is complete.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report