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

Installing NTP Service and change timezone in CentOS 6 / CentOS 7

Let’s install NTP service first:

yum install ntp

Configure NTP services by updating the following section (only if appropriate):

nano /etc/ntp.conf

And by commenting on the sections:

# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
#server 0.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst

In my case I used the following National Time Server of Bangladesh:

server bsti1.time.gov.bd
server bsti2.time.gov.bd

save and restart the ntp service.

Change Timezone on a CentOS 6 and 7

How do I see the current time zone on CentOS Linux?

Type the date command or the ls command:

$ date
$ ls -l /etc/localtime

Another option is to type the following command on systemd based distro such as CentOS 7 to see timezone along with the grep command and timedatectl command: Continue reading “Installing NTP Service and change timezone in CentOS 6 / CentOS 7” »

Share

Install and integrate DKIM with OpenDKIM and Postfix on a CentOS 6

UPDATE THE SYSTEM

Before going any further, make sure you’re in a screen session and your system is fully up-to-date by running:

## screen -U -S opendkim-screen
## yum update

ENABLE EPEL REPOSITORY

OpenDKIM is available in the EPEL repository, so we need to enable it on the system before we can install OpenDKIM

## wget -P /tmp http://mirror.pnl.gov/epel/6/i386/epel-release-6-8.noarch.rpm
## rpm -Uvh /tmp/epel-release-6-8.noarch.rpm
## rm -f /tmp/epel-release-6-8.noarch.rpm

INSTALL OPENDKIM

Install the package using yum:

## yum install opendkim

CONFIGURE OPENDKIM

Next thing to do is to configure OpenDKIM. Its main configuration file is located in /etc/opendkim.conf, so before making any changes create a backup and add/edit the following: Continue reading “Install and integrate DKIM with OpenDKIM and Postfix on a CentOS 6” »

Share

Apache Virtual Hosts on CentOS

Step One— Create a New Directory

The first step in creating a virtual host is to a create a directory where we will keep the new website’s information.

This location will be your Document Root in the Apache virtual configuration file later on. By adding a -p to the line of code, the command automatically generates all the parents for the new directory.

sudo mkdir -p /var/www/example.com/public_html

You will need to designate an actual DNS approved domain, or an IP address, to test that a virtual host is working. In this tutorial we will use example.com as a placeholder for a correct domain name.

However, should you want to use an unapproved domain name to test the process you will find information on how to make it work on your local computer in Step Six.

Step Two—Grant Permissions

We need to grant ownership of the directory to the user, instead of just keeping it on the root system.

sudo chown -R apache:apache /var/www/example.com/public_html

Additionally, it is important to make sure that everyone will be able to read our new files.

sudo chmod 755 /var/www

Now you are all done with permissions. Continue reading “Apache Virtual Hosts on CentOS” »

Share

Install Netdata on CentOS 6

Installing Netdata

[root@linuxhelp Desktop]# yum install zlib-devel libuuid-devel libmnl-devel gcc make git autoconf autogen automake pkgconfig -y
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Determining fastest mirrors
.
.
perl-Error.noarch 1:0.17015-4.el6 perl-Git.noarch 0:1.7.1-9.el6_9 
ppl.x86_64 0:0.10.2-11.el6

Complete!

It doesn’t end with that, you should also install additional packages. Run the following command for the same purpose. Continue reading “Install Netdata on CentOS 6” »

Share

Install Poppassd in CentOS 7

Steps for configuration change password plugin for squirrelmail/Horde/Rainloop using poppassd are:

Download poppassd.c from https://netwinsite.com/poppassd/

Look at poppassd.c and make sure it looks safe

yum -y install gcc
gcc poppassd.c -o poppassd -lcrypt
mv poppassd /usr/local/bin/
yum -y install xinetd
cp /etc/xinetd.d/time-stream /etc/xinetd.d/poppassd

nano /etc/xinetd.d/poppassdUpdate “service time” to “service poppassd”

disable = no
id = poppasswd
type = UNLISTED
user = root
group = root
server = /usr/local/bin/poppassd
port = 106
systemctl restart xinetd
systemctl enable xinetd

Test by doing “telnet localhost 106” that service is started properly or not.

Your poppassd is now installed on Centos 7 system.

Src: https://www.sbarjatiya.com/notes_wiki/index.php/CentOS_7.x_Configure_change_password_plugin_for_squirrelmail_using_poppassd

Share

Add a Static Route on CentOS

To add a temporary route:

ip route add 172.16.5.0/24 via 10.0.0.101 dev eth0

To make it persist system or network settings restart, create a route-ifname file for an interface through which the subnet is accessed, in this case eth0:

nano /etc/sysconfig/network-scripts/route-eth0

Add the line with the network settings for the other subnet:

172.16.5.0/24 via 10.0.0.101 dev eth0

If your computer is on a network and is not directly connected to the internet, it will be configured with what is called a default gateway, which is usually a router. If the computer cannot find the specific IP address on its local network (aka broadcast domain), as defined by its subnet, it will forward any packets headed to that IP address to the default gateway. The gateway will then attempt to forward packets elsewhere, such as the internet, or another broadcast domain Continue reading “Add a Static Route on CentOS” »

Share

Set Hostname in Centos 7

CentOS 7 only allows Fully Qualified Domain Names (FQDN’s). Acceptable values include lower-case letters a to z, numbers 0 to 9, the period, and the hyphen, and between 2 and 63 characters.

At the console, type:

hostnamectl set-hostname my.new-hostname.server

NOTE: Replace my.new-hostname.server with your chosen hostname.

Check the Hostname

hostnamectl
Share

Install LAMP on Centos 7 with PHP 5.x/7.0/7.1/7.2

In this tutorial, I use the hostname server1.example.com with the IP p 192.168.1.100. These settings might differ for you, so you have to replace them where appropriate.

I will add the EPEL repo here to install latest phpMyAdmin as follows:

rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*
yum -y install epel-release

To edit files on the shell, I’ll install the nano editor. If you prefer vi for file editing, then skip this step.

yum -y install nano

Installing MySQL / MariaDB

MariaDB is a MySQL fork of the original MySQL developer Monty Widenius. MariaDB is compatible with MySQL and I’ve chosen to use MariaDB here instead of MySQL. Run this command to install MariaDB with yum:

yum -y install mariadb-server mariadb

Then we create the system startup links for MySQL (so that MySQL starts automatically whenever the system boots) and start the MySQL server: Continue reading “Install LAMP on Centos 7 with PHP 5.x/7.0/7.1/7.2” »

Share