Tuesday, September 10, 2013

Tuesday, August 13, 2013

How to clear all data in a column in a MySQL database table

In certain cases its essential to clear all data in a particular column in a table.
For example a database name is school
There is a table inside school is student
A column inside school is email 

Column email contains email ids of about 100 students.
Apply following command, if you want to clean all email id entries from email column.

mysql -uroot -p  [enter mysql root password]

You can get mysql command prompt, enter following commands there;

use school;
UPDATE `student` SET `email` = '';
quit;



Now email column inside student table is clean.

Tuesday, August 6, 2013

Sunday, August 4, 2013

How to find CPU architecture information

In certain situations, you have to find PC architecture (32 bit / 63 bit) for various purposes. Here is a simple command to display Linux architecture information.

lscpu

The result is,

Saturday, July 27, 2013

Install Whisker menu on Xubuntu 12.04 /XFCE 4

Whisker menu is an application launcher available with XFCE 4. Very easy to find and launch applications with the help of Whisker menu.


Install  Whisker menu on Xubuntu 12.04
Apply following commands,
sudo add-apt-repository ppa:gottcode/gcppa
sudo apt-get update
sudo apt-get install xfce4-whiskermenu-plugin

Remove your default menu and add Whisker menu from panel properties.
Panel > Add New Items > Whisker Menu

Thursday, July 18, 2013

View your network information

This command is helpful to collect information about your network details.
Open a terminal and apply following command,

nm-tool

See the result.

Wednesday, June 19, 2013

Installing Dspace 3.x on Ubuntu 12.04

Installation of prerequisite applications

Open  Applications > Accessories > Terminal and execute following commands. Text in italics are commands to be executed.

sudo apt-get install openjdk-7-jdk
sudo apt-get install tasksel sudo tasksel

Select the following packages.
Use space bar for select applications from list.

[*] LAMP server [*] PostgreSQL database [*] Tomcat Java server

 use tab to select OK button and enter. Packages will start to install.
On the way you have to give MySQL root password. MySQL not necessary for Dspace installation.

sudo apt-get install ant maven
 
Create the database user (dspace)

sudo su postgres createuser -U postgres -d -A -P dspace

enter password for new role (select a password like dspace) Shall the new role be allowed to create more new roles? (y/n) n

Exit from the promp, type exit

Allow the database user (dspace) to connect to the database [If the following command not open, check the postgresql version number and apply in the command]

sudo gedit /etc/postgresql/9.1/main/pg_hba.conf

Add this line to the configuration file at the end:   

local all dspace md5 

save and close the file 

Restart PostgreSQL : sudo su      enter,

then paste the following line and enter

/etc/init.d/postgresql restart

Create the Unix 'dspace' user, update the passwd, create the directory in which you will install dspace, and ensure that the Unix 'dspace' user has write privileges on that directory:

sudo useradd -m dspace

sudo passwd dspace (enter any password like dspace for the new user dspace)

sudo mkdir /dspace

sudo chown dspace /dspace

Create the PostgreSQL 'dspace' database.
 
sudo -u dspace createdb -U dspace -E UNICODE dspace  

Configure Tomcat to know about the DSpace webapps.
[If the following command not open, check the tomcat version number and apply in the command]

sudo gedit /etc/tomcat7/server.xml

Insert the following chunk of text just above the closing </Host> 

<!-- Define a new context path for all DSpace web apps -->
<Context path="/xmlui" docBase="/dspace/webapps/xmlui" allowLinking="true"/>
<Context path="/sword" docBase="/dspace/webapps/sword" allowLinking="true"/>
<Context path="/oai" docBase="/dspace/webapps/oai" allowLinking="true"/>
<Context path="/jspui" docBase="/dspace/webapps/jspui" allowLinking="true"/>
<Context path="/lni" docBase="/dspace/webapps/lni" allowLinking="true"/>
<Context path="/solr" docBase="/dspace/webapps/solr" allowLinking="true"/>

save and close  the file a

This following  step downloads the compressed archive from SourceForge, and unpacks it in your current directory. The dspace-1.x.x-src-release directory is typically referred to as [dspace-src]. You can also download direct from Sourceforge website.

sudo mkdir /build
sudo chmod -R 777 /build
cd /build
wget http://downloads.sourceforge.net/project/dspace/DSpace%20Stable/3.1/dspace-3.1-release.tar.bz2 

tar -xvjf dspace-3.1-src-release.tar.bz2

cd /build/dspace-3.1-src-release
mvn -U package cd dspace/target/dspace-3.1-build
sudo ant fresh_install 
 
Fix Tomcat permissions, and restart the Tomcat server

sudo chown tomcat7:tomcat7 /dspace -R

Restart Tomcat

/etc/init.d/tomcat7 restart

 Make an initial administrator account (an e-person) in DSpace:

/dspace/bin/dspace create-administrator

Test it out in your browser
That is all that is required to install DSpace on Ubuntu. There are two main webapps that provide a similar turn-key repository interface


Wednesday, May 22, 2013

How to upgrade to Koha 3.12 in Koha Live DVD?

New version of Koha released with bundle of new features.
You can visit the release notes and check new features available with.

http://koha-community.org/koha-3-12-0-released/#more-4403

You can also download illustrated release notes,
http://koha-community.org/files/2013/05/Koha-3.12-release-notes.pdf

If you are Koha Live DVD user, you can easily upgrade to 3.12 version.

http://sourceforge.net/projects/kohalivedvd/

Apply the following command in Applications > Accessories > Terminal

sudo su    [enter the Linux password when it ask, check read me file to find password]
apt-get update
apt-get install koha-common


After upgrading you have to install additional perl modules missing,

Open Koha staff interface and check,  About Koha > Per Modules

You can find missing perl modules highlighted in different colors,

How to install missing perl modules,
Apply following commands in a terminal,

sudo su
sudo cpan


Here is an example to install a perl module called Data::Pagination

install Data::Pagination

The same way, you can install other missing Perl modules.
Now your Koha is upgraded to Koha 3.12 and ready to use.

Thursday, May 2, 2013

How to safeguard the panels of Xubuntu Linux for public use computers

Remove and modify the items in panels of Linux desktop is a common problem in Internet cafe's and libraries. A solution is available with Xubuntu Linux to prevent removing the items from desktop panel accidentally by users. 
Follow the steps below,

1. Configure the panels before start the process. Add/remove/edit items from panels.
2. Apply the following command,

sudo cp /home/vimal/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/

3. Apply the following command to edit the file.

sudo leafpad /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml

4. Find following line at the top of the file.

<channel name="xfce4-panel" version="1.0">

Insert # symbol at the start of the line.

5. Copy the following line and paste after the line above mentioned line.

<channel name="xfce4-panel" version="1.0" locked="*" unlocked="root">


 
Save the file. 
 

6. Restart your system.

Information courtesy:  
https://sites.google.com/site/easylinuxtipsproject/xfce#TOC-Safeguard-the-panels-kiosk-mode- 

Sunday, March 31, 2013

How to recover gnome-shell

If you found that your gnome-shell task bar missing?
And your desktop seems plain and not able to access applications menu.
You can recover your lost desktop. Follow the steps.

Apply the key combinations, Ctrl + Alt + T 
A terminal will open. Enter the following commands,

sudo su
gnome-shell --replace

You can see that, your desktop panels and menus appear again

Friday, March 1, 2013

Change grahical Ubuntu boot splash into text mode

gedit /etc/default/grub

Find the word "quiet splash".
Remove the word "quiet splash".

Save the file.

Update the grub.

update-grub

Wednesday, January 30, 2013

How to create Ubuntu Live CD/DVD using Remastersys

This tutorial is for creating a Live CD/DVD based on Ubuntu 12.04. You can also try latest version of Ubuntu Live CD/DVD by using the following instructions.

Step 1
Install Ubuntu 12.04 in a PC or using a Virtual Box application.
Upgrade the system by installing latest packages, apply the following commands,

sudo su
apt-get update
apt-get upgrade

Install the additional applications (e.g. Gimp) for your Live CD/DVD.

Step 2
Remove the uncessary packages using bleachbit. Otherwise the size of Live DVD will be heavy. Install bleachbit using the following command,

apt-get install bleachbit

Open Bleachbit from Applications > System Tools



To use bleachbit, see the documentation here.

Step 3
Installation of Remastersys in Ubuntu 12.04. Apply the following commands.

sudo su
wget -O - http://www.remastersys.com/ubuntu/remastersys.gpg.key | apt-key add -

gedit /etc/apt/sources.list


Add the following lines in the file, save and close.

#Remastersys Precise
deb http://www.remastersys.com/ubuntu precise main


You can add repository for latest version of Ubuntu from here

Update the package repository and install Remastersys

apt-get update
apt-get install remastersys remastersys-gtk

Remastersys will appear in Applications > System Tools > Administration
  
See the screen shots below,

Main screen of Remastersys.
You can assign name of your project.


You can export user settings to Live DVD.

You can click on appropriate buttons to build Live DVD. You need Internet connection to run Remastersys. Certain packages to be installed from Internet to build the Live DVD. The output will be in .iso format, you can locate it from /home/remastersys. Burn the .iso file in a DVD and boot from computer.

Wednesday, January 2, 2013

How to install Gnome Classic desktop in Ubuntu 12.04

Execute the following command in a terminal,

sudo apt-get install gnome-session-fallback

Log out and select Gnome Classic from login session.