Install Apache+php+mysql+phpmyadmin with Yum under Linux

Source: Internet
Author: User
Tags ldap pear php mysql php script iptables mysql login phpmyadmin

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.