Saturday, February 25, 2012

Performing basic tasks on CentOS 5

to see the current dirctory


pwd

/home/sourav



ls

Desktop

(it's directory not file as it is in blue colour)


cd Desktop

ls

cd ..

to go one level up

(tab for command completion)

cat > a.txt
Hellow how are you?

ctrl + z




ls -a for showing files starting with .


in linux user home directories generally starts with .

man and info command shows info about commands


for example



man ls

press space for more(scroll down)


press b for scrol up


press q to quit

ls

a.txt

cp a.txt b.txt

ls


a.txt b.txt

up arrow for previous commands
move or
mv filename newfilename
to create directory use mkdir directory name
to delete directory use rmdir directory name
to delete a non-empty directory
rm -r directory name

ls -l for long listing
In info command you can search like to search in emacs editor

info ls


type ctrl + s
 
type long to search long word in the info document

ctrl + g to exit out of searching in the document

q to quit

ls -al combines 2 command

In man command you can search like to search in vi editor
type a slash(/)
and the prompt will change to / from :

type the search string such as long
now press n to find the next instance where the word "long" is present in the
man document

find any command contaning any particular word

example

man -k jpg

cd /


takes us to the toppest level directory

there type ls to know about linux directories

bin directory contains executable binary files


boot directory holds the files needed for booting

home is for users

opt directory is for optional softwares


root is root user's home directory


many people call the / directory the root directory






sbin directory holds executable binary files such as system tools(can be used




by system admins)

in usr directory there is also /bin and /sbin directory
any executable generally resides in /bin or /usr/bin directory
any executable that is a system utility generally resides on /sbin or /usr/sbin
directory
in your user home directory there will be files ending with tilda(~) sign
such as
.bash_profile~
they are the old configuration
the newer configuration files will be without tilda(~),in case the newer files
got messed up
creating an alias

cd /home/sourav

vi .bashrc


press i


type
alias rm='rm -i'


:wq to save the file


type

source .bashrc

to active the change immediately and try deleting something with rm
to add a custom application launcher

system-preference-more preference-menu layout

then click new item

write the name of the application and the command to initiate it
close it

then you will see the application in the application drop down menu bar

to install a rpm

rpm -ivh packagename.rpm

to uninstall a rpm

rpm -e packagename.rpm

to untar a tar file

tar xvf packagename.tar

install apache

yum install httpd


start apache server


/etc/init.d/httpd start


to restart


/etc/init.d/httpd restart


Saturday, February 18, 2012

Update Firefox on Linux




Update Firefox on Ubuntu / Debian Linux


You can use APT package handling utility i.e. apt-get command. You can also use a GUI package tool called Update Manager:


Just type the following two commands at terminal:


$ sudo apt-get update


$ sudo apt-get install firefox


You can also use GUI tool: Click on System > Administration > Update Manger > Click on Check button see for updates






Update Firefox on Fedora / Redhat / CentOS Linux


Use yum tool or gui tool for the same purpose:


# yum update


# yum update firefox

Installing flash on CentOS5 and CentOS6

Step1:Install Yum Repository from Adobe



For i386



# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux

For x86-64


# rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpmadobe-release/adobe-release-x86_64-1.0-1.noarch.rpm


# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux


Step 2: Update the repositories


# yum update


Step 3: Installing Adobe Player -


CentOS 5


# yum install flash-plugin nspluginwrapper curl


CentOS 6



# yum install flash-plugin nspluginwrapper alsa-plugins-pulseaudio libcurl


Source:http://linuxtoolkit.blogspot.in/2012/01/installing-adobe-flash-plugin-on-centos.html



Friday, February 17, 2012

Things to do after installing Fedora 16 on Vmware Workstation 7


yum -y update

yum -y update kernel


Restart

yum -y install dkms binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel gcc-c++ kernel-PAE-devel


Restart


yum -y install qt-devel qt-config


Restart


Then go to http://rpmfusion.org/Configuration/ and download 2 rpm files for Fedora16(free and non-free) and install them by rpm -ivh command to add rpmforge repositories to Fedora16.


Then go to http://rpm.livna.org/ and download the rpm file and install it to add livna repositories to Fedora 16


Then install codecs by


yum -y install gstreamer-plugins-bad gstreamer-plugins-ugly gstreamer-ffmpeg phonon-backend-gstreamer


yum -y install ffmpeg ffmpeg-libs


yum -y install libdvdread libdvdnav lsdvd
By Default Perl is not installed in Fedora 16


to install perl


(yum grouplist "Perl Development" 

Loaded plugins: langpacks, presto, refresh-packagekit


Adding en_US to language list


Setting up Group Process


updates/group_gz
408 kB 00:00


updates-testing/group_gz
408 kB 00:00


Installed Groups:


Perl Development




install perl and a lot of useful additions. To install it that way, instead of "grouplist" use "groupinstall" .)




yum groupinstall "Perl Development"
 
after install see the version of perl by
 
perl -v


install gnome-tweak-tool by


yum -y install gnome-tweak-tool


install wxPython by


yum -y install wxPython


install wine by


yum install wine


yum install xfs


yum install ttmkfdir



wget http://downloads.sourceforge.net/wine/wine_gecko-1.5-x86.msi
sudo mkdir -p /usr/share/wine/gecko
sudo mv wine_gecko-1.5-x86.msi /usr/share/wine/gecko/

download chkfontpath rpm and install it


yum install cabextract rpm-build

wget http://corefonts.sourceforge.net/msttcorefonts-2.0-1.spec

 rpmbuild -ba msttcorefonts-2.0-1.spec

 rpm -ivh /usr/src/redhat/RPMS/noarch/msttcorefonts-2.0-1.noarch.rpm

/sbin/service xfs reload

download winetricks rpm and install it


yum -y install ncurses-devel  qt3-devel libXi-devel  gtk2-devel libglade2-devel


Then Install Vmware Tools