Currently the SCSDB service operates only on Linux systems, so this manual is intended for Linux operating systems only. The configuration of the SCSDB system is not too difficult, as long as the configuration of their own several times can be mastered.
The SCSDB internally requires data interaction through a high-speed, interoperable network. Therefore, the requirements for network cards, switches, and networks are relatively high. Therefore, it is also not recommended to deploy SCSDB systems on public networks. That is, Scsdbserver, Scsdbman, Scsdbidx, Scsdbsqlnode, and SCSDBDN need to be deployed in a high-speed, interoperable network environment.
Scsdb in the table scan, the disk I/O requirements are relatively high, so try to choose the best I/O performance of the hard disk.
1. Environment configuration
This manual will take the 4 server scsdb cluster installation scsdb01.08.07 version as an example to introduce the installation deployment of the SCSDB database, the following operations are performed on 4 servers.
1.1 Turn off SELinux
Vi/etc/selinux/config
Modifying the value of SELinux in a configuration file equals disabled
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/71/5A/wKiom1XMC8SRHVf1AAEL2LYYU8M900.jpg "title=" 1.png " alt= "Wkiom1xmc8srhvf1aael2lyyu8m900.jpg"/>
Note: It will take effect to restart the server after SELinux modification.
1.2 Close Iptables
Iptables-f #清除iptables Rules
Service Iptables Save #保存iptables Rules
Service Iptables Stop #关闭iptables
Chkconfig iptables off #开机不启动iptables
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/71/5A/wKiom1XMDA_xXV74AADJl_4YtrI806.jpg "title=" 2.png " alt= "Wkiom1xmda_xxv74aadjl_4ytri806.jpg"/>
1.3 Modifying the computer name
Vi/etc/sysconfig/network
Modify the value of hostname in the configuration file separately equals NODE1-NODE4
Networking=yes
Hostname=node1
1.4 Modifying the Hosts file
Vi/etc/hosts
Add the following:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/71/5A/wKiom1XMDLLjCa_YAACbP5jREJE890.jpg "title=" 3.png " alt= "Wkiom1xmdlljca_yaacbp5jreje890.jpg"/>
1.5 Root account password consistent
The root account password is consistent and easy to configure trust and effective management.
1.6 Smooth network between servers
Each node's IP address is continuously allocated and keeps the network unblocked.
2. Scsdb Database Installation
2.1 System Service Deployment diagram
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/71/5A/wKiom1XMDPzCvOk6AAEyb0DqE68207.jpg "title=" 4.png " alt= "Wkiom1xmdpzcvok6aaeyb0dqe68207.jpg"/>
2.2 Installation Package Introduction
SCSDB Database package: Scsdb
SCSDB Data node Package: SCSDBDN
SCSDB Automation Installation Tool: Sshconfig
Scsdb Backup tool: Scsdbautobackup
SCSDB Data node configuration file: prefix.conf
SCSDB Automated Installation Profile: ssh.conf
Scsdb Server Trust configuration file: sshconfig.pl
2.3 Installation Steps
1) Copy and unzip the installation file
SSH 192.168.0.171
Mkdir-p/home/scsinstall/010807
Mkdir-p/home/scsinstall/package
Copy the Scsdb01.08.07.zip, scsdbdn1.7.tar.gz to the/home/scsinstall/010807 directory, sshconfig1.0.0.tar.gz, scsdbautobackup1.0.2.tar.gz Copy to the/home/scsinstall/package directory.
cd/home/scsinstall/010807
Unzip Scsdb01.08.07_2.zip
2) Modify the configuration file
Scsdb system with one-click Installation mode, can quickly deploy a large number of cluster nodes above the system. Configuration file has
Ssh.conf, prefix.conf, are in the/home/scsinstall/package/sshconfig directory.
Scsdb system with one-click Installation mode, can quickly deploy a large number of cluster nodes above the system. Configuration file has
Ssh.conf, prefix.conf, are in the/home/scsinstall/package/sshconfig directory.
[User]
host=192.168.0.171 #当前操作的主机ip Address
Password=hcloud #集群内节点间root user access password to ensure that the certificate is a unified password
[SCSDBDN]
Dnpath=/home/scsinstall/010807/scsdbdn1.7.tar.gz #scsdbdn Installation package path
Sqlnodepath=/home/scsinstall/010807/scsdbsqlnode.tar.gz #scsdbsqlnode的安装包路径
[Scsdbman]
host=192.168.0.171 #scsdbman The IP address of the service node
Manpath=/home/scsinstall/010807/scsdbman.tar.gz #scsdbman Installation package path
[Scsdbindex]
host=192.168.0.171 #scsdbindex The IP address of the service node
Indexpath=/home/scsinstall/010807/scsdbindex.tar.gz #scsdbindex Installation package path
[Scsdbserver]
host=192.168.0.171 #scsdbserver The IP address of the service node
Serverpath=/home/scsinstall/010807/scsdbserver.tar.gz #scsdbserver Installation package path
[Client]
IP address of the host=192.168.0.171 #scsdbclient node
Clientpath=/home/scsinstall/010807/scsdbclient.tar.gz #scsdbclient的安装包路径
[Node] #将要安装scsdbdn and Scsdbsqlnode nodes, one row per IP
192.168.0.171
192.168.0.172
192.168.0.173
192.168.0.174
Modify Prefix.conf
[All]
Basedir =/usr/local #scsdbdn Program installation directory
[SCSDBDN]
Port = #port is the port number used by the SCSDBDN instance and is recommended to increment from 2000
datadir=/home/scsdbdata/2000 #数据库数据文件的目录
#注意datadir This directory if it is not in the/home/scsdbdata directory, make sure that his parent directory exists
General_log_file =/home/scsdbdata/2000/scsdbdn2000.log #日志文件
Log_error =/home/scsdbdata/2000/scsdbdn2000err.log #错误日志
[SCSDBDN] #scsdbdn can be run using multi-instance mode,
#要想安装多实例, you only need to add the configuration here [Scsdbdn],
#注意修改端口号, and related paths
Port = 2001
DataDir =/home/scsdbdata/2001
General_log_file =/home/scsdbdata/2001/scsdbdn2001.log
Log_error =/home/scsdbdata/2001/scsdbdn2001err.log
The number of #建议 [SCSDBDN] instances does not exceed the number of processor cores for the current host
Use vim/home/scsinstall/package/sshconfig/prefix.conf to complete the above configuration.
3) Automated cluster installation database
Cd/home/scsinstall/package/sshconfig/install
./install.pl installing a cluster-controlled dependency program
Cd.. /#返回上级目录
./sshconfig.pl #配置集群服务器互信 (if no password is required to log on to other nodes between 22, the table configured successfully)
./scsdbdn_install.sh #运行集群安装工具
In the installation process, if you find a previous version of the installation, you will be prompted to install the prompt action can be
Finally, if you are prompted to Use Auto Config (y/n?), here we select (Y) and wait for the configuration to complete.
4) Perfect Backup relationship
To complete a backup relationship, start the data node first:./scsdbdn_ctrl.sh start SCSDBDN #如果出现start error, Note the previous step did not install successfully, please re-execute the installation.
SSH Node1
Vim/etc/scs/ms.conf
We use a dual-instance interoperability configuration to modify [Scs_host] as follows:
[Scs_host] #数据实例 (main ip:port– from Ip1:port1, Ip2:port2 ... Multiple slave nodes can be added , separated by commas)
#scsdbdn Instances and backup relationships
192.168.0.171:2000-192.168.0.172:2000
192.168.0.171:2001-192.168.0.172:2001
192.168.0.172:2000-192.168.0.171:2000
192.168.0.172:2001-192.168.0.171:2001
192.168.0.173:2000-192.168.0.174:2000
192.168.0.173:2001-192.168.0.174:2001
192.168.0.174:2000-192.168.0.173:2000
192.168.0.174:2001-192.168.0.173:2001
: wq! Save exit.
Cd/home/scsinstall/package/scsdbautobackup/tcl_and_expect
./install.pl #安装备份工具的依赖程序
Cd.. /#返回上级目录
./autobackup.sh-u scs-p 123456-c/etc/scs/ms.conf #运行备份工具 (if There is no error message stating that the configuration was successful. Otherwise, verify that the/etc/scs/ms.conf configuration file [scs_host] section is configured correctly based on the error message. )
5) Start the database
SSH Node1
Cd/home/scsinstall/scsdb_010807_02/scsdbman/install
CP Scs_auth.dat/etc/scs
Cd/home/scsinstall/package/sshconfig
./scsdbdn_ctrl.sh Start All #启动所有服务 (show all start OK normally, otherwise you need to check Check if the service for a node is not properly installed. )
./scsdbdn_ctrl.sh Stop all #关闭所有服务
In addition, the second parameter of scsdbdn_ctrl.sh can also be (Scsdb\scsdbdn\scsdbsqlnode), can be Select the services you want to control as needed.
Scsdb-u scs-p123456-h 192.168.0.171 #启动数据库
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/71/56/wKioL1XMEPmhsROkAACNxA1_Bx4132.jpg "title=" 5.png " alt= "Wkiol1xmepmhsrokaacnxa1_bx4132.jpg"/>
6) scsdb Start stop
If the automatic installation, you can use the cluster command convenient service opening, shutdown and other control, can also be opened separately
To shut down a single service.
Detailed control methods are described below:
Cluster turn on/off all services
Cd/home/scsinstall/package/sshconfig
scsdbdn_ctrl.sh Start/stop All
Data node Service:
Scsdbdn_multi Start #开启本节点的所有实例
Scsdbdn_multi Stop #关闭本节点的所有实例
You can also control the opening and closing of a single port instance,
Scsdbdn_multi Start #开启本节点的2000 Port instance
Scsdbdn_multi Stop #关闭本节点的2000 Port instance
Sqlnode Service:
Service Scsdbsqlnode Start #启动scsdbsqlnode
Service Scsdbsqlnode Stop #关闭scsdbsqlnode
Scsdbindex Service:
Service Scsdbidx Start #启动Scsdbindex
Service Scsdbidx Stop #关闭Scsdbindex
Scsdbman Service:
Service Scsdbman Start #启动scsdbman
Service Scsdbman Stop #关闭scsdbman
Scsdbserver Service:
Service Scsdbserver Start #启动scsdbserver
Service Scsdbserver Stop #关闭scsdbserver
Customer
Scsdbman Service:
Service Scsdbman Start #启动scsdbman
Service Scsdbman Stop #关闭scsdbman
Scsdbserver Service:
Service Scsdbserver Start #启动scsdbserver
Service Scsdbserver Stop #关闭scsdbserver
Client:
Scsdb–u scs–p123456–h 192.168.0.104
Attention:
SCSDBDN and Scsdbsqlnode need to be installed on each data node. At the same time, their services must be turned on or the database will not function properly.
Boot order of the service:
SCSDBDN>SCSDBSQLNODE>SCSDBIDX>SCSDBMAN>SCSDBSERVER>SCSDB (client)
2.5 Deployment considerations
when deploying the SCSDB system environment for the first time, many people will encounter some difficulties, especially the beginner, and below we deploy when you need to pay attention to the list of issues, we can refer to when you encounter problems.
(1) Some service profiles require root user rights, if there is a problem during installation, please check if the current user has the permissions that should be applied.
(2) The/etc/hosts file needs to be modified on all nodes.
(3) when the installation cannot use SSH login system, please check the system firewall settings. SCSDB clusters are generally deployed in high-speed LANs, it is recommended to turn off firewalls and selinux.
(4) The system does not recognize the Scsdbdn_multi command and checks whether the source ~/.bash_profile command is executed. Check the Usr/bin directory for Scsdbdn_multi programs, and if not, you need to copy them from the/bin path under the installation directory to the/usr/bin directory.
(5) Configure the backup of the SCSDBDN instance to fail, check if the firewall is off, Server-id in/etc/scsdbdn.conf is no unique.
(6) Scsdbman service failed to start, please check configuration file ms.conf parameter is configured correctly.
(7) Scsdbserver service failed to start, please check whether the Scsdbman service is turned on, scs.conf configuration parameters are The . Check if there is
Scsdbserver Service is still running, ps aux | grep scsdbserver, using the kill-9 process number, ending the should be a zombie process.
(8) SCSDB client run error, please check data node SCSDBDN service is turned on, check scsdbserver service whether it has been started .
(9) When installing Scsdbman, the initial user who logged on to the client, if not properly configured, will not be able to access from the client Scsdb.
(10) When the SSH password-free access configuration fails, all of the node's. SSH folders are cleared, and the SSH is reconfigured without password access.
This article is from the "Sky Cloud Star Database" blog, please make sure to keep this source http://3406059.blog.51cto.com/3396059/1684279
Sky Cloud Star Database Installation deployment