Saturday, 22 December 2012
Installing the Flash plugin manually
When prompted, save the file (i.e.
install_flash_player_"version"_linux."processor".tar.gz).
At the top of the Firefox window, click on the File menu and select Quit
Open a Terminal window (in Gnome, click on the Applications menu,
select Accessories, and then select Terminal.)
In the Terminal window, change to the directory where you saved
the file you downloaded (e.g. cd /home/user/Downloads).
Extract libflashplayer.so from the file you downloaded with the command
tar -zxvf install_flash_player_"version"_linux."processor".tar.gz.
As the super user, copy the extracted file, libflashplayer.so, to
your Firefox installation directory's plugins sub-directory. For
example, if Firefox is installed in /usr/lib/mozilla, use the command
sudo cp libflashplayer.so /usr/lib/mozilla/plugins
and then enter your super user password when prompted.
Wednesday, 12 December 2012
Install Tomcat on a Linux Server
This article walks you through installing Tomcat on your Linux server. This has been tested on a Linux server with Cent OS release 5.5 (Final) and no control panel (e.g., Plesk or cPanel). These instructions were performed with Tomcat 7.0.10. This only applies to Cloud and Dedicated accounts. You can view more information about these account types at http://www.hosting.com/services/platform-services.
- Obtain a tarball (.tar.gz) of the latest stable release of Tomcat from http://tomcat.apache.org/ and place it in /usr/local/ on your Linux server. For example, you might run something like this at command prompt on your Linux server.
wget http://www.bizdirusa.com/mirrors/apache/tomcat/tomcat-7/v7.0.10/bin/apache-tomcat-7.0.10.tar.gz - Extract the tarball by running a command similar to the following:
tar -xvzf apache-tomcat-x.x.x.tar.gz (x.x.x is the version of Tomcat you obtained in step 1 above) - Create a symbolic link. The LINK NAME will be Tomcat and the TARGET will be the path of the extracted folder you created in step 2. It may look something like this:
ln -s /usr/local/apache-tomcat-7.0.10 ./tomcat - Run the following command:
export CATALINA_HOME=/usr/local/tomcat - Add the following lines to your /etc/profile file. It will set the CATALINA_HOME variable automatically if the system restarts.
- Install the latest stable release of the Java JDK. You can obtain this at http://www.oracle.com/technetwork/java/javase/downloads/index.html.This should be placed into /usr/java/jdkx.x.x_xx (the x's will be your version number).
- Run the following command:
export JAVA_HOME=/usr/java/jdk1.6.0_23 (The 1.6.0_23 you should replace with your version of the JDK you installed in Step 6. - Add the following lines to your /etc/profile file. It will set the JAVA_HOME variable automatically if the system restarts. Replace the 1.6.0_02 with your version.
- Run the following command to start the Tomcat server:
$CATALINA_HOME/bin/startup.sh - If you obtained any errors on the starting of Tomcat, please review the _ log to resolve those issues. Once those issues are resolved, proceed to step 11.
- Verify that the Tomcat server is running by browsing to http://Your_IP_Here:8080/
How to install Tomcat 6 on Ubuntu
Because Tomcat version 6 was included in Ubuntu installing a working Tomcat server is reasonably straightforward. However, before we can start installing Tomcat itself, we must first install Java.
First Install Sun Java in ubuntu 9.04 using this tutorial
Install tomcat 6 in ubuntu 9.04
sudo apt-get install tomcat6 tomcat6-admin tomcat6-common tomcat6-user tomcat6-docs tomcat6-examples
This command downloads and install the following packages
tomcat6 : Servlet and JSP engine
tomcat6-admin : Admin web applications
tomcat6-common : Common files
tomcat6-user : Tools to create user instances
tomcat6-docs : Example web applications
tomcat6-examples : Example web applications
To start, stop, restart and get the server status
Start tomcat server
sudo /etc/init.d/tomcat6 start
Stop tomcat server
sudo /etc/init.d/tomcat6 stop
Restart tomcat server
sudo /etc/init.d/tomcat6 restart
Get tomcat server status
sudo /etc/init.d/tomcat6 status
After installation type http://localhost:8080 or http://serverip:8080/examples/servlets/ in your browser.Now you should see tomcat welcome page
* To enable admin web based
features add the following lines to your /etc/tomcat6/tomcat-user.xml
<role rolename="manager"/>
<role rolename="admin"/>
<user name="admin" password="secret_password" roles="manager,admin"/>
* you should be able to see your manage page here http://your_ip_goes_here:8080/manager/html
* log in with the name and password you just set in /etc/tomcat6/tomcat-users.xml
* ls /var/lib/tomcat6 directory.
* you should see these directories conf, logs, webapps, work
* webapps is where your servlets will go ( or at least a xml file that points to them )
* as a test download this war file http://simple.souther.us/SimpleServlet.war
* then use the tomcat management page and select war file to deploy ( in teh deploy section) to upload this file to your server
* optionally just wget http://simple.souther.us/SimpleServlet.war directly to the webapps folder
* tomcat should recognize the war file and expand it with everything you need
* browse to http://serverip:8080/SimpleServlet/
Change tomcat server to run on port 80
If you want to Change tomcat server to run on port 80 follow this procedure
You need to edit the /etc/tomcat6/server.xml file
nano /etc/tomcat6/server.xml
Now replace the part that says Connector port=”8080? with Connector port=”80?
Save and exit the file
Restart tomcat server with the following command
sudo /etc/init.d/tomcat6 restart
Disable Apport Error Report Dialog in Ubuntu 12.04
In fresh Ubuntu 12.04 installation, it keeps popping up annoying apport error report dialog on every log-in even after sending the error report. This simple tutorial will show you how to disable this dialog in Ubuntu.
Open up terminal from the dash home or press Ctrl+Alt+T, edit “/etc/default/apport” file with this command:
sudo gedit /etc/default/apport
Set enable=0:
enable=0
Save the file, and done!
Thursday, 8 November 2012
Ubuntu How to install LBPxxxx canon printers
First, download the drivers from here and extract the file.

1.sudo dpkg -i cndrvcups-common_2.00-2_i386.debThen double click on the files and install or type the following command in terminal one by one.
2.sudo dpkg -i cndrvcups-capt_2.00-2_i386.deb
Now restart the cups type following commands in terminal
3.sudo /etc/init.d/cups restart
4.sudo /usr/sbin/ccpdadmin -p LBP2900 -o /dev/usb/lp0
Type the following the screen will display printer models

5.ls /usr/share/cups/model/ |grep CNCUPS

here select the printer model for installation
6. /usr/sbin/lpadmin -p LBP2900 -m CNCUPSLBP2900CAPTK.ppd -v ccp:/var/ccpd/fifo0 -E
Now the printer is installed

Then restart ccpd type the following command in terminal
7.sudo /etc/init.d/ccpd start
Set the ccpd at starting the computer type the following
8.sudo update-rc.d ccpd defaults 20
Now the printer works fine in my office .
Disable guest account in ubuntu 12.04 (Precise)
By default ubuntu 12.04 comes with guest account.You can disable this account using the following procedure.Guest account is a paswordless account which allow users to get access to Ubuntu machine
Open /etc/lightdm/lightdm.conf file from your terminal using the following commandgksudo gedit /etc/lightdm/lightdm.conf
Add the following line
allow-guest=false
Save and exit the file
After adding the above line you should see similar to the following in lightdm.conf file
[SeatDefaults] user-session=ubuntu greeter-session=unity-greeter allow-guest=false Finally you have to restart lightdm using the following command from your terminal
Note:- After executing above command all graphical programs running will be closedsudo restart lightdm
Friday, 2 November 2012
Package Installation and Updates
Most new users will use the Synaptic Package Manager to install packages. These instructions are for installing packages from the command-line Terminal. Terminal can be started:
- Menu -> Applications -> Accessories -> Terminal
- Install packages:
sudo apt-get install packagename
-
-
- Example:
-
sudo apt-get install mpd sbackup
- Remove packages:
sudo apt-get remove packagename
- To remove all dependencies:
sudo apt-get autoremove
-
-
- Example:
-
sudo apt-get remove mpd sbackup
- Search for packages:
apt-cache search <keywords>
-
-
- Examples:
-
apt-cache search Music MP3 apt-cache search "Text Editor"
- Update the apt package database after adding/removing repositories:
sudo apt-get update
- Upgrade packages:
sudo apt-get upgrade
- Upgrade the entire distribution (e.g. from Maverick to Natty):
sudo apt-get dist-upgrade
Installing .deb packages
Debian (.deb) packages are the packages that are used in Ubuntu. You can install any .deb package in your system. .deb files can generally be installed from your file manager (Nautilus) merely by clicking on them, since file associations with the default installer is already set in Ubuntu. These instructions are for those who wish to install packages from the command-line terminal (Terminal).
- Install a downloaded Debian (Ubuntu) package (.deb):
sudo dpkg -i packagename.deb
- Remove a Debian (Ubuntu) package (.deb):
sudo dpkg -r packagename
- Reconfigure/Repair an installed Debian (Ubuntu) package (.deb):
sudo dpkg-reconfigure packagename
-
- *Example:
sudo dpkg-reconfigure mpd
Handling (Tar/GZip) and (Tar/Bzip2) archives
(Tar/GZip) archives end in ".tar.gz" and (Tar/Bzip2) archives end in ".tar.bz2". Bzip2 is the newer, more efficient compression method. These files can generally be automatically extracted by merely clicking on them from your file manager (Nautilus), since file associations with the appropriate archival utilities are set by default in Ubuntu. These instructions are for those who wish to use the command line Terminal.
-
- To extract:
tar xvf packagename.tar.gz
Note: tar is an application which can extract files from an archive, decompressing if necessary.
-
- -x means extract.
- -v means verbose (list what it is extracting).
- -f specifies the file to use.
- Decompressing ".gz" files
gunzip file.gz
- Decompressing ".bz2" files
bunzip2 file.bz2
-
- Note: You can also decompress a package first by using the command gunzip (for .gz) or bunzip2 (for .bz2), leaving the .tar file. You would then use tar to extract it.
-
- To create a .gz archive:
tar cvfz packagename.tar.gz folder
-
- To create a .bz2 archive:
tar cvfj packagename.tar.bz2 folder
Installing a package from source
- Make sure you have all the necessary development tools (i.e. libraries, compilers, headers):
sudo apt-get install build-essential linux-headers-$(uname -r)
-
- Note: "uname -r" lists the current kernel you are using
- Extract the archive that contains the source files:
tar xvf sourcefilesarchive.tar.gz
- Build the package using the package's script (in this case the configure script), compile the package (make), and install the compiled package into your system (make install):
cd /path/to/extracted/sourcefiles ./configure sudo make sudo make install
-
- Note: typing ./ before a filename in the current folder allows the Linux shell to try and execute the file as an application even if it is not in the path (the set of folders which it searches when you type a command name). If you get a "permission denied" error, the file is not marked as being executable. To fix this:
sudo chmod +x filename
-
- Example: In the above instructions, configure is the shell script to build the package from source. To be sure the configure script is executable:
sudo chmod +x configure
Create a .deb package from source files
If your build from source is successful, you can make a Debian (Ubuntu) package (.deb) for future use:
- Install package tools:
sudo apt-get install checkinstall
- Rebuild package using "checkinstall":
cd /path/to/extracted/package ./configure sudo make sudo checkinstall
- Keep the resulting ".deb" file for future use. It can later be installed using:
sudo dpkg -i packagename.deb
Note: These are basic instructions that may not always work. Some packages require additional dependencies and optional parameters to be specified in order to build them successfully. Also see these Ubuntu wiki instructions. More info about .deb package structure can be found here.
