Suitable for Redhat in 32-bit and 64-bit, if local source is erected. Don't dwell on it here.
1 Installing Apache+php+mysql
A, install APAHCE, PHP, MySQL, and PHP connection MySQL library components yum-y install httpd php mysql mysql-server php-mysql
b, install the MySQL extension yum-y install mysql-connector-odbc mysql-devel libdbi-dbd-mysql
Or one-time paste installation:
yum-y install httpd php mysql mysql-server php-mysql httpd-manual mod_ssl mod_perl mod_auth_mysql php-mcrypt php-gd php-x ML php-mbstring php-ldap php-pear php-xmlrpc mysql-connector-odbc mysql-devel libdbi-dbd-mysql
C, set the MySQL database root account password.
mysqladmin-u root password ' newpassword ' [Enter the password in quotation marks]
d. Make MySQL database more secure
Mysql-u Root-p [You will be asked to enter the password you just set, enter it and return it.
mysql> DROP DATABASE test; [Delete test database]
Mysql> DELETE from mysql.user WHERE user = "; [Delete Anonymous Account]
mysql> FLUSH privileges; [Overloaded Permissions]
E, according to the above installation method, the default site directory is configured to create a new PHP script for/var/www/html/:
<?php
Phpinfo ();
?>
2, install phpMyAdmin
to enter phpMyAdmin official download (not the latest version, the next phpMyAdmin 2.11.9.5 on the line, more than 3.1 php 5.2 above), upload to your site directory, and then configure. It takes just a few steps to get it done.
I. config.sample.inc.php renamed to Config.inc.php;
II. Open the config.inc.php file for the following modifications;
//$cfg [' Servers '] [$i] [' controluser '] = ' PMA ';
//$cfg [' Servers '] [$i] [' controlpass '] = ' pmapass ';
//$cfg [' Servers '] [$i] [' pmadb '] = ' phpmyadmin ';
//$cfg [' Servers '] [$i] [' bookmarktable '] = ' pma_bookmark ';
//$cfg [' Servers '] [$i] [' relation '] = ' pma_relation ';
//$cfg [' Servers '] [$i] [' table_info '] = ' pma_table_info ';
//$cfg [' Servers '] [$i] [' table_coords '] = ' pma_table_coords ';
//$cfg [' Servers '] [$i] [' pdf_pages '] = ' pma_pdf_pages ';
//$cfg [' Servers '] [$i] [' column_info '] = ' pma_column_info ';
//$cfg [' Servers '] [$i] [' history '] = ' pma_history ';
//$cfg [' Servers '] [$i] [' designer_coords '] = ' pma_designer_coords ';
Remove the front//of each line;
II. $cfg [' blowfish_secret '] = "; | Modify to | $cfg [' blowfish_secret '] = ' http ';
Iv. $cfg [' Servers '] [$i] [' controluser '] = ' PMA '; | change ' PMA ' to your account | $cfg [' Servers '] [$i] [' controlpass '] = ' pmapass '; | Set the ' Pmapass to your MySQL login password |
V. $cfg [' blowfish_secret '] = "; | Add phrase password for example: $cfg [' blowfish_secret '] = ' onohot ';
3,//Installation of PHP extension
Yum-y Install PHP-GD php-xml php-mbstring php-ldap php-pear php-xmlrpc
4.//install Apache extension
Yum-y Install httpd-manual mod_ssl mod_perl mod_auth_mysql
5. Configure the Firewall
Add allow access to HTTP, FTP port
Iptables-i rh-firewall-1-input-m state–state new-m tcp-p tcp–dport 21-j acceptiptables-i Rh-firewall-1-input-m St Ate–state new-m tcp-p tcp–dport 80-j ACCEPT
Restart Iptables:service iptables Restart
Install Apache+php+mysql+phpmyadmin with Yum under Linux