In my UNIX class, I've been tasked with the following:
"Create a file and web server using Ubuntu 15.10, VSFTPD, and Apache2. Install antivirus. Upload a file on VSFTPD and a webpage on Apache2. Create 5 users, and make sure your users are able to access both the file and web server."
First, I will note that I have been working on this in the lab at my school - you will certainly need to have a network set up for this to work, whether it's simply a hard wired connection or a more sophisticated setup.
Let's start. :)
1. Install Ubuntu
I am using Ubuntu 15.10 server edition in 64 bit. Using server edition means that the GUI will not be installed on the server itself, which saves time and resources (GUIs are usually not installed on servers for this exact reason). Using a different Linux/UNIX distribution will be very similar.
1.1 Create a LiveCD or LiveUSB. Documentation on how to do this is abundant through the Ubuntu website.
1.2 Once you've created your installation media, place the CD or USB into the appropriate drive, and restart the computer you are using for the server.
1.3 Options selected during the installation process - obviously, change the options based on your preferred language and location:
You will be asked to enter your password at times when you use the sudo command. The most important thing to note here is that "sudo" means "super user do". This command allows you to perform administrative tasks on your system without logging in as root, and is slightly safer to use than root for novices.
"Create a file and web server using Ubuntu 15.10, VSFTPD, and Apache2. Install antivirus. Upload a file on VSFTPD and a webpage on Apache2. Create 5 users, and make sure your users are able to access both the file and web server."
First, I will note that I have been working on this in the lab at my school - you will certainly need to have a network set up for this to work, whether it's simply a hard wired connection or a more sophisticated setup.
Let's start. :)
1. Install Ubuntu
I am using Ubuntu 15.10 server edition in 64 bit. Using server edition means that the GUI will not be installed on the server itself, which saves time and resources (GUIs are usually not installed on servers for this exact reason). Using a different Linux/UNIX distribution will be very similar.
1.1 Create a LiveCD or LiveUSB. Documentation on how to do this is abundant through the Ubuntu website.
1.2 Once you've created your installation media, place the CD or USB into the appropriate drive, and restart the computer you are using for the server.
1.3 Options selected during the installation process - obviously, change the options based on your preferred language and location:
- English
- Install Ubuntu
- English - English
- United States
- Do not auto detect keyboard! (For me, the keyboard was incorrectly identified.)
- English (US) X2
- Enter Hostname (This will be the name of your server on the internal network.)
- Enter user account name (This will be the name of the default administrative user on your server - BE SURE TO REMEMBER THIS! YOU WILL NEED TO ENTER IT TO LOGIN LATER.)
- Select a password (the longer, the better!)
- Do NOT encrypt the home directory (Although you would want to do this in an enterprise setting to improve security, for the purposes of exploring the environment here, we're keeping things simple for now.
- Select Timezone (local is usually the way to go)
- Select YES to unmount partitions. This allows your newly installed operating system to use all the resources available on the machine.
- Select "Guided - use entire disk". Again, we're keeping things simple. No manual installation, no LVM, etc.
- Enter to select your primary disk.
- YES to write changes to disk (otherwise, it won't install!)
- Enter your proxy if you use one, otherwise leave it blank.
- I selected to perform manual updates to get more practice using command line and checking for updates. Your call.
- Use <Spacebar> to select OpenSSH Server, <Enter> to finish.
- Select YES to use GRUB.
- Remove media to continue, reboot your computer.
2. Run updates, Install Anti-Virus, Install VSFTPD and Apache2
If you're new to this stuff, the installation process is much easier than it sounds. Configuration is where things get interesting. :)
- Login to your server using the user account name and you chose during installation, press enter.
- Enter the password you selected during installation.
- Wait a moment for the system to initialize. You will be given a command line prompt that will look like this:
- username@hostname
2.1 Go to the root of the directory. By default, you will login to the "home" directory, which is not the same as the root directory. To access the root directory, type the following command and press enter, twice:
cd ..
This means "change directory", and takes you to the directory next closest to the root directory each time you enter it.
When you have successfully reached the root directory, your prompt will appear as username@hostname:/$. The prompt gives you clues to let you know where you are in the directory.
When you have successfully reached the root directory, your prompt will appear as username@hostname:/$. The prompt gives you clues to let you know where you are in the directory.
2.2 Apply updates to the OS. This includes patches to known security issues, so it's pretty important. To do so, type the following command:
sudo apt-get update
You will be asked to enter your password at times when you use the sudo command. The most important thing to note here is that "sudo" means "super user do". This command allows you to perform administrative tasks on your system without logging in as root, and is slightly safer to use than root for novices.
2.3 Install antivirus. Even though Linux is less targeted by viruses, it still happens. I don't recommend running any system without some kind of anti-malware. Here, we're using ClamAV.
sudo apt-get install clamav clamav-daemon
2.2 Install VSFTPD. This is your file server. VSFTPD stands for Very Secure File Transfer Protocol Daemon. It's the most secure FTP server I'm aware of at the time of this writing.
sudo apt-get install vsftpd
2.3 Install Apache2. Apache web servers have been around for quite a while, and there is excellent documentation available at www.apache.org.
sudo apt-get install apache2
Voila! You have now created a web and file server! Unless you have some very unusual computing needs, it almost certainly doesn't actually do what you will want or need it to do. But take a moment to enjoy your accomplishment. :)
sudo apt-get install vsftpd
2.3 Install Apache2. Apache web servers have been around for quite a while, and there is excellent documentation available at www.apache.org.
sudo apt-get install apache2
Voila! You have now created a web and file server! Unless you have some very unusual computing needs, it almost certainly doesn't actually do what you will want or need it to do. But take a moment to enjoy your accomplishment. :)
No comments:
Post a Comment