CentOS6.2 install LAMP and phpMyadmin-php using yum tutorial

Source: Internet
Author: User
Tags mcrypt
CentOS6.2 use yum to install LAMP and phpMyadmin

  1. # If The system prompts The requested URL returned error: 404, replace it with The latest version.
  2. Rpm-ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
  3. Rpm-ivh http://download.Fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm

Step 2. install php/mysql/httpd

  1. # Install apache
  2. Yum-y install httpd-devel
  3. # Install mysql
  4. Yum-y install mysql-devel mysql-server mysql-libs
  5. # Install php
  6. Yum-y install php
  7. # Install php extensions
  8. Yum-y install php-mysql php-gd php-imap php-ldap php-odbc php-mbstring php-devel php-soap php-cli php-pdo
  9. Yum-y install php-mcrypt php-tidy php-xml php-xmlrpc php-pear
  10. # Other php extensions are not commonly used. you do not need to install www.linuxidc.com.
  11. Yum-y install php-pecl-memcache php-eaccelerator
  12. # Install phpmyadmin
  13. Yum-y install phpmyadmin
  14. # Start after installation
  15. Service httpd start
  16. Service mysqld start

Step 3. configure httpd and mysqld to start automatically

  1. Chkconfig mysqld on
  2. Chkconfig httpd on

Step 4. configure phpmyadmin to modify/usr/share/phpmyadmin/config. inc. php

  1. # Modify the abcde text to your own character.
  2. $ Cfg ['blowfish _ secret'] = 'ABCDE ';

The following describes common problems encountered when installing the lamp environment in yum.

1. phpmyadmin prompts that php-mcrypt is not enabled because the php-mrcrpt extension is not installed. There is no php-mrcrpt extension in the official source. please install the epel source before yum install php-mcrypt.

2. phpmyadmin cannot access phpmyadmin. by default, only http: // localhost/phpmyadmin can be used for access. you can modify the corresponding part of/etc/httpd/conf. d/phpmyadmin. conf

  1. Order Deny, Allow
  2. # Deny from all
  3. Allow from All

We do not recommend that you do this. it is insecure to expose phpmyadmin.

Note: apache parses php, modifies the httpd. conf file, and adds

  1. Addtype application/x-httpd-php. php. phtml
  2. Addtype application/x-httpd-php-source. phps

You can remotely log on to myql and set the mysql password:

  1. Mysql>; USE mysql;
  2. Mysql>; UPDATE user SET Password = PASSWORD ('newpassword') WHERE user = 'root ';
  3. Mysql>; flush privileges;

1.2.3 allow remote login

  1. Mysql-u root-p
  2. Enter Password:
  3. Mysql> grant all privileges on *. * TO 'username '@' % 'identified by 'password' with grant option;

After that, you can use mysql-front to remotely manage the mysql database.

Set mysql to boot:

  1. 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.