In Windows,i used WAMP and adobe dreamweaver. In Ubuntu,i am planning to use bluefish editor. I hear that WAMP server equivalent is LAMP in ubuntu. I need detailed and simple explaination to install LAMP server in ubuntu. I am a beginner,so make it simple as you can.
4 Answers
1. Installing and setting up the LAMP stack
- Open Terminal by hitting Ctrl+Alt+T
- Update the
aptcache and installlamp-server^by runningsudo apt-get update && sudo apt-get install lamp-server^(you should be able to go through the on-screen setup; it's just a matter of setting up themysqlroot password)
2. Installing and setting up PHPMyAdmin
- Open Terminal by hitting Ctrl+Alt+T
- Update the
aptcache and installphpmyadminby runningsudo apt-get update && sudo apt-get install phpmyadmin(you should be able to go through the on-screen setup; it's just a matter of providing themysqlroot password, setting up thephpmyadminpassword and choosing which DBMS you want to configure, i.e.mysql)
3. Setting up Apache for PHPMyAdmin
- Open Terminal by hitting Ctrl+Alt+T
- Add this line (
Include /etc/phpmyadmin/apache.conf) to/etc/apache2/apache2.confby runningecho 'Include /etc/phpmyadmin/apache.conf' | sudo tee -a /etc/apache2/apache2.conf - Restart
apacheby runningsudo service apache2 restart
Finally, test Apache and PHPMyAdmin to see if everything went right;
Test Apache by opening http://localhost in your web browser; if everything went right you should see this:
Test PHPMyAdmin by opening http://localhost/phpmyadmin in your web browser; if everything went right you should see this:
To install these packages in the command-line you can type
sudo apt-get install lamp-server^ phpmyadmin
There is also extensive documentation how to set up a LAMP environment with phpmyadmin at https://help.ubuntu.com/community/ApacheMySQLPHP | https://help.ubuntu.com/14.04/serverguide/lamp-applications.html
Feel free to ask more specific questions if you feel stuck somewhere in the process.
- 576
Run those commands:
sudo apt-get update
Install apache:
sudo apt-get install apache2
You can test apache2 is working by directing your browser to http://localhost , you should see "it works" output.
Install PHP:
sudo apt-get install php5 libapache2-mod-php5
Restart apache2 now:
sudo service apache2 restart
To test PHP now create a file testphp.php under the web root directory /var/www
sudo gedit /var/www/testphp.php
Then add this line:
<?php phpinfo(); ?>
Save and close the file, then open you're web browser direct your browser to: http://localhost/testphp.php
you should see a page showing the php information .
Install Mysql:
sudo apt-get install mysql-server
Optional you may need to install a program called phpMyAdmin which is an easy tool to edit your databases.
sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
- 87,123
You might also want to look at setting up a VirtualBox environment for PHP development. This way you keep your host OS free from server packages but you can still do all development on your own PC with the shared folder functionality. :)
- 2,736

