国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數據庫 > 文庫 > 正文

安裝部署PhxSQL教案

2024-09-07 22:12:52
字體:
來源:轉載
供稿:網友
  需求:公司某軟件使用phxsql已經部署在3個機房,現需要在新的機房增加一個phxsql節點,以下為操作過程,因為保護隱私把4臺IP用
 
  1.1.1.1
 
  2.2.2.2
 
  3.3.3.3
 
  新的ip為4.4.4.4
 
  。安裝Phxsql需要Python2.7版本,Centos默認為2.6版本,需要進行升級
 
  cd /opt
  wget --no-check-certificate https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz
  tar xf Python-2.7.6.tar.xz
  cd Python-2.7.6
  ./configure --prefix=/usr/local
  make && make install
  。Phxsql需要升級glibc包,Centos6.5默認為2.12版本,升級為2.20版本。因為glic是操作系統底層庫,謹慎操作
 
  glibc-common-2.12-1.149.el6_6.5.x86_64
  glibc-2.12-1.149.el6_6.5.i686
  glibc-2.12-1.149.el6_6.5.x86_64
  glibc-headers-2.12-1.149.el6_6.5.x86_64
  glibc-devel-2.12-1.149.el6_6.5.x86_64
  升級操作
 
  rpm -Uvh --aid --force --nodeps glibc-headers-2.20-8.fc21.x86_64.rpm
  rpm -Uvh --aid --force --nodeps glibc-devel-2.20-8.fc21.x86_64.rpm
  rpm -Uvh --aid --force --nodeps glibc-2.20-8.fc21.x86_64.rpm
  rpm -Uvh --aid --force --nodeps glibc-common-2.20-8.fc21.x86_64.rpm
  。四個phxsql節點的服務器,防火墻需要開放如下幾個端口
 
  iptables -A INPUT -p tcp -m multiport --dports 11111,54321,54322 -s 4.4.4.4 -j ACCEPT
  。在phxsql集群里任意一個節點,在新節點還沒有開始安裝部署phxsql時,把新節點IP添加到集群里面
 
  phxbinlogsvr_tools_phxrpc -f AddMember -h2.1.1.1 -p17000 -m 4.4.4.4
  加后使用命令行檢查
 
  phxbinlogsvr_tools_phxrpc -f GetMemberList -h2.1.1.1 -p 17000
  。設置phxsql的數據目錄,官網教程定義目錄為/tmp/data,這里改為/data1/
 
  cd /data1/phxsql/tools/
  mkdir -p /data1/phxsql/tmp/data/log
  chown -R mysql:mysql /data1/phxsql/tmp/data/log
  python2.7 install.py -i"4.4.4.4" -p 54321 -g 6000 -y 11111 -P 17000 -a 8001 -f /data1/phxsql/tmp/data/
  安裝過程會出現如下信息
 
  Namespace(agent_port=6000, base_dir='/data1/phxsql/', data_dir='/data1/phxsql/tmp/data/', inner_ip='183.36.122.100', ip_list='4.4.4.4', module_name='test', mysql_port=11111, paxos_port=8001, phxbinlogsvr_port=17000, phxsqlproxy_port=54321, process_name='all', skip_data=0)
  kill all binaries success....
  mkdir: cannot create directory `/data1/phxsql/etc': File exists
  generate all configs success....
  mkdir: cannot create directory `/data1/phxsql/tmp/data/log': File exists
  /data1/phxsql/tmp/data/phxbinlogsvr
  skip data 0
  mkdir: cannot create directory `/data1/phxsql/tmp/data/log': File exists
  /data1/phxsql/tmp/data/percona.workspace
  cd /data1/phxsql/percona.src; ./scripts/mysql_install_db --defaults-file=/data1/phxsql/etc/my.cnf --user=mysql
  WARNING: The host 'centos' could not be looked up with /data1/phxsql/percona.src/bin/resolveip.
  This probably means that your libc libraries are not 100 % compatible
  with this binary MySQL version. The MySQL daemon, mysqld, should work
  normally with the exception that host name resolving will not work.
  This means that you should use IP addresses instead of hostnames
  when specifying MySQL privileges !
  Installing MySQL system tables...2017-05-04 04:07:27 0 [Warning] 'THREAD_CONCURRENCY' is deprecated and will be removed in a future release.
  2017-05-04 04:07:27 0 [Note] ./bin/mysqld (mysqld 5.6.31-77.0-log) starting as process 55454 ...
 
  killall -9 phxbinlogsvr_phxrpc
  。添加環境變量
 
  vi /etc/profile
  export PATH=/data1/phxsql/sbin:$PATH
  . /etc/profile
  。phxsql安裝好了,目前是空的,需要從一個有數據的節點上把數據導過來,通常會選擇從點,通過命令查詢哪個是master,然后避開master,我這邊數據量是200G,對于導出大量的數據會很消耗磁盤資源,需要讓業務切換到其他點。

(編輯:武林網)

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 忻城县| 安陆市| 咸丰县| 黔南| 子长县| 海盐县| 信阳市| 乌恰县| 鄯善县| 墨竹工卡县| 祁东县| 招远市| 含山县| 琼结县| 新乡县| 织金县| 曲阳县| 辉县市| 滕州市| 东乡县| 黄梅县| 耒阳市| 辽中县| 文安县| 祥云县| 阳谷县| 崇左市| 梁山县| 繁峙县| 吉安市| 乐安县| 革吉县| 湖州市| 黄梅县| 钟山县| 拜城县| 梓潼县| 特克斯县| 滦南县| 高雄市| 隆林|