Getting your Linux server running can be a troubling experience for beginners, but it doesn’t have to be difficult. We have a number of articles written in our community that go over the basics of getting set up on a server.
In this guide, we’ll leverage some of those articles to get you up and running by pointing you to some of the common procedures that users implement to get their site up quickly.
Before you can do anything else, you need to deploy a server. This is very simple using DigitalOcean, but we have a guide to walk you through the process in case you’re still unsure.
For consistency, in this guide, we’re going to be using the Ubuntu 14.04 distribution for our operating system. This can be either 32-bit or 64-bit. You can get the details by following our getting started with DigitalOcean tutorial. Just select Ubuntu 14.04 when given the option.
Once your server is up and running, there are some standard procedures that you should complete in order to build a good foundation. We call this our initial server setup.
You should go through this guide before continuing, especially steps 1-4. This will show you how to get logged in, create a regular user account, and give that user administrative privileges.
After you get your account created and configured, we can move on to the actual web server software.
One of the most popular ways to serve content on the internet is through a set of components known as the “LAMP” stack. This is an acronym that stands for a Linux operating system, the Apache web server, a MySQL database, and a PHP script processor. These components work together to allow you to serve a dynamic website or application.
You can learn how to install a LAMP stack on Ubuntu 14.04 by following this guide. It may look complicated, but follow each step carefully and you should have it up and running in no time.
Once you have your LAMP stack installed, your server is ready to start serving web content. However, right now, you can only access it using the server’s public IP address.
We can set up a domain name (like
example.com) so that visitors can access our site easier. You’ll need to purchase your desired domain name from a domain name registrar, and then come back here to continue.
When you have a domain name, you can follow this guide to learn how to point your domain name to your server. The changes you make may take awhile to propagate, but you can move on to the next step while this happens.
After you have installed and configured your server software, and you have a domain name set up pointed to your server, you can copy your website files to your server.
The best way to do this is probably by using an SFTP client. SFTP is a protocol that leverages the SSH protocol in order to securely transfer files to and from remote computers. What all of this means is that you can use it to transfer your files in a secure fashion.
There are many SFTP client programs and FTP clients with SFTP capabilities. One option is to connect to your remote server using the sftp command line utility like this guide shows.
If you’d rather use a graphical client, there are many options. One popular choice is Filezilla. You can follow this guide to learn how to use Filezilla with SFTP.
You want to place your files into a directory called the “document root” of the server. For Ubuntu 14.04, the document root is at
/var/www/html by default. Place your files there.
When you are finished (provided that your domain name has been updated around the world), you should be able to access your site in your web browser.
If you have gotten this far, your site should be off and running. If your web files require extra components or are doing something outside of the norm, you may have to do some additional configuration. But simple sites should work without any additional steps.
If you want to leverage the capabilities of something like WordPress, we have an article that you can use to get started with WordPress on Ubuntu 14.04. There are many other possibilities and enhancements that you can make to your site to make it better. Check out the other articles in our community to get some more ideas.
<div class=“author”>By Justin Ellingwood</div>
Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.