Last night, i was thinking of configuring LAMP on my UbuntuBox. LAMP is an open source Web development platform that uses Linux as the operating system, Apache as the Web server, MySQL as the relational database management system and PHP as the object-oriented scripting language. (Sometimes Perl or Python is used instead of PHP.) Because the platform has four layers, LAMP is sometimes referred to as a LAMP stack. Stacks can be built on different operating systems. Developers that use these tools with a Windows operating system instead of Linux are said to be using WAMP; with a Macintosh system, MAMP; and with a Solaris system, SAMP.
I tried the following and got success:
Open terminal and typed:
neeraj@nee-pc:~$ sudo apt-get install lamp-server^
The total size downloaded was 43 mb approx and took about 20 minutes.
let us see, whether the installation succeeded??
open Firefox and type
If the browser displays "It Works", means the installation is successful.
type in the terminal the following
neeraj@nee-pc:~$ sudo gedit /var/www/testphp.php
and type in the following code:
Save and close the file and restart Apache by:
neeraj@nee-pc:~$ sudo /etc/init.d/apache2 restart
Open the browser and put http://localhost/testphp.php in the addressbar, hit enter and if you see the following, php has been successfully installed.
Next is the turn of MySQL:
MySQL has to be bound with the localhost so type in the following to check whether the bind-address is 127.0.0.1?
neeraj@nee-pc:~$ gksudo gedit /etc/mysql/my.cnf
I also installed phpMyAdmin which is optional:
open terminal and type
neeraj@nee-pc:~$ sudo apt-get install libapache2-mod-auth-mysql phpmyadmin
After this type in:
neeraj@nee-pc:~$ sudo ln -s /usr/share/phpmyadmin/ /var/www/phpmyadmin
type in http://localhost/phpMyAdmin in the addressbar of your browser and you get the following homepage:
Log in with the MySQL accoun and you are done. I forgot the password and hence tried the following:
sudo dpkg-reconfigure mysql-server-5.0
to reset the MySQL Password.
Now, everything’s peachy. 🙂