Skip to content

Instantly share code, notes, and snippets.

@iamdey
Last active April 30, 2017 14:12
Show Gist options
  • Select an option

  • Save iamdey/2665599 to your computer and use it in GitHub Desktop.

Select an option

Save iamdey/2665599 to your computer and use it in GitHub Desktop.

Revisions

  1. iamdey revised this gist Jul 19, 2013. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions lamp-install-dev.sh
    Original file line number Diff line number Diff line change
    @@ -27,6 +27,7 @@ then
    sudo tee -a $php_ini <<XDEBUG
    [xdebug]
    xdebug.remote_enable=On
    xdebug.remote_connect_back=On
    xdebug.remote_handler=dbgp
    xdebug.remote_mode=req
    xdebug.remote_host=10.0.0.1
  2. iamdey revised this gist May 14, 2012. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions lamp-install-dev.sh
    Original file line number Diff line number Diff line change
    @@ -35,6 +35,11 @@ XDEBUG

    fi

    if ! grep -xq "ServerName" /etc/apache2/httpd.conf
    then
    echo "ServerName precise32" | sudo tee -a $php_ini
    fi

    sudo service apache2 restart

    ## config php cli DEV
  3. iamdey revised this gist May 13, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion lamp-install-dev.sh
    Original file line number Diff line number Diff line change
    @@ -47,7 +47,7 @@ then
    fi

    sudo sed -i 's/short_open_tag = On/short_open_tag = Off/g' $php_ini
    sudo sed -i 's/memory_limit = \d{1-3}M/memory_limit = 128M/g' $php_ini
    sudo sed -i 's/memory_limit = \d{1-3}M/memory_limit = -1/g' $php_ini
    sudo sed -i 's/error_reporting = .*/error_reporting = E_ALL | E_STRICT/g' $php_ini
    sudo sed -i 's/display_errors = Off/display_errors = On/g' $php_ini
    sudo sed -i 's/html_errors = Off/html_errors = On/g' $php_ini
  4. iamdey revised this gist May 12, 2012. No changes.
  5. @invalid-email-address Anonymous revised this gist May 12, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion lamp-install-dev.sh
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    #!/bin/bash

    sudo apt-get install apache2 php5 mysql-server libapache2-mod-php5 php5-mysql php5-sqlite php5-intl php5-cli php-apc php5-xdebug acl
    sudo apt-get install apache2 php5 mysql-server libapache2-mod-php5 php5-mysql php5-sqlite php5-intl php5-cli php-apc php5-xdebug acl git

    ## configuration apache

  6. @invalid-email-address Anonymous revised this gist May 12, 2012. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions vagrant-install.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    #!/bin/bash

    sudo apt-get install vagrant virtualbox nfs-kernel-server
  7. @invalid-email-address Anonymous created this gist May 12, 2012.
    56 changes: 56 additions & 0 deletions lamp-install-dev.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,56 @@
    #!/bin/bash

    sudo apt-get install apache2 php5 mysql-server libapache2-mod-php5 php5-mysql php5-sqlite php5-intl php5-cli php-apc php5-xdebug acl

    ## configuration apache

    sudo sed -i 's#/var/www#/vagrant#g' /etc/apache2/sites-available/default
    sudo adduser www-data vagrant

    ## config php apache DEV

    php_ini="/etc/php5/apache2/php.ini"

    if [ ! -f $php_ini".bak" ]
    then
    sudo cp $php_ini $php_ini".bak"
    fi

    sudo sed -i 's/short_open_tag = On/short_open_tag = Off/g' $php_ini
    sudo sed -i 's/memory_limit = \d{1-3}M/memory_limit = 128M/g' $php_ini
    sudo sed -i 's/error_reporting = .*/error_reporting = E_ALL | E_STRICT/g' $php_ini
    sudo sed -i 's/display_errors = Off/display_errors = On/g' $php_ini
    sudo sed -i 's/html_errors = Off/html_errors = On/g' $php_ini

    if ! grep -xq "\[xdebug\]" $php_ini
    then
    sudo tee -a $php_ini <<XDEBUG
    [xdebug]
    xdebug.remote_enable=On
    xdebug.remote_handler=dbgp
    xdebug.remote_mode=req
    xdebug.remote_host=10.0.0.1
    xdebug.remote_port=9000
    XDEBUG

    fi

    sudo service apache2 restart

    ## config php cli DEV

    php_ini="/etc/php5/cli/php.ini"

    if [ ! -f $php_ini".bak" ]
    then
    sudo cp $php_ini $php_ini".bak"
    fi

    sudo sed -i 's/short_open_tag = On/short_open_tag = Off/g' $php_ini
    sudo sed -i 's/memory_limit = \d{1-3}M/memory_limit = 128M/g' $php_ini
    sudo sed -i 's/error_reporting = .*/error_reporting = E_ALL | E_STRICT/g' $php_ini
    sudo sed -i 's/display_errors = Off/display_errors = On/g' $php_ini
    sudo sed -i 's/html_errors = Off/html_errors = On/g' $php_ini


    exit 0