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.

Remove default Fedora/RHEL/CentOS default Apache welcome page

Answer:

To remove the Apache default welcome page under Fedora/RHEL/CentOS,

1. Remove the welcome page configuration

# rm -rf /etc/httpd/conf.d/welcome.conf

2. Restart Apache

# /etc/init.d/httpd restart 

That's all.

How to upgrade an installed RPM package

Answer:

To upgrade an installed RPM package under Red Hat/Fedora/CentOS

# rpm –Uvh package.rpm

Install GD Library for PHP on Linux

Answer:

To install GD Library for PHP on Linux

1. Fedora/CentOS

# yum install php-gd

Then restart Apache

# service httpd restart

2. Debian/Ubuntu

# sudo apt-get install php5-gd

Then restart Apache

# sudo /etc/init.d/apache restart

How to install a RPM package

Answer:

To install a RPM package under Red Hat/Fedora/CentOS

# rpm –ivh package.rpm