Installing Drupal

Looking for a good content management system is a hard thing to do; you have to compare features, run demo and in that respect I initially never noticed what drupal could do for me since drupal did not have an installer and the demo's did not show much of the power of drupal.

I have written up a step by step guide on how to set up a working drupal system. I'll explain in it 2 parts: having ssh/ftp access and having only ftp access.

First of here are the requirements for drupal:

REQUIREMENTS
------------
Drupal requires a web server, PHP4 (4.3.3 or greater) or PHP5
(http://www.php.net/) and either MySQL (http://www.mysql.com/)
or PostgreSQL (http://www.postgresql.org/). Your database user
will also need sufficient privileges to run Drupal. Please
check the INSTALL.mysql.txt and INSTALL.pgsql.txt for more
detailed information.
NOTE: the Apache web server and MySQL database are recommended;
other web server and database combinations such as IIS and PostgreSQL
are possible but tested to a lesser extent.
OPTIONAL REQUIREMENTS
---------------------
- To use XML-based services such as the Blogger API, Jabber, and RSS
syndication, you will need PHP's XML extension. This extension is
enabled by default.
- If you want support for clean URLs, you'll need mod_rewrite and
the ability to use local .htaccess files. (More information can
be found in the Drupal handbook on drupal.org.)

 

So if you have ssh access, you can simple download the gzip file by logging into your website via ssh and navigate to your document root and then give the command:

wget http://ftp.osuosl.org/pub/drupal/files/projects/drupal-4.7.3.tar.gz

then to expand:

tar xvfz drupal-4.7.3.tar.gz

and to put everything in the right spot:

mv drupal-4.7.3/.htaccess .
mv drupal-4.7.3/* .

SETTING UP YOUR DATABASE:

That shouldn't be much of a problem, the drupal distribution comes with a directory or folder called database that has a sql file for the database. So you would have to:

cd database

There are 2 mysql sql files located here:

database.4.0.mysql
database.4.1.mysql

first you would have to create a dabase and a user before being able to load it so:

mysql -h (your hostname for your mysql server) -u (username to get into mysql) -p
create database drupal;
grant all on drupal.* to yourname@localhost identified by 'password';
exit;
mysql -h (your hostname for your mysql server) -u (username to get into mysql) -p drupal <./database.4.0.mysql

or

mysql -h (your hostname for your mysql server) -u (username to get into mysql) -p drupal <./database.4.1.mysql

for the appropiate version.

Next up would be the configuration file of drupal which is located under the directory names "sites". So move to :

cd ../sites/default
nano settings.php (or edit with your favorite editor)

and look for this line:

	$db_url = 'mysql://username:password@localhost/databasename';
	
And fill in the appropriate values for the username, password, mysql hostname and database name and save the file. At this point your drupal installation is up and running. Start up a browser and visit your homepage it will have the instructions on how to set up user name etc.

INSTALLING DRUPAL BY USING FTP:

First download the latest version of drupal at :

http://ftp.osuosl.org/pub/drupal/files/projects/drupal-4.7.3.tar.gz

and expand it to your harddrive using winrar or similar programs. I'm assuming that if you only have ftp access to your website that you will be able to set up the database using a control panel of some sort like ensim or cpanel and that you have access to phpmyadmin and be able to set up the database, the username for the database and be able to import the sql file and run it. From that point on all you have to do is edit the file /sites/default/settings.php and and look for this line:

$db_url = 'mysql://username:password@localhost/databasename';
And fill in the appropriate values for the username, password, mysql hostname and database name and save the file. At this point  you can upload using ftp all your drupal files and your drupal installation is up and running. Start up a browser and visit your homepage it will have the instructions on how to set up user name etc.
The next article on Drupal will be about all the options under the admin settings.