Ubuntu14.04 Building Lamp

Source: Internet
Author: User
Tags ssh

1. Update the SOFTWARE source

sudo apt-get update

2. Installing Apache

sudo apt-get install apache2

3. See if Apache is installed successfully

Apache2–v

4. Installing PHP5

sudo apt-get install php5

5. View the version of PHP5

Php5–v

6. Check to see if Apache has loaded the Libphp5.so module, a module that Apache uses to command PHP parsers to execute PHP code.

Cat/etc/apache2/mods-enabled/php5.load

7. Install MySQL, the installation process will let the input database root user password, two times input can continue installation to complete, note that this password is not the system root account password, but the database you installed the default user root password

sudo apt-get install Mysql-server

8. Check if mysql.so extension is loaded, PHP performs curd operation via the extension link MySQL, if prompt no such file or directory means PHP does not have an extension of the operational database installed by default, it needs to install itself

Cat/etc/php5/mods-available/mysql.ini,

9. If the previous step is unsuccessful, perform this step to install the MySQL extension for PHP

sudo apt-get install Php5-mysql

10. See if the extension is installed successfully, the different versions may be stored in different locations

Cat/etc/php5/mods-available/mysql.ini

11. Restart MySQL and Apache

sudo service MySQL restart

sudo service apache2 restart

12. Create a PHP file to test if the environment is installed successfully.

Cd/var/www/html

Vim index.php

<?php

Phpinfo ();

?>

13. Install Common Extensions for PHP

sudo apt-get install php5-gd curl libcurl3 Libcurl3-dev Php5-curl

The installation time of the process is longer, please wait patiently;

14. After the installation is complete, restart Apache

sudo service apache2 restart

15. If you need to upload or manipulate files, you need to use the root account for SSH login, you need to modify the Ubuntu system allows the root user ssh login,

cd/etc/ssh/

sudo vim sshd_config


: Set Nu


28G


16. Find Permitrootlogin instead of Yes to save the exit, restart the SSH service, you can use the root account login.

sudo service ssh restart

17. Install the phpMyAdmin (preferably installed, easy to operate and set the remote login account behind)

sudo apt-get install phpMyAdmin

18. The installation process will be prompted to enter the password, etc., direct input, the installation is completed by default in the/usr/share/phpmyadmin directory, in order to enable us through the Web Access, here need to establish a soft connection to the Apache default directory

sudo ln-s/usr/share/phpmyadmin/var/www/html/pma

Here we have established a PMA soft connection pointing to the actual phpMyAdmin directory.

19. Turn on MySQL remote access permission,

sudo vim/etc/mysql/my.cnf

Find Bind-address, comment out it, save exit, then log in to phpMyAdmin, create a new user in permissions

20. Finally restart the MySQL service

sudo service MySQL restart

Website: http://www.linuxidc.com/Linux/2015-03/115136.htm

This article is from the "high-tech blog" blog, please be sure to keep this source http://gpj1997.blog.51cto.com/12830710/1940537

Ubuntu14.04 Building Lamp

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.