Study

Columnstore 1.0.x Binary Install Script (2017)

whistory 2022. 9. 19. 10:16
반응형

OS : Centos 6.8
버전 : 
Columnstore 1.0.9
설치위치 : /sw/maria/mariadb/columnstore/
유저 : maria.dba

다운로드 링크

https://downloads.mariadb.com/ColumnStore/



root 계정에서 실행 - root.sh

#!/bin/bash

echo "Create group and user"
groupadd -g 602 dba
useradd -g 602 -u 600 maria

echo "Change mode"
chmod 777 /tmp
chmod 777 /dev/shm

echo "Make Directories"
mkdir -p /sw/maria /logs/mariadb/ /data1/maria/mariadb/columnstore/mysql/db

echo "Tarbell columnstore install path = /sw/maria"
tar -xf /download/mariadb-columnstore-1.0.9-1-centos6.x86_64.bin.tar.gz -C /sw/maria/

# user script copy
cp /download/rpms/user.sh /home/maria/

echo "Change owner to maria.dba"
chown -R maria.dba /sw /home/maria/ /download /data1 /logs

echo "Install rpms "
rpm -e mysql-libs --nodeps
rpm -ihv /download/rpms/*rpm

설치한 rpm들



# system configuration Start
echo "local setting"
localedef -i en_US -f UTF-8 en_US.UTF-8

echo "ifconfig eth0"
echo "/sbin/ifconfig eth0 txqueuelen 10000" >> /etc/rc.d/rc.local

echo "/etc/sysctl.conf setting"
echo "# increase TCP max buffer size" >> /etc/sysctl.conf
echo "net.core.rmem_max = 16777216" >> /etc/sysctl.conf
echo "net.core.wmem_max = 16777216" >> /etc/sysctl.conf
echo "# increase Linux autotuning TCP buffer limits" >> /etc/sysctl.conf
echo "# min, default, and max number of bytes to use" >> /etc/sysctl.conf
echo "net.ipv4.tcp_rmem = 4096 87380 16777216" >> /etc/sysctl.conf
echo "net.ipv4.tcp_wmem = 4096 65536 16777216" >> /etc/sysctl.conf
echo "# don't cache ssthresh from previous connection" >> /etc/sysctl.conf
echo "net.ipv4.tcp_no_metrics_save = 1" >> /etc/sysctl.conf
echo "# recommended to increase this for 1000 BT or higher" >> /etc/sysctl.conf
echo "net.core.netdev_max_backlog = 2500" >> /etc/sysctl.conf
echo "# for 10 GigE, use this" >> /etc/sysctl.conf
echo "net.core.netdev_max_backlog = 30000" >> /etc/sysctl.conf

echo "umask setting"
echo "umask 022" >> /etc/profile

echo "vm.vfs_cache_pressure setting"
sysctl -w vm.vfs_cache_pressure=10

echo "/etc/security/limits.conf"
echo "maria hard nofile 65536" >> /etc/security/limits.conf
echo "maria soft nofile 65536" >> /etc/security/limits.conf
# System Configuration End



#echo "external drive setting"
#echo "#/dev/sdb1 /sw/maria/mariadb/columnstore/data1 ext2 noatime,nodiratime,noauto,users 0 0" >> /etc/fstab

echo "********************************************************************************"
echo "********************************************************************************"
echo "   1. visudo               add maria user"
#echo "   2. /etc/fstab           check mount information "
#echo "   3. ./mount              run this script"
echo "********************************************************************************"
echo "********************************************************************************"
echo "root user setting End"

External 일 경우 mount drive 권한 - mount.sh

#!/bin/bash

echo "make tmpdir"
mkdir /tmpdir

echo "mount"
mount /dev/sdb1 /tmpdir

echo "change own"
chown -R maria.dba /tmpdir

echo "umount"
umount /tmpdir

echo "remove tmpdir"
rmdir /tmpdir


non root 계정에서 실행 - user.sh

#!/bin/bash

echo "maria 계정에 user path setting to bashrc"
echo "export COLUMNSTORE_INSTALL_DIR=/sw/maria/mariadb/columnstore" >> .bashrc
echo "export PATH=$COLUMNSTORE_INSTALL_DIR/bin:$COLUMNSTORE_INSTALL_DIR/mysql/bin:/usr/sbin:$PATH" >> .bashrc
echo "export LD_LIBRARY_PATH=$COLUMNSTORE_INSTALL_DIR/lib:$COLUMNSTORE_INSTALL_DIR/mysql/lib/mysql" >> .bashrc
source .bashrc

# centos6_boost 압축풀기
echo "tarbell centos_boost "
tar -xf /download/rpms/centos6_boost_1_55.tar.gz -C /sw/maria/mariadb/columnstore/lib/

# postinstall script 수정   (user.user 로 되어있음)
echo "edit post-install chwon informatiln"
sed -i 's/\$user.\$user/\$user.\$group/g' /sw/maria/mariadb/columnstore/bin/post-install

# Run postinstall script
echo "Run Script"
echo "./sw/maria/mariadb/columnstore/bin/post-install --installdir=/sw/maria/mariadb/columnstore"


https://mariadb.com/kb/en/library/preparing-for-columnstore-installation-10x/

반응형