From f89da18eb055db939bca49312d43c44759110e26 Mon Sep 17 00:00:00 2001 From: ulvii Date: Thu, 13 Jul 2017 19:13:57 -0700 Subject: [PATCH] Fixing a few minor issues with RedHat instructions. Also applying review comments to windows setup script --- test/Performance/setup_env_unix.sh | 11 +++++------ test/Performance/setup_env_windows.ps1 | 6 ++++++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/test/Performance/setup_env_unix.sh b/test/Performance/setup_env_unix.sh index 76e50297..c1ffc10a 100644 --- a/test/Performance/setup_env_unix.sh +++ b/test/Performance/setup_env_unix.sh @@ -46,17 +46,16 @@ if [ $PLATFORM = "Ubuntu16" ]; then elif [ $PLATFORM = "RedHat7" ]; then echo "Update..." yes | sudo yum update >> env_setup.log 2>&1 + echo "OK" echo "Enabling EPEL repo..." - yes | sudo yum install epel-release -y >> env_setup.log 2>&1 + wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm >> env_setup.log 2>&1 + yes | sudo yum install epel-release-latest-7.noarch.rpm >> env_setup.log 2>&1 echo "OK" echo "Installing python34-setuptools..." yes | sudo yum install python34-setuptools -y >> env_setup.log 2>&1 echo "OK" echo "Installing gcc, git, zip libxml, openssl, EPEL, python3, pip3..." - yes | sudo yum install -y gcc-c++ libxml2-devel git zip openssl-devel python34 python34-devel >> env_setup.log 2>&1 - echo "OK" - echo "Installing pip3" - yes | sudo easy_install-3.4 pip >> env_setup.log 2>&1 + yes | sudo yum install -y gcc-c++ libxml2-devel git zip openssl-devel python34 python34-devel python3-pip >> env_setup.log 2>&1 echo "OK" echo "Installing MSODBCSQL..." curl -s https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/mssql-release.repo @@ -121,7 +120,7 @@ make >> ../env_setup.log 2>&1 echo "OK" sudo make install >> ../env_setup.log 2>&1 cp php.ini-production php.ini -EXTENSION_DIR=`php-config --extension-dir` +EXTENSION_DIR=`bash -c 'php-config --extension-dir'` echo "extension=$EXTENSION_DIR/sqlsrv.so" >> php.ini echo "extension=$EXTENSION_DIR/pdo_sqlsrv.so" >> php.ini sudo cp php.ini /usr/local/lib diff --git a/test/Performance/setup_env_windows.ps1 b/test/Performance/setup_env_windows.ps1 index 2ac0d766..c4a580e5 100644 --- a/test/Performance/setup_env_windows.ps1 +++ b/test/Performance/setup_env_windows.ps1 @@ -19,6 +19,11 @@ IF($PHP_THREAD -ne "nts" -And $PHP_THREAD -ne "ts"){ Break } +IF($PHP_VERSION -NotMatch "7.[0-1].[0-9]"){ + Write-Host "PHP_VERSION must be in format of 7.x.x" + Break +} + $startingDir=$pwd.Path $tempFolder=Join-Path $startingDir "temp" @@ -104,6 +109,7 @@ Copy-Item C:\php-sdk\phpdev\vc14\$ARCH\deps\bin\libeay32.dll C:\Windows -force cd $startingDir [Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\php\", [System.EnvironmentVariableTarget]::Machine) +$env:Path += ";C:\php\" RefreshEnv wget https://getcomposer.org/installer -O composer-setup.php php composer-setup.php