Skip to main content

Posts

Showing posts from January, 2018

How to Upgrade MariaDB 5.5 to MariaDB 10.1 Stable Release on CentOS 7 for VestaCP ?

By Default VestaCP will install old base version of Mariadb 5.5 when installing on Centos 7.

I am using VestaCP with
Version: 0.9.8 (x86_64), Release: 23
5.5.60-MariaDB - MariaDB Server
PHP version: 5.6.40


In this tutorial we are going to show you how to upgrade MariaDB 5.5 to MariaDB 10.1 latest stable version. You will need to have root access to the machine, where you will be performing the upgrade.

Note that if you are running earlier version of MariaDB the recommended course of upgrading is by going through each version. For example MariaDB 5.1 -> 5.5 -> 10.1.
Clean all yum cache & update yum
# yum clean all # rm -rf /var/cache/yum # yum update -yStep 1: Backup or Dump All MariaDB Databases
As always when performing an upgrade creating backup of your existing databases is important. You can either dump the databases with command such:
# mysqldump -u root -pPassbMUs1Pbu --all-databases > /tmp/all-database.sql Or alternatively, you can stop the MariaDB service with:
# systemc…

How to Install High Performance VestaCP Hosting Panel with NGINX+php-fpm?

Vesta Control Panel (VestaCP) is an open source hosting control panel that can manage multiple websites, create and manage email accounts, create and manage FTP accounts. Also, manage MySQL database and DNS records.

The Vesta Control panel can be installed on a RHEL, CentOS, Debian and Ubuntu server. For a smooth installation you will need clean system "minimal install base". If installation fails you can force it using --force option. If you want to get full list of available options run installer with --help argument.

Installer categorizes servers into 4 groups.
Micro - less than 1Gb of RAM.       - Do not support phpfcgi template
Small - less than 3Gb of RAM.        - Do not support phpfcgi template
Medium - less than 7Gb of RAM.   - Support  Antispam and Antivirus packages
Large - more than 7Gb of RAM.     - Support  Antispam and Antivirus packages

Antispam and Antivirus packages are only installed on a medium and large servers. Micro server also do not support phpfcgi templa…

VestaCP Installation Perquisite : Part 7 Install Latest EPEL Release

At First, Update your Base Repository ,then install latest EPEL
# yum check-update # yum update -y Reboot The Machine # reboot # rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY* # yum -y install epel-release Run Update again & Check # yum update -y # yum repolist If you have getting any error then run:
# yum clean all # rm -rf /var/cache/yum # yum update -y # yum repolist By default CentOS 7 uses postfix mail server. So remove Postfix completely because Vesta uses Exim4 mail server . also remove sendmail
# systemctl stop postfix # yum remove postfix -y # yum remove sendmail -y If you want use nginx web-server , then remove
# systemctl stop httpd # yum remove httpd –y

VestaCP Installation Perquisite : Part 6 Set-Up Time Zone

Server Time Zone is very important for any Internet Services. My Time Zone is Asia/Dhaka . Follow the steps to configure your Time Zone.
# timedatectl list-timezones # timedatectl list-timezones | grep Asia # mv /etc/localtime /root/localtime.old # ln -s /usr/share/zoneinfo/Asia/Dhaka /etc/localtime # timedatectl set-ntp yes # timedatectl set-timezone Asia/Dhaka # systemctl restart systemd-timedated.service # timedatectl Local time: Wed 2018-10-31 11:15:50 +06 Universal time: Wed 2018-10-31 05:15:50 UTC RTC time: Wed 2018-10-31 05:15:50 Time zone: Asia/Dhaka (+06, +0600) NTP enabled: yes NTP synchronized: yes RTC in local TZ: no DST active: n/a # hwclock Wed 31 Oct 2018 11:21:37 AM +06 -0.084209 seconds

VestaCP Installation Perquisite : Part 5 Configure Chrony NTP server

Accurate time keeping is important for a number of reasons in IT. This setup is the best practice that helps with problem diagnosis and informal server monitoring. I am living in Asia that's why i'm using this pool.
Install Chrony and Configure The NTP server .
# yum -y install chrony # vi /etc/chrony.conf #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 server 0.asia.pool.ntp.org iburst server 1.asia.pool.ntp.org iburst server 2.asia.pool.ntp.org iburst server 3.asia.pool.ntp.org iburst add the network range you allow to receive requests allow 127.0.0.1 :x (save & quit) Reminder: We have disabled firewalld, So we will add the port 123/udp after the VestaCP installation using Iptables.
Start the services and enable it 
# systemctl start chronyd # systemctl enable chronyd # chronyc sources # timedatectl set-ntp yes # systemctl enable systemd-timedated.service # syste…

VestaCP Installation Perquisite : Part 4 Disable Network Manager & Set Static IP

This Tutorial describes how to disable the Network Manager service. The Network Manager service automates the network's settings and disrupts connections to the IP addresses that reside in the ipaliases module. We recommend that you disable the Network Manager service and enable the network.service service before you install VestaCP hosting Control Panel.
# systemctl stop NetworkManager # systemctl disable NetworkManager # nmcli device status # systemctl list-unit-files | grep NetworkManager # systemctl enable network.service # systemctl restart network.service Reboot The Machine # reboot I have two NIC in my VPS, So Add the below parameter in /etc/sysconfig/network-scripts/ifcfg-eXXX of interfaces that are managed by NetworkManager to make it unmanaged. NM_CONTROLLED="no“
# vi /etc/sysconfig/network-scripts/ifcfg-ens33 BOOTPROTO=static NM_CONTROLLED=no ONBOOT=yes #DOMAIN=datahead.biz HOSTNAME=host.datahead.biz :x (save & quit) # vi /etc/sysconfig/network-scripts/i…

VestaCP Installation Perquisite : Part 3 Set Hostname Permanently

The hostname is used by many of the networking programs (such as sendmail, Apache servers) to identify the machine. By default, your server is started with the server’s given name as the hostname. Some software, such as cPanel, CWP , VestaCP requires a valid Fully Qualified Domain Name (FQDN) for the hostname.

Types of hostnames (The hostname can be configured as follows):
Static host name assigned by sysadmin. For example, “server1”, “wwwBot2”, or “host.datahead.biz”.
Transient/dynamic host name assigned by DHCP or mDNS server at run time.
Pretty host name assigned by sysadmin/end-users and it is a free-form UTF8 host name for presentation to the user. For example, “Rubel’s netbook”.

On a CentOS Linux 7 server you can use any one of the following tool to manage hostnames:
hostnamectl command : Control the system hostname. This is a recommended method.
nmtui command : Control the system hostname using text user interface (TUI).
nmcli command : Control the system hostname using CLI part o…

VestaCP Installation Perquisite : Part 2 Disable Firewalld

CentOS 7 comes with firewalld by default. So disable firewalld because VestaCP uses IPtables & with Fail2ban. Here
Firewall - Iptables
Intrusion Detection  - Fail2ban
# systemctl stop firewalld.service # systemctl disable firewalld.service Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service. Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service. # systemctl mask firewalld.service Created symlink from /etc/systemd/system/firewalld.service to /dev/null. Reboot your server so that all updates can take affect and then check your Firewalld Status.
# reboot # systemctl status firewalld

VestaCP Installation Perquisite : Part 1 Disable SeLinux

To run VestaCP on your server, SELinux must remain disabled. SELinux in enforcing mode does not allow VestsCP to function properly. For more information about SELinux modes, read the SELinux Mode documentation.

While VestaCP can function with SELinux in permissive mode, we recommend that you do not use it. Permissive mode generates a large number of log entries.To check the status of SELinux on your server, run the sestatus command.

Environment Details:
CPU Model: Intel(R) Xeon(R) CPU X3440 @ 2.53GHz
CPU Details: 2 Core (2527 MHz)
Distro Name: CentOS Linux release 7.6.1810 (Core)
Kernel Version: 3.10.0-957.1.3.el7.x86_64
RAM: 8 GB
Type: VPS (VmWare)

At first we will disable the selinux then reboot the machine .
# sestatus # vi /etc/selinux/config OR # vi /etc/sysconfig/selinux # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instea…