How to set up master slave replication in MySQL

MySQL replication is a process that enables data from one MySQL database server (the master) to be copied automatically to one or more MySQL database servers (the slaves). Replication is asynchronous by default. Slaves do not need to be connected permanently to receive updates from the master. Depending on the configuration, you can replicate all databases, selected databases, or even selected tables within a database.

Continue reading “How to set up master slave replication in MySQL”

Upgrade Ubuntu 16.04/17.10 to Ubuntu 18.04 From Command Line

You can use command line to upgrade Ubuntu desktop or a headless server. Speaking of servers, it is recommended that you upgrade Ubuntu on a test server before doing it on a production server.

If you use SSH to log into your Ubuntu server, it’s a good idea to keep your OpenSSH session alive by adding the following line in /etc/ssh/sshd_config file on your server.

nano /etc/ssh/sshd_config
ClientAliveInterval 60

Save and close the file. Then restart SSH daemon.

systemctl restart ssh

To upgrade to Ubuntu 18.04, first run the following command to upgrade existing software.

apt update && apt dist-upgrade

Then make sure you have update-manager-core package installed.

 apt install update-manager-core

After that, run the following command to begin the upgrade process.


Then follow the on-screen instruction to upgrade to Ubuntu 18.04. Once the upgrade is finished, reboot your Ubuntu desktop or server. To check your Ubuntu version, run:

lsb_release -a


No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04 LTS
Release:	18.04
Codename:	bionic

You also need to re-enable third-party repositories such as PPA because they are disabled during upgrade.

Attention: this update will not work on OpenVZ servers except KVM servers.

OpenVZ container will return this message:

This version of the GNU libc requires kernel version 3.2 or later. Please upgrade your kernel before installing glibc.


How To Install Apache Tomcat 9 on Ubuntu 16.04

Apache Tomcat is a web server and servlet container that is used to serve Java applications. Tomcat is an open source implementation of the Java Servlet and JavaServer Pages technologies, released by the Apache Software Foundation. This tutorial covers the basic installation and some configuration of the latest release of Tomcat 9 on your Ubuntu 16.04 server.

Continue reading “How To Install Apache Tomcat 9 on Ubuntu 16.04”