LAMP environment setup-MySQL 5.6

Source: Internet
Author: User
Tags mysql host

Basic Ideas:
1. Install httpd, mysql, php-mysql, and related packages
2. Start the httpd service
3. decompress the phpMyAdmin package and deploy it to the website directory.
4. Configure config. inc. php and specify the MySQL host address.
5. browser access and logon

Environment:
Build a LAMP environment on the server 192.168.1.200
The server 192.168.1.100 is the MySQL server environment.
Required software packages and files:
Mysql, mysql-server, php *. *, httpd, httpd-devel (installed using yum)
Php-mbstring-5.3.3-26.el6.x86_64.rpm (ignore dependency with rpm-ivh plus -- nodeps option)
PhpMyAdmin-4.1.2-all-languages.zip (copy to/var/www/html with uzip unzip)

Procedure:
1. Configure the yum source and install related software packages.

Yum install mysqlmysql-server
Yum install php *.*
Yum install httpdhttpd-devel

2. Test the service.
Service httpd start
Echo 123>/var/www/html/a.html
Eliks -- dump httpd: // localhost/a.html

Service mysqld start // the startup name of the mysql package that comes with the CD is mysqld

3. Modify the httpd configuration file so that it supports index. php on the homepage.
Add the homepage that supports index. php code to the httpd configuration file: vim/etc/httpd/conf/httpd. conf.
Modify index. php for the Home Page
Restart the httpd service: service httpd restart

4. Decompress phpmyadmin-4.1.2-all-languages.zip and modify the phpmyadmin configuration file.
Cp phpMyAdmin-4.1.2-all-languages.zip/var/www/html
Unzip phpMyAdmin-4.1.2-all-languages.zip
Cd/var/www/html/phpmyadmin
Cpconfig. sample. inc. php config. inc. php
Vim config. inc. php
$ Cfg ['blowfish _ secret '] = 'a8b7c6d'; // ensure that the value after the equal sign of the content in this line is not empty
$ Cfg ['servers'] [$ I] ['host'] = '192. 168.1.100 '; // The address value is the address of the mysql server.

5. Install the php-mbstring package and restart the httpd service.
Rpm-ivh php-mbstring-5.3.3-26.el6.x86_64.rpm -- nodeps
Note: When installing php-mbstring, the dependency and php-common will be reminded. In fact, yum php *. * php-common has been installed, and -- nodeps is used to ignore dependencies.
Service httpdrestart

6. Ensure that the two hosts can be connected
Log on to the mysql server on the 192.168.1.100 server and authorize a user to link to the mysql server through 192.168.1.200

Grant all on *. * toroot@192.168.1.200 identified by 123 with grant option;

7. Disable the firewall and SELINUX.
Make sure that both the firewall and selinux of the client (192.168.1.200) and mysql Server (192.168.1.100) are disabled.
Service iptablesstatus
Iptables-F
Service iptables stop
Chkconfig iptables off
Getenforce
Setenforce 0
Or modify the selinux configuration file/etc/sysconfig/selinux.
Change SELINUX value to disabled (permanently disabled)

8. Use a browser to manage the mysql server
On the client (192.168.1.200), use a browser to manage the mysql server (192.168.1.100 ).
Httpd: // localhost/phpmyadmin

Recommended reading:

Install the LAMP \ Vsftpd \ Webmin \ phpMyAdmin service and settings in Ubuntu 13.04

Compile and install LAMP in CentOS 5.9 (Apache 2.2.44 + MySQL 5.6.10 + PHP 5.4.12)

Source code for Web server architecture in RedHat 5.4 build the LAMP environment and application PHPWind

Build a WEB Server Linux + Apache + MySQL + PHP in the LAMP source code Environment

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.