CENTOS6 How to install PHP mysql and GD extension libraries using Yum

Source: Internet
Author: User
Tags php mysql phpinfo
    1. #yum-y install MySQL mysql-server mysql-devel
Copy Code

Configure MySQL Boot service

    1. #chkconfig--add mysqld (add MySQL service to the service list)
    2. #chkconfig mysqld on (set up MySQL service with boot)
    3. #service mysqld Start (start MySQL service)
Copy Code

Second, install PHP

    1. #yum-y Install PHP
    2. #service httpd Restart (restart Apache)
Copy Code

#vi/var/www/html/index.php Test Code:

    1. Phpinfo ();
    2. ?>
Copy Code

Save exit, Access http://youdomain.com/with IE if output phpinfo information, the PHP installation is successful.

Third, install the PHP related components

    1. #yum Search PHP (Searching for PHP related components)
    2. #yum-y install php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc
Copy Code

When the installation is complete, restart the Apache service:

    1. #service httpd Restart
Copy Code

The lamp environment is now complete.

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