User Manual

advertisement

2010

User Manual

By: Kathleen Fokkens, Marcus Morris and

Cameron Clarke

This is a user manual on how we created our server.

SAIT

SAIT

1/1/2010

Table of Contents

Introduction .................................................................................................................................................. 3

Packages You Need ...................................................................................................................................... 3

Lamp .......................................................................................................................................................... 3

Php-Mysql ................................................................................................................................................. 3

SSH ............................................................................................................................................................ 3

Folders to Know ............................................................................................................................................ 3

/var/www .................................................................................................................................................. 3

Lamp .......................................................................................................................................................... 5

Configuration Files ....................................................................................................................................... 4

PHP.ini ....................................................................................................................................................... 4

My.cnf ....................................................................................................................................................... 4

Hosts ......................................................................................................................................................... 4

Conf.d ........................................................................................................................................................ 4

Connecting to the Server ............................................................................................................................. 4

SSH ............................................................................................................................................................ 4

Yog ............................................................................................................................................................. 4

WinSCP ...................................................................................................................................................... 4

Viewing Your Site ......................................................................................................................................... 5

Simple Troubleshooting ............................................................................................................................... 5

Conclusion .................................................................................................................................................... 5

Introduction

Congratulations on deciding to make your own web server. The following manual will guide you through the steps we took to set up our server and get our sites functioning.

First we’ll go over the specs of our server.

Ubuntu 9.1

Packages You Need

These are all the packages well manually installed.

LAMP o To run the server properly make sure you have LAMP (Linux Apache Mysql PHP) installed. Ubuntu 9.1 allows you to install a LAMP server during the initial installation. o It is possible to install each of these components separately, however not all configuration items will be added and you may be missing some of the libraries.

Php5-mysql o If you are using PHP5, You must also install a package called php5-mysql. This can be done using a simple apt-get install command.

SSH o This can also be done during the Installation or through apt-get install. We used SSH to connect to our server remotely. You’ll also use this for yog.

Folders to Know

Some of the important folders we used were:

/var/www o This is the folder where we placed all the php files that make up our website.

Configuration Files

These are all of the configuration Files that we used while setting up our server.

/etc/php5/apache2/php.ini o This file only required one change. Look through the file and find a commented out line that says “extended=…” Uncomment it out and after the “=” add the statement

“mysql.so”. Once that is changed save the file and exit.

/etc/mysql/my.cnf o This is the configuration file for Mysql. Make sure that the bind address is commented out or you will have problems connecting to your Yog later on.

/etc/hosts o This file should contain YOUR IP and your Host Name. It’s always good to double check that this is all correct.

/etc/apache2/conf.d o This is the apache configuration file. In order for your server to actually display the php files you must go into this file and add “index.php” to the line “DirectoryIndex” So it will look like this “DirectoryIndex index.php”

Remotely Connecting to the Server

We used three different ways to connect to our server.

SSH o Specifically we used putty, however any SSH will work fine. With putty all we had to do was type in our IP Address, port 22 and connect. We entered our user name and password and we had full control of our server.

Yog o We used Mysql Yog to create and edit our database. Make sure you get the Enterprise

Edition as we needed the SSH tunneling. On the Mysql tab enter you IP Address and your sql username and password, port 3306 and the name of your database (this can be left blank. Before you click connect switch over to your SSH tab. Click on the box to enable SSH Tunneling. Enter your IP again then the user (we used root) for your server

WinSCP and the password, enter port 22 and now click connect. o WinSCP was used to simplify adding our content to the server. You simply type in your

IP address, username and password and you’re connected to the server. This gives you more of a GUI method then the server command line. You get a split screen, one with your computer contents and one with the server’s contents. You can navigate your way to any folder you need and moving files are as easy as click and drag.

Viewing Your Site

Now that the site is on the server you can view it by going to any browser and typing: http:// <IP address of your server>

If everything went perfect then you are now able to view your site, click your links and any other functionality.

Simple Troubleshooting

The first suggestion for trouble shooting is: Is everything running? Check the status of Mysql, SSH and

Apache.

Next question is: Is there an error code? If there is place it into your favorite search engine. This will tell you many ways that others have managed to solve a similar problem.

Are all your configuration files correct? Double check that all the changes to your files are correct and saved properly.

Did you put your site files in the write directory? /var/www. Double check.

Conclusion

If you follow this guide without any problems then your site will be up and running. This is a basic guide and does not cover all of the potential problems that may arise. Hope you enjoy your site and that all went well. Best of luck.

Download