Added suse to readme and perf script

This commit is contained in:
David Puglielli 2017-08-24 12:59:09 -07:00
parent e5c03a9c15
commit c505d522f9
3 changed files with 20 additions and 17 deletions

View file

@ -15,6 +15,8 @@ Run `Windows PowerShell` as administrator.
sudo env "PATH=$PATH" bash setup_env_unix.sh Ubuntu16 <PHP_VERSION - 7.x.y> <PHP_THREAD - ts or nts> <absolute path to the SQLSRV driver so> <absolute path to the PDO_SQLSRV driver so> sudo env "PATH=$PATH" bash setup_env_unix.sh Ubuntu16 <PHP_VERSION - 7.x.y> <PHP_THREAD - ts or nts> <absolute path to the SQLSRV driver so> <absolute path to the PDO_SQLSRV driver so>
### RedHat 7 ### RedHat 7
sudo env "PATH=$PATH" bash setup_env_unix.sh RedHat7 <PHP_VERSION - 7.x.y> <PHP_THREAD - ts or nts> <absolute path to the SQLSRV driver so> <absolute path to the PDO_SQLSRV driver so> sudo env "PATH=$PATH" bash setup_env_unix.sh RedHat7 <PHP_VERSION - 7.x.y> <PHP_THREAD - ts or nts> <absolute path to the SQLSRV driver so> <absolute path to the PDO_SQLSRV driver so>
### SUSE 12
sudo env "PATH=$PATH" bash setup_env_unix.sh SUSE12 <PHP_VERSION - 7.x.y> <PHP_THREAD - ts or nts> <absolute path to the SQLSRV driver so> <absolute path to the PDO_SQLSRV driver so>
### MacOS 10.12 Sierra ### MacOS 10.12 Sierra
`brew` cannot be run with `sudo` on Sierra. Either enable passwordless `sudo` on the machine or enter the password when prompted. `brew` cannot be run with `sudo` on Sierra. Either enable passwordless `sudo` on the machine or enter the password when prompted.
@ -30,10 +32,10 @@ PHPBench is used to run the benchmarks. Visit http://phpbench.readthedocs.io/en/
### Windows ### Windows
py.exe run-perf_tests.py -platform <PLATFORM> py.exe run-perf_tests.py -platform <PLATFORM>
### Linux and Mac ### Linux and Mac
On Linux and Mac, the script must be executed with `sudo python3` because to enable pooling it needs to modify odbcinst.ini system file. As an improvement, the location of the odbcinst.ini file can be changed so that, sudo is not requiered. On Linux and Mac, the script must be executed with `sudo python3` because to enable pooling it needs to modify odbcinst.ini system file. As an improvement, the location of the odbcinst.ini file can be changed so that sudo is not required.
python3 run-perf_tests.py -platform <PLATFORM> | tee run-perf_output.txt python3 run-perf_tests.py -platform <PLATFORM> | tee run-perf_output.txt
`-platform` - The platform that the tests are ran on. Must be one of the following: Windows10, WindowsServer2016, WindowsServer2012, Ubuntu16, RedHat7, Sierra. `-platform` - The platform that the tests are ran on. Must be one of the following: Windows10, WindowsServer2016, WindowsServer2012, Ubuntu16, RedHat7, SUSE12, Sierra.
`-php-driver` (optional) - The driver that the tests are ran on. Must be one of the following: sqlsrv, pdo_sqlsrv, or both. Default is both. `-php-driver` (optional) - The driver that the tests are ran on. Must be one of the following: sqlsrv, pdo_sqlsrv, or both. Default is both.
`-testname` (optional) - The test to run. Must be the file name (not including path) of one test or 'all'. Default is 'all'. If one test is specified, must also specify the -php-driver option to sqlsrv or pdo_sqlsrv. `-testname` (optional) - The test to run. Must be the file name (not including path) of one test or 'all'. Default is 'all'. If one test is specified, must also specify the -php-driver option to sqlsrv or pdo_sqlsrv.

View file

@ -58,6 +58,7 @@ def validate_platform( platform_name ):
, "WindowsServer2012" , "WindowsServer2012"
, "Ubuntu16" , "Ubuntu16"
, "RedHat7" , "RedHat7"
, "SUSE12"
, "Sierra"] , "Sierra"]
if platform_name not in platforms: if platform_name not in platforms:
print ( "Platform must be one of the following:" ) print ( "Platform must be one of the following:" )

View file

@ -61,8 +61,8 @@ elif [ $PLATFORM = "RedHat7" ]; then
printf "Enabling EPEL repo..." printf "Enabling EPEL repo..."
# pipe non-error to log file (wget and yum install reports error when there's nothing to do) # pipe non-error to log file (wget and yum install reports error when there's nothing to do)
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm >> env_setup.log 2>&1 wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm >> env_setup.log
yes | sudo yum install epel-release-latest-7.noarch.rpm >> env_setup.log 2>&1 || true yes | sudo yum install epel-release-latest-7.noarch.rpm >> env_setup.log || true
printf "done\n" printf "done\n"
printf "Installing python34-setuptools..." printf "Installing python34-setuptools..."
@ -86,24 +86,24 @@ elif [ $PLATFORM = "RedHat7" ]; then
elif [ $PLATFORM = "SUSE12" ]; then elif [ $PLATFORM = "SUSE12" ]; then
printf "Update..." printf "Update..."
sudo zypper refresh >> env_setup.log 2>&1 sudo zypper refresh >> env_setup.log
printf "done\n" printf "done\n"
printf "Installing autoconf, gcc, g++, git, zip, libxml, openssl, python3, pip3..." printf "Installing autoconf, gcc, g++, git, zip, libxml, openssl, python3, pip3..."
sudo zypper -n install autoconf gcc gcc-c++ libxml2-devel git zip libopenssl-devel python3-devel python3-pip python3-setuptools >> env_setup.log 2>&1 sudo zypper -n install autoconf gcc gcc-c++ libxml2-devel git zip libopenssl-devel python3-devel python3-pip python3-setuptools >> env_setup.log
printf "done\n" printf "done\n"
printf "Installing MSODBCSQL..." printf "Installing MSODBCSQL..."
zypper -n ar https://packages.microsoft.com/config/sles/12/prod.repo 2>&1 zypper -n ar https://packages.microsoft.com/config/sles/12/prod.repo
zypper --gpg-auto-import-keys refresh 2>&1 zypper --gpg-auto-import-keys refresh
ACCEPT_EULA=Y zypper -n install msodbcsql >> env_setup.log 2>&1 ACCEPT_EULA=Y zypper -n install msodbcsql >> env_setup.log
ACCEPT_EULA=Y zypper -n install mssql-tools >> env_setup.log 2>&1 ACCEPT_EULA=Y zypper -n install mssql-tools >> env_setup.log
zypper -n install unixODBC-devel >> env_setup.log 2>&1 zypper -n install unixODBC-devel >> env_setup.log
printf "done\n" printf "done\n"
printf "Installing pyodbc" printf "Installing pyodbc"
pip3 install --upgrade pip >> env_setup.log 2>&1 pip3 install --upgrade pip >> env_setup.log
pip3 install pyodbc >> env_setup.log 2>&1 pip3 install pyodbc >> env_setup.log
printf "done\n" printf "done\n"
elif [ $PLATFORM = "Sierra" ]; then elif [ $PLATFORM = "Sierra" ]; then
@ -142,7 +142,7 @@ fi
printf "Downloading PHP-$PHP_VERSION source tarball..." printf "Downloading PHP-$PHP_VERSION source tarball..."
# pipe non-error to log file # pipe non-error to log file
wget http://ca1.php.net/get/php-$PHP_VERSION.tar.gz/from/this/mirror -O php-$PHP_VERSION.tar.gz >> env_setup.log 2>&1 wget http://ca1.php.net/get/php-$PHP_VERSION.tar.gz/from/this/mirror -O php-$PHP_VERSION.tar.gz >> env_setup.log
printf "done\n" printf "done\n"
printf "Extracting PHP source tarball..." printf "Extracting PHP source tarball..."
@ -154,7 +154,7 @@ phpDir=php-$PHP_VERSION
cd $phpDir cd $phpDir
printf "Configuring PHP..." printf "Configuring PHP..."
./buildconf --force >> ../env_setup.log 2>&1 ./buildconf --force >> ../env_setup.log
CONFIG_OPTIONS="--enable-cli --enable-cgi --with-zlib --enable-mbstring --prefix=/usr/local" CONFIG_OPTIONS="--enable-cli --enable-cgi --with-zlib --enable-mbstring --prefix=/usr/local"
[ "${PHP_THREAD}" == "ts" ] && CONFIG_OPTIONS=${CONFIG_OPTIONS}" --enable-maintainer-zts" [ "${PHP_THREAD}" == "ts" ] && CONFIG_OPTIONS=${CONFIG_OPTIONS}" --enable-maintainer-zts"
if [ $PLATFORM = "Sierra" ]; then if [ $PLATFORM = "Sierra" ]; then
@ -163,7 +163,7 @@ else
CONFIG_OPTIONS=$CONFIG_OPTIONS" --with-openssl" CONFIG_OPTIONS=$CONFIG_OPTIONS" --with-openssl"
fi fi
#pipe non-error to log file #pipe non-error to log file
(./configure $CONFIG_OPTIONS >> ../env_setup.log 2>&1) (./configure $CONFIG_OPTIONS >> ../env_setup.log)
printf "done\n" printf "done\n"
printf "Compiling and installing PHP..." printf "Compiling and installing PHP..."
@ -197,7 +197,7 @@ printf "done\n"
printf "Installing Composer..." printf "Installing Composer..."
cd .. cd ..
# pipe non-error to log file # pipe non-error to log file
wget https://getcomposer.org/installer -O composer-setup.php >> env_setup.log 2>&1 wget https://getcomposer.org/installer -O composer-setup.php >> env_setup.log
/usr/local/bin/php composer-setup.php >> env_setup.log /usr/local/bin/php composer-setup.php >> env_setup.log
printf "done\n" printf "done\n"