CentOS 6.5 uses Yum to quickly build the lamp environment

Source: Internet
Author: User

Since this is installed in Yum mode, we have to configure the Yum source as well. In order to speed up the download, we recommend using the Yum source of NetEase. Reference: CentOS configuration netease 163yum Source http://www.linuxidc.com/Linux/2014-07/104562.htm

This approach is very convenient for beginners, but is not customizable and has a low software version. Generally used in experiments and learning environments.

CentOS 6.5 Installation Configuration lamp http://www.linuxidc.com/Linux/2014-07/104373.htm

Ubuntu 13.04 Installation lamp\vsftpd\webmin\phpmyadmin services and Settings http://www.linuxidc.com/Linux/2013-06/86250.htm

CentOS 5.9 under Compile and install lamp (Apache 2.2.44+mysql 5.6.10+php 5.4.12) http://www.linuxidc.com/Linux/2013-03/80333p3.htm

RedHat 5.4 Under the Web server architecture source code construction Lamp Environment and application Phpwind http://www.linuxidc.com/Linux/2012-10/72484p2.htm

Lamp source Environment Build Web server linux+apache+mysql+php http://www.linuxidc.com/Linux/2013-05/84882.htm

Lamp optimization and reinforcement http://www.linuxidc.com/Linux/2014-07/104092.htm based on Ubuntu

1. Installing Apache

[Email protected] ~]# yum-y install httpd

# Boot from Boot

[Email protected] ~]# chkconfig httpd on

# Start httpd Service

[[Email protected] ~]# service httpd start

# # # installs Apache some extensions

[Email protected] ~]# yum-y install httpd-manual mod_ssl mod_perl mod_auth_mysql


Now just type http://localhost or HTTP///native IP directly in the browser and you should see the Apache test page

Here, you need to pay attention to the iptables settings.

2. Installation configuration MySQL

# MySQL client program

# Mysql-server Service-side program

# Mysql-devel Development and Design Library

[[email protected] ~]# yum-y install MySQL mysql-server mysql-devel

# Boot up

[Email protected] ~]# chkconfig mysqld on

# Start MYSQLD Service

[[Email protected] ~]# service mysqld start

# Make some security configuration

[Email protected] ~]#/usr/bin/mysql_secure_installation

[Email protected] ~]# NETSTAT-TULPN | Grep-i MySQL

TCP 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 1723/mysqld


OK, we see that the mysqld is up and listening on port 3306.

3. Install PHP


Install the relevant module: In order for PHP to support MySQL, we can install the Php-mysql software package, or use the following command to search for available PHP modules

[Email protected] ~]# yum-y install PHP php-mysql

# Install PHP Common extensions

[email protected] ~]# Yum search php

[Email protected] ~]# yum-y install GD php-gd gd-devel php-xml php-common php-mbstring php-ldap php-pear php-xmlrpc php- Imap

# # # Restart the httpd service, this step is important

[Email protected] ~]# service httpd restart


We then provide a PHP page to test

[Email protected] ~]# cd/var/www/html/

[Email protected] html]# VI index.php

<?php

Phpinfo ();

?>


Then, again, in the browser type http://localhost or http://Native IP, you should see the following page

4. Installation Configuration phpMyAdmin

After installing Mysql,apache and PHP, we can install phpMyAdmin for visual management of MySQL database. Download the latest version of the website: http://www.phpmyadmin.net/home_page/

Under Windows, in fact Navicat is also a very useful MySQL visualizer, recommended to use.

[Email protected] ~]# Unzip Phpmyadmin-4.2.6-all-languages.zip

[Email protected] ~]# MV Phpmyadmin-4.2.6-all-languages/var/www/html/phpmyadmin

[Email protected] ~]# cd/var/www/html/phpmyadmin

[email protected] ~]# CP libraries/config.default.php config.inc.php

[Email protected] ~]# VI cnfig.inc.php

$cfg [' pmaabsoluteuri '] = '; Fill in PhpMyAdmin's access URL here.

$cfg [' Servers '] [$i] [' host '] = ' localhost '; MySQL hostname or IP address

$cfg [' Servers '] [$i] [' port '] = '; MySQL Port-leave blank for default port

$cfg [' Servers '] [$i] [' user '] = ' root '; Fill in the MySQL username used by MySQL access phpMyAdmin, which defaults to root.

fg[' Servers ' [$i] [' password '] = '; Fill in the password corresponding to the MySQL user name above.

# then restart, httpd service

[Email protected] ~]# service httpd restart


You can access it by typing http://localhost/phpmyadmin in the browser.

If you encounter an issue with access rights, check SELinux.

1130mysql Connection Error Resolution:

Mysql-u root-p;

Mysql>use MySQL;

Mysql>update User Set host = '% ' where user = ' root ';

Mysql>select host, user from user;

To completely uninstall the MySQL method:

Yum remove MySQL mysql-server mysql-libs compat-mysql51
Rm-rf/var/lib/mysql
Rm/etc/my.cnf
See if you have MySQL software:
Rpm-qa|grep MySQL
If it exists, continue with the deletion.

CentOS 6.5 uses Yum to quickly build the lamp 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.