【AntDB-T Installation and Deployment Documentation】Installation Using RPM Packages
Dependency package installation
For offline environment, it is recommended to build a local yum source on the host computer through the image file of the operating system to facilitate the installation of dependencies. Under cento or redhat operating system, execute the following command to install the dependencies.
sudo yum install -y perl-ExtUtils-Embed
sudo yum install -y flex
sudo yum install -y bison
sudo yum install -y readline-devel
sudo yum install -y zlib-devel
sudo yum install -y openssl-devel
sudo yum install -y pam-devel
sudo yum install -y libxml2-devel
sudo yum install -y libxslt-devel
sudo yum install -y openldap-devel
sudo yum install -y python-devel
sudo yum install -y gcc-c++
For other operating systems, please just change the installation command, and the dependency package names will remain the same. Some dependencies do not provide libssh2 package, you can install it by compiling the source code.
• Download at: https://www.libssh2.org/download/
• Source code compilation and installation (executed by root).
wget https://www.libssh2.org/download/libssh2-1.9.0.tar.gz
tar xzvf libssh2-1.9.0.tar.gz
cd libssh2-1.9.0
./configure
make
make install
Install RPM packages
Upload the RPM package provided by the delivery person to the server on the host where ADBMGR is located and install it under root or a user with sudo privileges. Install to the default path /opt/app/antdb.
sudo rpm -ivh antdb-xxx.rpm
If you want to install to other paths, you can do so as follows:
sudo rpm -ivh antdb-xxx.rpm --relocate=/opt/app/antdb=$ADBHOME
$ADBHOME as a custom directory, the name is best to be known by its name, e.g.:
/home/antdb/app/antdb
After the RPM package is installed, the value of the variable ADB_HOME will either be /opt/app/antdb, or a directory of your choice. Next, you need to modify the directory permissions:
sudo chown -R antdb:antdb $ADBHOME
sudo chmod -R 755 $ADBHOME
Configure Environment Variables
After installing the RPM package, the initmgr and mgr_ctl executables will be generated in the bin directory of the specified directory (i.e. $ADBHOME directory). To initialize adbmgr you also need to configure the PATH variable to do so, by appending the following to the hidden file .bashrc under the current user (execute vim ~/.bashrc to open the file):
export ADBHOME=/opt/app/antdb
export PATH=$ADBHOME/bin:$PATH
export LD_LIBRARY_PATH=$ADBHOME/lib:$LD_LIBRARY_PATH
export PGDATABASE=postgres
export mgrdata=/data/antdb/mgr1
alias adbmgr='psql -p 6432 -d postgres '
alias mgr_stop='mgr_ctl stop -D $mgrdata -m fast'
alias mgr_start='mgr_ctl start -D $mgrdata'
Note: ADBHOME needs to be set according to the path of the binary executable generated by the compilation of AntDB. mgrdata also needs to be modified according to the actual path of the respective environment. Then execute the following command to make it effective:
source ~/.bashrc