Labels

Monday, April 23, 2012

How to use YUM to install and uninstall packages

Introduction
To update the system applying the most recent corrective patches of security and to the operating system is not as difficult as many do not suppose, nor either must be a hell of dependencies between packages RPM as some others argue. The reality of the things is that it is much very simple and single requires of good bandwidth or very many patience. Next we presented/displayed the procedures to use yum and to make easily what some denominate "horrible, difficult and complicated ".

Please note there are some changes that apply to Fedora Core 3. You will need to install GPG Key for yum in FC3.

Creating Yum Repo's For FC3.

To update system. Update of the system with all the dependencies that are necessary:

Code:
yum update
Searches. To make a search of some package or term in the data base in some of the formed deposits yum in the system:

Code:
 yum search any-package
Example:

Code:
yum search httpd
I hope this will help you understand how to use yum more effeciently. Any erros in this how please notify me.
Consultation of information. To consult the information contained in a package in individual:

Code:
 yum info any-package
Example:

Code:
yum info httpd
Installation of packages. Installation of paquetería with automatic resolution of dependencies:

Code:
 yum install any-package
Example.

Code:
yum install gkrellm
Uninstalling packages. Desinstalación of packages along with everything what it depends on these:

Code:
yum remove any-package
Example.

Code:
yum remove gkrellm
Listing Packages. The following thing will list all the packages available in the data base yum and that can settle:

Code:
 available yum list|less
The following thing will list all the packages installed in the system:

Code:
 yum list installed|less
The following thing will list all the packages installed in the system and that can (they must) be updated:

Code:
 yum list updates|less
Cleaning of the system.

Yum leaves as result of its use heads and packages RPM stored in the interior of the directory located in the route /var/cache/yum/. Particularly the packages RPM that have settled can occupy much space and is by such reason agrees to eliminate them once no longer they have utility. Also it agrees to do the same with the old heads of packages that no longer are in the data base. In order to make the corresponding cleaning, the following thing can be executed:

Code:
 yum clean all
Group install

Code:
yum groupinstall "groupname"

Monday, April 2, 2012

Shell+Script Learning Notes--Basic

1.              To display the current Shell that you are in
# echo $SHELL
2.              How to check the bash shell version
# bash -version
GNU bash, version 3.2.48(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2007 Free Software Foundation, Inc.

3.              There are two ways you can execute this script.

The first is by “sourcing” the script. All this did was send the lines in your file except for those that started with the # to the current shell. So running the script is identical to typing the following at the command prompt
$ . ./simple.sh

The other way you can execute your script is to make it executable and use it as a command.
$ ./simple.sh

specify which shell to run within your script.  #!/bin/bash at the beginning of your script.

How to find the installation path for a software under linux?

You can use:
which fluidpoint
to see where it is executing from (if it's in your $PATH). Or:
find / -name fluidpoint 2> /dev/null
to look for a file named fluipoint and redirect errors on virtual filesystems.
Usually they are in /sbin, /usr/sbin, /usr/local/bin or ~ as a hidden directory.



  
If you use an RPM based distribution (CentOS, RHEL, SUSE, openSUSE) you can use rpm -ql
Example:
rpm -ql findutils
/bin/find
/usr/bin/find
/usr/bin/xargs
/usr/share/doc/packages/findutils
/usr/share/doc/packages/findutils/AUTHORS
/usr/share/doc/packages/findutils/COPYING
/usr/share/doc/packages/findutils/NEWS
/usr/share/doc/packages/findutils/README
/usr/share/doc/packages/findutils/THANKS
/usr/share/doc/packages/findutils/TODO
/usr/share/info/find.info.gz
/usr/share/man/man1/find.1.gz
Things aren't installed to locations in the Linux/UNIX world like they are in the Windows (and even somewhat in the Mac) world. They are more distributed. Binaries are in /bin or /sbin, libraries are in /lib, icons/graphics/docs are in /share, configuration is in /etc and program data is in /var. The /bin,lib,sbin contain the core applications needed for booting and the /usr contains all the other user and system applications