Web Server apache + mysql + php settings-Linux Enterprise Application-Linux server application information, the following is a detailed description. Web Server Settings
Apache + mysql + php is generally considered to be an excellent combination of web servers. It is ideal for individual lab servers and medium-sized servers. For large servers, I don't know how many pages are written in the php language, mainly because the execution efficiency of php pages is not very good, but even so, the apache server is still one of the most widely used servers. mysql does not have to say that, network-based databases are excellent. I have read a lot of articles about this on the Internet before. Although I wrote it in detail, I only succeeded once according to the above method. Many people say they have succeeded in the experiment, but in fact many people have lost some steps. The following article is based on an article and made a lot of modifications by myself.
Apache + mysql + php in Linux
Apache1.3.28 + php-4.3.3 + mysql-4.0.16
Note that the static php module can be used for apache 1.3.x.
The required software package for this installation:
Apache_1.3.28.tar.gz
Php-4.3.3.tar.bz2
MySQL-client-4.0.16-0.i386.rpm
MySQL-devel-4.0.16-0.i386.rpm
MySQL-server-4.0.16-0.i386.rpm
MySQL-shared-4.0.16-0.i386.rpm
0. Before installation:
First, uninstall the server software that comes with the debugging system. Because apache must be re-compiled, php does not bring the original system. As for mysql, if it has been installed during initial installation of the system, you may not install it here, but I promise, this is a bit newer than what you brought ~~ :).
Uninstall apache: rpm-e apache. If it fails, add the -- nodeps parameter.
Uninstall mysql: Run rpm-qa | grep MySQL to check the software package installed in the system.
If MySQL software packages are listed, uninstall them one by one. Note that the -- nodeps and -- force parameters are added because they are mutually dependent and cannot be unloaded without parameters:
Rpm-e MySQL-client -- nodeps -- force
Rpm-e MySQL-server -- nodeps -- force
Rpm-e MySQL-shared -- nodeps -- force
Rpm-e MySQL-devel -- nodeps -- force
Rpm-e mysql
If you do not want to uninstall it, you can.
The installation is started below.
1. Install mysql: (skip this step if you do not intend to uninstall the original mysql)
Put these packages in a directory, such as your main directory/root
A. Create a MySQL user group: (if the system has already established users and groups, this step will not succeed, but it does not matter. You can proceed directly to the next step)
Cd./php-4.3.3
Cp php. ini-dist/usr/local/lib/php. ini
You can edit php. ini as needed
B. Edit httpd in the/usr/local/apache/conf directory. conf (this file involves all the server variables. You can change the server address, port, and main directory. The following list must be changed)
Find:
DirectoryIndex index.html
Changed:
DirectoryIndex index.html index. php index.htm
Add one to the file:
AddType application/x-httpd-php. php
C. Create a symbolic connection to control the server:
Save it as index. php, copy it to/usr/local/apache/htdocs/(this is the default web server home directory), then start the mysql server and start the web server.
Mysqld_safe &
Apache start
Visit the test page. If all the server information is printed, it indicates that you have succeeded.
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.