Main agenda:
Build lamp quickly
Apache virtual directory
Apache Virtual Host
Authorization and authentication
MySQL Master/Slave Server Configuration
Rsync synchronization settings
Assume that the lamp image site experiment
Site stress test
Obtain and install Lamp
Install lamp in RPM Mode
Linux + Apache + MySQL + PHP
Attach a cd
Yum-suitable for environments with high network speed
Configuration File
Apache ---------/etc/httpd/CONF/httpd. conf
PHP -----------/etc/PHP. ini
MySQL ----------/etc/My. CNF
# Uname-
# DF-h --- check that the/dev/SHM capacity corresponding to tmpfs has been used 0, and the optical drive is not mounted.
# Mount/dev/CDROM/mnt ----------/dev/HDC
# DF
# Cd/mnt
# Ls
# Rpm-Qa | grep MySQL
# Rpm-Qa | grep Apache
# Rpm-Qa | grep HTTP
# Ls HTTP *
# Rpm-IVH install the master file
# Rpm-IVH-PHP-Master File
# Service httpd start
Test: enter an IP address in the address bar. Http: // 192.168.1.101
# Vi/var/www/html/test. php
# <? PHP
Phpinfo ();
?>
# ESC
#: WQ
Test: Http: // 192.168.1.101/test. php
No MySQL found
# Ls PHP *
See PHP-mysql-This middleware for installation.
# Rpm-IVH -....
# Install the corresponding package based on the dependency
# Service httpd restart
Start MySQL
# Servicemysqld start
# Mysql-u root-P
# Show databases;
# \ Q
# Ntsysv
# Chkconfig httpd on
Now the lamp environment has been set up
Configuration File
Apache ----/etc/httpd/CONF/httpd. conf
PHP -----/etc/PHP. ini
MySQL ---/etc/My. CNF
# Vi/etc/httpd/CONF/httpd. conf
# Vi/etc/PHP. ini
# Vi/etc/My. CNF
Apache configuration file
Prompt information
Global Variables
Configure the master server
Configure a VM
Apache virtual directory
Virtual directory
Easy access
Easy to move site Directories
Increase disk space
High Security
# Mkdir-P/data/Web
# Mkdir-P/data/web/test01
# Mkdir-P/data/web/test02
# Vi/etc/httpd/CONF/httpd. conf
# G
# Include vhost/vhost. conf
#: WQ
# Cd/etc/httpd
# Pwd
# Ls
# Mkdir vhost
# Vi/vhost. conf
Alias
<.....
...>
# Service httpd restart
Updating .....