First, LAMP
A Web site architecture solution, with 70% of the traffic coming from lamp, the software used is open source software, which is what we are familiar with in Wikipedia. Many popular commercial applications are to adopt this architecture, compared with JAVA/J2EE architecture, lamp has the characteristics of rich web resources, light weight, rapid development, etc., Microsoft's. NET architecture, lamp has a common, cross-platform, high-performance, low-cost advantages, so lamp whether it is performance, quality or price is the preferred platform for enterprises to build websites.
Second, preparation (non-production environment experimental environment some packages or modules omitted)
Required packages for Down
Apache:apr-1.5.2.tar.gz
Apr-iconv-1.2.1.tar.gz
Apr-util-1.5.4.tar.gz
Pcre-8.36.tar.gz
Mysql:mysql-5.5.20.tar.gz
php:php-5.5.10.tar.bz2
Third, installation
Apache installed before the installation has mentioned
(2) Installing MySQL
# yum Install Bison ncurses ncurses-devel ncurses-libs
# cmake-dcmake_install_prefix=/usr/local/mysql-dmysql_datadir=/usr/local/mysql/data-dsysconfdir=/usr/local/ Mysql-dtmpdir=/tmp-dwith_innobase_storage_engine=1-dwith_archive_storage_engine=1-dwith_blackhole_storage_ Engine=1-dwith_perfschema_storage_engine=1-ddefault_charset=utf8-ddefault_collation=utf8_general_ci-denabled_ Local_infile=1-dmysql_unix_addr=/tmp/mysql.sock-dwith_extra_charsets=all
# make
# make Install
# Cd/usr/local/mysql/support-files
# CP MY-DEFAULT.CNF/USR/LOCAL/MYSQL/MY.CNF
# CP Mysql.server/etc/init.d/mysqld
# Vim/etc/init.d/mysqld
Basedir=/usr/local/mysql
Datadir=/usr/local/mysql/data
Conf=/usr/local/mysql/my.cnf
# VIM/USR/LOCAL/MYSQL/MY.CNF
[MySQL]
Socket =/tmp/mysql.sock
[Mysqld]
Basedir =/usr/local/mysql
DataDir =/usr/local/mysql/data
Port = 3306
server_id = 1
Socket =/tmp/mysql.sock
Log_bin = Server_log
Skip_name_resolve = On
User=mysql
Explicit_defaults_for_timestamp = On
Sql_mode=no_engine_substitution,strict_trans_tables
# Cd/usr/local/mysql
#./scripts/mysql_install_db--user=mysql--datadir=/usr/local/mysql/data
# service Mysqld Start
Installation of PHP:
./configure--prefix=/usr/local/php--with-apxs2=/usr/local/httpd/bin/apxs--with-config-file-path=/usr/local/php
Configure Apache to support PHP
Loading library files provided by PHP body
LoadModule Php5_module modules/libphp5.so
Application handlers for configuring PHP files (PHP)
AddType application/x-httpd-php. php
AddType Application/x-httpd-php-source. Phps
Add index.php to the default home page file settings
DirectoryIndex index.html index.php
# VIM index.php \\php Information Display test page
<?php
Phpinfo ();
?>
The basic software has been installed.
Construction of linux+apache+mysql+php Environment