cubrid-setup.sh 721 Bytes
Newer Older
1 2
#!/bin/sh
#
3
# install CUBRID DBMS
4

5 6
# cubrid dbms
echo 'yes' | sudo add-apt-repository ppa:cubrid/cubrid
7
sudo apt-get update
8 9 10
sudo apt-get install cubrid
/etc/profile.d/cubrid.sh
sudo apt-get install cubrid-demodb
11

12
# cubrid pdo
13 14 15 16 17 18 19 20 21 22 23 24 25
install_pdo_cubrid() {
    wget "http://pecl.php.net/get/PDO_CUBRID-9.2.0.0001.tgz" &&
    tar -zxf "PDO_CUBRID-9.2.0.0001.tgz" &&
    sh -c "cd PDO_CUBRID-9.2.0.0001 && phpize && ./configure && make && sudo make install"

    echo "extension=pdo_cubrid.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini

    return $?
}

install_pdo_cubrid > ~/pdo_cubrid.log || ( echo "=== PDO CUBRID BUILD FAILED ==="; cat ~/pdo_cubrid.log )

echo "Installed CUBRID `dpkg -s cubrid |grep Version`"