Skip to content

Instantly share code, notes, and snippets.

@scarnago
Forked from kbond/post.md
Last active September 23, 2015 01:49
Show Gist options
  • Save scarnago/f69513519c33e8e7f0f0 to your computer and use it in GitHub Desktop.
Save scarnago/f69513519c33e8e7f0f0 to your computer and use it in GitHub Desktop.

Revisions

  1. Santiago Carnago renamed this gist Sep 23, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. @kbond kbond revised this gist Aug 12, 2015. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions post.md
    Original file line number Diff line number Diff line change
    @@ -243,6 +243,8 @@ Add the following to your `php.ini`:

    apt-get install php5-sybase

    ---

    [Download latest FreeTDS](http://www.freetds.org/) and compile:

    ```
  3. @kbond kbond revised this gist Aug 12, 2015. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions post.md
    Original file line number Diff line number Diff line change
    @@ -239,6 +239,10 @@ Add the following to your `php.ini`:

    ## F. Install pdo_dblib/mssql from source

    **UPDATE:** on Ubuntu 14.04 and PHP 5.6 you can simply install Sybase DB:

    apt-get install php5-sybase

    [Download latest FreeTDS](http://www.freetds.org/) and compile:

    ```
  4. @kbond kbond revised this gist Aug 12, 2015. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion post.md
    Original file line number Diff line number Diff line change
    @@ -311,4 +311,8 @@ Install dependencies:

    Install weasyprint:

    sudo pip install weasyprint
    sudo pip install weasyprint

    ## H. Install [wkhtmltopdf](http://wkhtmltopdf.org/) dependencies

    sudo apt-get install libxrender1 libfontconfig1 libxtst6
  5. @kbond kbond revised this gist Aug 11, 2015. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions post.md
    Original file line number Diff line number Diff line change
    @@ -12,17 +12,17 @@ Configure Git:
    ssh-keygen -t rsa -C "Your Email"
    cat ~/.ssh/id_rsa.pub

    Use PHP 5.4.x:
    (Optional) Use PHP 5.4.x:

    sudo add-apt-repository ppa:ondrej/php5-oldstable
    sudo apt-get update

    Use PHP 5.5.x:
    (Optional) Use PHP 5.5.x:

    sudo add-apt-repository ppa:ondrej/php5
    sudo apt-get update

    Use PHP 5.6.x:
    (Optional) Use PHP 5.6.x:

    sudo add-apt-repository ppa:ondrej/php5-5.6
    sudo apt-get update
  6. @kbond kbond revised this gist Aug 11, 2015. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions post.md
    Original file line number Diff line number Diff line change
    @@ -22,6 +22,11 @@ Use PHP 5.5.x:
    sudo add-apt-repository ppa:ondrej/php5
    sudo apt-get update

    Use PHP 5.6.x:

    sudo add-apt-repository ppa:ondrej/php5-5.6
    sudo apt-get update

    Install apache/php:

    sudo apt-get install apache2 php5 php5-cli libapache2-mod-php5 php5-dev
  7. @kbond kbond revised this gist Jan 29, 2015. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions post.md
    Original file line number Diff line number Diff line change
    @@ -132,14 +132,12 @@ Add the following:
    </VirtualHost>
    <VirtualHost *:80>
    ServerName *.local
    ServerAlias *.local
    VirtualDocumentRoot /home/{user}/www/%1/web
    </VirtualHost>
    # For SSL
    #<VirtualHost *:443>
    # ServerName *.local
    # ServerAlias *.local
    # VirtualDocumentRoot /home/kbond/www/%1/web
    #
  8. @kbond kbond revised this gist Feb 1, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion post.md
    Original file line number Diff line number Diff line change
    @@ -103,7 +103,7 @@ Install node.js/npm:
    sudo apt-get update
    sudo apt-get install nodejs

    Install Bower/UglifyJs/UglifyCss/Grunt:
    Install some npm modules:

    sudo npm install -g bower
    sudo npm install -g uglify-js
  9. @kbond kbond revised this gist Feb 1, 2014. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions post.md
    Original file line number Diff line number Diff line change
    @@ -109,6 +109,7 @@ Install Bower/UglifyJs/UglifyCss/Grunt:
    sudo npm install -g uglify-js
    sudo npm install -g uglifycss
    sudo npm install -g grunt-cli
    sudo npm install -g zombie

    # Appendix

  10. @kbond kbond revised this gist Jan 15, 2014. 1 changed file with 13 additions and 2 deletions.
    15 changes: 13 additions & 2 deletions post.md
    Original file line number Diff line number Diff line change
    @@ -103,11 +103,12 @@ Install node.js/npm:
    sudo apt-get update
    sudo apt-get install nodejs

    Install Bower/UglifyJs/UglifyCss:
    Install Bower/UglifyJs/UglifyCss/Grunt:

    sudo npm install -g bower
    sudo npm install -g uglify-js
    sudo npm install -g uglifycss
    sudo npm install -g grunt-cli

    # Appendix

    @@ -296,4 +297,14 @@ To:

    ```bash
    pdo_cv_inc_path=/path/to/php_pdo_driver.h # mine was: /usr/include/php5/ext/pdo/php_pdo_driver.h
    ```
    ```

    ## G. Install [weasyprint](http://weasyprint.org/)

    Install dependencies:

    sudo apt-get install python-dev python-pip python-lxml libcairo2 libpango1.0-0 libgdk-pixbuf2.0-0 libffi-dev libxml2-dev libxslt-dev

    Install weasyprint:

    sudo pip install weasyprint
  11. @kbond kbond revised this gist Dec 17, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion post.md
    Original file line number Diff line number Diff line change
    @@ -140,8 +140,8 @@ Add the following:
    # ServerName *.local
    # ServerAlias *.local
    # VirtualDocumentRoot /home/kbond/www/%1/web
    # SSLEngine on
    #
    # SSLEngine on
    # SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
    # SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
    #</VirtualHost>
  12. @kbond kbond revised this gist Dec 17, 2013. 1 changed file with 11 additions and 0 deletions.
    11 changes: 11 additions & 0 deletions post.md
    Original file line number Diff line number Diff line change
    @@ -134,6 +134,17 @@ Add the following:
    ServerAlias *.local
    VirtualDocumentRoot /home/{user}/www/%1/web
    </VirtualHost>
    # For SSL
    #<VirtualHost *:443>
    # ServerName *.local
    # ServerAlias *.local
    # VirtualDocumentRoot /home/kbond/www/%1/web
    # SSLEngine on
    #
    # SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
    # SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
    #</VirtualHost>
    ```

    Enable the site:
  13. @kbond kbond revised this gist Sep 18, 2013. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions post.md
    Original file line number Diff line number Diff line change
    @@ -238,7 +238,7 @@ Compile `pdo_dblib`:
    ```
    cd ext/pdo_dblib
    phpize
    ./configure --with-pdo-dblib=/usr/local/freetds
    ./configure --with-pdo-dblib=/usr/local/freetds --with-php-config=/path/to/php-config
    make
    make install
    ```
    @@ -248,7 +248,7 @@ Compile `mssql`:
    ```
    cd ext/mssql
    phpize
    ./configure --with-mssql=/usr/local/freetds
    ./configure --with-mssql=/usr/local/freetds --with-php-config=/path/to/php-config
    make
    make install
    ```
  14. @kbond kbond revised this gist Sep 18, 2013. 1 changed file with 22 additions and 5 deletions.
    27 changes: 22 additions & 5 deletions post.md
    Original file line number Diff line number Diff line change
    @@ -221,9 +221,9 @@ Add the following to your `php.ini`:

    extension=intl.so

    ## F. Install pdo_dblib from source
    ## F. Install pdo_dblib/mssql from source

    [Download latest FreeTDS](http://www.freetds.org/)
    [Download latest FreeTDS](http://www.freetds.org/) and compile:

    ```
    ./configure --prefix=/usr/local/freetds --with-tdsver=7.0 --enable-msdblib --with-gnu-ld
    @@ -233,19 +233,36 @@ make install

    [Download source for your version of php](https://github.com/php/php-src)

    Compile `pdo_dblib`:

    ```
    cd ext/pdo_dblib
    phpize
    ./configure --with-pdo-dblib=/usr/local/freetds --with-php-config={path/to/php-config}
    ./configure --with-pdo-dblib=/usr/local/freetds
    make
    make install
    ```

    Compile `mssql`:

    ```
    cd ext/mssql
    phpize
    ./configure --with-mssql=/usr/local/freetds
    make
    make install
    ```

    Add the following to your `php.ini`:

    extension=pdo_dblib.so
    ```
    extension=pdo_dblib.so
    extension=mssql.so
    ```

    **Note**: ensure these are below `extension=pdo.so`

    Ensure it is available with:
    Ensure `dblib` it is available with:

    php -r "phpinfo();" | grep "PDO drivers"

  15. @kbond kbond revised this gist Sep 18, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion post.md
    Original file line number Diff line number Diff line change
    @@ -226,7 +226,7 @@ Add the following to your `php.ini`:
    [Download latest FreeTDS](http://www.freetds.org/)

    ```
    ./configure --prefix=/usr/local/freetds --enable-msdblib --enable-sybase-compat
    ./configure --prefix=/usr/local/freetds --with-tdsver=7.0 --enable-msdblib --with-gnu-ld
    make
    make install
    ```
  16. @kbond kbond revised this gist Sep 17, 2013. 1 changed file with 22 additions and 1 deletion.
    23 changes: 22 additions & 1 deletion post.md
    Original file line number Diff line number Diff line change
    @@ -247,4 +247,25 @@ Add the following to your `php.ini`:

    Ensure it is available with:

    php -r "phpinfo();" | grep "PDO drivers"
    php -r "phpinfo();" | grep "PDO drivers"

    **Note**: during `./configure` if you get the error: `configure: error: Cannot find php_pdo_driver.h.`, edit the following section in the `./configure` file:

    From:

    ```bash
    if test -f $abs_srcdir/include/php5/ext/pdo/php_pdo_driver.h; then
    pdo_cv_inc_path=$abs_srcdir/ext
    elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
    pdo_cv_inc_path=$abs_srcdir/ext
    elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
    pdo_cv_inc_path=$prefix/include/php/ext
    fi

    ```

    To:

    ```bash
    pdo_cv_inc_path=/path/to/php_pdo_driver.h # mine was: /usr/include/php5/ext/pdo/php_pdo_driver.h
    ```
  17. @kbond kbond revised this gist Sep 17, 2013. 1 changed file with 31 additions and 3 deletions.
    34 changes: 31 additions & 3 deletions post.md
    Original file line number Diff line number Diff line change
    @@ -177,7 +177,7 @@ Then run the following:
    sudo make
    sudo make install

    Add the following to ``/etc/php5/cli/php.ini``:
    Add the following to your `php.ini`:

    extension=twig.so

    @@ -217,6 +217,34 @@ make
    make install
    ```

    Add the following to ``/etc/php5/cli/php.ini``:
    Add the following to your `php.ini`:

    extension=intl.so
    extension=intl.so

    ## F. Install pdo_dblib from source

    [Download latest FreeTDS](http://www.freetds.org/)

    ```
    ./configure --prefix=/usr/local/freetds --enable-msdblib --enable-sybase-compat
    make
    make install
    ```

    [Download source for your version of php](https://github.com/php/php-src)

    ```
    cd ext/pdo_dblib
    phpize
    ./configure --with-pdo-dblib=/usr/local/freetds --with-php-config={path/to/php-config}
    make
    make install
    ```

    Add the following to your `php.ini`:

    extension=pdo_dblib.so

    Ensure it is available with:

    php -r "phpinfo();" | grep "PDO drivers"
  18. @kbond kbond revised this gist Aug 7, 2013. 1 changed file with 25 additions and 2 deletions.
    27 changes: 25 additions & 2 deletions post.md
    Original file line number Diff line number Diff line change
    @@ -75,7 +75,7 @@ Ensure this worked by visiting ``http://localhost/phpmyadmin``.

    Install useful php modules:

    sudo apt-get install php5-mcrypt php5-xdebug php5-curl php5-sqlite php5-xsl php5-intl php-pear php-apc
    sudo apt-get install php5-mcrypt php5-xdebug php5-curl php5-sqlite php5-xsl php-pear php-apc

    Change php.ini directory for apache to use the same config as cli:

    @@ -196,4 +196,27 @@ Add `acl` to the options column of `ext4`:
    ```
    # <file system> <mount point> <type> <options> <dump> <pass>
    UUID=... / ext4 acl,errors=remount-ro 0 1
    ```
    ```

    ## E. Install icu/php-intl from source

    [Download latest ICU](http://site.icu-project.org/download)

    ```
    ./configure
    make
    make install
    ```

    [Download latest intl](http://pecl.php.net/package/intl)

    ```
    phpize
    ./configure
    make
    make install
    ```

    Add the following to ``/etc/php5/cli/php.ini``:

    extension=intl.so
  19. @kbond kbond revised this gist Aug 7, 2013. 1 changed file with 9 additions and 1 deletion.
    10 changes: 9 additions & 1 deletion post.md
    Original file line number Diff line number Diff line change
    @@ -12,7 +12,15 @@ Configure Git:
    ssh-keygen -t rsa -C "Your Email"
    cat ~/.ssh/id_rsa.pub

    Use php 5.4+ http://www.zimbio.com/Ubuntu+Linux/articles/D_AsJR2qAL6/How+Upgrade+PHP+5+4+Ubuntu
    Use PHP 5.4.x:

    sudo add-apt-repository ppa:ondrej/php5-oldstable
    sudo apt-get update

    Use PHP 5.5.x:

    sudo add-apt-repository ppa:ondrej/php5
    sudo apt-get update

    Install apache/php:

  20. @kbond kbond revised this gist Jun 27, 2013. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion post.md
    Original file line number Diff line number Diff line change
    @@ -156,7 +156,11 @@ Enable ssl and default ssl site in apache:

    Reference: http://twig.sensiolabs.org/doc/intro.html#installing-the-c-extension

    Run the following:
    Ensure `gcc` is intalled:

    sudo apt-get install gcc

    Then run the following:

    git clone https://github.com/fabpot/Twig.git
    cd Twig/ext/twig/
  21. @kbond kbond revised this gist Apr 30, 2013. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions post.md
    Original file line number Diff line number Diff line change
    @@ -134,11 +134,11 @@ Enable the site:

    Restart Apache:

    sudo apache2ctl restart
    sudo apache2ctl restart

    Ensure your sites are added to `/etc/hosts`:

    127.0.0.1 mysite.local
    127.0.0.1 mysite.local

    ## B. Enable SSL

  22. @kbond kbond revised this gist Apr 27, 2013. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions post.md
    Original file line number Diff line number Diff line change
    @@ -175,6 +175,10 @@ Restart Apache:

    ## D. Enable ACL

    Edit your filesystem table:

    sudo nano /etc/fstab

    Add `acl` to the options column of `ext4`:

    ```
  23. @kbond kbond revised this gist Apr 26, 2013. 1 changed file with 11 additions and 9 deletions.
    20 changes: 11 additions & 9 deletions post.md
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ Configure Git:
    git config --global core.excludesfile ~/.gitignore_global
    git config --global user.name "Your Name"
    git config --global user.email "Your Email"

    ssh-keygen -t rsa -C "Your Email"
    cat ~/.ssh/id_rsa.pub

    @@ -50,16 +50,18 @@ Edit phpmyadmin ``config.inc.php``:

    Add/edit the following (around page 42):

    // ...
    ```php
    // ...

    /* Authentication type */
    $cfg['Servers'][$i]['auth_type'] = 'config';

    $cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
    $cfg['Servers'][$i]['user'] = 'root';
    /* Server parameters */
    /* Authentication type */
    $cfg['Servers'][$i]['auth_type'] = 'config';

    // ...
    $cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
    $cfg['Servers'][$i]['user'] = 'root';
    /* Server parameters */

    // ...
    ```

    Ensure this worked by visiting ``http://localhost/phpmyadmin``.

  24. @kbond kbond revised this gist Apr 25, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion post.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    Install git/subversion:
    Install git:

    sudo apt-get install git

  25. @kbond kbond revised this gist Apr 25, 2013. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions post.md
    Original file line number Diff line number Diff line change
    @@ -114,6 +114,11 @@ Add Apache site:
    Add the following:

    ```
    <VirtualHost *:80>
    ServerName localhost
    DocumentRoot /home/{user}/www
    </VirtualHost>
    <VirtualHost *:80>
    ServerName *.local
    ServerAlias *.local
  26. @kbond kbond revised this gist Apr 25, 2013. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions post.md
    Original file line number Diff line number Diff line change
    @@ -173,6 +173,4 @@ Add `acl` to the options column of `ext4`:
    ```
    # <file system> <mount point> <type> <options> <dump> <pass>
    UUID=... / ext4 acl,errors=remount-ro 0 1
    UUID=... none swap sw 0 0
    ```
  27. @kbond kbond revised this gist Apr 25, 2013. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions post.md
    Original file line number Diff line number Diff line change
    @@ -171,8 +171,8 @@ Restart Apache:
    Add `acl` to the options column of `ext4`:

    ```
    # <file system> <mount point> <type> <options> <dump> <pass>
    UUID=e3bb5087-84ff-405f-ada3-02f07af8d69b / ext4 acl,errors=remount-ro 0 1
    # <file system> <mount point> <type> <options> <dump> <pass>
    UUID=... / ext4 acl,errors=remount-ro 0 1
    UUID=fea69fb4-f59d-4ba8-a92a-8d66fe2fdabb none swap sw 0 0
    UUID=... none swap sw 0 0
    ```
  28. @kbond kbond revised this gist Apr 25, 2013. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions post.md
    Original file line number Diff line number Diff line change
    @@ -32,6 +32,10 @@ Edit your php.ini:

    short_open_tag = Off

    3. Increase `xdebug.max_nesting_level`

    xdebug.max_nesting_level = 250

    Install mysql (enter through password prompts to use use defaults):

    sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
  29. @kbond kbond revised this gist Apr 25, 2013. 1 changed file with 11 additions and 0 deletions.
    11 changes: 11 additions & 0 deletions post.md
    Original file line number Diff line number Diff line change
    @@ -161,3 +161,14 @@ Add the following to ``/etc/php5/cli/php.ini``:
    Restart Apache:

    sudo apache2ctl restart

    ## D. Enable ACL

    Add `acl` to the options column of `ext4`:

    ```
    # <file system> <mount point> <type> <options> <dump> <pass>
    UUID=e3bb5087-84ff-405f-ada3-02f07af8d69b / ext4 acl,errors=remount-ro 0 1
    UUID=fea69fb4-f59d-4ba8-a92a-8d66fe2fdabb none swap sw 0 0
    ```
  30. @kbond kbond revised this gist Apr 25, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion post.md
    Original file line number Diff line number Diff line change
    @@ -97,7 +97,7 @@ Install Bower/UglifyJs/UglifyCss:

    # Appendix

    ## A. Configure Development environment
    ## A. Configure Apache Sites

    Enable Apache mods: