Linux

The Complete Illustrated Step by Step Guide to Creating an Ubuntu LAMP Server Part 3

Tuesday, July 27th, 2010 | How-To, Linux | No Comments

Part 3 – Secure and Update your installation.

We are now going to secure and update your server through webmin. Also we are going to add a firewall.

  1. Login to your server from another browser https://[hostname/ipaddress]:10000 (by default only SSL is supported, also you will probable get a message to accept the certificate.)
  2. We are first going to update all the packages installed. Go to System -> Software Package Updates -> Scroll down and select Select all -> then Update Selected Packages.
  3. Click Install Now. You can now watch as it updates.
  4. Now it’s time to restrict who can access webmin. Go to Webmin -> Webmin Configuration -> IP Access Control
  5. Change the setting to “Only allow from listed addresses”. In the box put in your IP addresses you will be managing the server from. Here I have my local LAN and using no-ip’s dynamic DNS server I have a laptop that will allow me to manage the server from outside the network (My laptop will update that DNS address and my server will grab the latest address when I login to verify). If you are using a system like mines (Dynamic DNS) you would also want “Resolve hostnames on every request?” enabled. Then Click Save.
  6. Now that Webmin is secure let’s now add a firewall. Go to Network -> Linux Firewall -> Then select “Allow all traffic”, Checkmark “Enable firewall at boot time?”, and Finally Setup Firewall.
  7. This will enable the firewall. Now it’s time to make some rules. First under “Incoming packets (INPUT)” click Add Rule.
  8. The first rule is for Webmin Then make another one for the Web Server. You will need to do something like this.
    Rule Comment: “Webmin”
    Action to take: “Accept”
    Network protocol: “Equals” “TCP”
    Destination TCP or UDP port: “Equals” “Port(s) 10000”

    Rule Comment: “Web Server”
    Action to take: “Accept”
    Network Protocol: “Equals” “TCP”
    Destination TCP or UDP Port “Equals” “Port(s) 80”

  9. Repeat 7-8 for other ports you will need like Port 80 for the web. Then change the default action for “Incoming Packets (INPUT)” to “Drop” and Click “Set Default Action To:”
  10. Click Apply Configuration at the bottom. If you did everything right you should not be clicked out of your server. We are also done, continue on to configure install the LAMP components.

 

 

› Continue reading

Tags: , ,

The Complete Illustrated Step by Step Guide to Creating an Ubuntu LAMP Server Part 2

Tuesday, July 27th, 2010 | How-To, Linux | No Comments

Part 2 – Webmin Installation.

Next step is we are going to configure management tools. I personally like webmin to manage my servers. It’s easy, effective, and secure.

  1. Login to your Ubuntu system.
  2. We’re going to have to prepare a bit before we can actually start downloading Webmin. First type in “sudo apt-get update”. This will prompt you for your password again enter and continue on.
  3. After it updates run “sudo apt-get install apt-show-versions perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl libapt-pkg-perl” to download the dependencies.
  4. Grab the file online using “wget http://prdownloads.sourceforge.net/webadmin/webmin_1.510-2_all.deb” or check out their website.
  5. Install the package using the command “sudo dpkg –I webmin_1.510-2_all.deb”
  6. Now that it is all setup, it’s time to check it out. From another computer on the same network go to https://[IPaddress or hostname]:10000. You’ll get an error like this to which you just need to click continue to this website (IE) or I understand the risks -> Add Exception… (Firefox)
  7. Login and you are done installing Webmin.

› Continue reading

Tags: , ,

The Complete Illustrated Step by Step Guide to Creating an Ubuntu LAMP Server Part 1.

Monday, July 26th, 2010 | How-To, Linux | No Comments

Part 1 – Basic Linux Installation.

Hello, I’m going to go over how to create a basic LAMP server, a Backup plan for that LAMP server and some basic guide to maintain the server.
First step is we are going to use Ubuntu as the Linux distro, specifically the Ubuntu Server edition. It can be found here, http://www.ubuntu.com/server/get-ubuntu/download. So burn the iso and pop it in. Screenshots are on the bottom.

  1. Going through all the menus first you have the Language Selection
  2. Main Menu, Choose Install Ubuntu Server
  3. Another Language Selection Screen
  4. Region Selection,
  5. Keyboard selection screen (you can do automatic and follow the prompts, I just choose US keyboard as I know my own keyboard).
  6. Here you can enter the hostname. I personally used something I can remember anything works but it’s nice if it’s something meaningful so you can easily identify the computer on the network.
  7. Check the timezone.
  8. How you would like to partition the disk. I picked Guided – with LVM.
  9. Select the disk,
  10. Agree to the changes,
  11. I’ll let LVM handle any volumes I’ll make so I don’t need to split up the partition. As such I just let it use max
  12. I agree to write changes again,
  13. › Continue reading

Tags: , ,