Added suse to readme and perf script
This commit is contained in:
parent
e5c03a9c15
commit
c505d522f9
|
@ -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>
|
||||
### 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>
|
||||
### 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
|
||||
`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
|
||||
py.exe run-perf_tests.py -platform <PLATFORM>
|
||||
### 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
|
||||
|
||||
`-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.
|
||||
`-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.
|
|
@ -58,6 +58,7 @@ def validate_platform( platform_name ):
|
|||
, "WindowsServer2012"
|
||||
, "Ubuntu16"
|
||||
, "RedHat7"
|
||||
, "SUSE12"
|
||||
, "Sierra"]
|
||||
if platform_name not in platforms:
|
||||
print ( "Platform must be one of the following:" )
|
||||
|
|
|
@ -61,8 +61,8 @@ elif [ $PLATFORM = "RedHat7" ]; then
|
|||
|
||||
printf "Enabling EPEL repo..."
|
||||
# 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
|
||||
yes | sudo yum install epel-release-latest-7.noarch.rpm >> env_setup.log 2>&1 || true
|
||||
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 || true
|
||||
printf "done\n"
|
||||
|
||||
printf "Installing python34-setuptools..."
|
||||
|
@ -86,24 +86,24 @@ elif [ $PLATFORM = "RedHat7" ]; then
|
|||
|
||||
elif [ $PLATFORM = "SUSE12" ]; then
|
||||
printf "Update..."
|
||||
sudo zypper refresh >> env_setup.log 2>&1
|
||||
sudo zypper refresh >> env_setup.log
|
||||
printf "done\n"
|
||||
|
||||
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 "Installing MSODBCSQL..."
|
||||
zypper -n ar https://packages.microsoft.com/config/sles/12/prod.repo 2>&1
|
||||
zypper --gpg-auto-import-keys refresh 2>&1
|
||||
ACCEPT_EULA=Y zypper -n install msodbcsql >> env_setup.log 2>&1
|
||||
ACCEPT_EULA=Y zypper -n install mssql-tools >> env_setup.log 2>&1
|
||||
zypper -n install unixODBC-devel >> env_setup.log 2>&1
|
||||
zypper -n ar https://packages.microsoft.com/config/sles/12/prod.repo
|
||||
zypper --gpg-auto-import-keys refresh
|
||||
ACCEPT_EULA=Y zypper -n install msodbcsql >> env_setup.log
|
||||
ACCEPT_EULA=Y zypper -n install mssql-tools >> env_setup.log
|
||||
zypper -n install unixODBC-devel >> env_setup.log
|
||||
printf "done\n"
|
||||
|
||||
printf "Installing pyodbc"
|
||||
pip3 install --upgrade pip >> env_setup.log 2>&1
|
||||
pip3 install pyodbc >> env_setup.log 2>&1
|
||||
pip3 install --upgrade pip >> env_setup.log
|
||||
pip3 install pyodbc >> env_setup.log
|
||||
printf "done\n"
|
||||
|
||||
elif [ $PLATFORM = "Sierra" ]; then
|
||||
|
@ -142,7 +142,7 @@ fi
|
|||
|
||||
printf "Downloading PHP-$PHP_VERSION source tarball..."
|
||||
# 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 "Extracting PHP source tarball..."
|
||||
|
@ -154,7 +154,7 @@ phpDir=php-$PHP_VERSION
|
|||
cd $phpDir
|
||||
|
||||
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"
|
||||
[ "${PHP_THREAD}" == "ts" ] && CONFIG_OPTIONS=${CONFIG_OPTIONS}" --enable-maintainer-zts"
|
||||
if [ $PLATFORM = "Sierra" ]; then
|
||||
|
@ -163,7 +163,7 @@ else
|
|||
CONFIG_OPTIONS=$CONFIG_OPTIONS" --with-openssl"
|
||||
fi
|
||||
#pipe non-error to log file
|
||||
(./configure $CONFIG_OPTIONS >> ../env_setup.log 2>&1)
|
||||
(./configure $CONFIG_OPTIONS >> ../env_setup.log)
|
||||
printf "done\n"
|
||||
|
||||
printf "Compiling and installing PHP..."
|
||||
|
@ -197,7 +197,7 @@ printf "done\n"
|
|||
printf "Installing Composer..."
|
||||
cd ..
|
||||
# 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
|
||||
printf "done\n"
|
||||
|
||||
|
|
Loading…
Reference in a new issue