【待完成】CentOS6.5安裝mysql-cluster-community-7.5.6-1.el6.x86_64.rpm-bundle.tar
阿新 • • 發佈:2019-01-26
先在官網上下載(https://dev.mysql.com/downloads/cluster/)mysql-cluster-community-7.5.6-1.el6.x86_64.rpm-bundle.tar,先選擇Red Hat Enterprise Linux / Oracle Linux,在選擇Red Hat Enterprise Linux 6 / Oracle Linux 6 (x86, 64-bit),將下載的mysql-cluster-community-7.5.6-1.el6.x86_64.rpm-bundle.tar上傳到CentOS上
rpm -qa|grep mysql #檢視mysql是否安裝,如果已經安裝需要解除安裝,如果是
rpm -e --nodeps mysql-libs-5.1.71-1.el6.x86_64 #如果這個命令不行,可用:yum -y remove mysql-libs-5.1.71-1.el6.x86_64 #解除安裝
cd /usr/local/ #指定目錄
tar -xvf mysql-cluster-community-7.5.6-1.el6.x86_64.rpm-bundle.tar
rpm -ivh mysql-cluster-community-common-7.5.6-1.el6.x86_64.rpm
rpm -ivh mysql-cluster-community-libs-7.5 .6-1.el6.x86_64.rpm
yum install perl #安裝mysql-cluster相關的依賴包
yum install perl-Class-MethodMaker #安裝mysql-cluster相關的依賴包
yum install perl-DBI #安裝mysql-cluster相關的依賴包
rpm -ivh mysql-cluster-community-client-7.5.6-1.el6.x86_64.rpm
yum install libaio #安裝mysql-cluster相關的依賴包
yum install numactl #安裝mysql-cluster相關的依賴包
rpm -ivh mysql-cluster-community-server-7.5.6-1.el6.x86_64.rpm
rpm -ivh mysql-cluster-community-management-server-7.5.6-1.el6.x86_64.rpm
rpm -ivh mysql-cluster-community-devel-7.5.6-1.el6.x86_64.rpm
mkdir /var/lib/mysql-cluster #建立目錄,用於管理節點
mkdir /usr/mysql-cluster #建立目錄,用於程序DIR
mkdir /var/lib/mysql/data #建立目錄,用於儲存節點
vi /var/lib/mysql-cluster/config.ini
[ndbd default]
NoOfReplicas= 1
[mysqld default]
[ndb_mgmd default]
[tcp default]
[ndb_mgmd]
HostName= localhost.test1 #自己伺服器的主機名,可通過hostname命令查詢
[ndbd]
HostName=localhost.test1 #自己伺服器的主機名,可通過hostname命令查詢
DataDir= /var/lib/mysql-cluster
[mysqld]
[mysqld]
HostName=localhost.test1 #自己伺服器的主機名,可通過hostname命令查詢
[mysqld]
按Esc鍵後,在輸入:wq 按回車