Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Yum repository mirror for old CentOS' versions

Answer:

Most CentOS' mirrors don't host full mirror of Yum repository for all versions of CentOS. If you are using older version of CentOS, you might one-day found the yum update is broken since the mirror no longer contains the files you needed.

In this case, you can modify the file /etc/yum.repos.d/CentOS-Base.repo and change all paths point to the following:

..
baseurl=http://vault.centos.org/...
..

Then do a yum update to reflect the changes.

Check which Apache modules are loaded

Answer:

To check which Apache modules are loaded, in RHEL/Fedora/CentOS, type

# httpd -M

In Debian/Ubuntu

# sudo apache2ctl -M

How to tell if Apache 2 is using prefork or worker MPM?

Answer:

If you are running in Red Hat Linux/ Fedora/ CentOS

# httpd -V
....
Architecture:   64-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
...

If you are running in Debian/ Ubuntu, you can use apache2 -V, which get the same output as above.

Immediate time synchronization in RHEL/CentOS/Fedora

Answer:

If you want to sync the system time without installing ntpd package, rdate is an older way but it will do what you need.

# rdate -s ntp0.cornell.edu

You can find a list of time servers at: http://pank.org/blog/2004/08/time-server-list.html

Remove package with Yum

Answer:

You can use the following command to remove packages using yum,

e.g. remove Firefox

yum remove firefox

To remove multiple packages, try

yum remove firefox gedit