Last active
February 26, 2018 16:54
-
-
Save jehadassaf/940251c5be265fcd6c82 to your computer and use it in GitHub Desktop.
Add extra stuff to Homestead
This file contains 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/sh | |
# If you would like to do some extra provisioning you may | |
# add any commands you wish to this file and they will | |
# be run after the Homestead machine is provisioned. | |
echo "Updating repositories..." | |
apt-get -qq update | |
echo "Disabling XDebug..." | |
phpdismod xdebug | |
service php7.0-fpm restart | |
echo "Installing extra PHP extensions..." | |
apt-get install -y --force-yes unzip php7.0-ldap php7.0-mcrypt | |
echo "PHP OCI8 Driver..." | |
mkdir /opt/oracle && cd /opt/oracle | |
echo "Downloading Oracle Instant Client binaries - this may take a while..." | |
wget --quiet https://dl.dropboxusercontent.com/u/582415/linux/instantclient-basic-linux.x64-12.2.0.1.0.zip | |
wget --quiet https://dl.dropboxusercontent.com/u/582415/linux/instantclient-sdk-linux.x64-12.2.0.1.0.zip | |
unzip \*.zip | |
cd instantclient_12_1 | |
ln -s libnnz12.so libnnz.so | |
ln -s libclntshcore.so.12.1 libclntshcore.so | |
ln -s libclntsh.so.12.1 libclntsh.so | |
ln -s libocci.so.12.1 libocci.so | |
export LD_LIBRARY_PATH=/opt/oracle/instantclient_12_1:$LD_LIBRARY_PATH | |
echo "Re-install PEAR..." | |
apt-get -y --force-yes remove php-pear --purge | |
apt-get -y --force-yes install php-pear | |
pear config-set php_dir /usr/share/php/PEAR | |
echo 'include_path=".:/usr/share/php:/usr/share/php/PEAR"' >> /etc/php/7.0/fpm/php.ini | |
echo 'include_path=".:/usr/share/php:/usr/share/php/PEAR"' >> /etc/php/7.0/cli/php.ini | |
echo "Restarting services..." | |
service php7.0-fpm restart | |
service nginx restart; | |
printf "instantclient,/opt/oracle/instantclient_12_1" | pecl install oci8 | |
echo 'extension=oci8.so' >> /etc/php/7.0/fpm/php.ini | |
echo 'extension=oci8.so' >> /etc/php/7.0/cli/php.ini | |
echo "Restarting services..." | |
service php7.0-fpm restart | |
service nginx restart; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment