CentOS6.5 detailed process of installing LAMP environment and phpMyAdmin using yum

Source: Internet
Author: User
Tags mcrypt
This article describes how to use YUM configuration to install the LAMP environment under CentOs6.2. some brothers also like to use the compilation method. I personally think that if it is not customized for the server, the yum installation is stable and simple, why downloadmakemakeinstall. Step 1 configure the rpmforge and epel source for centos. The official centos source is actually enough, but it is similar to ph.

This article describes how to use YUM configuration to install the LAMP environment under CentOs6.2. some brothers also like to use the compilation method. I personally think that if it is not customized for the server, the yum installation is stable and simple, why download & make & makeinstall.

Step 1:CentosConfigure the rpmforge and epel source.CentosOfficial sources are enough, but some extensions such as php-mcrypt are not available in official sources.
You can find the latest version of rpmforge source in release or rpmforge-release-*. x86_64.rpm.
The epel source can be

Here we use a 32-bit system as an example.,
# If The system prompts The requested URL returned error: 404, replace it with The latest version.
Rpm-ivhhttp: // pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
Rpm-ivhhttp: // download.fedoraproject.org/pub/epel/6/ I #/epel-release-6-5.noarch.rpm

Step 2. install php/Mysql/Httpd
# Install apache
Yum-y install httpd-devel
# Install mysql
Yum-y install mysql-devel mysql-server mysql-libs
# Install php
Yum-y install php
# Install php extensions
Yum-y install php-mysql php-gd php-imap php-ldap php-odbcphp-mbstring php-devel php-soap php-cli php-pdo
Yum-y install php-mcrypt php-tidy php-xml php-xmlrpc php-pear
# Other php extensions are not commonly used. you do not need to install www.linuxidc.com.
Yum-yinstall php-pecl-memcache php-eaccelerator
# InstallationPhpmyadmin
Yum-y install phpmyadmin
# Start after installation
Service httpd start
Service mysqld start

Step 3. configure httpd and mysqld to start automatically
Chkconfig mysqld on
Chkconfig httpd on

Step 4. configure phpmyadmin
Modify/usr/share/phpmyadmin/config. inc. php
# Modify the abcde text to your own character.
$ Cfg ['blowfish _ secret'] = 'ABCDE ';

FAQs
1. phpmyadmin prompts that php-mcrypt is not enabled because the php-mrcrpt extension is not installed. No php-mrcrpt extension is available in official sources. please install epel source before yuminstall php-mcrypt

2. phpmyadmin cannot be accessed

Phpmyadmin can only be accessed through http: // localhost/phpmyadmin by default. you can modify the corresponding part of/etc/httpd/conf. d/phpmyadmin. conf

Order Deny, Allow
# Deny from all
Allow from All

However, it is strongly not supported to expose phpmyadmin to be insecure.

Note:
Apache parses php, modifies the httpd. conf file, and adds
Addtype application/x-httpd-php. php. phtml
Addtype application/x-httpd-php-source. phps

Myql remote logon
Set mysql password
Mysql>; USE mysql;
Mysql>; UPDATE user SET Password = PASSWORD ('newpassword') WHEREuser = 'root ';
Mysql>; flush privileges;
1.2.3 allow remote login
Mysql-u root-p
Enter Password:
Mysql> grant all privileges on *. * TO 'username '@' % 'identified by 'password' with grant option;
After that, you can use mysql-front to remotely manage mysql.
Set to boot
Chkconfig mysqld on

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.