Created
June 13, 2014 13:45
-
-
Save jk/1c51cd89fa5eec897992 to your computer and use it in GitHub Desktop.
Small workflow script to install a new php version via php-build
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Test user == jenkins | |
PHP_VERSION=5.4.16 | |
PHP_DIR=~/.phpenv/versions/$PHP_VERSION | |
PHP_INI_DIR=/var/lib/jenkins/.phpenv/versions/$PHP_VERSION/etc/php.ini | |
TEMP_DIR=~/tmp/$PHP_VERSION | |
echo "Install PHP ${PHP_VERSION} into ${PHP_DIR}" | |
cd ~ | |
php-build -i development $PHP_VERSION ~/.phpenv/versions/$PHP_VERSION | |
echo "date.timezone = \"Europe/Berlin\"" >> $PHP_INI_DIR | |
mkdir -p $TEMP_DIR | |
cd $TEMP_DIR | |
phpenv local $PHP_VERSION | |
pyrus install pear/VersionControl_SVN-0.4.0 | |
wget http://pecl.php.net/get/ssh2-0.12.tgz | |
tar xzf ssh2-0.12.tgz | |
cd $TEMP_DIR/ssh2-0.12 | |
phpenv local $PHP_VERSION | |
phpize | |
./configure --with-ssh2 | |
make -s | |
make install | |
echo "extension=ssh2.so" >> $PHP_INI_DIR | |
php -m | grep ssh2 | |
cd ~ | |
rm -rf $TEMP_DIR | |
echo "Installation of PHP ${PHP_VERSION} with pear/VersionControl_SVN-0.4.0 and pecl/ssh2 ... done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment