Setup under Ubuntu (linux+apache+mysql+php, LAMP) environment

Source: Internet
Author: User
Tags install php phpmyadmin

recently started to play PHP, so try to build a development environment and make a record, in case you can use it later to be easily checked. The first step is to ensure that the package is up to datesudo apt-get updateStep two install Apache2sudo apt-get install apache2Test after installation: Open http://localhost/or http://127.0.0.1 in the browserIf there is an IT works! It proves the Apache installation was successful.
Second step to install MySQL
sudo apt-get install mysql-serverthe root password needs to be set during installationsudo apt-get install mysql-clientStep three install PHPsudo apt-get install php5Fourth Step other module installationsudo apt-get install libapache2-mod-php5let Apache, PHP support MySQLsudo apt-get install libapache2-mod-auth-mysqlsudo apt-get install php5-mysqlsudo/etc/init.d/apache2 RestartGD Library Installation: Image library, such as generate verification code, processing pictures are inseparable from itsudo apt-get install PHP5-GDCurl Extension Installation: Support Ftp,http and so on protocol, easy to use.sudo apt-get install Php5-curlsudo/etc/init.d/apache2 RestartFifth Step Modify permissions
Because most of the lamp operation is related to the/var/www directory, for convenience, the permission to modify the directory is accessible to ordinary users. sudo chmod 777/var/www/Sixth Step installation phpMyAdminphpMyAdmin is a MySQL database management tool based on PHP that is web-architected on a Web site host, allowing administrators to manage the MySQL database using a Web interface. sudo apt-get install phpMyAdminSelect Apache2 during installationThe seventh step is to establish a connection between phpMyAdmin and Apache2Note: www directory in/var/www,phpmyadmin in/usr/share/phpmyadmin directorysudo ln-s/usr/share/phpmyadmin/var/wwwtest: Run Http://localhost/phpmyadmin directly to see if there is any database management software presentEnter your user name and password and log inEighth step PHP testCreate a new file under the/var/www directory test.phpsudo touch test.phpand write in the file:<? phpPhpinfo (); ?>Save the file. nineth Step Test php You can see the system Information of PHP by entering http://localhost/test.php in the browser.
This completes the Lamp development environment configuration under Ubuntu.

Setup under Ubuntu (linux+apache+mysql+php, LAMP) environment

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.