Carsten Brandt
11 years ago
1 changed files with 11 additions and 27 deletions
@ -1,32 +1,16 @@ |
|||||||
#!/bin/sh |
#!/bin/sh |
||||||
# |
# |
||||||
# install CUBRID DBMS https://github.com/CUBRID/node-cubrid/blob/056e734ce36bb3fd25f100c983beb3947e899c1c/.travis.yml |
# install CUBRID DBMS |
||||||
|
|
||||||
sudo hostname localhost |
# cubrid dbms |
||||||
# Update OS before installing prerequisites. |
echo 'yes' | sudo add-apt-repository ppa:cubrid/cubrid |
||||||
sudo apt-get update |
sudo apt-get update |
||||||
# Install Chef Solo prerequisites. |
sudo apt-get install cubrid |
||||||
sudo apt-get install ruby ruby-dev libopenssl-ruby rdoc ri irb build-essential ssl-cert |
/etc/profile.d/cubrid.sh |
||||||
# Install Chef Solo. |
sudo apt-get install cubrid-demodb |
||||||
# Chef Solo 11.4.4 is broken, so install a previous version. |
|
||||||
# The bug is planned to be fixed in 11.4.5 which haven't been released yet. |
|
||||||
sudo gem install --version '<11.4.4' chef --no-rdoc --no-ri |
|
||||||
# Make sure the target directory for cookbooks exists. |
|
||||||
mkdir -p /tmp/chef-solo |
|
||||||
# Prepare a file with runlist for Chef Solo. |
|
||||||
echo '{"cubrid":{"version":"'$CUBRID_VERSION'"},"run_list":["cubrid::demodb"]}' > cubrid_chef.json |
|
||||||
# Install CUBRID via Chef Solo. Download all cookbooks from a remote URL. |
|
||||||
sudo chef-solo -c tests/unit/data/travis/cubrid-solo.rb -j cubrid_chef.json -r http://sourceforge.net/projects/cubrid/files/CUBRID-Demo-Virtual-Machines/Vagrant/chef-cookbooks.tar.gz/download |
|
||||||
|
|
||||||
|
# cubrid pdo |
||||||
install_pdo_cubrid() { |
sudo apt-get install php5-cubrid |
||||||
wget "http://pecl.php.net/get/PDO_CUBRID-9.1.0.0003.tgz" && |
echo '/opt/cubrid/' | pecl install pdo_cubrid |
||||||
tar -zxf "PDO_CUBRID-9.1.0.0003.tgz" && |
echo "extension=pdo_cubrid.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini |
||||||
sh -c "cd PDO_CUBRID-9.1.0.0003 && phpize && ./configure && make && sudo make install" |
/etc/profile.d/cubrid.sh |
||||||
|
|
||||||
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 ) |
|
||||||
|
Loading…
Reference in new issue