Skip to content

Instantly share code, notes, and snippets.

@Ashrafdev
Last active September 20, 2018 06:21
Show Gist options
  • Save Ashrafdev/5fdc4aa11e1b421ebe5a35af8eae67f5 to your computer and use it in GitHub Desktop.
Save Ashrafdev/5fdc4aa11e1b421ebe5a35af8eae67f5 to your computer and use it in GitHub Desktop.

Revisions

  1. Ashrafdev revised this gist Sep 20, 2018. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions deploy_php_app.sh
    Original file line number Diff line number Diff line change
    @@ -21,7 +21,7 @@ sudo apt dist-upgrade
    # php env
    apt-get install -y php7.1 php7.1-cli php7.1-common php7.1-mbstring php7.1-gd php7.1-intl php7.1-xml php7.1-mysql php7.1-mcrypt php7.1-zip php7.1-pdo-pgsql php7.1-dom php7.1-bcmath php7.1-curl php7.1-fpm
    # optional for pgsql ext
    apt-get install -y php7.1-pgsql
    #apt-get install -y php7.1-pgsql

    # composer
    sudo apt install composer
    @@ -44,8 +44,8 @@ sudo apt-get -y update

    # Install Percona Server DB
    # install MyRocks & TokuDB Storage Engine (optional)
    sudo apt-get -y install percona-server-rocksdb-5.7
    #sudo apt-get -y install percona-server-tokudb-5.7
    sudo apt-get -y install percona-server-tokudb-5.7
    #sudo apt-get -y install percona-server-rocksdb-5.7
    #sudo apt-get -y install percona-server-server-5.7

    # Install libjemalloc
  2. Ashrafdev revised this gist May 8, 2018. 1 changed file with 2 additions and 3 deletions.
    5 changes: 2 additions & 3 deletions deploy_php_app.sh
    Original file line number Diff line number Diff line change
    @@ -42,12 +42,11 @@ dpkg -i percona-release_0.1-4.$(lsb_release -sc)_all.deb
    # update cache & install percona
    sudo apt-get -y update

    # percona myRocks
    sudo apt-get -y install percona-server-server-5.7

    # Install Percona Server DB
    # install MyRocks & TokuDB Storage Engine (optional)
    sudo apt-get -y install percona-server-rocksdb-5.7
    #sudo apt-get -y install percona-server-tokudb-5.7
    #sudo apt-get -y install percona-server-server-5.7

    # Install libjemalloc
    sudo apt-get install -y libjemalloc-dev
  3. Ashrafdev revised this gist May 8, 2018. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion deploy_php_app.sh
    Original file line number Diff line number Diff line change
    @@ -29,9 +29,12 @@ sudo apt install composer
    # speedup composer package
    sudo composer global require hirak/prestissimo

    #chown app dir
    # chown app dir
    sudo chown -R www-data:www-data /var/www

    # install redis-server for cache
    sudo apt-get -y install redis-server

    # Install Percona Server database
    wget https://repo.percona.com/apt/percona-release_0.1-4.$(lsb_release -sc)_all.deb
    dpkg -i percona-release_0.1-4.$(lsb_release -sc)_all.deb
  4. Ashrafdev revised this gist May 8, 2018. 1 changed file with 17 additions and 0 deletions.
    17 changes: 17 additions & 0 deletions deploy_php_app.sh
    Original file line number Diff line number Diff line change
    @@ -32,4 +32,21 @@ sudo composer global require hirak/prestissimo
    #chown app dir
    sudo chown -R www-data:www-data /var/www

    # Install Percona Server database
    wget https://repo.percona.com/apt/percona-release_0.1-4.$(lsb_release -sc)_all.deb
    dpkg -i percona-release_0.1-4.$(lsb_release -sc)_all.deb

    # update cache & install percona
    sudo apt-get -y update

    # percona myRocks
    sudo apt-get -y install percona-server-server-5.7

    # install MyRocks & TokuDB Storage Engine (optional)
    sudo apt-get -y install percona-server-rocksdb-5.7
    #sudo apt-get -y install percona-server-tokudb-5.7

    # Install libjemalloc
    sudo apt-get install -y libjemalloc-dev

    exit 0
  5. Ashrafdev revised this gist May 8, 2018. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions deploy_php_app.sh
    Original file line number Diff line number Diff line change
    @@ -7,6 +7,9 @@ sudo apt-get install -y software-properties-common
    # webserver
    sudo apt-get install -y nginx-full

    # generate cipher for SSL
    openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048

    # php repo
    sudo add-apt-repository -y ppa:ondrej/php

  6. Ashrafdev created this gist Feb 18, 2018.
    32 changes: 32 additions & 0 deletions deploy_php_app.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,32 @@
    #!/bin/bash

    # apt common
    sudo apt-get install -y python-software-properties
    sudo apt-get install -y software-properties-common

    # webserver
    sudo apt-get install -y nginx-full

    # php repo
    sudo add-apt-repository -y ppa:ondrej/php

    # update
    sudo apt update
    sudo apt upgrade
    sudo apt dist-upgrade

    # php env
    apt-get install -y php7.1 php7.1-cli php7.1-common php7.1-mbstring php7.1-gd php7.1-intl php7.1-xml php7.1-mysql php7.1-mcrypt php7.1-zip php7.1-pdo-pgsql php7.1-dom php7.1-bcmath php7.1-curl php7.1-fpm
    # optional for pgsql ext
    apt-get install -y php7.1-pgsql

    # composer
    sudo apt install composer

    # speedup composer package
    sudo composer global require hirak/prestissimo

    #chown app dir
    sudo chown -R www-data:www-data /var/www

    exit 0