Posted on April 28, 2009 | Category: Networking, Server, Ubuntu
This tutorial will not discuss the ins and outs of installing Ubuntu Server. However, I will tell you how to get it up and running with the Apache configuration, PHP, and general installation of a Content Management System (CMS) using PhpMyAdmin.
The first thing that you need to know, is where all of your files are located.
Also, these are some of the main commands that you will use to get things going
Make sure that you have a static ip from your internet service provider. Otherwise, this really won’t work for you. Visit your domain service provider (e.g. Network Solutions) and the Advanced DNS records section. Enter your static ip address in the ARecords.
Changes can take hold within 20 minutes to 48 hours, so be patient if things aren’t going your way. Next, let’s work on opening up your router to port 80. Using your web browser, you will need to type in something like 192.168.1.10. This address varies depending on your router brand or model. You will also need to find out your logon and password for access to the router. Once this is complete, bookmark the router address and change the password for router access – seriously! Visit a tab or section in your router title Port Forwarding and add port 80. As you can see in the screenshot, my internal ip uses the 10.X.XX.XXX sequence versus the standard 192.168.1.10. Remeber to put in your internal computer ip, versus your static ip that you obtained from your ISP.
The last sequence of events told your router to allow information coming from port 80 to your specific computer Save your changes and close out the router page.
Depending on your configuration and preferences, you may have to install some or all of these. So, go ahead and type in
<p>sudo apt-get install php5-curl curl openssh-server libcurl3 sendmail php5-gd phpmyadmin -y</p>
<p>sudo ufw allow 22</p>
The first file that you can modify is your /etc/apache2/httpd.conf. Using vi, type in
<p>sudo vi /etc/apache2/httpd.conf</p>
Your default file handles many variables in your Apache configuration. I feel that it is one of the more important files for configuring your box. Ok, so open up the file in your favorite editor by typing in
<p>sudo gedit /etc/apache2/sites-available/defualt</p>
ServerAdmin root@localhostThe next task is a fairly simple file modification to the php.ini. Oftentimes, the PHP memory limit and max_upload size needs increasing. Open up
<p>sudo gedit /etc/php5/apache2/php.ini</p>
<p>Maximum allowed size for uploaded files. upload_max_filesize = 2M</p>
Now you need to change your /etc/hosts file by typing in sudo gedit /etc/hosts
At the end of the first uncommented line reading 127.0.0.1, add your domain name to the tune of “domain_name.net” without the http or www prefix.
Now that you have made all of these changes, restart apache using sudo /etc/init.d/apache2 restart
If you really want to dispell all doubt, simply restart your Sever box by typing in sudo reboot
You should be off and running. If not, leave a comment, search Google, or visit the Ubuntu Forums.