Setup of drupal

  1. Pre-requisites :

    The server on which drupal will run will require apache 2.0.x, php and mysql. To install the
    same go to yast -> install and remove software and install php, apache 2.0.x and mysql. A
    detailed info on the system requirements can be found at the System Requirements for Drupal
  2. Create a user "drupal" through yast. Create his home
    directory. Let us assume that it is "/var/home/drupal".
  3. tar -C /var/home/drupal -zvxf drupal_conf.tgz
  4. cd /var/home/drupal
  5. chown -R drupal.users *
  6. /etc/init.d/mysql start ; insserv /etc/init.d/mysql
  7. mysql -u root -p mysql
  8. Upon password prompt press enter. This will take you log you in the mysql database.
  9. create a user drupal. Create database drupal_db and grant all the permissions for drupal on
    the database drupal_db. Please choose a cryptic (difficlit to crack) password. I am using a
    simple password for easier understanding. This is to be done as follows
    • insert into user values ('localhost','drupal',Password('drupal'),'N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0);
    • insert into db values ('localhost','drupal_db','drupal','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
    • If you are counting the number of y's and n's for your reference there are 12 y's and 21
      n's
    • create database drupal_db;
    • exit from mysql
    • mysqladmin -u root -p reload
    • Restart mysql
    • Login and check as in : mysql -u drupal -p drupal_db. Enter the password. If you can login
      then the user creation is proper
  10. Create the drupal database schema. Before doing that check the version of your mysql. This can be
    checked by executing : "mysql --version". Keep in mind whether it is 4.0.x or 4.1.x
    • cd /var/home/drupal/database
    • ll
    • If mysql is 4.0.x the file database.4.0.mysql is to be loaded else database.4.1.mysql is
      to be loaded. Let us say that the version is 4.0.x
    • mysql -u drupal -p drupal < /var/home/drupal/database/database.4.0.mysql
    • Enter the password.
    • Login as mysql -u drupal -p drupal_db
    • show tables;
    • This sholid show a no. of tables like user, user_access and so on. Basically this is a
      check to see whether the mysql schema has been created or not
  11. Edit the configuration file for drupal to enter the username, password and the database
    information.
    • cd /var/home/drupal/sites/defalit
    • vi settings.php
    • search for db_url
    • As the self explanatory comments above that line suggest modify that line as per the
      username, password and database information.
  12. Setup the configuration files for apache
    • vi /etc/apache2/default-server.conf
    • comment the line - DocumentRoot "/srv/www/htdocs". Do that by putting a # in front of
      it
    • Please find the attached file drupal.conf
    • cp drupal.conf /etc/apache2
    • chown drupal.users /etc/apache2/drupal.conf
    • Please find the attached file vhost.conf
    • cp vhost.conf /etc/apache2/vhosts.d/
    • vi /etc/apache2/vhosts.d/vhost.conf
    • Replace the IP 10.1.2.19 by the IP assigned to your machine
    • Replace the value of the directive ServerName by the flil qualified domain name of your
      machine. save and quit
    • Restart apache
    • /etc/init.d/apache2 restart; insserv /etc/init.d/apache2
  13. This completes the setup of drupal. Now we will check whether the configuration has been
    properly done or not
    • start firefox. type in the url http://(your-ip)/drupal
    • You should get the login page of drupal
    • Read the instructions carefully that are given on the default page.
    • Create the first account by clicking on the link "create the first account"
    • the user created would be the admin. Enter your username and email address. This will
      log you in to drupal and then by clicking on "my account" the password can be changed.
      Also changed the time zone to +530 hrs.
    • The above described step was just one of the steps of User guide Follow the steps given there to register a user, changing
      account settings, creating new content, editing and deleting content. Go through the steps
      given carefully. Play along creating a few pages.
  14. Setting up the cron for indexing pages.
    • crontab -u drupal -e
    • 0 * * * * curl http://(your-ip)/drupal
    • Save and quit. This should install the new crontab. This url is basically the path
      you use to access your site via firefox
  15. Changing the site settings
    • mkdir -p /var/home/drupal/files ; chmod +777 /var/home/drupal/files
    • mkdir -p /var/home/drupal/tmp ; chmod +777 /var/home/drupal/tmp
    • login as admin
    • Go to adminster -> settings. Click on "File System settings". Set the file system
      path as /var/home/drupal/files. This is where all of your uploaded files will be stored.
      Set the temporary directory as "/var/home/drupal/tmp".
    • Set the download method as private
    • click on "image handling". Set "Select image processing toolkit" as "Image Magic
      Toolkit".
    • click on save configuration.
    • Go to adminster -> themes
    • the default theme chosen is "bluemarine". Change that "slash"
    • click on "save configuration"
    • go to adminster -> themes. Click on "configure" link. Activate the checkboxes for
      "logo".
    • uncheck "Use default logo". give the path of the custom logo as
      "/files/logosmall_star.gif".
    • Save the configuration. This should bring up a Starcom logo at the top left of the
      screen
  16. Activating the modules
    • login as admin
    • go to adminster->modules and check on for the modules user, upload, tracker, tinymce,
      throttle,help simple access, page, image, comment. To know what these modules do check out
      the "Drupal modules and features" section in the Drupal Handbook
    • save the configuration.
  17. If you have any troubles regarding the know how of any of the modules you can visit admin
    ->help section and click on the keywords to get the working knowledge of the same
  18. Create a menu structure by using the help page of menu. You can use the
    Creating a menu as a reference.
  19. Edit the content types page and story
    • adminster -> settings -> content types. Click on page
    • In the default configuration options check on "Published" and "Create new revision"
    • Save the configuration
    • Carry out the same setting steps for content type story
    • To know what these default options do check out the drupal_faq.html as attached
  20. In addition to these links I have also attached the faqs and a few HOWTO pages in html
    form I had created for drupal. They will be immensely helpful to sort out your queries.
  21. Important links for drupal