First, install the Tair
1. Install SVN tools
Yum-y Install Subversion
2. Get the source code
Get source code for the underlying library Tbsys and tbnet
SVN checkout Http://code.taobao.org/svn/tb-common-utils/trunk/tb-common-utils
Get Tair Source code
SVN checkout Http://code.taobao.org/svn/tair/trunk/tair
3, pre-installation preparation, installation of dependent libraries or software
Before compiling tair or tbnet/tbsys, you need to pre-install some of the dependent libraries or software required for compilation.
Before installing these dependencies, it is a good idea to first check that the system is installed, and you can use the RPM-Q package name to see if the software or library is installed on the OS using the RPM management software package.
A. Installing the Libtool
Yum-y Install Libtool # installs the Automake and AutoConfig that Libtool relies on at the same time
B. Installing the Boost-devel Library
Yum-y Install Boost-devel
C. Installing the Zlib Library
Yum-y Install Zlib-devel
D. Installing g++
Yum-y Install gcc-c++ #而tair是用C + + developed so that it can only be compiled with g++
4. Compile and install Tbsys and tbnet
After obtaining the source code, specify the environment variable tblib_root to the directory you want to install. This environment variable will still be used in subsequent Tair compilation installations.
For example, to install to the current user's Lib directory, specify export tblib_root= "~/lib"
Go to the common folder and perform the build.sh installation.
A. Create a folder named "Tairlib" as the installation path for the relevant LIB file
Mkdir/alidata1/tairlib
B. Specifying environment variables
Create environment variable tblib_root indicates the installation path of the associated Lib file, pointing to the Tairlib folder you created earlier
echo Export tblib_root= "/alidata1/tairlib" >>/etc/profile
Source/etc/profile #执行这个命令/etc/profile file under new loading
C. Enter the Tb-common-utils directory to execute the build.sh script
Cd/alidata1/tb-common-utils
./build.sh #当安装信息最后一行是 "have installed In/alidata1/tairlib" indicates that the Tb-common-utils library is already installed
5, installation Tair
A. Switch into the Tair folder
Cd/alidata1/tair
B. Execute bootstrap.sh Script
./bootstrap.sh #当输出信息最后一行是 "src/client/makefile.am:installing './depcomp ' B" indicates that the./bootstrap.sh script has been completed
C. Implementation of Configure
./configure--prefix=/alidata1/tair_bin The installation path of the #指定tair_bin directory, and if you do not specify, change the directory layer to the current user's root directory
D. Perform the make && make install operation
Make && make install
Second, the configuration Tair
Now there are two Tair hosts as an example host tair1:10.172.2.128 host tair2:10.172.0.241
1. Configure Config Server
Rename "Configserver.conf.default" to "configserver.conf" under the ETC Directory of Tair_bin generated by host Tair1 and host Tair2.
Rename "Group.conf.default" to "group.conf" as the official configuration file for the server.
Specific configuration information view according to the actual situation configuration
View the Tair use document
Third, start Tair cluster
After the installation configuration is complete, you can start the cluster.
You need to start data server and start Cofnig server first.
If you are adding dataserver to an existing cluster, you can start the dataserver process and then modify gruop.conf.
If you first modify the group.conf and then start the process, you need to perform touch group.conf;
In the scripts directory there is a script tair.sh that can be used to help start the./tair.sh Start_ds used to start data server. The./tair.sh Start_cs is used to start config server.
(Start Config.server and start Data.server first)
This script is simple and requires the configuration file to be placed in a fixed location with a fixed name.
Users can start the cluster by executing tair_server (data server) and Tair_cfg_svr (config server) under the bin under the installation directory.
To check the Tair run status command
Enter the Sbin directory
./tairclient-c 10.172.2.128:5198-g Group_ecs
Then enter health view
or/tairclient-g group_ecs-c 10.172.2.128:5198-l stat
Tair Distributed Key/value Storage System Environment construction