A couple of my items. Click to view more. I think you need something like this
 

 

22

2008-01-16

Installing Ubuntu Server LAMP, SSH, FTP, Webmin and phpMyAdmin for a newbie

I’m not interested in using Linux for my desktop, Gnome and KDE really don’t do it for me and Windows XP is doing me fine – though I am looking forward to moving my studio onto a Mac Pro. Another big reason Linux as a desktop isn’t for me is that Adobe’s Creative Suite 3 does not, and won’t by the looks of things, support any flavor of Linux.

I’m after a new Server environment. I’m in the process of switching from Classic ASP (ASP3) over to PHP5. I’ve been using MySQL religiously for my dev work. But what I really want access to is the speed and reliability of Apache and PHP running on Linux. Also the chmod in ftp will save SO MUCH TIME when setting up blogs or any other site that requires permission changes.

So it’s time to learn – and by learning I mean command lines. Back to the good ‘ol DOS days.

I found Ubuntu 7.10 Server to be the solution for me. Why? Because a) It’s built on Debian and 2) they are the best at marking their flavor of Linux and bringing it to the attention of us Windows users.

Also a great feature that I found is that in around 15 minutes you can have a LAMP (Linux, Apache, MySQL and PHP) server up and ready to go! You just select it during installation!

The LAMP option means you don’t have to install and integrate each of the four separate LAMP components, a process which can take hours and requires someone who is skilled in the installation and configuration of the individual applications. Instead, you get increased security, reduced time-to-install, and reduced risk of misconfiguration, all of which results in a lower cost of ownership. New pre-configured installation options have been added to the Ubuntu Server. Mail Server, File Server, Print Server, and Database Server options join existing LAMP and DNS options for pre-configured installations, easing the deployment of common server configurations.

Here’s what will be installed

  • Ubuntu Gutsy Gibbon 7.10
  • Apache 2.2.4
  • Mysql 5.0.45
  • PHP 5.2.3

Installing Ubutnu Server I found to be really simple and once I did it a couple of times (due to errors on my behalf) I quickly found it even easier to install then Windows 2003 Server


You’ll need to first download Ubuntu Server from http://www.ubuntu.com/getubuntu/download. Burn the ISO or mount it in VMWare if you are installing it on a virtual machine. Insert the CD a make sure you BIOS is set to boot from the CD/DVD drive

  1. Select “Install to the Hard Disk”
    ubnuntu_server_16.png
  2. Select your language
    ubnuntu_server_21.png

  3. Select your location
    ubnuntu_server_31.png
  4. Ubuntu Server can try and detect your keyboard layout. For the most people will be using US English. Select No and chose your layout yourself.
    ubnuntu_server_41.png

    Go through the options for your keyboard. The installation will then detect your hardware.
  5. Enter ubuntuLamp or what ever you want to call your Server
    ubnuntu_server_51.png
  6. The installer will detect your Hard Drive. Select “Guided – use entire disk”
    ubnuntu_server_61.png
  7. When you receive the screen title “[!!] Partion Disks” select <Yes> and hit enter
    ubnuntu_server_71.png
  8. Select <Yes> when presented about the system clock
    ubnuntu_server_81.png
  9. Enter in administration for your name

    ubnuntu_server_91.png
  10. Enter in administrator for your username

    ubnuntu_server_101.png
  11. Enter in a secure password (here is a great article on coming up with a secure password that you can remember)
    ubnuntu_server_111.png
  12. When you are presented with the screen [!] Software selection press the down arrow till the “* is in the “LAMP server” box and press space bar. As were also going to be using SSH I also select “OpenSSH server”

    ubnuntu_server_121.png
  13. You’ll be presented with the option to change the MySQL root password. This is highly recommended as the standard password is blank

    ubnuntu_server_131.png
  14. You’re done! Remove the CD from the CD drive and reboot

    ubnuntu_server_141.png
  15. You server is now installed.

    ubnuntu_server_151.png

Next I configure a Static IP.

Log into your server using the details you entered during install. I’m using 192.168.0.150 as my example IP)

Type

sudo su

and enter your password again

Then Type

nano /etc/network/interfaces

If you have typed it out correctly you’ll Also you will see the following:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
 
# The loopback network interface
auto lo
iface lo inet loopback
 
# The primary network interface
auto eth0
iface eth0 inet dhcp

Replace the last 3 lines with the following:

# The primary network interface
auto eth0
iface eth0 inet static
address 172.19.0.10
netmask 255.255.255.0
network 172.19.0.0

Try Ctrl+O to write the file and then press enter

Type Ctrl+X to exit

To set your Nameservers, type

nano /etc/resolv.conf

Enter in your nameservers as required “nameserver xxx.xxx.xxx.xxx”

Type Ctrl+O to write the file and then press enter

Type Ctrl+X to exit

Now you need to restart your network service. Type the following

/etc/init.d/networking restart

You’ve now configured your network interface.

I also wanted to also install Webmin to manage my server remotely as well as SSH but I found that the install instructions on the above site just didn’t work for me. So here is how I installed Webmin on my Ubuntu Server.

You will need to enable the universe and universe and multiverse repositories in the /etc/apt/sources.list (https://wiki.ubuntu.com/AddingRepositoriesCliHowto)

This is also where I started to use Putty and SSH (http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe)

sudo su
mkdir /opt/Webmin
cd /opt/Webmin
wget http://easynews.dl.sourceforge.net/sourceforge/webadmin/Webmin-1.390.tar.gz
gzip -cd Webmin-1.390.tar.gz | tar xvf -
sudo apt-get install libauthen-pam-perl libnet-ssleay-perl libpam-runtime openssl perl perl-modules

Note I had heaps of problems with this command and it was to do with my sources.list file. No matter what I uncommented it just didn’t seam to work. I had to generate a new sources.list file from this site (http://www.ubuntu-nl.org/source-o-matic/) and past that into /etc/apt/sources.list then run sudo apt-get update before the above command would run

 cd Webmin*
./setup.sh

Basically just hit enter and choose SSL and the auto start the service at boot. Use these settings (or change as requried)

Web server port (default 10000): (Feel Free to change this) Login name (default admin): Login password: AReallyGoodONE Password again: AReallyGoodONE Use SSL (y/n): y Start Webmin at boot time (y/n): y

I found that the default instating module for PHP looks for the php.ini file in the Apache directory when it needs to look in the apache2 directory. After instating login into Webmin by visiting https://your-ip:10000 and click on “Other” in the right bar. Then click on “PHP Configureation” You should see that following:

/etc/php5/apache/php.ini=Configuration for mod_php
/etc/php5/cgi/php.ini=Configuration for scripts run via CGI
/etc/php5/cli/php.ini=Configuration for command-line scripts

Change the line /etc/php5/apache/php.ini=Configuration for mod_php to read /etc/php5/apache2/php.ini=Configuration for mod_php and click save

This should have configured the PHP moduble for Webmin for you.

FTP

Now were going to install ProFTPD FTP server.

Login into your Ubuntu Server via SSH, or how ever you wish to access the console, and type:

sudo apt-get install proftpd

When asked if you want to install the server as a inid or standalone, select standalone and continue.

Done! Now if you check back in Webmin under Servers you’ll see ProFTPD Server, if you click on that you should see the ProFTPd options up and running.

Adding a FTP user is done through the “System => Users and Groups” area in Webmin. You just click on “Create a new user” enter in the details and select the home directory to /var/www (make sure you click the check box next to the home directory text box as it stays checked at “Automatic” even once you enter something into the text box.)

Fire up your ftp client and login!

You should now have a working LAMP+F (Linux, Apache, MySQL, PHP and FTP) Ubuntu Server. Next I’ll be looking into securing the server. I’ve read that ProFTPD isn’t the most secure FTP Server to use with Linux, apparently VSFTPD is the way to go there, but for the purpose of simplicity for the first time, and the fact that this is not a live server, rather just a testing box, it’s not such a big deal.

Please post your comments on this, if you find it useful please let me know – anything that needs further clarification tell me – I’m new to Linux as you might be so this is a big change.

This entry was posted on Wednesday, January 16th, 2008 at 10:45 am and is filed under Linux, Tutorial. You can follow any responses to this entry through the RSS 2.0 feed.You can leave a response, or trackback from your own site.

There are 22 Responses to “ Installing Ubuntu Server LAMP, SSH, FTP, Webmin and phpMyAdmin for a newbie ”

1

Gary Flores Says

Setting up the FTP user like that with the default options on proftpd lwt you right in the /var/www/ directory?

I’m having problems with the writing permisions… could you emailme?


2

Jamie Le Souef Says

Hi Gary,

Sorry for the late reply – Only just got back to my blog.

Permissions are a funny thing i’ve found with GNU/Linux and something i’m still getting my head around.

Once I do mate i’ll get something posted


3

jay Says

the title says “Installing Ubuntu Server LAMP,SSH,FTP,Webmin and phpMyAdmin for a newbie” yet i see nothing about phpmyadmin


4

Jamie Le Souef Says

Jay, you are completely right! I’m sorry about that. I’ll write a tutorial on that one today


5

Swerve Says

Worked a treat!

Thanks for the great tutorial, and please do do the ones on the other areas.

Thanks!


6

Jamie Le Souef Says

Thanks Swerve,

I’m glad you liked it. I’m planning on Creating another for setting up phpMyAdmin (which i forgot to finish in this post)

Keep checking back :)


7

Nick Says

Hey… I have installed Webmin a couple of times now and I seem to have an issue with it reporting that Apache is down when it is really working. Any ideas why this might be? Thanks!


8

Jamie Le Souef Says

Hi Nick,

I’m sorry but i have no idea! Never come across that. Try looking in the Ubuntu forums or wiki.

If you find the solution, please post a reply comment :)


9

Daniel Says

I read similar article also named ing Ubuntu Server LAMP,SSH,FTP,Webmin and phpMyAdmin for a newbie -, and it was completely different. Personally, I agree with you more, because this article makes a little bit more sense for me


10

Jamie Le Souef Says

Hi Daniel,

I’m glad you liked it. I’m going to write an update to it soon as I’ve been working with Linux for a while now. Look out for it mate :)


12

The Doctor Says

Why compile Webmin? Put it in your repos to resolve dependencies & use apt-get.

anon says:
January 14, 2009 at 4:44 pm

It’s better practice to not put this in the sources.list file; rather, put it in it’s own file under the sources.list.d directory. I have a file /etc/apt/sources.list.d/webmin.list on my server, containing the following:

# Webmin packages
deb http://download.webmin.com/download/repository sarge contrib

This means that when I want to do a distribution upgrade, I’m not having to do bespoke rules to keep webmin at sarge.

You can also (more elegantly :) ) install the key in this manner:

wget -q http://www.webmin.com/jcameron-key.asc -O – | sudo apt-key add – && sudo apt-get update

source: http://www.ubuntugeek.com/webmin-installation-and-configuration-in-ubuntu-linux.html


13

Jamie Le Souef Says

Thanks for that Doctor! Great comment.


14

Nick H Says

I have already installed and have LAMP running, is it therefore possible to install Webmin on an existing LAMP install, without affecting it?

THanks


15

Jamie Le Souef Says

Hi Gary,

Webmin doesn’t sit within your LAMP stack, it’s a separate apllication that i beleive runs via Python (but i’m not 100% sure there). It will run even if you don’t have a LAMP stack installed as it is designed to manage more than your web tools.

Hope this helps.


16

Jim MacDiarmid Says

Hey Jamie,

Great article! Thanks. Regarding the part where you mention name servers. How do I know this info? I don’t have a name server other than my actual web host.

Thanks,
Jim
.-= Jim MacDiarmid´s last blog ..4th of July =-.


17

Tom Gurney Says

Great walkthrough – thanks for taking the time to do it. Now let’s see if I can actually do as you describe :)


19

Pihu Says

This is a great tutorial. Worked like a charm. Please post other tutorials on installation of subversion with svn, svn+ssh etc.


20

Mike Says

Ubuntu servers are great! They are so reliable. I have been suing them for a couple of years.

One that I found that is probably the easiest to set up is called FreeNAS Its not ubuntu, but still linix. It is easy to install, has a web based gui like webmin, and has all of the thing like apache, FTP samba and the like.


21

Jamie Le Souef Says

i’m sure you’ve been using them.. to suing them ;)

i agree, Ubuntu is great.. but I am thinking of packing up my ubuntu server and replacing it with a Mac Mini server…


22

jonathan chetwynd Says

Jamie,

did you buy the 1Tb mac mini?
did you install ubuntu lamp?

I ask because a howto would be great!

I looked into SLS and the tools look great for some businesses, but not this project…


Leave a Reply

 

recent projects

My Boy (1)

Title : My Boy (1)
Media: Canon EOS 350D DSLR, Adobe Lightroom, Photoshop
Description : A day out in the park with my world.

Tasmania Corrective Services Badge

Title : Tasmania Corrective Services Badge
Media: Adobe Illustrator, Stitch
Description : Badge for the Canine Drug Detection Unit

 

Webb Martin Consulting Website Concept 1

Title : Webb Martin Consulting Website Concept 1
Media: Blog/Website, flash, css, xhtml, php
Description : Website deisgn for Webb Martin Consulting

Webb Martin Website Design Concept

Title : Webb Martin Website Design Concept
Media: Wordpress, CSS, xhtml, php
Description : Concept website design for Webb Martin.

 

 

site tags

 

meta