How to fix CentOS 5 or 6 error: YumRepo Error: All mirror URLs are not using ftp, http[s] or file

The error looks like-

And here goes the resolution (please carefully update/use the exact CentOS version you are using, in my case it was CentOS 6.9)

1. Go to /etc/yum.repos.d/ directory:

# cd /etc/yum.repos.d/

2. Make copy of original file:

# cp CentOS-Base.repo CentOS-Base.repo.old

3. Open and edit file with any text editor:

# vi CentOS-Base.repo looks

4. After editing it should looks like: Continue reading “How to fix CentOS 5 or 6 error: YumRepo Error: All mirror URLs are not using ftp, http[s] or file” »


Configuring SpamAssassin for Postfix on CentOS

In the process of receiving email, spamassassin will stand between the outside world and the email services running on your server itself. If it finds, according to its definition rules and configuration, that an incoming message is spam, it will rewrite the subject line to clearly identify it as such. Let’s see how.

The main configuration file is /etc/mail/spamassassin/, and we should make sure the following options are available (add them if they are not present or uncomment if necessary):
report_safe 0
required_score 8.0
rewrite_header Subject [SPAM]

When report_safe is set to 0 (recommended value), incoming spam is only modified by modifying the email headers as per rewrite_header. If it is set to 1, the message will be deleted. To set the aggressivity of the spam filter, required_score must be followed by an integer or decimal number. The lesser the number, the more sensitive the filter becomes. Setting required_score to a value somewhere between 8.0 and 10.0 is recommended for a large system serving many (~100s) email accounts. Once you’ve saved those changes, enable and start the spam filter service, and then update the spam rules: Continue reading “Configuring SpamAssassin for Postfix on CentOS” »


Install ClamAV on CentOS 6

Step 1. First add yum repository your system.

The EPEL repo is enabled by simply installing an RPM. Please use the command below to install the EPEL repository on your CentOS server.

#CentOS 6 – 32-bit

rpm -Uvh

#CentOS 6 – 64-bit

rpm -Uvh

Step 2. Install required ClamAV packages.

yum install clamav clamd

Step 3. Start the clamd service on system boot. Continue reading “Install ClamAV on CentOS 6” »


Install SNMP and Configure the Community String For CentOS

Install SNMP

Install the SNMPD service by running the following command:

yum install net-snmp net-snmp-utils

Once the service is installed, verify that it is set to start at startup by running:

CentOS 6:

chkconfig snmpd on

CentOS 7:

systemctl enable snmpd

Continue reading “Install SNMP and Configure the Community String For CentOS” »


Squid as Transparent Proxy on CentOs 6.4

In this tutorial I am going to configure squid acting as transparent proxy what does it means? It means we have no part of configurations on the client end, just to setup squid in transparent proxy mode so it will sits between client and internet. And redirect their port 80 requests to 3128 port which is default squid port. Here the simple steps which you need to perform on squid server.

Lab Environment: 

  • CetnOs 6.4 (as squid transparent proxy server), Hostname =
  • eth0 : (Connected to Internet) IP =, Gateway = and DNS =
  • eth1 : (Connected to LAN) IP =, and DNS =
  • Xp Pro SP3 (Client PC for testing). Hostname = IP =, Gateway = Server’s IP) and DNS =

Step-1 Installing squid packages.

yum install squid -y

Step-2 Edit squid configuration file ‘/etc/squid/squid.conf’. Continue reading “Squid as Transparent Proxy on CentOs 6.4” »


Install VirtualBox on Centos 6 / 7

Step 1 – Add Required Yum Repositories

Firstly you are required to add VirtualBox yum repository in your system. Download repository file from its official site and place it under at /etc/yum.repos.d/virtualbox.repo .First navigate to /etc/yum.repos.d/ directory and use one of below commands as per your operating system.

cd /etc/yum.repos.d/

The CentOS and RedHat users also required to add EPEL yum repository using one of the following commands.

### On CentOS/RHEL 7 ### 
rpm -Uvh
### On CentOS/RHEL 6 ### 
rpm -Uvh

Step 2 – Install Required Packages

Before installing VirtualBox make sure to install all required packages to run VirtualBox like kernel-headers, kernel-devels etc. Use the following command to install the required packages. Continue reading “Install VirtualBox on Centos 6 / 7” »


Configure iSCSI Initiator (client) in CentOS / RHEL 6

To use RHEL/CentOS 6 system as an iSCSI initiator or client, you must have iscsi-initiator-utils package installed. You can verify that this is installed on your system using the rpm command, as shown in the following example:

$ rpm -qa | grep iscsi-initiator-utils

Install the package if its not already available on your system using yum.

# yum install iscsi-initiator-utils

Start the iscsi demaon and use chkconfig to enable it to start after reboot as well.

# service iscsi start
# chkconfig iscsi on

Once you have installed the required package and started the service you can start discovering the available targets. To Obtain a listing of available targets from a given host (please note that ipaddress listed below must be replaced with the resolvable hostname or IP address of the system providing the port if different than default):

# iscsiadm -m discovery -t st -p,1

Continue reading “Configure iSCSI Initiator (client) in CentOS / RHEL 6” »