CentOS 6.2 installs lamp and phpMyAdmin with Yum

Source: Internet
Author: User
Tags mcrypt
    1. #如果提示The requested URL returned error:404, please change yourself to 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
Copy Code

Step 2. Installing PHP/MYSQL/HTTPD

    1. #安装apache
    2. Yum-y Install httpd Httpd-devel
    3. #安装mysql
    4. Yum-y install MySQL mysql-devel mysql-server mysql-libs
    5. #安装php
    6. Yum-y Install PHP
    7. #安装php扩展
    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. #其它不常用php扩展, www.linuxidc.com can not be installed
    11. Yum-y Install Php-pecl-memcache Php-eaccelerator
    12. #安装phpmyadmin
    13. Yum-y Install phpMyAdmin
    14. #安装完成之后, start
    15. Service httpd Start
    16. Service mysqld Start
Copy Code

Step 3: Configure httpd, mysqld boot from

    1. Chkconfig mysqld on
    2. Chkconfig httpd on
Copy Code

Step 4. Configure phpMyAdmin Modify/usr/share/phpmyadmin/config.inc.php

    1. #将这里abcde文字修改为自己的字符, can be any
    2. $cfg [' blowfish_secret '] = ' ABCDE ';
Copy Code

Here are some common problems with the Yum installation lamp environment.

The 1,phpmyadmin prompt does not turn on Php-mcrypt because the php-mrcrpt extension is not installed. There is no php-mrcrpt extension in official source, please install Epel source and then yum install Php-mcrypt.

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

    1. Order Deny,allow
    2. # Deny from all
    3. Allow from all
Copy Code

It is not recommended to do so, exposing phpmyadmin to be unsafe.

Note: Apache parses php, modifies httpd.conf files, adds

    1. AddType application/x-httpd-php. php. phtml
    2. AddType Application/x-httpd-php-source. Phps
Copy Code

MYQL can log in remotely and set the MySQL password:

    1. mysql>; Use MySQL;
    2. mysql>; UPDATE user SET Password=password (' newpassword ') WHERE user= ' root ';
    3. mysql>; FLUSH privileges;
Copy Code

1.2.3 Allow remote logins

    1. Mysql-u root-p
    2. Enter Password:
    3. Mysql>grant all privileges on * * to ' user name ' @ '% ' identified by ' password ' with GRANT OPTION;
Copy Code

Once you're done, you can manage the MySQL database remotely with Mysql-front.

Set MySQL to boot up:

    1. Chkconfig mysqld on
Copy Code
  • 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.