How to install Drupal 7 on ubuntu

June 26, 2012 in CMS

How to install Drupal 7 on ubuntu Part 1

This is a full article on how to install Drupal on Ubuntu, that means you can use this guide even if you have a clean installation of Ubuntu, and I will try to keep it as simple as I can.

What you will need in order to install Drupal.

First of all you will need a LAMP Server(more information can be found here).

1. You have to install a Linux system(you can choose whatever you want. A guide on how to install Ubuntu can be found here).It doesn’t really matter if you choose a desktop or server edition but if you are planning to publish your Drupal website I strongly recommend to use a server edition of Ubuntu for example.

2. You will need Apache (more information can be found here)

3. You will need MySQL (more information can be found here)

4. You will need PhP (more information can be found here)

5. And last but not least you will need to download Drupal from official site.

Let’s go to the next Part and install Lamp

Bash script for beginners

June 25, 2012 in Bash script

Bash scripting for beginners Part 1

What is Bash script?

A Bash script is mainly a set of commands that can be executed in a Terminal. You can create a Bash script file (filename.sh) and execute the set of commands inside that file as many times as you want. So if you want to execute a set of commands periodically then you should think “Bash script”.

Bash script is more than that. You can actually use that as a programming language in order to create small programs that can be executed in a terminal.

And as they say the most easy way to learn a language is to create a program with that language and try to improve it. (I don’t really know if people say that, but that is the way of this tutorial.

So in this tutorial i will explain how to create bash scripts while you are creating a backup program.

Lets start Bash scripting

echo Comments

To do so, let’s create some folders that we will need in order to store our scripts and backups.

Open a terminal and type:

cd ~/Desktop

mkdir bash

cd bash

mkdir code

mkdir backup

Now go into “code” folder

cd code

Just before we start the backup program let’s create first a bash script for “Hello  World”, so you can understand how to create and then execute a script.

In order to create a Bash script you will just need a text editor such as “gedit”. You can use your favorite text editor but I will use gedit since this editor comes with Ubuntu.

Open a terminal and type:

gedit ~/Desktop/bash/code/helloworld.sh

enter the following text to gedit,

#!/bin/bash  
# Bash scripting with allaboutlinux.eu 
echo Hello World

press “save” and close gedit

Almost done! Now you have to make that file executable. Open a terminal and type:

chmod +x helloworld.sh

And now you are ready to execute your first Bash script. Open a terminal and type:

cd ~/Desktop/bash/code

./helloworld.sh

Now you should see “Hello World”.

Just a quick explanation of the script:

You can use “#” in order to “comment” a line. So the line “# Bash scripting with allaboutlinux.eu” is just a comment and has nothing to do with the script. there is an exception to that rule that applies to the first line that starts with “#!” this line defines which interpreter to use. in this case we use bash.

You can use “echo” in order to print something in the terminal.

If you have understood everything in this part you can go to the next part where we will start making our backup program.