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

How to configure APACHE2.0.55 + PHP5.1.1+MYSQL5.0.16+GD Library by Linux

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces Linux how to configure APACHE2.0.55 + PHP5.1.1+MYSQL5.0.16+GD library, the article is very detailed, has a certain reference value, interested friends must read it!

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.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

ZendOptimizer-2.5.3-linux-glibc21-i386.tar.gz

Gd-2.0.28.tar.gz

Libxml2-2.6.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.

However, you may have a new version of the above software downloaded when you see this post. It's up to you.

Start pretending >

Install the MYSQL server first

# 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 (php5.1.1 cannot be installed without it)

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.1.1 only supports libxml2-2.6.11 and above)

# tar zxvf libxml2-2.6.11.tar.gz

# cd libxml2-2.6.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.std Makefile

# make

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

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

AddType application/x-httpd-php .php

And find out

DirectoryIndex index.html index.html.var

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

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 / myweb directory, so I will upload the PHP file in the / myweb directory, and then visit it with IP to see the home page.

That's about it. For other apache2 optimizations, see the apache configuration category in www.phpv.net.

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 / myweb 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

These are all the contents of the article "how to configure APACHE2.0.55 + PHP5.1.1+MYSQL5.0.16+GD libraries in Linux". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

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

Wechat

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

12
Report