There was an error in this gadget

Friday, May 25, 2012

Things I did after Installing my Ubuntu


             Although Ubuntu comes loaded with lots of applications but its default looks and applications may not suit everyone. Same was mine case. When I installed it , it simply refused to play any mp3 songs or any video. Reason of this is that Ubuntu policy is to provide free and open-source softwares. It can't provide many of popular softwares owing to this reason. An another reason can be argued that Ubuntu has to keep its size limited to 700 MB to facilitate CD burning. Many will disagree with this point as now-a-days disc drives are becoming increasingly low in use as you can see with tablets or netbooks or smartbooks ( e.g. Macbook Air ). Even Ubuntu comes with option of creating a bootable USB since Ubuntu 8.04 ( I think...) .

        Coming back to things to do after installing Ubuntu.....the very first thing everyone should do is to update your system . Ahh.... you will say I just installed my new Ubuntu and now I have to again update it. But yes , its important as it delivers the latest packages to your system which may contain latest bug-fixes and even new features which could not be accommodated in the CD you used to install your Ubuntu. If you used net-install or upgraded your Ubuntu , then you may not need updating again. Just open a terminal ( keyboard short-cut : Ctrl + Alt + t ) and type in following command :

          Command :
                            sudo apt-get update && sudo apt-get upgrade;

            Now as your packages are up-to-date you can add more applications to your Ubuntu installation to suit your need. But before that first explore what Ubuntu comes pre-loaded with. A few applications that comes with Ubuntu 12.04 LTS ( Precise Pangolin ) are as follows :
  1. Mozilla Firefox : One of the very best web browser.
  2. Empathy : A chat client for use with Gmail , Yahoo , Facebook accounts.
  3. Gwibber : A Broadcast client to use for posting and viewing latest updates/posts on facebook and twitter.
  4. Mozilla Thunderbird : A mail client equivalent to Outlook Express of M$ Windows Xp.
  5. Libre-office : A full-featured office package containing Libreoffice Writer ( equivalent to M$ word ) , Libreoffice Calc ( equivalent to M$ excel ) , Libreoffice Impress ( equivalent to M$ power-point ) .
  6. Brasero : A Disc burning client to let you burn your audio/video/data CD or DVD.
  7. Deja-dup : A back-up and restore tool.
  8. Ubuntu One : A tool and service to backup your data online ( cloud ) . It provides you with 5 GB of free space. You can increase the space if need more at a nominal charge.
  9. Evince : A document viewer for your text and pdf files
  10. Rhythmbox : A music player-cum-organizer .
  11. Shotwell : A tool to view and edit pictures . You import and create libraries of you photos and even share them online.
  12. Totem : A gstreamer-based movie/video player.
  13. Games : Sudoku , Solitaire, gbrainy , Mines , Mahjongg
  14. Transmission : A bit-torrent client .
  15. Ubuntu Software Center : A Central point to download new software for Ubuntu ( both paid and free )
  16. Simple Scan : A utility to use with your scanner.


                Although , Ubuntu comes pre-loaded with lots of applications for your ease , many times its not sufficient. So, go and install few more to add to this brigade :
1) VLC : The most popular video/audio player that plays almost any format out of box. It is the VideoLAN project's media player. It plays MPEG, MPEG-2, MPEG-4, DivX, MOV, WMV, QuickTime, WebM, FLAC, MP3, Ogg/Vorbis files, DVDs, VCDs, podcasts, and multimedia streams from various network sources.
               VLC can also be used as a streaming server that duplicates the stream it reads and multicasts them through the network to other clients, or serves them through HTTP.
                VLC has support for on-the-fly transcoding of audio and video formats, either for broadcasting purposes or for movie format transformations. Support for most output methods is provided by this package, but features can be added by installing additional audio plugins (vlc-plugin-pulse, vlc-plugin-sdl) or video plugins (vlc-plugin-sdl).

               Command :
                              sudo apt-get install vlc

Screen-shot :

2) Gstreamer Multimedia codecs : For playing any video / audio file the default multimedia players of Ubuntu ( i.e. RhythmBox and totem ) requires a set of codecs / plugins and the same is provided by the Gstreamer multimedia codecs. 
              Ubuntu has got a very unique and extremely user-friendly way to install these codecs. You have to just open the Multimedia file in totem player and if it is not able to play the file, it will ask whether you want to search for a suitable codec/plugin . Just proceed with the instructions in subsequent steps and it will download all the necessary packages for you and you are ready to enjoy your movie/song.
3) Chromium : If you are not satisfied by performance of Firefox , go and get chromium from google . It is the Linux version of Google Chrome. Chromium serves as a base for Google Chrome, which is Chromium re-branded (name and logo) with very few additions such as usage tracking and an auto-updater system.

               Command :
                            sudo apt-get install chromium-browser

Screen-shot :

4) MyUnity : This program allows one to configure and tune Unity with a pleasant and comfortable graphical interface. Please note that MyUnity is a third-party application, not official part of the Unity project.

             Command :
                            sudo apt-get install myunity

Screen-shot :

5) Synaptic Package Manager : This was the main package managing tool for Ubuntu before they decided to create Ubuntu Software Center. It enables you to install, upgrade and remove software packages in a user friendly way. A very useful tool and low on resource consumption.

            Command :
                             sudo apt-get install synaptic

Screen-shot :

6) Avidemux : It is a better equivalent to M$ Windows Movie Maker. It is a free video editor designed for simple cutting, filtering and encoding tasks. It supports many file types, including AVI, DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks can be automated using projects, job queue and powerful scripting capabilities.

           Command :
                           sudo apt-get install avidemux-qt

Screen-shot :

7) Skype : Skype is a little piece of software that lets you make free calls to anyone else on Skype, anywhere in the world. And even though the calls are free, they are really excellent quality. Main Advantages of skype are :
* Make free Skype-to-Skype calls to anyone else, anywhere in the world.
* Call phones and mobiles at pretty cheap rates per minute.
* Group chat with up to 100 people or conference call with up to nine others.
* Free to download.

         Command :
                         sudo apt-get install skype

Screen-shot :

8) Gparted : It is a advanced partition editor that allows you to create and manage your hard-disk partitions. This tool is included on Ubuntu Live Disc but doesn't feature in default Ubuntu Installation. It is an equivalent to M$ Windows disk management tool.

          Command :
                        sudo apt-get install gparted

Screen-shot :

9) GIMP : GIMP ( GNU Image Manipulation Program ) is an advanced picture editor and is Linux equivalent of Adobe Photoshop. You can use it to edit, enhance, and retouch photos and scans, create drawings, and make your own images. Lots of tools are available; you can sharpen and resize photos, and remove dust and red-eyes, for example.
              It has a large collection of professional-level editing tools and filters, similar to the ones you might find in PhotoShop. Numerous fine-control settings and features like layers, paths, masks, and scripting give you total control over your images.
              Many image file formats are supported, including JPEG, PhotoShop (.psd), and Paint Shop Pro (.psp) files. It can also be used to scan and print photos.

          Command :
                      sudo apt-get install gimp

Screen-shot :

            The list I wrote above is just a glimpse of Softwares and Applications that are available to install in Ubuntu. With so much of advanced and feature-rich but still free applications available, I think one should think twice before spending thousands of bucks on M$ (my-crow-soft ) products. Don't use them just because they got better looks if you can have much better performance from a total free solution.
Any one interested in learning basic linux/terminal  commands can access the following sister-site link :
http://tipsandinfoit.blogspot.com/2012/05/basic-unix-commands.html 

Have a nice Ubuntu Experience ….

Thursday, May 10, 2012

Installing Oracle 11g R2 Express Edition on Ubuntu 64-bit

              Recently I installed Oracle 11g R2 Express Edition on my ubuntu 12.04 ( Precise Pangolin). But for this, I have to google a lot and had to install two times to get a fully working environment. So, I thought it would be better if I share my experience with my fellow ubuntu'ers so that they don't have to face the troubles that I encountered. I have came up with following series of steps ( mostly derived from the link source I given at the end of this post ) for easy and hassle-free installation.
              But at first, I must inform you about the limitations of Oracle 11g R2 Express Edition (XE) which are as follows :

    • The Installer released by Oracle is only meant for 64-bit (x86_64) systems. If you wish to install the 32-bit version , see installing oracle xe on ubuntu 32-bit
    • It will consume, at most, processing resources equivalent to one CPU.
    • Only one installation of Oracle Database XE can be performed on a single computer.
    • The maximum amount of user data in an Oracle Database XE database cannot exceed 11 GB.
    • The maximum amount of RAM that Oracle XE uses cannot exceed 1 GB, even if more is available.
      Now the steps for Installation :

      1) Download the Oracle 11gR2 express edition installer from the link given below:


      ( You will need to create a free oracle web account if you don't already have it )

      2) Unzip it :
      unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip

      3) Install the following packages :
      sudo apt-get install alien libaio1 unixodbc vim

      4) Convert the red-hat ( rpm ) package to Ubuntu-package :
      sudo alien --scripts -d oracle-xe-11.2.0-1.0.x86_64.rpm

      (Note: this may take a while , till that time you can go for step 5 )

      5) Do the following pre-requisite things:
      a) Create a special chkconfig script :

      The Red Hat based installer of Oracle XE 11gR2 relies on /sbin/chkconfig, which is not used in Ubuntu. The chkconfig package available for the current version of Ubuntu produces errors and my not be safe to use. Below is a simple trick to get around the problem and install Oracle XE successfully: 
      sudo vim /sbin/chkconfig

      (copy and paste the following into the file )
      #!/bin/bash
      # Oracle 11gR2 XE installer chkconfig hack for Ubuntu
      file=/etc/init.d/oracle-xe
      if [[ ! `tail -n1 $file | grep INIT` ]]; then
      echo >> $file
      echo '### BEGIN INIT INFO' >> $file
      echo '# Provides: OracleXE' >> $file
      echo '# Required-Start: $remote_fs $syslog' >> $file
      echo '# Required-Stop: $remote_fs $syslog' >> $file
      echo '# Default-Start: 2 3 4 5' >> $file
      echo '# Default-Stop: 0 1 6' >> $file
      echo '# Short-Description: Oracle 11g Express Edition' >> $file
      echo '### END INIT INFO' >> $file
      fi
      update-rc.d oracle-xe defaults 80 01
      Save the above file and provide appropriate execute privilege :
             sudo chmod 755 /sbin/chkconfig

      b) Set the Kernel parameters :
      Oracle 11gR2 XE requires to set the following additional kernel parameters:
      sudo vim /etc/sysctl.d/60-oracle.conf 
      (Enter the following) 
      # Oracle 11g XE kernel parameters  
      fs.file-max=6815744  
      net.ipv4.ip_local_port_range=9000 65000  
      kernel.sem=250 32000 100 128 
      kernel.shmmax=536870912 
      (Save the file) 
      Note: kernel.shmmax = max possible value , e.g. size of physical RAM ( in bytes e.g. 512MB RAM == 512*1024*1024 == 536870912 bytes ) 
      Verify the change : 
      sudo cat /etc/sysctl.d/60-oracle.conf 
      Load new kernel parameters: 
      sudo service procps start  
      Verify: sudo sysctl -q fs.file-max 
             -> fs.file-max = 6815744 
      c) Increase the system swap space : Analyze your current swap space by following command :
                 free -m 
      Minimum swap space requirement of Oracle 11gR2 XE is 2 GB . In case, your is lesser , you can increase it by following steps in my one of previous post .
      d) make some more required changes :
      i) sudo ln -s /usr/bin/awk /bin/awk 
      ii) mkdir /var/lock/subsys 
      iii) touch /var/lock/subsys/listener 


      6) Now you are ready to install Oracle 11gR2 XE. Go to the directory where you created the ubuntu package file in Step 4 and enter following commands in terminal :
      i) sudo dpkg --install oracle-xe_11.2.0-2_amd64.deb  
      Update : Before you proceed to next step , do have a look at this trouble-shooting post in order to avoid MEMORY TARGET or any other "shared memory" error.

      ii) sudo /etc/init.d/oracle-xe configure 
      Enter the following configuration information:
      • A valid HTTP port for the Oracle Application Express (the default is 8080)  
      • A valid port for the Oracle database listener (the default is 1521) 
      • A password for the SYS and SYSTEM administrative user accounts
      • Confirm password for SYS and SYSTEM administrative user accounts
      • Whether you want the database to start automatically when the computer starts (next reboot).
      7) Before you start using Oracle 11gR2 XE you have to set-up more things :
      a) Set-up the environmental variables :
      Add following lines to your .bashrc :
      export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
      export ORACLE_SID=XE
      export NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`
      export ORACLE_BASE=/u01/app/oracle
      export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
      export PATH=$ORACLE_HOME/bin:$PATH
       
      b) execute your .profile to load the changes:
           
                . ./.profile

      8) Start the Oracle 11gR2 XE :

      sudo service oracle-xe start

      The output should be similar to following :
      user@machine:~$ sudo service oracle-xe start
      Starting Oracle Net Listener.
      Starting Oracle Database 11g Express Edition instance.
      user@machine:~$
       
      8) Create your user :
      a) start sqlplus and login as sys :
      sqlplus sys as sysdba
      ( provide the password you gave while configuring the oracle in Step 6 (ii) ).
      This should come to following :

      SQL*Plus: Release 11.2.0.2.0 Production on Wed May 9 12:12:16 2012

      Copyright (c) 1982, 2011, Oracle. All rights reserved.

      Enter password:

      Connected to:
      Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production

      SQL>

      b) Enter following on the sql prompt : Replace username and password by your desired ones.
      SQL> create user username identified by password;

      User created.

      SQL> grant connect,resource to username;

      Grant succeeded. 
       

      9) Now as you have created the user , you can login to it :

      user@machine:~$ sqlplus

      SQL*Plus: Release 11.2.0.2.0 Production on Wed May 9 12:28:48 2012

      Copyright (c) 1982, 2011, Oracle. All rights reserved.

      Enter user-name: temp
      Enter password:

      Connected to:
      Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production

      SQL> select 2+2 from dual;

      2+2
      ----------
      4

      SQL>

      Reference Links :-