Skip to content

Instantly share code, notes, and snippets.

@Radostin
Forked from stayallive/install.sh
Last active August 29, 2015 14:26

Revisions

  1. @stayallive stayallive revised this gist Mar 29, 2015. 1 changed file with 18 additions and 18 deletions.
    36 changes: 18 additions & 18 deletions install.sh
    Original file line number Diff line number Diff line change
    @@ -18,33 +18,33 @@ yum -y install gcc make gcc-c++ cpp kernel-headers.x86_64 libxml2-devel openssl-
    mysql-devel readline-devel libedit-devel recode-devel libtidy-devel libtool-ltdl-devel

    # Download PHP
    wget http://nl1.php.net/get/php-5.6.4.tar.gz/from/this/mirror -O /php/php-5.6.4.tar.gz
    wget http://nl1.php.net/get/php-5.6.7.tar.gz/from/this/mirror -O /php/php-5.6.7.tar.gz

    # Extract PHP
    tar xzvf /php/php-5.6.4.tar.gz
    tar xzvf /php/php-5.6.7.tar.gz

    # Move to unpacked folder
    cd /php/php-5.6.4
    cd /php/php-5.6.7

    # Configure PHP build script
    ./configure \
    --with-libdir=lib64 \
    --cache-file=./config.cache \
    --prefix=/php/php-5.6.4 \
    --with-config-file-path=/php/php-5.6.4/etc \
    --prefix=/php/php-5.6.7 \
    --with-config-file-path=/php/php-5.6.7/etc \
    --disable-debug \
    --with-pic \
    --disable-rpath \
    --with-bz2 \
    --with-curl \
    --with-freetype-dir=/php/php-5.6.4 \
    --with-png-dir=/php/php-5.6.4 \
    --with-freetype-dir=/php/php-5.6.7 \
    --with-png-dir=/php/php-5.6.7 \
    --enable-gd-native-ttf \
    --without-gdbm \
    --with-gettext \
    --with-gmp \
    --with-iconv \
    --with-jpeg-dir=/php/php-5.6.4 \
    --with-jpeg-dir=/php/php-5.6.7 \
    --with-openssl \
    --with-pspell \
    --with-pcre-regex \
    @@ -60,7 +60,7 @@ cd /php/php-5.6.4
    --with-unixODBC=/usr \
    --enable-shmop \
    --enable-calendar \
    --with-libxml-dir=/php/php-5.6.4 \
    --with-libxml-dir=/php/php-5.6.7 \
    --enable-pcntl \
    --with-imap \
    --with-imap-ssl \
    @@ -80,10 +80,10 @@ cd /php/php-5.6.4
    --enable-xmlwriter \
    --enable-pdo \
    --with-pdo-mysql \
    --with-pear=/php/php-5.6.4/pear \
    --with-pear=/php/php-5.6.7/pear \
    --with-mcrypt \
    --without-pdo-sqlite \
    --with-config-file-scan-dir=/php/php-5.6.4/php.d \
    --with-config-file-scan-dir=/php/php-5.6.7/php.d \
    --without-sqlite3 \
    --enable-intl \
    --enable-opcache
    @@ -92,18 +92,18 @@ cd /php/php-5.6.4
    make && make install

    # Create a default php.ini
    mkdir /php/php-5.6.4/etc
    cp -a /etc/php.ini /php/php-5.6.4/etc/php.ini
    mkdir /php/php-5.6.7/etc
    cp -a /etc/php.ini /php/php-5.6.7/etc/php.ini

    # Set the timezone
    timezone=$(grep -oP '(?<=")\w+/\w+' /etc/sysconfig/clock)
    sed -i "s#;date.timezone =#date.timezone = $timezone#" /php/php-5.6.4/etc/php.ini
    sed -i "s#;date.timezone =#date.timezone = $timezone#" /php/php-5.6.7/etc/php.ini

    # Register with Plesk
    /usr/local/psa/bin/php_handler \
    --add \
    -displayname "5.6.4" \
    -path /php/php-5.6.4/bin/php-cgi \
    -phpini /php/php-5.6.4/etc/php.ini \
    -displayname "5.6.7" \
    -path /php/php-5.6.7/bin/php-cgi \
    -phpini /php/php-5.6.7/etc/php.ini \
    -type fastcgi \
    -id "fastcgi-5.6.4"
    -id "fastcgi-5.6.7"
  2. @stayallive stayallive revised this gist Dec 30, 2014. 1 changed file with 18 additions and 18 deletions.
    36 changes: 18 additions & 18 deletions install.sh
    Original file line number Diff line number Diff line change
    @@ -18,33 +18,33 @@ yum -y install gcc make gcc-c++ cpp kernel-headers.x86_64 libxml2-devel openssl-
    mysql-devel readline-devel libedit-devel recode-devel libtidy-devel libtool-ltdl-devel

    # Download PHP
    wget http://nl1.php.net/get/php-5.6.3.tar.gz/from/this/mirror -O /php/php-5.6.3.tar.gz
    wget http://nl1.php.net/get/php-5.6.4.tar.gz/from/this/mirror -O /php/php-5.6.4.tar.gz

    # Extract PHP
    tar xzvf /php/php-5.6.3.tar.gz
    tar xzvf /php/php-5.6.4.tar.gz

    # Move to unpacked folder
    cd /php/php-5.6.3
    cd /php/php-5.6.4

    # Configure PHP build script
    ./configure \
    --with-libdir=lib64 \
    --cache-file=./config.cache \
    --prefix=/php/php-5.6.3 \
    --with-config-file-path=/php/php-5.6.3/etc \
    --prefix=/php/php-5.6.4 \
    --with-config-file-path=/php/php-5.6.4/etc \
    --disable-debug \
    --with-pic \
    --disable-rpath \
    --with-bz2 \
    --with-curl \
    --with-freetype-dir=/php/php-5.6.3 \
    --with-png-dir=/php/php-5.6.3 \
    --with-freetype-dir=/php/php-5.6.4 \
    --with-png-dir=/php/php-5.6.4 \
    --enable-gd-native-ttf \
    --without-gdbm \
    --with-gettext \
    --with-gmp \
    --with-iconv \
    --with-jpeg-dir=/php/php-5.6.3 \
    --with-jpeg-dir=/php/php-5.6.4 \
    --with-openssl \
    --with-pspell \
    --with-pcre-regex \
    @@ -60,7 +60,7 @@ cd /php/php-5.6.3
    --with-unixODBC=/usr \
    --enable-shmop \
    --enable-calendar \
    --with-libxml-dir=/php/php-5.6.3 \
    --with-libxml-dir=/php/php-5.6.4 \
    --enable-pcntl \
    --with-imap \
    --with-imap-ssl \
    @@ -80,10 +80,10 @@ cd /php/php-5.6.3
    --enable-xmlwriter \
    --enable-pdo \
    --with-pdo-mysql \
    --with-pear=/php/php-5.6.3/pear \
    --with-pear=/php/php-5.6.4/pear \
    --with-mcrypt \
    --without-pdo-sqlite \
    --with-config-file-scan-dir=/php/php-5.6.3/php.d \
    --with-config-file-scan-dir=/php/php-5.6.4/php.d \
    --without-sqlite3 \
    --enable-intl \
    --enable-opcache
    @@ -92,18 +92,18 @@ cd /php/php-5.6.3
    make && make install

    # Create a default php.ini
    mkdir /php/php-5.6.3/etc
    cp -a /etc/php.ini /php/php-5.6.3/etc/php.ini
    mkdir /php/php-5.6.4/etc
    cp -a /etc/php.ini /php/php-5.6.4/etc/php.ini

    # Set the timezone
    timezone=$(grep -oP '(?<=")\w+/\w+' /etc/sysconfig/clock)
    sed -i "s#;date.timezone =#date.timezone = $timezone#" /php/php-5.6.3/etc/php.ini
    sed -i "s#;date.timezone =#date.timezone = $timezone#" /php/php-5.6.4/etc/php.ini

    # Register with Plesk
    /usr/local/psa/bin/php_handler \
    --add \
    -displayname "5.6.3" \
    -path /php/php-5.6.3/bin/php-cgi \
    -phpini /php/php-5.6.3/etc/php.ini \
    -displayname "5.6.4" \
    -path /php/php-5.6.4/bin/php-cgi \
    -phpini /php/php-5.6.4/etc/php.ini \
    -type fastcgi \
    -id "fastcgi-5.6.3"
    -id "fastcgi-5.6.4"
  3. @stayallive stayallive revised this gist Dec 18, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install.sh
    Original file line number Diff line number Diff line change
    @@ -102,7 +102,7 @@ sed -i "s#;date.timezone =#date.timezone = $timezone#" /php/php-5.6.3/etc/php.in
    # Register with Plesk
    /usr/local/psa/bin/php_handler \
    --add \
    -displayname "5.3" \
    -displayname "5.6.3" \
    -path /php/php-5.6.3/bin/php-cgi \
    -phpini /php/php-5.6.3/etc/php.ini \
    -type fastcgi \
  4. @stayallive stayallive revised this gist Dec 18, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install.sh
    Original file line number Diff line number Diff line change
    @@ -18,7 +18,7 @@ yum -y install gcc make gcc-c++ cpp kernel-headers.x86_64 libxml2-devel openssl-
    mysql-devel readline-devel libedit-devel recode-devel libtidy-devel libtool-ltdl-devel

    # Download PHP
    wget http://nl1.php.net/get/php-5.6.3.tar.bz2/from/this/mirror -O /php/php-5.6.3.tar.gz
    wget http://nl1.php.net/get/php-5.6.3.tar.gz/from/this/mirror -O /php/php-5.6.3.tar.gz

    # Extract PHP
    tar xzvf /php/php-5.6.3.tar.gz
  5. @stayallive stayallive revised this gist Dec 18, 2014. 1 changed file with 18 additions and 18 deletions.
    36 changes: 18 additions & 18 deletions install.sh
    Original file line number Diff line number Diff line change
    @@ -18,33 +18,33 @@ yum -y install gcc make gcc-c++ cpp kernel-headers.x86_64 libxml2-devel openssl-
    mysql-devel readline-devel libedit-devel recode-devel libtidy-devel libtool-ltdl-devel

    # Download PHP
    wget http://downloads.php.net/tyrael/php-5.6.0RC2.tar.gz -O /php/php-5.6.0RC2.tar.gz
    wget http://nl1.php.net/get/php-5.6.3.tar.bz2/from/this/mirror -O /php/php-5.6.3.tar.gz

    # Extract PHP
    tar xzvf /php/php-5.6.0RC2.tar.gz
    tar xzvf /php/php-5.6.3.tar.gz

    # Move to unpacked folder
    cd /php/php-5.6.0RC2
    cd /php/php-5.6.3

    # Configure PHP build script
    ./configure \
    --with-libdir=lib64 \
    --cache-file=./config.cache \
    --prefix=/php/php-5.6.0RC2 \
    --with-config-file-path=/php/php-5.6.0RC2/etc \
    --prefix=/php/php-5.6.3 \
    --with-config-file-path=/php/php-5.6.3/etc \
    --disable-debug \
    --with-pic \
    --disable-rpath \
    --with-bz2 \
    --with-curl \
    --with-freetype-dir=/php/php-5.6.0RC2 \
    --with-png-dir=/php/php-5.6.0RC2 \
    --with-freetype-dir=/php/php-5.6.3 \
    --with-png-dir=/php/php-5.6.3 \
    --enable-gd-native-ttf \
    --without-gdbm \
    --with-gettext \
    --with-gmp \
    --with-iconv \
    --with-jpeg-dir=/php/php-5.6.0RC2 \
    --with-jpeg-dir=/php/php-5.6.3 \
    --with-openssl \
    --with-pspell \
    --with-pcre-regex \
    @@ -60,7 +60,7 @@ cd /php/php-5.6.0RC2
    --with-unixODBC=/usr \
    --enable-shmop \
    --enable-calendar \
    --with-libxml-dir=/php/php-5.6.0RC2 \
    --with-libxml-dir=/php/php-5.6.3 \
    --enable-pcntl \
    --with-imap \
    --with-imap-ssl \
    @@ -80,10 +80,10 @@ cd /php/php-5.6.0RC2
    --enable-xmlwriter \
    --enable-pdo \
    --with-pdo-mysql \
    --with-pear=/php/php-5.6.0RC2/pear \
    --with-pear=/php/php-5.6.3/pear \
    --with-mcrypt \
    --without-pdo-sqlite \
    --with-config-file-scan-dir=/php/php-5.6.0RC2/php.d \
    --with-config-file-scan-dir=/php/php-5.6.3/php.d \
    --without-sqlite3 \
    --enable-intl \
    --enable-opcache
    @@ -92,18 +92,18 @@ cd /php/php-5.6.0RC2
    make && make install

    # Create a default php.ini
    mkdir /php/php-5.6.0RC2/etc
    cp -a /etc/php.ini /php/php-5.6.0RC2/etc/php.ini
    mkdir /php/php-5.6.3/etc
    cp -a /etc/php.ini /php/php-5.6.3/etc/php.ini

    # Set the timezone
    timezone=$(grep -oP '(?<=")\w+/\w+' /etc/sysconfig/clock)
    sed -i "s#;date.timezone =#date.timezone = $timezone#" /php/php-5.6.0RC2/etc/php.ini
    sed -i "s#;date.timezone =#date.timezone = $timezone#" /php/php-5.6.3/etc/php.ini

    # Register with Plesk
    /usr/local/psa/bin/php_handler \
    --add \
    -displayname "5.6RC2" \
    -path /php/php-5.6.0RC2/bin/php-cgi \
    -phpini /php/php-5.6.0RC2/etc/php.ini \
    -displayname "5.3" \
    -path /php/php-5.6.3/bin/php-cgi \
    -phpini /php/php-5.6.3/etc/php.ini \
    -type fastcgi \
    -id "fastcgi-5.6RC2"
    -id "fastcgi-5.6.3"
  6. @stayallive stayallive revised this gist Jul 28, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install.sh
    Original file line number Diff line number Diff line change
    @@ -85,7 +85,7 @@ cd /php/php-5.6.0RC2
    --without-pdo-sqlite \
    --with-config-file-scan-dir=/php/php-5.6.0RC2/php.d \
    --without-sqlite3 \
    --enable-intl
    --enable-intl \
    --enable-opcache

    # Build & Install
  7. @stayallive stayallive revised this gist Jul 28, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    #!/bin/bash

    # Make sure you are up to date
    yum update && yum -y install wget
    yum -y update && yum -y install wget

    # Install EPEL repository
    rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
  8. @stayallive stayallive revised this gist Jul 28, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install.sh
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@ yum update && yum -y install wget
    rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

    # Get us a clean working directory
    makedir /php
    mkdir /php
    cd /php

    # Install PHP dependencies
  9. @stayallive stayallive renamed this gist Jul 28, 2014. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  10. @stayallive stayallive created this gist Jul 28, 2014.
    109 changes: 109 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,109 @@
    #!/bin/bash

    # Make sure you are up to date
    yum update && yum -y install wget

    # Install EPEL repository
    rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

    # Get us a clean working directory
    makedir /php
    cd /php

    # Install PHP dependencies
    yum -y install gcc make gcc-c++ cpp kernel-headers.x86_64 libxml2-devel openssl-devel \
    bzip2-devel libjpeg-devel libpng-devel freetype-devel openldap-devel postgresql-devel \
    aspell-devel net-snmp-devel libxslt-devel libc-client-devel libicu-devel gmp-devel curl-devel \
    libmcrypt-devel unixODBC-devel pcre-devel sqlite-devel db4-devel enchant-devel libXpm-devel \
    mysql-devel readline-devel libedit-devel recode-devel libtidy-devel libtool-ltdl-devel

    # Download PHP
    wget http://downloads.php.net/tyrael/php-5.6.0RC2.tar.gz -O /php/php-5.6.0RC2.tar.gz

    # Extract PHP
    tar xzvf /php/php-5.6.0RC2.tar.gz

    # Move to unpacked folder
    cd /php/php-5.6.0RC2

    # Configure PHP build script
    ./configure \
    --with-libdir=lib64 \
    --cache-file=./config.cache \
    --prefix=/php/php-5.6.0RC2 \
    --with-config-file-path=/php/php-5.6.0RC2/etc \
    --disable-debug \
    --with-pic \
    --disable-rpath \
    --with-bz2 \
    --with-curl \
    --with-freetype-dir=/php/php-5.6.0RC2 \
    --with-png-dir=/php/php-5.6.0RC2 \
    --enable-gd-native-ttf \
    --without-gdbm \
    --with-gettext \
    --with-gmp \
    --with-iconv \
    --with-jpeg-dir=/php/php-5.6.0RC2 \
    --with-openssl \
    --with-pspell \
    --with-pcre-regex \
    --with-zlib \
    --enable-exif \
    --enable-ftp \
    --enable-sockets \
    --enable-sysvsem \
    --enable-sysvshm \
    --enable-sysvmsg \
    --enable-wddx \
    --with-kerberos \
    --with-unixODBC=/usr \
    --enable-shmop \
    --enable-calendar \
    --with-libxml-dir=/php/php-5.6.0RC2 \
    --enable-pcntl \
    --with-imap \
    --with-imap-ssl \
    --enable-mbstring \
    --enable-mbregex \
    --with-gd \
    --enable-bcmath \
    --with-xmlrpc \
    --with-ldap \
    --with-ldap-sasl \
    --with-mysql=/usr \
    --with-mysqli \
    --with-snmp \
    --enable-soap \
    --with-xsl \
    --enable-xmlreader \
    --enable-xmlwriter \
    --enable-pdo \
    --with-pdo-mysql \
    --with-pear=/php/php-5.6.0RC2/pear \
    --with-mcrypt \
    --without-pdo-sqlite \
    --with-config-file-scan-dir=/php/php-5.6.0RC2/php.d \
    --without-sqlite3 \
    --enable-intl
    --enable-opcache

    # Build & Install
    make && make install

    # Create a default php.ini
    mkdir /php/php-5.6.0RC2/etc
    cp -a /etc/php.ini /php/php-5.6.0RC2/etc/php.ini

    # Set the timezone
    timezone=$(grep -oP '(?<=")\w+/\w+' /etc/sysconfig/clock)
    sed -i "s#;date.timezone =#date.timezone = $timezone#" /php/php-5.6.0RC2/etc/php.ini

    # Register with Plesk
    /usr/local/psa/bin/php_handler \
    --add \
    -displayname "5.6RC2" \
    -path /php/php-5.6.0RC2/bin/php-cgi \
    -phpini /php/php-5.6.0RC2/etc/php.ini \
    -type fastcgi \
    -id "fastcgi-5.6RC2"