CENTOS7 安裝Mysql 7.6.6 cluster
先把fireall關閉 # vi /etc/selinux/config SELINUX=disabled # SELINUXTYPE=targeted 存檔離開 #systemctl stop firewalld.service # systemctl disable firewalld.service 存檔離開,重新開機 安裝前先把CENTOS預設的MYSQL及MARIA移除 yum erase mysql yum erase maria 先下載YUM需要的安裝檔,後續安裝會比較方便 wget http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm 下載成功後用RPM安裝剛剛下載下來的檔 rpm -Uhv epel-release-7-11.noarch.rpm 或者 rpm -ihv epel-release-7-11.noarch.rpm mkdir -p /var/lib/mysql-cluster yum install mysql-cluster-community-server cp /usr/local/mysql/bin/ndb_mgm* /usr/local/bin/ 以上指令其他台都需執行,可以在MGM完成設定後COPY虛擬機來使用會比較快一點 vi /var/lib/mysql-cluster/config.ini [NDBD DEFAULT] NoOfReplicas=2 [MYSQLD DEFAULT] [NDB_MGMD DEFAULT] [TCP DEFAULT] [NDB_MGMD] hostname=192.168.100.62 NodeId=1 [MYSQLD] NodeId=2 hostname=192.168.100.64 [mysqld] NodeId=3 hostname=192.168.100.68 [ndbd] hostname=192.168.100.52 NodeId=4 [ndbd]