The previous one is written using the RPM package to build the lamp environment, the method is easy to install, but because the RPM package update is required for a long time, so if you want to install the newer package, the best way is the source code installation.
General source package placed under the/usr/local/, Mysql,apache source package are unpacked under its, PHP placed under the/usr/local/src/
Approximate Steps for installation:
First, install with four packages below Yum (preferably with group installation)
For example: Yum groupinstall "Development tools" –y
A. Development Tools
B. Development Libraries
C. Legacy Software Development
D. X Software Development
Two. After the above operation, we install MySQL first, to the red font need to install the package into the directory
1. Disassemble the MySQL file to the/usr/local directory
[Root@localhost ~]# tar-zxvf mysql-5.5.15-linux2.6-i686.tar.gz-c/usr/local
[Root@localhost ~]# cd/usr/local
2. Switch to mysql-5.5.15-linux2.6-i686, you can use ll to see the file inside
[Root@localhost local]# CD mysql-5.5.15-linux2.6-i686/
3. View installation Methods
[Root@localhost mysql-5.5.15-linux2.6-i686]# less install-binary
Instance installation steps:
shell> Groupadd MySQL
Shell> useradd-r-G MySQL MySQL
Shell> cd/usr/local
Shell> Tar zxvf/path/to/mysql-version-os.tar.gz
shell> ln-s Full-path-to-mysql-version-os MySQL
shell> CD MySQL
Shell> chown-r MySQL.
Shell> chgrp-r MySQL.
Shell> scripts/mysql_install_db--user=mysql
Shell> chown-r Root.
shell> chown-r MySQL Data
# Next command is optional
shell> CP support-files/my-medium.cnf/etc/my.cnf
Shell> Bin/mysqld_safe--user=mysql &
# Next command is optional
shell> CP Support-files/mysql.server/etc/init.d/mysql.server
Open another terminal
[Root@localhost ~]# cd/usr/local