My LAMP process-Linux Enterprise Application-Linux server application information. The following is a detailed description. Apache + mysql + php supports the GD library
Install the GCC coding environment. When I install the system, I select the compiling environment for development.
1. Install the apache service Compiler
Tar-zxvf httpd-2.2.11.tar.gz-C/usr/local/src
Cd/usr/local/src/httpd-2.2.11
./Configure -- prefix =/usr/local/apache2 -- enable-so -- enable-rewrite
# -- Prefix installation path -- enable-so dynamic module loading -- enable-rewrite enable writable
Make
Make install
2. Install Mysql (I am using rpm, because the source code installation is prone to errors)
Source code Installation
Decompress the package and enter the directory. /configure -- with-mysqld-user = mysql -- prefix =/usr/local/mysql -- with-openssl -- # with-extra-charset = all -- with-isam -- exec-prefix =/usr/local/mysql
-- With-mysqld-user Logon user -- prefix installation path -- with-openssl encryption algorithm -- with-extra-charset character type -- with-isam -- exec-prefix execution file path
Make
(The following error occurs at this step ")
Make [3]: Leaving directory '/usr/local/src/mysql-5.1.32/server-tools/instance-manager'
Make [3]: Leaving directory '/usr/local/src/mysql-5.1.32/server-tools'
Make [3]: Nothing to be done for 'all-am'. Or 'all '.
Make [3]: Leaving directory '/usr/local/src/mysql-5.1.32/server-tools'
Make [2]: Leaving directory '/usr/local/src/mysql-5.1.32/server-tools'
Make [1]: Leaving directory '/usr/local/src/mysql-5.1.32'
Search a lot of information on the Internet, have not solved the problem, my QQ: 641253551 www.ludyhhm@sina.com
Install with rpm
MySQL-client-community-5.1.33-0.rhel5.i386.rpm
MySQL-devel-community-5.1.33-0.rhel5.i386.rpm
MySQL-server-community-5.1.33-0.rhel5.i386.rpm
Create a mysql user
Groupadd mysql
Useradd-g mysql
Rpm-ivh MySQL-client-community-5.1.33-0.rhel5.i386.rpm
Rpm-ivh MySQL-devel-community-5.1.33-0.rhel5.i386.rpm
Rpm-ivh MySQL-server-community-5.1.33-0.rhel5.i386.rpm
Find-name mysql
./Home/mysql \ mysql home directory
./Var/lock/subsys/mysql \\
./Var/lib/mysql \ contains the error log and id, database, mysql Library File
./Var/lib/mysql \ mysql Library File
./Etc/rc. d/init. d/mysql \ mysql Startup Script
./Etc/logrotate. d/mysql \ mysql Log script
./Usr/bin/mysql \ mysql Tool
./Usr/share/mysql \ mysql header file, which must be pointed to here when compiling ghost php
./Usr/lib/mysql \ mysql Library File
./Usr/include/mysql \ mysql configuration files
Grant mysql permissions to the directory
Cd/usr/bin
./Mysql_install_db \ this command is an initialization script to prepare for mysql running: to create a mysql license table.
./Mysqld_safe -- user = mysql & \ Start the mysql server
Or use service mysql start \ to start the mysql server
Service mysql stop \ shut down the mysql server
Service mysql status \ view the running status of mysql
By default, mysql has a root user with a blank password.
/Usr/bin/mysqladmin password 1234
/Usr/local/mysql/bin/mysql-u root-p 1234
Welcome to the MySQL monitor. Commands end with; or \ g.
Your MySQL connection id is 26
Server version: 5.1.33-community-log MySQL Community Server (GPL)
Type 'help; 'or' \ H' for help. Type '\ C' to clear the buffer.
Mysql> \ login successful
Mysql> show databases; \ view database
+ -------------------- +
| Database |
+ -------------------- +
| Information_schema |
| Mysql |
| Test |
+ -------------------- +
3 rows in set (0.06 sec)
Modify httpd. conf in Apache configuration file
Cd/usr/local/apache2/conf
Vi httpd. conf
Add
AddType application/x-httpd-php. php
Search for index.html
Add index. php to the end of DirectoryIndex index.html
Save
Create index. php In the htconf directory as follows:
Phpinfo ();
?>
Restart the apache service
The following error may occur:
Httpd: Syntax error on line 53 of/usr/local/apache/conf/httpd. conf: Cannot load/usr/local/apache/modules/libphp5.so into server:/usr/local/apache/modules/libphp5.so: cannot restore segment prot after reloc: Permission denied
This is caused by a selinux protection mode in linux.
Solution:
Method for disabling selinux
Vi/etc/selinux/config change SELINUX = enforcing to SELINUX = disabled and restart the server.
This method may cause risks to the server.
Search for related information online? There is another way to solve the problem!
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.