How to Install LAMP in Ubuntu 14.04

29
1. Installation of Apache

description

Hello Everyone, How to Reset New Root Passwd or Fix Broken Sudo....... Errors that you are getting.......... Error 1:- you may notice an error saying you're not in the sudoers file and the incident is going to be reported. Error 2:- sorry user usuario is not allowed to execute '/usr/bin/passwd root' as root on. Cause and symptoms :- the /etc/sudoers file has been altered to no longer allow users in the admin group to escalate privilege the permissions on the /etc/sudoers file are changed to something other than 0440 a user who should not have been has been taken out of the admin group. By above error and cause can be done by following steps..... To Reset Root Passwd step1 :- Restart your server or desktop step2 :- press continue shift untill boot menu show step3 :- select ubuntu generic second option press Enter step4 :- then select root shell press Enter step5 :- type mount -o rw,remount / step6 :- sudo passwd root or passwd root assign passwd and then repeat again the same passwd Note :- inplace of root you can set your name,hostname any name that u assign during installation OR Login. You can also Create NEW USER step7 :-sudo adduser ubuntu and give new passwd Thanking You

Transcript of How to Install LAMP in Ubuntu 14.04

Page 1: How to Install LAMP in Ubuntu 14.04

1. Installation of Apache

Page 2: How to Install LAMP in Ubuntu 14.04

Hello Everyone,

In this tutorial,

let us Install LAMP Server (Apache, MySQL, PHP) on Ubuntu 12.04/14.04 Server.

Page 3: How to Install LAMP in Ubuntu 14.04

What is Lamp?

LAMP is a combination of operating system and open-source software stack. The acronym LAMP

is derived from first letters of Linux, Apache HTTP Server, MySQL or Maria DB database, and

PHP/Perl/Python.

Page 4: How to Install LAMP in Ubuntu 14.04

What is Apache ?

Apache is an open-source multi-platform web server. It provides a full range of web server features including CGI, SSL and virtual domains.

Website link for Apache: httpd.apache.org/

Page 5: How to Install LAMP in Ubuntu 14.04

I'm running all the steps in this tutorial with root privileges, so make sure you're logged in as

ROOT

Page 6: How to Install LAMP in Ubuntu 14.04

Update Ubuntu repositories by giving the below command

Page 7: How to Install LAMP in Ubuntu 14.04

sudo apt-get update & sudo apt-get upgrade -y

Page 8: How to Install LAMP in Ubuntu 14.04

sudo apt-get install apache2

Page 9: How to Install LAMP in Ubuntu 14.04

Testing for Apache Working or Not

http://localhost/ or http://server-ip-address/.

Page 10: How to Install LAMP in Ubuntu 14.04

2. Installation of MySQL

Page 11: How to Install LAMP in Ubuntu 14.04

What is MySQL ?MySQL is a relational database management system (RDBMS) that runs as a server providing multi-user access to a number of

databases, though SQLite probably has more total embedded deployments.

Website link MySQL: http://www.mysql.com/

Page 12: How to Install LAMP in Ubuntu 14.04

sudo apt-get install mysql-server mysql-client or

sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql

Page 13: How to Install LAMP in Ubuntu 14.04

You can verify the MySQL server status using command sudo service mysql status

Sample output:mysql start/running, process 3470

Page 14: How to Install LAMP in Ubuntu 14.04

3. Installation of PHP

Page 15: How to Install LAMP in Ubuntu 14.04

What is PHP ?

PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely used open-source general purpose scripting language that is especially suited for web development and can be embedded into HTML. Website phpMyAdmin: www.phpmyadmin.net

Page 16: How to Install LAMP in Ubuntu 14.04

sudo apt-get install php5 php5-mysql libapache2-mod-php5

Page 17: How to Install LAMP in Ubuntu 14.04

Test PHP Create a sample “testphp.php” file in Apache document root folder.

sudo nano /var/www/html/testphp.php

Add the following lines.<?phpphpinfo();?>

Page 18: How to Install LAMP in Ubuntu 14.04

Restart apache2 service:sudo service apache2 restart or /etc/init.d/apache2 restart

Page 19: How to Install LAMP in Ubuntu 14.04

Testing testphp(e.g. localhost:testphp or http://192.168.0.100/testphp.php)

If you want to install all php modules enter the command

sudo apt-get install php* and restart the apache2 service.

Page 20: How to Install LAMP in Ubuntu 14.04

To verify the modules, open web browser and navigate to

http://server-ip-address/testphp.php. You will able to see all installed php modules

Page 21: How to Install LAMP in Ubuntu 14.04

3. Installation of phpMyAdmin

Page 22: How to Install LAMP in Ubuntu 14.04

phpMyAdmin is a free open-source web interface tool used to manage your MySQL databases. It is available in the Official Debian repositories.

Page 23: How to Install LAMP in Ubuntu 14.04

sudo apt-get install phpmyadmin

Page 24: How to Install LAMP in Ubuntu 14.04

Web server to reconfigure automatically: <-- apache2Configure database for phpmyadmin with dbconfig-common? <-- yesEnter MySQL application password phpmyadmin < --- 123456

Page 25: How to Install LAMP in Ubuntu 14.04

Afterwards, you can access phpMyAdmin under:- http://192.168.0.100/phpmyadmin/

Page 26: How to Install LAMP in Ubuntu 14.04

How to change MYSQL root Passwd

Page 27: How to Install LAMP in Ubuntu 14.04

Once you have installed MySQL, we should activate it with this command

sudo mysql_install_dbsudo /usr/bin/mysql_secure_installation

Page 28: How to Install LAMP in Ubuntu 14.04

The prompt will ask you for your current root password.

Go ahead and choose N and move on to the next steps

Remove anonymous users? [Y/n] yDisallow root login remotely? [Y/n] y

Remove test database and access to it? [Y/n] yReload privilege tables now? [Y/n] y

Now you can manage your MySQL databases from phpMyAdmin web interface

Page 29: How to Install LAMP in Ubuntu 14.04

That’s it. Your LAMP server is up and running now.

NOTE :- For Any Clarification Please Comment Below

Watch Next Video :- see How to Install Ubuntu Server 14.04 https://www.youtube.com/watch?v=PiKchOXHwpE&list=PLmMAzSMza_1f4b8Keim51-9LfKBU28pWf

Thanking You Hope U Like it........