Custom Search

Saturday, April 11, 2009

download rpm using yum without installing it

To download rpm packages using yum, just perform the following things,

First, download yum-downloadonly plugins
Command: yum install yum-downloadonly

Second, now download any rpm without installing it.
Example command, yum install --downloadonly --downloaddir . telnet

This will download the rpm package telnet in current directory.


Thursday, February 19, 2009

yum through proxy with authentication, username & password proxy support

See the Basic setting & then try to apply the following ---

http_proxy="http://username:passwd@192.168.1.1:3128" /* if PROXY host is http://192.168.1.1 & PROT is 3128 */
ftp_proxy="http://username:passwd@192.168.1.1:3128"

Don't forger to export the environment variables!!!!!

yum through proxy, squid proxy, cannot connect through proxy, yum behind proxy

If you are behind a proxy, yum will not connect via proxy.
(Remember you had to put proxy information in Firefox Web Browser to connect with internet).

So, for yum, you have to put the same settings.

First, set the environment variable(s) for yum:

http_proxy="http://192.168.1.1:3128" /* if PROXY host is http://192.168.1.1 & PROT is 3128 */
ftp_proxy="http://192.168.1.1:3128"

Second, export the variable:

export http_proxy
export ftp_proxy

Third, run your yum command!!!!

Saturday, October 25, 2008

Limiting the number of user processes in Fedora/Linux

Limiting user processes is is very important for running a stable system.
To limit user process just add user name or group name or all users to /etc/security/limits.conf file and impose process limitations.

For example:
# To impose a process limit of 500, on "cse" group, add the following line to the file.
@cse hard nproc 500

# To impose a process limit of 100, on user "galvin", add the following line to the file.
galvin hard nproc 100

For more information see the man page, command is "man limits.conf"


Tuesday, August 5, 2008

Reverse command of cat is tac, head is tail, cut is paste...

cat filename shows the content of the file.
But "tac"? What it does?
It displayes the file in reverse order.
So funny!! Why they had implemented so??

Try "head & tail" command and "cut & paste" command.
For details see man pages!!

Accessing a file whose first character of the filename is "-"

A file with name "-file.txt" can not be accessed by the commands like "cat -file.txt" or "vi -file.txt".

But can be accessed using "cat ./-file.txt" or "vi ./-file.txt"
So if anynoe does not know the meaning of "./" will not be able to access the file!!
Its really funny!!!

Adding an admin account in Linux/Fedora

Multiple "Admin" account is possible in Linux.

First create an account & set the password.
Commnad: useradd -g users admin1 [Create a user with name admin1 in users group].

Now edit the corresponding line in /etc/passwd file.
Put zero in third field(user id) and zero in forth field(group id).
Save the file

Now log on to the system with this new account.
You will get "#" prompt!!
 
Watch the latest videos on YouTube.com