Fast setup of Lamp environment under CentOS system (super detailed, turn)

Source: Internet
Author: User

Lamp Construction for Beginners is a very headache, so take this opportunity to build their own rapid linux+apche+mysql+php to share the way you hope to be able to.

Tools/Materials
    • Virtual machines and CentOS operating systems
    • Use of basic Linux commands
Method/Step
  1. First of all, in order to build a stable lamp practice environment, make sure that your virtual machine can be connected, here we use the Yum installation, It helps us to solve the software's own dependencies. I've added the PostgreSQL database back. The parameters of PostgreSQL can be removed if not needed. command is as follows

    Yum-y install httpd mysql mysql-server php php-mysql postgresql postgresql-server php-postgresql php-pgsql php-devel

  2. Yum installation process, about 1-2 minutes

  3. Launch Apache service and view time to start successfully

    The command is as follows: (Remember to start the service with the root user)

    Start:/ETC/RC.D/INIT.D/HTTPD start

    Detect startup results: PS aux | grep httpd

  4. View the IP of the server and go to the Web site root to create a new phpinfo.php program for viewing PHP-related configuration information.

  5. If this goes well, then we'll proceed to the MySQL database configuration

    The command is as follows:

    Start:/etc/rc.d/init.d/mysqld start

    Check startup results: NETSTAT-TULNP | grep:3306

    Change root password: mysqladmin-u root password ' password you want to set '

  6. Enter the MySQL database, create a demo library and a person table for testing, and insert test data

  7. Finally, write the PHP test code to connect to MySQL to detect whether MySQL can work properly with PHP

Fast setup of Lamp environment under CentOS system (super detailed, turn)

Related Article

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.