User Rating: / 8
PoorBest 

Bookmark and Share

If you are new to Unixmen, you may want to subscribe :

linuxmint-logoLAMP (Linux, Apache, MySQL and PHP) is an open source Web development platform that uses Linux as operating system, Apache as the Web server, MySQL as the relational database management system and PHP as the object-oriented scripting language.
In this Simple tutorial we will explain you how to install LAMP server on your LinuxMint7 Gloria
The installation will be done in 3 steps:
Apache, PHP and MySQL, after that we will install phpmyadmin the administration software tool for MySql.

1- Apache2 installation

sudo apt-get install apache2  

to check that Apache has been installed without problems, go to your browser and type

 http://localhost

if everything is correct you will see the message :

It works

Now we will go and try to install PHP5

2- PHP5 and dependencies installation:

sudo apt-get install php5 libapache2-mod-php5 

A restart of apache2 is needed to make this one see PHP5, to restart apache2 use the command:

sudo /etc/init.d/apache2 restart

3- MySql Installation :

To install MySql type the command

sudo apt-get install mysql-server  

During the installation you will got this screen (package configuration) to set root password for MySql, enter your password and retype it

if you diden`t got the screen to setup root password for mysql then you have to do it manually, to setup root password for mysql :

mysql -u root
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('YOURPASSWORD');   

Don`t forget to change YOURPASSWORD with the password you want to use The basic installation of LAMP is ready. Now we will install phpmyadmin,

phpMyAdmin is a free graphical software tool to handle the administration of MySQL, this will make it easy for you to create, import/export and delete

databases. Install phpmyadmin using the command:

 

sudo apt-get install phpmyadmin  

During the installation a blue screen will appear asking you which server you want to use apache, apache2 …. choose then apache2 and click ok

Then you will be asked to set a password for your phpmyadmin

 Type the password and retype it

Now  is done, Point your browser to: http://domain/phpmyadmin you will got this screen

Pic

if you diden`t receive any screen of psckage configuration during the installation of phpmyadmin then you will have

To set up phpmyadmin under Apache manually, all you need to do is include the following line in /etc/apache2/apache2.conf, first type the following command to open up this file:

sudo gedit /etc/apache2/apache2.conf

Add the following line of code inside apache2.conf:

Include /etc/phpmyadmin/apache.conf

Now restart Apache:

sudo /etc/init.d/apache2 restart

and is done, now Point your browser to: http://domain/phpmyadmin (see pic above)

If you have any problem please report it .Thanks.


Related Articles By Tags:

Comments (23)
  • craig b  - Home Network Question
    avatar

    Tks for the post, great info, very easy to follow.

    I have a small home network, a XP laptop, a desktop with linux mint 7 and I've added an old desktop (running Linux Mint 7) on which I've added LAMP, how can I get the other computers to access the LAMP install through their browsers.

    Tks

  • pirat9
    avatar

    to access LAMP from other machine :
    For example the Linux ip is 192.168.1.2
    from other PC:

    http://192.168.1.2
    to acces you phpmyadmin page

    http://192.168.1.2/phpmyadmin

  • aFriend  - THANKS
    avatar

    Thank you very much for your Help!

    You are good!

  • dixon
    avatar

    What about tasksel? It's much easier with tasksel. Just type sudo tasksel and select LAMP to be installed and there you go :)

  • walterav  - last step gives error
    avatar

    Hi,

    I tried your 'howto' on linux mint 7 in vmware, but I as soon as selected apach2 in the phpyadmin setup, I get another screen asking "configure phpmyadmin with dbconfig-commen" If I do no, the installation finished but than it doesn't work.
    If I do yes, I can choose a password but than it gives an error when going on.

    "error 1045:28000" access denied for user root@localhost.

    My server is running at 127.0.1.1 is that the problem?

  • pirat9
    avatar

    Your mysql-serer is not yet configured.

    mysql -u root -p
    and try if you can login

  • walterav
    avatar

    Thanks for the quick reply, the mysql server was running, but during the setup I just didn't understand why I need to enter the password 3 times!

    1 is for the mysql database already configured one step before, and the other 2 are new passwords for the myphpadmin interface...

    I just typed the wrong password therefor it wasn't able to connect to the mysql server.

    BtW I noticed that allot of these servers are running as root, can I change that easily, because its not safe for a commercial environment...

    any links?

  • mrfedex
    avatar

    :D Awesome tutorial, exactly what I was looking for.

  • urio  - i try to insatll, but it fail in configuration of
    avatar

    help me to configure phpmyadmin i try but fail in all two alternative

  • zinovsky
    avatar

    Ok, try to install phpmyadmin from the package manager and see if it work :)

  • Pradna
    avatar

    thanks for tutorial, but on me is : "404 Not Found"
    i think phpmyadmin is correctly install on my laptop and apache (localhost) is works.

    Thanks.

  • Pradna
    avatar

    beg me pardon,
    i not read carefully this tutorial (in this section :sudo gedit /etc/apache2/apache2.conf)(worship)...
    and now phpmyadmin is work :D

    Thanks

  • Rob  - Works perfectly for me
    avatar

    Just setting up my first linux install.
    This worked great thanks :D

  • fennilyn  - Can't make it work
    avatar

    At the last part, I typed this:
    sudo gedit /etc/apache2/apache2.conf

    But i got this error
    sudo: gedit: command not found

    Why? Please help :cry:

  • fennilyn
    avatar

    Ooopss. Sorry, I forgot to change the domain word with my IP address. Its working fine.... :oops:

  • df
    avatar

    Where do I save my PHP files?

  • Jon  - Thanks a bunch.
    avatar

    Excellent work mate. :)

  • Artur
    avatar

    Thanks, Just installed on Mint 9. Worked great.

  • fraser  - can't log in
    avatar

    I get an error message "# 1045 cannot log in to the mysql server"

    Help!!!!

  • linux novice  - very easy and straight-forward instructions
    avatar

    Thank you for this install guide for LAMP. You do a very good job of outlining all the commands.

    Sincerely,
    Novice

  • Trin Calway  - Error: Could not reliably determine the server's f
    avatar

    Hi - quick fix for an issue I had ...

    If you get:

    Code:
    * Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
    ... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

    To fix that problem, you need to edit the httpd.conf file. Open the terminal and type,

    Code:
    sudo gedit /etc/apache2/httpd.conf

    By default httpd.conf file will be blank. Now, simply add the following line to the file.

    Code:
    ServerName localhost

    Save the file and exit from gEdit.

    Finally restart the server.

    Code:
    sudo /etc/init.d/apache2 restart

    This fix is from here

    He has some other good tips for LAMP/Python.
    Cheers!

  • Zinovsky
    avatar

    Thanks for the tip:)

  • Trin Calway  - Thank you!
    avatar

    Thank you for the walk through! One of the best things about Linux is knowing that someone will have taken their time to help others learn.
    Cheers,
    Trin

Write comment
Your Contact Details:
Gravatar enabled
Comment:
[b] [i] [u] [s] [url] [quote] [code] [img]   
:D:):(:0:shock::confused:8):lol::x:P:oops::cry:
:evil::twisted::roll::wink::!::?::idea::arrow: