Ubuntu14.04 build LAMP and ubuntu14.04lamp
First let me talk about my system version, I used the image file is: ubuntu-14.04.2-desktop-amd64.iso, why do I want to say so carefully, because every time I install wubantu, the problems are different, it is estimated that the version of the image file is different, and the software source is more or less different.
First, update your software source, enter the command, and then enter the password.
buzhidao@nongfushanquan-K55VD:~$ sudo apt-get update [sudo] password for buzhidao:
Then enter
buzhidao@nongfushanquan-K55VD:~$ sudo apt-get upgrade
If there is any dependency or error in the update, use the following command:
buzhidao@nongfushanquan-K55VD:~$ sudo apt-get -f install
The so-called LAMP is actually linux + apache + mysql + php,
Install apache
buzhidao@nongfushanquan-K55VD:~$ sudo apt-get install apache2
Install mysql
buzhidao@nongfushanquan-K55VD:~$ sudo apt-get install mysql-server
Install php
buzhidao@nongfushanquan-K55VD:~$ sudo apt-get install php5
Now we have installed it, but we do not have the write permission in the/var/www/html folder, so we need to modify the File Permission.
Buzhidao @ nongfushanquan-K55VD :~ $ Su root Password: root @ nongfushanquan-K55VD:/home/buzhidao # cd/root @ nongfushanquan-K55VD:/# chmod 777 varroot @ nongfushanquan-K55VD:/# cd var/root @ nongfushanquan-K55VD: /var # chmod 777 wwwroot @ nongfushanquan-K55VD:/var # cd www/root @ nongfushanquan-K55VD:/var/www # chmod 777 html
Then you can create a PHP file under the/var/www/html/folder. The environment is complete.
- How does ubuntu use the root stamp here?
- How to install mysql in ubuntu?
When installing the software in ubuntu, you may not have the software source, so when installing the software, I personally prefer to use the Tab key,
For example, if you want to install mysql, you can
Buzhidao @ nongfushanquan-K55VD :~ $ Sudo apt-get install mysql and press the Tab twice to display the mysql-related software name, these are the mysql-client mysql-mmm-monitor mysql-source-5.6mysql-client-5.5 mysql-mmm-tools mysqltclmysql-client-5.6 mysql-proxy mysql-testsuitemysql-client-core-5.5 mysql-server mysql-testsuite-5.5mysql-client-core-5.6 mysql-server-5.5 mysql-testsuite-5.6mysql-common mysql-server-5.6 mysqltunermysql-common-5.6 mysql-server-core-5.5 mysql-util Itiesmysql-mmm-agent mysql-server-core-5.6 mysql-workbenchmysql-mmm-common mysql-source-5.5 mysql-workbench-databuzhidao @ nongfushanquan-K55VD :~ $ Sudo apt-get install mysql