Wednesday, March 30, 2011

Installing Drupal In Ubuntu 10.04

Drupal is a an Open Source Content Management System. Installation of Drupal on Ubuntu 10.04 is relatively easy. Just follow the simple steps below:
1. Open a terminal and type:
sudo apt-get install drupal6
2. You’ll be prompted to select the database. With your arrow keys select mysql and press enter.
3. Enter your MySQL password when you are asked to. This creates a database schema called drupal6 in your MySQL RDBMS.
This is also supposed to auto-create the necessary files in the /var/www/ directory.
But it didn’t in my case, so I had to go for manual creation of files. Continue with the following steps only if you do not have a drupal directory in /var/www/.

4. Download the drupal6 source from http://ftp.drupal.org/files/projects/drupal-6.15.tar.gz. For Extract , do the following:
Open this downloaded Zip folder. Select all the files and folders in it. Right click on the  selection and choose Extract. A dialog box will be displayed. Create a new folder on the desktop and copy alll the files and folders in that folder.
5. Create the necessary directory in /var/www/ by th efollowing command in terminal:
sudo mkdir /var/www/drupal
6. Copy the contents of the extracted directory into /var/www/drupal/ by typing the following command in terminal:
sudo mv drupal-6.15/* drupal-6.15/.htaccess /var/www/drupal
In my case, this command was not working. For doing this, I changed the permission of root folder by the command:
gksudo nautilus
It displayed Root -File Browser Dialog box. Then I choose File System>var>www>Drupal
Then I copy All the extracted Files and folders contained in the folder placed on the desktop To folder Drupal(/var/www/drupal)
7. Create a directory files in drupal/sites/ by the following:

sudo mkdir /var/www/drupal/sites/default/files
 
8. Change the owner of the directory.

sudo chown www-data:www-data /var/www/drupal/sites/default
/files
 
9. Create the initial configuration files.

sudo cp /var/www/drupal/sites/default/default.settings.php
 /var/www/drupal/
sites/default/settings.php
 
11. Create a database drupal6 using phpMyAdmin.

mysqladmin -u root -p create drupal6
 
12. Log in to MySQL if you already have lamp-server installed on your system.

mysql -u root -p
 
13. Grant permissions to the root user (or the username you log into MySQL with) on all tables in drupal6 schema.

mysql>  GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, 
INDEX, ALTER,  CREATE TEMPORARY TABLES, LOCK TABLES ON 
drupal6.* TO'username'@localhost IDENTIFIED BY 'password';
 
Here, ‘username’ is either root or any other username you use to log into MySQL and ‘password’ is the password of the username.
14. Open your browser and type http://localhost/drupal/. You’ll get the following page if you haven’t created a database for Drupal.

Database Configuration
Enter the details and click on Save and continue.
15. Next you’ll get a screen as follows.

Enter your email address under Site information. Under Administrator account, enter a username, email address and password. I used my phpMyAdmin username and password and my email address. Click Save and continue.
16. Then you get a page saying “Drupal installation complete”. Go to your new site.

Drupal Installed
Installation complete! Enjoy It…..

Saturday, March 26, 2011

Install LAMP on Ubuntu


To install it, type and run the following commands one by one in the terminal:
sudo apt-get install apache2
sudo apt-get installphp5 libapache2-mod-php5
sudo apt-get install mysql-server mysql-server
My SQL root password





You'll then be prompted to enter a MySQL application password for phpmyadmin. You can hit <Enter> and a random password will be generated. I chose to use the same password that I used for the root MySQL password.
My SQL Application Password
If you enter your own password, a password confirmation screen will come up. Confirm your password.
Confirmation Password


sudo apt-get install phpmyadmin
phpMyadmin setup
This is important! Use the space bar on your keyboard to select apache2. Make sure there's a * next to apache2 like the picture below and then hit <Enter>.  (Click the picture to enlarge it and see what I'm talking about.)
phpMyadmin setup:select apache2
The next screen will explain some information about database configuration. Hit the <Enter> key to move on.
phpMyadmin Database config
Another screen will come up asking if you want to configure a new database called dbconfig-common.  Since this is a fresh installation, use the <Tab> key to select Yes and hit <Enter>.
phpMyadmin dbconfig-common

sudo apt-get install libapache2-mod-auth-mysql php5-mysql
sudo /etc/init.d/apache2 restart
Note: We will be promoted to enter the password for mysql,phpmyadmin etc.It will look as if installation is going on with blue blink. But don’t get confuse. It is the space where you have to write the password. Press the Tab key to navigate from one button to another like to choose ok or cancel button, press the tab key for choosing it.

Monday, March 14, 2011

To convert an image into ASCII code

For doing this, install an image converter jp2a using command in terminal:
               sudo apt-get install jp2a
Now the command's syntax to convert an image into ASCII code is:
Syntax:  
jp2a [ options ] [ filename(s) | URL(s) ]
For example to convert the following image in ASCII:
 
Type the following commands:
cd Desktop
jp2a --size=40*20 easterlogo.jpg
Then press enter
Following image will be displayed in terminal:




 Have fun with other options too.....at the following URL:http://manpages.ubuntu.com/manpages/hardy/man1/jp2a.1.htm





Saturday, March 12, 2011

How to run songs in terminal of ubuntu?

Firstly, Install any music player e.g. VLC Player By typing command in terminal

sudo apt-get install vlc

Then give the following commands in terminal:

cd Desktop
vlc -I ncurses song_name.mp3


Note: Make sure that The song you want to play should be on desktop.

If Song is in any folder then syntax of command is:
vlc -I ncurses /home/user_name/music_folder


Tuesday, March 8, 2011

How to add a video to a webpage using HTML?

Syntax:  <iframe src =""></iframe>
For example:  to add a video to a webpage which is in You Tube, Give title u r using i.e. YouTube video player. Then give the source of video i.e. URL . Use embed to avoid whole web page of youtube showing that video which you want to add to your webpage. Lets see an example of a program showing how to add video......

<html>
<head>
<title>Tum Jo Aaye song</title>
<body>
<iframe title = "YouTube video player"height="390" width = "480"src = "http://www.youtube.com/embed/KfCdIr-E1Bs"frameborder="0" allowfullscreen></iframe>
</body>
</head>
</html>
See the source of URL. Actually  real URL ishttp://www.youtube.com/watch?v=KfCdIr-E1Bs&feature=player_embedded#at=231  . We used Embed to avoid whole Page .