Skip to content

Instantly share code, notes, and snippets.

@midascodebreaker
Last active March 15, 2022 10:09
Show Gist options
  • Select an option

  • Save midascodebreaker/95d5e30012c2f875840481442e7eb04c to your computer and use it in GitHub Desktop.

Select an option

Save midascodebreaker/95d5e30012c2f875840481442e7eb04c to your computer and use it in GitHub Desktop.

Revisions

  1. midascodebreaker renamed this gist Jul 16, 2016. 1 changed file with 0 additions and 0 deletions.
  2. midascodebreaker revised this gist Jul 16, 2016. 1 changed file with 65 additions and 0 deletions.
    65 changes: 65 additions & 0 deletions Provision HHVM and Maria DB Fix
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,65 @@
    #### 1.) Add MariaDB in Your Homestead.yml

    ```
    mariadb:true
    ```

    #### 2.) Provision Server

    ```
    vagrant u p
    ```

    #### 3.) Manually Install HHVM

    ##### SSH to Server

    ```
    vagrant ssh
    ```

    ##### Change to Root User

    ```
    sudo su -
    ```

    ##### Install HHVM

    ```
    wget -O - http://dl.hhvm.com/conf/hhvm.gpg.key | apt-key add -
    apt-get update
    apt-get install -y hhvm
    ```

    ##### Configure HHVM To Run As Homestead

    ```
    service hhvm stop
    sed -i 's/#RUN_AS_USER="www-data"/RUN_AS_USER="vagrant"/' /etc/default/hhvm
    service hhvm start
    ```

    ##### Start HHVM On System Start

    ```
    update-rc.d hhvm defaults
    ```

    ##### Logout Root

    ```
    exit
    ```

    ##### Edit Homestead.yaml

    ```
    hhvm: true
    ```

    ##### Provision Again Vagrant

    ```
    vagrant reload --provision
    ```
  3. midascodebreaker revised this gist Jul 16, 2016. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions laravel-per-project-installation.md
    Original file line number Diff line number Diff line change
    @@ -156,3 +156,6 @@ npm install
    gulp
    ```




  4. midascodebreaker revised this gist Jul 16, 2016. 1 changed file with 31 additions and 20 deletions.
    51 changes: 31 additions & 20 deletions laravel-per-project-installation.md
    Original file line number Diff line number Diff line change
    @@ -1,31 +1,42 @@
    1.) Create a New Laravel App
    ##### Prerequisite:
    - Php7
    - Composer
    - Gulp
    - Npm
    - Vagrant
    - Virtual Box
    - Laravel Installer


    #### 1.) Create a New Laravel App

    ```
    laravel new blog
    ```

    2.) Create a New Homestead Installation
    #### 2.) Create a New Homestead Installation

    ```
    composer require "laravel/homestead" --dev
    ```

    3.) Update Composer
    #### 3.) Update Composer

    ```
    composer update
    ```

    4.) Generate Homestead.yaml file
    #### 4.) Generate Homestead.yaml file

    ```
    vendor\\bin\\homestead make
    ```

    5.) Edit Homestead.yaml file
    #### 5.) Edit Homestead.yaml file

    #### OPTIONS

    OPTIONS
    A.) ENABLE NFS
    ##### A.) ENABLE NFS

    ```
    folders:
    @@ -35,7 +46,7 @@ folders:
    mount_options: [nolock,vers=3,udp,noatime]
    ```

    B. HHVM ENABLED
    ##### B. HHVM ENABLED

    ```
    sites:
    @@ -44,7 +55,7 @@ sites:
    hhvm: true
    ```

    C.) CRON ENABLED
    ##### C.) CRON ENABLED

    ```
    sites:
    @@ -53,32 +64,32 @@ sites:
    schedule: true
    ```

    D.) MARIADB ENABLED
    ##### D.) MARIADB ENABLED

    ```
    mariadb:true
    ```

    6.) PROVISION SERVER
    #### 6.) PROVISION SERVER

    ```
    vagrant up
    ```

    7.) SSH TO SERVER
    #### 7.) SSH TO SERVER

    ```
    vagrant ssh
    ```

    8.) Configure Vagrant Based On Options Enabled
    A.) Make sure You Have NFS Installed Follow this Instruction
    #### 8.) Configure Vagrant Based On Options Enabled
    ##### A.) Make sure You Have NFS Installed Follow this Instruction

    ```
    https://github.com/winnfsd/vagrant-winnfsd
    ```

    B.) HHVM Enabled
    ##### B.) HHVM Enabled

    ```
    hhvm --version
    @@ -92,7 +103,7 @@ Compiler: tags/HHVM-3.14.1-0-gd99b370804b7e0234ab794869d1ba1774c848e85
    Repo schema: ac0c6851ba5643ce00ae67bbe67c50973efd65d6
    ```

    C.) Cron Enabled
    ##### C.) Cron Enabled

    ```
    cd /etc/cron.d
    @@ -103,7 +114,7 @@ add this
    * * * * * php /path/to/artisan schedule:run >> /dev/null 2>&1
    ```

    D.) MARIA DB Enabled
    ##### D.) MARIA DB Enabled
    check if maria db installed

    ```
    @@ -125,21 +136,21 @@ Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    MariaDB [(none)]>
    ```

    9.) Edit Host File (Local Machine)
    #### 9.) Edit Host File (Local Machine)

    add ip address based on your Homestead.yml file

    ```
    192.168.XX.XX domainname.app
    ```

    10.) Run Npm Install (Local Machine)
    #### 10.) Run Npm Install (Local Machine)

    ```
    npm install
    ```

    11.) Test to Run Gulp (Local Machine)
    #### 11.) Test to Run Gulp (Local Machine)

    ```
    gulp
  5. midascodebreaker revised this gist Jul 16, 2016. No changes.
  6. midascodebreaker renamed this gist Jul 16, 2016. 1 changed file with 38 additions and 1 deletion.
    Original file line number Diff line number Diff line change
    @@ -1,81 +1,118 @@
    1.) Create a New Laravel App

    ```
    laravel new blog
    ```

    2.) Create a New Homestead Installation

    ```
    composer require "laravel/homestead" --dev
    ```

    3.) Update Composer

    ```
    composer update
    ```

    4.) Generate Homestead.yaml file

    ```
    vendor\\bin\\homestead make
    ```

    5.) Edit Homestead.yaml file

    OPTIONS
    A.) ENABLE NFS

    ```
    folders:
    - map: "C:/Users/USER/Code/project"
    to: "/home/vagrant/project"
    type: nfs
    mount_options: [nolock,vers=3,udp,noatime]
    ```

    B. HHVM ENABLED

    ```
    sites:
    - map: homestead.app
    to: /home/vagrant/Code/Laravel/public
    hhvm: true
    ```

    C.) CRON ENABLED

    ```
    sites:
    - map: homestead.app
    to: /home/vagrant/Code/Laravel/public
    schedule: true
    ```

    D.) MARIADB ENABLED

    ```
    mariadb:true
    ```

    6.) PROVISION SERVER

    ```
    vagrant up
    ```

    7.) SSH TO SERVER

    ```
    vagrant ssh
    ```

    8.) Configure Vagrant Based On Options Enabled
    A.) Make sure You Have NFS Installed Follow this Instruction

    ```
    https://github.com/winnfsd/vagrant-winnfsd
    ```

    B.) HHVM Enabled

    ```
    hhvm --version
    ```

    it should show something like this.

    ```
    HipHop VM 3.14.1 (rel)
    Compiler: tags/HHVM-3.14.1-0-gd99b370804b7e0234ab794869d1ba1774c848e85
    Repo schema: ac0c6851ba5643ce00ae67bbe67c50973efd65d6
    ```

    C.) Cron Enabled

    ```
    cd /etc/cron.d
    ```
    add this

    ```
    * * * * * php /path/to/artisan schedule:run >> /dev/null 2>&1
    ```

    D.) MARIA DB Enabled
    check if maria db installed

    ```
    mysql -u homestead -p
    password: secret
    ```

    it should show something like this
    it should show something like

    ```
    Welcome to the MariaDB monitor. Commands end with ; or \g.
    Your MariaDB connection id is 41818
  7. midascodebreaker created this gist Jul 16, 2016.
    110 changes: 110 additions & 0 deletions laravel-per-project-installation
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,110 @@
    1.) Create a New Laravel App
    laravel new blog
    2.) Create a New Homestead Installation
    composer require "laravel/homestead" --dev
    3.) Update Composer
    composer update
    4.) Generate Homestead.yaml file
    vendor\\bin\\homestead make
    5.) Edit Homestead.yaml file
    OPTIONS
    A.) ENABLE NFS
    ```
    folders:
    - map: "C:/Users/USER/Code/project"
    to: "/home/vagrant/project"
    type: nfs
    mount_options: [nolock,vers=3,udp,noatime]
    ```
    B. HHVM ENABLED
    ```
    sites:
    - map: homestead.app
    to: /home/vagrant/Code/Laravel/public
    hhvm: true
    ```
    C.) CRON ENABLED
    ```
    sites:
    - map: homestead.app
    to: /home/vagrant/Code/Laravel/public
    schedule: true
    ```
    D.) MARIADB ENABLED
    ```
    mariadb:true
    ```

    6.) PROVISION SERVER
    ```
    vagrant up
    ```

    7.) SSH TO SERVER
    ```
    vagrant ssh
    ```

    8.) Configure Vagrant Based On Options Enabled
    A.) Make sure You Have NFS Installed Follow this Instruction
    ```
    https://github.com/winnfsd/vagrant-winnfsd
    ```
    B.) HHVM Enabled
    ```
    hhvm --version
    ```
    it should show something like this.
    ```
    HipHop VM 3.14.1 (rel)
    Compiler: tags/HHVM-3.14.1-0-gd99b370804b7e0234ab794869d1ba1774c848e85
    Repo schema: ac0c6851ba5643ce00ae67bbe67c50973efd65d6
    ```
    C.) Cron Enabled
    ```
    cd /etc/cron.d
    ```
    add this
    ```
    * * * * * php /path/to/artisan schedule:run >> /dev/null 2>&1
    ```
    D.) MARIA DB Enabled
    check if maria db installed
    ```
    mysql -u homestead -p
    password: secret
    ```

    it should show something like this
    ```
    Welcome to the MariaDB monitor. Commands end with ; or \g.
    Your MariaDB connection id is 41818
    Server version: 10.1.14-MariaDB-1~xenial mariadb.org binary distribution

    Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

    MariaDB [(none)]>
    ```

    9.) Edit Host File (Local Machine)

    add ip address based on your Homestead.yml file

    ```
    192.168.XX.XX domainname.app
    ```

    10.) Run Npm Install (Local Machine)

    ```
    npm install
    ```

    11.) Test to Run Gulp (Local Machine)

    ```
    gulp
    ```