Build a LAMP environment using ubutun

Source: Internet
Author: User
: This article describes how to build a LAMP environment in ubutun. For more information about PHP tutorials, see. 1: install strongtun
2: enable the SSH service sudo apt-get install openssh-server
3: Use ifconfig to view the IP address of the host and use Xshell to connect
4. install LAMP
Install Apache2 sudo apt-get install apache2
Install Mysql sudo apt-get install mysql-server
Install php sudo apt-get install php5

Using mysql as an extension module of Apache2
Sudo apt-get install php5-mysql
5. restart
Restart Apache service apache2 reatart
Restart mysql service mysql restart
6: install common extensions for php
Gd library and curl
Sudo apt-get install php5-gd php5-curl curl libcurl3 libcurl3-dev
Restart apache
7: use filezilla to transfer files and use root to log on
If you cannot log on to/ect/ssh/sshd_config, edit and restart the ssh service.
8. configuration file details
Available Apache modules/etc/apache2/mods-available
Modules enabled by Apache/etc/apache2/mod-enabled
Php configuration file/etc/php5/apache2/php. ini
Mysql configuration file/etc/mysql/my. cnf
Principle: establish a soft connection to an enabled module
9: multi-site configuration
Copy 000-default.conf under the available modules
Establish a soft connection to the enabled module
After the connection is established, add ServerName to change document root.
Restart Apache
10: install phpmyadmin
Apt-get install phpmyadmin is installed under/usr/share by default.
Establish a soft connection ln-s/usr/share/phpmyadmin/var/www
OK

Appendix: ubuntun is a root user by default, but there is no password, and ubuntun does not have a password by default, so we must first be root
After setting the password sudo passwd root, you can use the root account to log 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.