How to install Percona XtraDB Cluster on VestaCP
Posted: Sun Sep 16, 2018 4:00 pm
Hi, I'm very interested in Percona XtraDB Cluster, called PXC.
today I tried to start a Percona XtraDB Cluster on Ubuntu 16.04, I'm using vestacp, so Mysql is already installed.
In the first step of installing written in the percona website in third note of Prerequisites, I saw this note:
As mentioned in comment sections of this tutorial, Disabling AppArmor in a wrong way will break your Ubuntu 14x -16x system and will remove a lot of programs!!
I tried sudo apt-get remove apparmor which was the solution of Percona, and I got this:
My question is what is the right solution to install PXC when Mysql is already installed?
PS: I was googling the whole day and found this tutorial:
https://www.percona.com/blog/2018/08/09 ... b-cluster/
But I couldn't understand it completely, it was a little confusing.
1- First of all, Is it the solution I need for installing PXC when Mysql is already installed
2- What is that Start iterating title mean? Is it a mandatory step?
3- In top of the tutorial is written "you can just grab my profile"
Can I skip all the steps for even first node, and do these below steps for all nodes (without doing anything else! none of the other steps!)
(first installing apparmor-utils which is not mentioned in “Copy the profile” section):
today I tried to start a Percona XtraDB Cluster on Ubuntu 16.04, I'm using vestacp, so Mysql is already installed.
In the first step of installing written in the percona website in third note of Prerequisites, I saw this note:
Very bad, dangerous and unacceptable solution by Percona!!!Note
If you previously had MySQL installed on the server, there might be an AppArmor profile which will prevent Percona XtraDB Cluster nodes from communicating with each other. The best solution is to remove the apparmor package entirely:If you need to have AppArmor enabled due to security policies or for other reasons, it is possible to disable or extend the MySQL profile.Code: Select all
$ sudo apt-get remove apparmor
As mentioned in comment sections of this tutorial, Disabling AppArmor in a wrong way will break your Ubuntu 14x -16x system and will remove a lot of programs!!
I tried sudo apt-get remove apparmor which was the solution of Percona, and I got this:
As you can see it is going to uninstall the Mysql, and as a result, it will break my whole vestacp server! Fortunately, I answered No and was able to save my life!The following packages were automatically installed and are no longer required:
libcgi-fast-perl libcgi-pm-perl libevent-core-2.0-5 libfcgi-perl libhtml-template-perl linux-headers-4.4.0-131
linux-headers-4.4.0-131-generic linux-image-4.4.0-131-generic linux-image-extra-4.4.0-131-generic mysql-server-core-5.7
python3-apparmor python3-libapparmor
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
apparmor apparmor-utils liblxc1 lxc-common lxd mysql-server mysql-server-5.7 snapd
0 upgraded, 0 newly installed, 8 to remove and 0 not upgraded.
After this operation, 150 MB disk space will be freed.
My question is what is the right solution to install PXC when Mysql is already installed?
PS: I was googling the whole day and found this tutorial:
https://www.percona.com/blog/2018/08/09 ... b-cluster/
But I couldn't understand it completely, it was a little confusing.
1- First of all, Is it the solution I need for installing PXC when Mysql is already installed
2- What is that Start iterating title mean? Is it a mandatory step?
3- In top of the tutorial is written "you can just grab my profile"
Can I skip all the steps for even first node, and do these below steps for all nodes (without doing anything else! none of the other steps!)
(first installing apparmor-utils which is not mentioned in “Copy the profile” section):
Code: Select all
apt install apparmor-utils
cd /etc/apparmor.d
wget https://gist.githubusercontent.com/y-trudeau/dc62a324817df643eae0ccb39d719c91/raw/94e7c4416de0eb26cbd29fe638a6740a70b90485/usr.bin.mysqld_safe
aa-enforce usr.bin.mysqld_safe