===LAMP Installation and Drupal Installation===
===Overview===
- [[#Setting up LAMP (Linux, Apache, MySQL & PHP)|Setting up LAMP (Linux, Apache, MySQL & PHP)]]
- [[#Install Drupal|Install Drupal]]
- [[#Menus|Menus]]
- [[#Adding content|Adding content]]
- [[#Slideshow|Slideshow]]
- [[#Blocks|Blocks]]
- [[#Creating blocks|Creating blocks]]
- [[#Normal blocks|Normal blocks]]
- [[#Blocks with Images|Blocks with Images]]
- [[#Contact form|Contact form]]
- [[#Search|Search]]
==Setting up LAMP (Linux, Apache, MySQL & PHP)==
* If you have Debian OS installed in your system, type su and press enter it will prompt for password, enter your root password
* If you have Ubuntu OS installed in your system, type sudo su and press enter it will prompt for password, enter your root password
* 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/html
Check if apache is working
/etc/init.d/apache2 restart
nano /var/www/html/info.php
Copy & paste the folowing php code in the nano editor
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** (You can also set your own password).
* Creating a MySQL DB & user for your Drupal installation
mysqladmin -u root -p create d8
Enter **hello** (mysql password) when you are prompted for password. If you get a "Database exists" error, please issue "mysqladmin -u root -p drop d8" to delete the existing database and then issue the create command.
* Configuring Apache for Clean URLs
a2enmod rewrite
nano /etc/apache2/apache2.conf
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
* Restart the apache server
service apache2 restart
==Install Drupal==
* The Drupal is available at http://172.27.2.2 .
* **Note: Do this only if the previous step fails.**Download the latest stable version of drupal from http://drupal.org/project/drupal
* Prepare server for drupal setup
* Copy the drupal-8.x.tar.gz file to /var/www/html and uncompress the files so that you get /var/www/drupal-8.x finally
* Rename the drupal folder to d8
* Goto d8/sites/default, create a folder called files so that you have d8/sites/default/files
* Copy default.settings.php as settings.php so that you have d8/sites/default/settings.php
* Give 777 permissions to file(apply permissions to enclosed files) & settings.php
* Install drupal
* Goto http://localhost/d8
* Choose **Standard** installation profile and **save and continue**
* Leave **English** as is and **save and continue**
* Give **Database Name** as **d8**, **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** and **Save and continue**
* Now click on **Visit your new site**
==Menus==
==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 **** 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