Linux under the Apache+php4+mysql installation _ server

Source: Internet
Author: User

At present, Linux+apache+php4+mysql should be said to be a very popular combination, but also the most economical choice to build the site, because such a combination is almost no money, cost and benefit ratio is also the lowest choice. There are also many examples of successful sites.
These days, I just bought a genuine Chinese blue dot Bluepoint Linux, with the accompanying installation manuals and user technical guides to help quickly get started. Although WIN32 platforms such as Windows NT or Windows 98 can also install PHP4 and Apache servers, PHP4 and Apache can run faster, better and more securely under Linux/unix.
The following is a detailed description of the installation process for MYSQL+APACHE+PHP4 on Bluepoint Linux:
1. First download the appropriate software:
Mysql 3.22.32 for Linux ()
Apache 1.3.12 for Linux ()
php4.o.0 for Linux ()
There are also many downloads in China. The best place to put the downloaded files into a directory, such as/etc/local, is illustrated in this article as an example of this directory.
2. Installation steps:
Note: Following the action after each line number is the whole string of words together, in the text may branch and cause misunderstanding. The information in Chinese is explained by/to the beginning.
First step: Install MySQL 3.22.32
1)//Compressed file decompression restore, automatically set up under the/etc/local MySQL 3.22.32 subdirectory
(2)//Enter the Mysql 3.22.32 subdirectory
CD MySQL 3.22.32
(3)//configuration, note that configure is preceded by "./", indicating the execution of the configure file in the current directory
./configure
(4)/compile
Make
(5)//Installation
Make install
In general, it takes a long time to compile and install MySQL. If in the configuration, the compilation process appears-some error messages (I encountered several times), generally because of the lack of some files, according to the error message, install the Bluepoint Linux CD on the corresponding installation files provided (Bluepoint Linux GUI installation of these software is more convenient, Mount the optical drive first using the Mount command: mount/dev/cdrom/mnt/cdrom)
(6) Cd/usr/local/bin
(7)./mysql_install_db
So that MySQL is compiled, the following can be run to try.
(8) Cd/usr/local/share/mysql
(9),//Add Mysql.server file's execution permission right
chmod +x Mysql.server
(10)//Start Mysql.server
./mysql.server Star
(one) Cd/usr/local/bin
(a)/mysql-uroot
Now, if you see mysql>, it's OK.
Step two: Install Apache and PHP4, which are installed together.
(l)//Establish Apache installation directory
Mkdir/usr/local/apache
(2)//Compressed file decompression restore, automatically set up in the/etc/local under the apache_1.3.12 subdirectory
Tar Xvfz apache_1.3.12.tar.gz
(3)//Compressed file decompression restore, automatically set up in the/etc/local under the php-4.0.0 subdirectory
Tar Xvfz php-4.0.0.tar.gz
(4) CD apache_1.3.12
(5)//configuration, the--prefix option refers to the Apache installation directory path.
./configuer--prefix=/usr/local/apache
(6) CD. /pbp-4.0.0
(7)//configuration, if not installed MySQL database, you can omit the--with-mysql option, it is important to add the--with-apache option, and Apache original file path to the correct. This option allows PHP to be used as a modular form of Apache. (The following command is actually a string of words fonts together, with spaces in between.)
./configure-with-apache=. /apache_1.3.12
--with-mysql--disable-debug--enable-ftp--enable-track-vars
After the PHP4 is set, it is compiled and installed into Apache's original file directory.
(8) Make
(9) Make install
(10)//Copy the php.ini to the specified directory
CP Php.ini-dist/usr/local/lib/php.ini
(11)//Enter apache_1.3.12 catalogue
Cd.. /apache_1.3.12
(12)//configuration apache,libphp4.a currently does not exist, during the installation process will be automatically generated
./configure--prefix=/usr/local/appche--activate-module=src/modules/php4/libphp4.a.
(a) Make
(L4) Make install
Now that the installation is complete, you need to modify some of the configuration files below.
On the Apache server Setup side. To add the following string to the Apache configuration file httpd.conf, tell the Apache server that the suffix PHP is a special program file. Of course the suffix name can also be set to another suffix name, and some platform will be the PHP program suffix name set to phtml is also possible.
(cd/usr/local/apache/conf)
(16)//Launch VI editor, edit httpd.conf file
VI httpd.conf
Remove the # from the front of the line AddType application/x-httpd-php.php, optionally join a line
AddType APPLICATION/X-HTTPD-PHP.PHP4,
As for the other parameters can be based on the actual practice of cumin, here to keep the default value on it.
(17)//Enter/usr/local/apache/bin catalogue
Cd.. /bin
In the Apache directory there is a bin directory, which will have a apachectl shell program, input apchectl start can restart the Apache server.
(18)/Start Apache server
./apchectl Start
Now, at last, let's try the Hello World program! Create a file hello.php in the/usr/local/apache/htdocs directory, which reads as follows:

echo "Hello world\n";
?>


Then, start to Xwindow, or try to access the hello.php on another machine. You should be able to see the word Hello world. In this way, the whole installation process of the APACHE+PHP4+MYSPL is over, enjoy the fun of it slowly.

Related Article

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

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.