**************************************** *********
Vm8.0 Virtual Machine Under win7
Centos6.0 (minimum installation)
Filezilla upload software
Reference material: the lamp compilation video tutorial by brother Lian Li Ming. Thank you for the detailed tutorial.
About the decompressed shell script and compile the installation script: http://download.csdn.net/detail/wang02011/3939392 tested all available, compilation can be completed once.
I saved the Unix format. Even if you are a Windows system, you can directly use it after downloading it and uploading it to Linux. If you want to edit the shell script under Win, remember to change the file format to Unix, otherwise the script will not be executed on Linux.
**************************************** *********
Preparations
1. Check whether the installation tool has installed GCC, GCC-C ++, and make (YUM installation)
Check: gcc-V
Yum install gcc
2. Check whether Apache MySQL PHP has been installed and uninstalled.
Check: rpm-Qa | grep hpptd, rpm-Qa | grep MySQL, rpm-Qa | grep PHP
Uninstall: rpm-E [software name]
3. Check the Firewall Status. Check whether port 80 3306 22 is enabled and disabled by default. Need to open, open method see http://blog.csdn.net/wang02011/article/details/7065997
#/Etc/init. d/iptables status
Restart the firewall after enabling the port
Service iptables restart
4. Upload the software to/lamp and decompress the software package.
# Tar-zxf [software name]
// Decompress the package using shell scripts for convenience.
Compilation started: // For convenience, script installation is available. My machine has been installed in less than one and a half hours.
========================================================== ======================
1. Install the libxml2 library file
CD/lamp/libxml2-2.6.30
./Configure -- prefix =/usr/local/libxml2/
Make
Make install
2. Install the libmcrypt Library File
CD/lamp/libmcrypt-2.5.8
./Configure -- prefix =/usr/local/libmcrypt/
Make
Make install
3. Install libltdl in the libmcrypt Library
CD/lamp/libmcrypt-2.5.8/libltdl
./Configure -- enable-ltdl-install
Make
Make install
4. Install the zlib library file
CD/lamp/zlib-1.2.3
./Configure do not specify the installation path, otherwise libpng installation will fail. Install it to the default location.
Make can define the Installation Log. Make install>/test/backup/zlib_20151118.install.log
Make install
5. Install the libpng library file
CD/lamp/libpng-1.2.31
./Configure -- prefix =/usr/local/libpng/
Make
Make install
6. Install the IIS6 Library File
Mkdir/usr/local/IIS6 // directory for installing the mkdir/usr/local/IPv6 Software
Mkdir/usr/local/secrets 6/bin // directory for storing commands
Mkdir/usr/local/IPv6/lib // directory where the library file of mkdir/usr/local/IPv6 is located
Mkdir/usr/local/secrets 6/include // store the header file directory
Mkdir-P/usr/local/IPv6/man/Man1 // store the manual directory-P is the continuous directory created
CD/lamp/jpeg-6b
./Configure -- prefix =/usr/local/configure 6/-- enable-shared -- enable-static
Make
Make install
7. Install FreeType library files
CD/lamp/freetype-2.3.5
./Configure -- prefix =/usr/local/FreeType/
Make
Make install
8. Install the Autoconf Library File
CD/lamp/autoconf-2.61
./Configure // do not specify a directory
Make
Make install
9. Install the GD library file
CD/lamp/gd-2.0.35 // zlib does not specify the installation directory, so you do not need to specify the zlib location to install GD2
./Configure -- prefix =/usr/local/GD2/-- With-JPEG =/usr/local/versions 6/-- With-FreeType =/usr/local/FreeType/
Make
Make install
10. Install apache2
CD/lamp/httpd-2.2.9
. /Configure -- prefix =/usr/local/apache2/-- sysconfdir =/etc/httpd/-- With-included-Apr -- disable-userdir -- enable-so -- enable-Deflate = shared -- enable-expires = shared -- enable-Rewrite = shared -- enable-static-support
Make
Make install
/Usr/local/apache2/bin/apachectl start // start
Echo "/usr/local/apache2/bin/apachectl start">/etc/rc. d/rc. sysinit // Add to start automatically
# Enable/usr/local/apache2/bin/apachectl start
# Disable/usr/local/apache2/bin/apachectl stop
# Restart/usr/local/apache2/bin/apachectl restart
# Test the host machine input 192.168.1.11
11. Install the related software of the MySQL database
CD/lamp/ncurses-5.6 // This must be installed first, otherwise the installation of MySQL will fail
./Configure -- With-shared -- without-Debug -- without-ADA -- enable-overwrite
Make
Make install
12. Install the MySQL database
Groupadd MySQL/Add a MySQL standard group
Useradd-G MySQL // Add a MySQL user and add it to the MySQL Group
CD/lamp/mysql-5.0.41
./Configure -- prefix =/usr/local/MySQL/-- With-extra-charsets = all
Make
Make install
Set MySQL
CP support-files/my-medium.cnf/etc/My. CNF // copy the configuration file
/Usr/local/MySQL/bin/mysql_install_db -- user = MySQL // create a data table as a MySQL user (one more var directory)
Chown-r root/usr/local/MySQL // set the owner of the MySQL home directory (I .e./usr/local/MySQL) to the root user
Chown-r MySQL/usr/local/MySQL/var // set the owner of the VaR directory to a MySQL user
Chgrp-r MySQL/usr/local/MySQL // set the owner of the MySQL home directory to the MySQL user group
/Usr/local/MySQL/bin/mysqld_safe -- user = MySQL & // start MySQL
CP/lamp/mysql-5.0.41/support-files/MySQL. server/etc/rc. d/init. d/mysqld // set MySQL. copy this file to/etc/init. d/directory and renamed mysqld
Chown root. Root/etc/rc. d/init. d/mysqld // set the owner of mysqld to root
Chmod 755/etc/rc. d/init. d/mysqld // Grant "execution" permission to the/etc/init. d/mysqld file.
Chkconfig -- add mysqld // Add to automatically run upon startup
Chkconfig -- list mysqld
Chkconfig -- levels 245 mysqld off // The running level is 2 4 5
13. install PHP
CD/lamp/php-5.2.6
. /Configure -- prefix =/usr/local/PHP/-- With-config-file-Path =/usr/local/PHP/etc/-- with-apxs2 =/usr/local/apache2/ bin/apxs -- With-mysql =/usr/local/MySQL/-- With-libxml-Dir =/usr/local/libxml2/-- With-JPEG-Dir =/usr/local /release 6/-- With-FreeType-Dir =/usr/local/FreeType/
-- With-Gd =/usr/local/GD2/-- With-mcrypt =/usr/local/libmcrypt/-- With-mysqli =/usr/local/MySQL/bin/mysql_config -- enable-soap -- enable-mbstring = all -- enable-sockets
Make
Make install
Cp php. ini-Dist/usr/local/PHP/etc/PHP. INI // copy the PHP configuration file to/usr/local/PHP/etc/and name it PHP. ini
Echo "addtype application/X-httpd-PHP. php. phtml">/etc/httpd. conf // enables Apache to parse PHP
/Usr/local/apache2/bin/apachectl restart // restart Apache
14. Configure MySQL
CD/usr/local/MySQL
Bin/mysqladmin version // simple test
Bin/mysqladmin varibles // view all MySQL Parameters
Bin/MySQL-u root // you can directly log on to the local server without a password
# View all users in the authorization table
# Mysql> select * From mysql. User \ G;
# Deleting all users except localhost (improving security)
# Mysql> Delete from mysql. User where host! = 'Localhost ';
# Modify the password of the root user. Here the root user refers to the root user of MySQL, which is irrelevant to the root user of Linux.
# Mysql> set password for 'root' @ 'localhost' = PASSWORD ('123 ');
# Refresh Permissions
# Mysql> flush privileges;
15. Install Zend accelerator
This software is not the source code. Binary binfiles only need to be executed./install. Sh.
Then follow the prompts to install
If./install. Sh cannot be installed, install it with./install-tty.
Enter the address of the configuration file.
PHP:/usr/local/PHP/etc/
Apache: automatically locked
16. Install phpadmin
Copy the decompressed source code package to the directory where the website is stored and rename it phpMyAdmin.
[Root @ Feng soft] # cp-A phpMyAdmin-3.0.0-rc1-all-languages/web/phpMyAdmin
Create a configuration file
[Root @ Feng phpMyAdmin] # cp config. sample. Inc. php config. Inc. php
Open the configuration file
[Root @ Feng phpMyAdmin] # vi./config. Inc. php
Edit the configuration file and change the cookie to HTTP
/* Authentication type */
$ Cfg ['servers'] [$ I] ['auth _ type'] = 'http ';
Restart Apache
#/Usr/local/apache2/bin/apachectl restart
17. Errors after installation
1) Apache restart error: httpd: syntax error on line 57 of/etc/httpd. conf: cannot load/usr/local/apache2/
Solution: http://blog.csdn.net/wang02011/article/details/7082815
2) HTTPD: cocould not reliably determine the server's fully qualified domain name
Solution: # Check the port netstat-tnl. If port 80 is not enabled
In VI/etc/httpd. conf, remove the # servername localhost: 80 comment in it.
3) Upload a project to/web, and the installation fails, prompting config. Inc. php to fail to be set.
View permissions [root @ Feng web] # ll
Result: drwxr-XR-X. 12 Root 4096 04:22 cms_demo
View Apache user process [root @ Feng web] # ps-Aux | grep httpd
Result: Daemon 30930 0.0 1.4 20172 7536?
Modify the owner of the cms_demo Project
Chown-r daemon. Daemon cms_demo // change the user of the project and all its subdirectories to the daemon user group to the daemon