User Tools

Site Tools


cms1

This is an old revision of the document!


Content Management System(Focus On Drupal), Day1

Overview

Setting up LAMP (Linux, Apache, MySQL & PHP)
  • If you have Debian OS installed in your system, add the following line to /etc/apt/sources.list and put # before all existing lines in the file
deb http://ftp.us.debian.org/debian testing main contrib non-free 

In place of testing in the above line replace it with your current flavor of OS like stable, unstable, lenny, sid

  • Update package sources
apt-get update

(This is safer than apt-get upgrade or apt-get dist-upgrade, because it safely upgrades your server and resolves dependencies)

  • Install Apache2 and PHP5
apt-get install apache2 php5 libapache2-mod-php5 php5-gd
chmod -R 777 /var/www

Check if apache is working

/etc/init.d/apache2 restart
nano /var/www/info.php

Copy & paste the folowing php code in the nano editor

<?php
phpinfo();
?>

Go and check http://localhost/info.php in your browser to see configuration of installed php version.

  • Install Mysql and PHPmyadmin
apt-get install mysql-server mysql-client php5-mysql
apt-get install phpmyadmin

When prompted for a password enter hello.

  • Creating a MySQL DB & user for your Drupal installation
mysqladmin -u root -p create d7

Enter hello when you are prompted for password. If you get a “Database exists” error, please issue “mysqladmin -u root -p drop d7” to delete the existing database and then issue the create command.

  • Configuring Apache for Clean URLs
a2enmod rewrite
/etc/init.d/apache2 restart
chmod -R 777 /var/www
Install Drupal
  • Prepare server for drupal setup
    • Copy the drupal-7.2.tar.gz file to /var/www and uncompress the files so that you get /var/www/drupal-7.2 finally
    • Rename the drupal-7.2 to d7
    • Goto d7/sites/default, create a folder called files so that you have d7/sites/default/files
    • Copy default.settings.php as settings.php so that you have d7/sites/default/settings.php
    • Give 777 permissions to file(apply permissions to enclosed files) & settings.php
  • Install drupal
    • Choose Standard installation profile and save and continue
    • Leave English as is and save and continue
    • Give Database Name as d7, Database username as root & Database password as hello for LAMP or leave blank for XAMPP and Save and continue
    • configure Site information
      • Site Name your full name
      • Site e-mail address your email id
    • configure Site maintenance account
      • username as admin
      • password & Confirm password as hello
    • configure Server settings
      • Choose India under Default country
      • Choose Asia/Kolkata: Tuesday, June 21, 2011 - 14:51 +0530 under Default time zone and Save and continue
    • Now click on Visit your new site
Adding content
  • Click on add content in top black menu
  • Then click on Basic page
  • Give Title as Workshop
  • Write a summary about workshop in the body
  • Check the box Provide a menu link under Menu Settings below Text format group
  • Give Workshop in Menu link title
  • Ensure <Main menu> under Parent item
  • Choose 1 as Weight and click save

Similarly create pages about Prepare your computer, Software carpentry & CMS but ensure Workshop under Parent item for the new pages

Slideshow
Install colorbox module
  • Extract colorbox-7.x-1.3.tar.gz under /var/www/drupal-7.14/sites/all/modules directory
  • Create directory /var/www/drupal-7.14/sites/all/libraries
  • Extract colorbox.zip to libraries directory
  • Click “Modules” from top menu, check “Colorbox” & “Save configuration”
  • Click “Structure” from top menu, “Content types” and “Manage Display” for “Article”.
  • Choose “Colorbox” under “Format” for “Image” & Save.
  • Again “Structure”, “Content types” and “Manage fields” for “Article”
  • Click “edit” under “Operations” for “Image”
  • Check “Enable Title field” under “Article settings”
  • Change “Number of values” under “Image field settings” to “Unlimited”, scroll down & “Save settings”
  • Click “Structure” from top menu, “Content types” and “Manage Display” for “Article”
  • Click Gear wheel at the extreme right for “Image”
  • Choose “thumbnail” in “Node image style” and click “Update”
Blocks
Creating blocks
Normal blocks
  • Click on Structure in the top black menu & then click Blocks
  • Then click Add block
  • Configure block
    • About Workshop in Block description & Block title
    • Write a summary about workshop in Block body
  • Then Save block
Blocks with Images
  • Follow the previous mentioned steps to create a block except Block body
  • Download a image, rename it to block.jpg and copy it to d7/sites/default/files
  • Put the following content in Block body to put image
 <img src='/d7/sites/default/files/block.jpg' height=86 width=249>
  • Select Full HTML under Text format
  • Then Save block
Contact form
  • Goto Modules in top black menu and search for contact
  • Check the box in the Enabled column near contact
  • Scroll down & Save configuration
  • Goto Structure > Menus in top black menu
  • Click List links near Main menu
  • Click Add link
  • Configure the menu item
    • Contact us as Menu link title
    • contact as Path and Save
  • Goto Configuration in top black menu
  • Click Search settings under Search & Metadata
  • If Indexing status is 0% click on cron maintenance task link at the top
  • Then click on Run cron link appearing in the middle of the page
  • Then goback to Indexing status and ensure 100%
Links
cms1.1338529769.txt.gz · Last modified: 2018/03/24 11:13 (external edit)