How to Disable Network Manager on CentOS 7

1. To disable the Network Manager service, perform the following steps:

Disable Network Manager with the following commands:

CentOS 6, CloudLinux 6, Red Hat Enterprise Linux 6 (RHEL), or Amazon Linux:

service NetworkManager stop
chkconfig NetworkManager off

CentOS 7, CloudLinux 7, or RHEL 7:

systemctl stop NetworkManager
systemctl disable NetworkManager

2. Change to the /etc/sysconfig/network-scripts directory.

3. Open the ifcfg-eth0 and ifcfg-lo files with your preferred text editor and, if they exist, set the following keys’ Continue reading “How to Disable Network Manager on CentOS 7” »

Share

Fixing Vesta CP Exim Email Incoming error with T=local_delivery defer (-1): Malformed value “0MM”

********
Applicable for vesta cp 1.0.0-5 version)
********

If you lately encounter an issue with mail incoming with vesta cp after an auto update took place, your /var/log/exim/main.log shows something similar below-

2021-12-19 03:39:42 1mxheU-000374-0o == mail@domain.com R=localuser T=local_delivery defer (-1): Malformed value “0MM” (expansion of “${extract{6}{:}{${lookup{$l$….

Step-1 Finding vesta version

Well the following steps I had to do to solve. Before further proceedings we need to find out vesta version. My particular version 1.0.0-5 is generating this error of receiving email- specially where disk quota of email users had “Unlimited” quota. Continue reading “Fixing Vesta CP Exim Email Incoming error with T=local_delivery defer (-1): Malformed value “0MM”” »

Share

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” »

Share

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/local.cf, and we should make sure the following options are available (add them if they are not present or uncomment if necessary):

local.cf
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” »

Share

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 http://mirror.overthewire.com.au/pub/epel/6/i386/epel-release-6-8.noarch.rpm

#CentOS 6 – 64-bit

rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

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” »

Share

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” »

Share

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 = pxy.lintut.com
  • eth0 : (Connected to Internet) IP = 192.168.1.211/24, Gateway = 192.168.1.1 and DNS = 8.8.8.8
  • eth1 : (Connected to LAN) IP = 10.0.0.1/24, and DNS = 172.0.0.1
  • Xp Pro SP3 (Client PC for testing). Hostname = xp1.lintut.com IP = 10.0.0.11/8, Gateway = 10.0.0.1(squid Server’s IP) and DNS = 10.0.0.3

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” »

Share

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/
wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo

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

### On CentOS/RHEL 7 ### 
rpm -Uvh http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
### On CentOS/RHEL 6 ### 
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

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” »

Share

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 192.168.10.10
192.168.10.10:3260,1 iqn.2010-03.com.example:tgtd

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

Share