In this quick post I will show you how to install a LAMP server on Linux Mint using apt-get to make the entire process automatic and easy. I will also show you how to quickly install phpMyAdmin and Sendmail to make it possible for your scripts to send emails if you need them to.
Installing LAMP on Linux Mint 13 | Maya | KDE | XFCE
1. Install Apache2 on Linux Mint using apt-get.
sudo apt-get install apache2
2. Install PHP and the module enabling Apache to work with PHP using apt-get.
sudo apt-get install php5 libapache2-mod-php5
3. Install MySQL Server and set root MySQL user password with the following command, it will automatically prompt you for the password during installation.
sudo apt-get install mysql-server
4. Install Sendmail or phpMyAdmin with the 2 following commands. (I read something about Sendmail not being used that much anymore but it does the job if this is just for web development or something similar, when I installed with the following command it worked right away however you may need to restart Apache.)
sudo apt-get install phpmyadmin
sudo apt-get install sendmail
5. Restart Apache with the following command to ensure everything works properly.
sudo /etc/init.d/apache2 restart
6. Create a quick php test script that uses the phpinfo() function to test your server with. After running this command simply open up Firefox or Chrome and go to http://127.0.0.1/index.php or http://localhost/index.php.
sudo echo “<?php phpinfo(); ?>” > /var/www/index.php
If this post helped you get a LAMP server running on Linux Mint please don’t forget to share/comment, if I missed anything also please let me know so I can learn as-well as update this post.
Incoming search terms:
- lamp linux mint
- linux mint server
- apache web server for xfce
- linux mint lamp
- install lamp linux mint
- mint server
- mint lamp
- install lamp linux mint 13
- install lamp on linux mint
- install lamp mint

I received a brand new MintBox Pro in the post today, with Mint 13 preinstalled. I set myself up as administrator, and started to set it up. I followed your instructions and installed all the ‘AMP’ stack and sendmail as you described.
But.. At the final point of:
sudo echo “” > /var/www/index.php
I get the dreaded:
‘bash: /var/www/index.php: Permission denied’
message..
I opened gedit, tried that way, same ‘you don’t have permission’ message..
In the terminal, opened gedit via sudo gedit saved the file ok as index.php. Went to http://localhost/index.php and apache returned the php information. Great!
I looked at the properties of the var/www/ folder, it is owned by root, and I can’t change the permissions on that. I need to now go see why.. Any thoughts?
Thanks,
I just chmodded /var/www/ folder to 777 so my actual user account could modify files and everything easier without sudo being involved, its still owned by root at the time and I don’t know if changing that would be a good idea? It can’t hurt to try using chown if you really wanted to since you could just change it back if something goes wrong. I am still learning myself so I hope this would change the permission to what you are trying to do.
[...] http://alinuxblog.com/linux-mint/install-lamp-server-linux-mint-13-maya-kde-xfce.htm Leave a Comment TrackBack URI [...]
A plain, easy to understand tut. Under some circumstances you might want to change that 777
http://www.elated.com/articles/understanding-permissions/