Tuesday, April 1, 2008

4-1-08

Today I began working on my server around 7:15 PM. I booted up the server, and lo and behold, the PHP functions are working. So I navigate to the /wiki page to configure it. I went through the list of items, and entered all of the information necessary. When I got to the step where it asked which database to use, I went and researched how to make a database in MySQL, so I went and did that. I also created a user and assigned All capabilities to that username and password. So I went back to the wiki setup, entered the information, and it created a wiki. The time is now 7:55 PM.

Following this, I installed the VSFTPD (Very Secure File Transfer Protocol Daemon), which will allow me to easily upload files to the sever from other computers. So, I created a username for the wiki folder, assigned it a password, and assigned it as the owner of the folder containing the wiki. This way, should I need to upload any files, I can log-in remotely and upload the files directly into the necessary folders. I'm also changing the VSFTPD configuration file, to suit my needs, and to keep the server safe and running.

[Specifically, I am changing the line from allow anonymous FTP to anonymous_enable=NO, so that anonymous users cannot gain access to the server to upload potentially harmful files, or gain access to the system. I've also uncommented the line "local_enable=YES" so that users with an account already on the system may login with their normal account information. Upon restarting the ftp server daemon, the new changes take affect. Done at 8:15 PM.]

I am running this server at home, so I'm using a router so that I only need to own and pay for one IP address to my home. The router allows the function that web requests can be forwarded to specific IP addresses on the internal network, and for specific ports. The normal port that apache listens on is 80, however that's already being taken by another server. So, I edited the /etc/apache2/ports.conf file, to listen on port 80, and 8080. I restarted the server, and made the necessary change in the router's configuration. So, when someone searches for that address to that server, which will be a webforward including that port number, (as of the moment it is http://74.69.29.67:8080) it will be forwarded to the wiki server. Done at 8:40 PM.

Monday, March 31, 2008

Project - 3/31/08

I've set up the server today. It is currently an old IBM ThinkPad laptop, equipped with stock Pentium 333Mhz processor and probably 64 MB of RAM. The hard drive is relatively small, and was swapped out with another laptop, but is approximately 4.6 GB, large enough for a web-server.
I installed Ubuntu Linux, Server Edition, version 7.10 - Codename: Gutsy Gibbon. Upon installation, I installed the Apache2 webserver program, via the built-in installer [apt-get install apache2] - This automatically downloaded, installed, and configured the application. Following this, I setup the network interface card (NIC), which is an external PCMCIA Xircom 10/100 Ethernet Card. To do so, I needed to edit the network interface configuration file, /etc/network/interfaces. I added the lines:

#The primary network interface
auto eth0
iface eth0 inet dchp


These lines will automatically initiate, load, and obtain an IP address from the router, through the DHCP protocol.

Following this, I proceeded to install a SQL server. Specifically, I chose the open-source MySQL database server because it is the one with which I am most familiar, and also it was a requirement for the MediaWiki wiki software. I installed MySQL via the command [apt-get install myql-server]. During the installation, it prompted me for a password for the root user, which I gave.
Next, I downloaded the MediaWiki software, version 1.12, from the site, http://wikimedia.org, via the command [wget http://download.wikimedia.org/mediawiki/1.12/mediawiki-1.12.0.tar.gz]. This downloaded the software into the current directory, /var/www/wiki. I then extracted the files using [tar -cxvf mediawiki-1.12.0.tar.gz].

I've also constructed a small placeholder page using HTML to place as the temporary index page on the site. This is named index.html and placed in the /var/www folder, so it will be automatically displayed when the site is queried.

To install the wiki software, one must navigate to the folder via a web browser. So, I browsed over to the server, 192.168.1.104 on my internal network, and went to the subfolder /wiki. Lo and behold, the page attempts to download because it cannot yet display php files as a page.
So, I attempted to install the php5-common and libapachephp5 packages using the aptitude installer, which I did. I then moved the php5.conf and php5.load modules from /etc/apache2/mods-available to the /etc/apache2/mods-available folder, and restarted apache2. This should reload the webserver, which should have loaded the PHP5 protocols for displaying php pages, however that didn't solve anything yet. So I checked the apache2 configuration file, though that didn't help, or provide me with any clue as to a solution. I'll continue trouble-shooting another time.