Skip to content

Instantly share code, notes, and snippets.

@nakamuraagatha
Last active January 22, 2019 18:08
Show Gist options
  • Save nakamuraagatha/8f2cad5b782edfacfb4c0f11d749b928 to your computer and use it in GitHub Desktop.
Save nakamuraagatha/8f2cad5b782edfacfb4c0f11d749b928 to your computer and use it in GitHub Desktop.
How to Install Laravel 5.5 on c9.io with php 7.1

Install with PHP 7.1

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install libapache2-mod-php7.1
sudo a2dismod php5
sudo a2enmod php7.1

Install PHP Module

sudo apt-get install php-xml php-mbstring php-zip php-gd php-gmp php-mysql php-sqlite3 php-mcrypt php-curl

Install Laravel 5.5 Global

sudo composer global require 'laravel/installer'
export PATH=~/.composer/vendor/bin:$PATH
laravel new laravel

Set Up Virtual Host Apache2

sudo nano /etc/apache2/sites-enabled/001-cloud9.conf

Setup Composer Cache

sudo chown -R $USER $HOME/.composer

Create Database

CREATE DATABASE laravel DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
GRANT ALL ON laravel.* TO 'laraveluser'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;

You Got Error on php artisan migrate?

Please edit AppServiceProvider.php on app/Providers

use Illuminate\Support\Facades\Schema;

public function boot()
{
    Schema::defaultStringLength(191);
}

Want Deploy to Cloud Server?

Using this link : https://m.do.co/c/70b5b463c03f

@YulianD
Copy link

YulianD commented Jul 23, 2018

funciona perfectamente, gracias por el dato.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment