Skip to content

Instantly share code, notes, and snippets.

@collegeman
Last active August 23, 2017 17:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save collegeman/80e2a41fd6c1f0b160b18ad74bc42253 to your computer and use it in GitHub Desktop.
Save collegeman/80e2a41fd6c1f0b160b18ad74bc42253 to your computer and use it in GitHub Desktop.
Running Laravel 5.4 on Cloud9

Beginning with a baseline PHP workspace (LAMP).

Install PHP 7.1

From Cloud9's support forums:

$ sudo add-apt-repository ppa:ondrej/php -y
$ sudo apt-get update -y
$ sudo apt-get install php7.1-curl php7.1-dev php7.1-gd php7.1-intl php7.1-mcrypt php7.1-json php7.1-mysql php7.1-opcache php7.1-bcmath php7.1-mbstring php7.1-soap php7.1-xml
$ sudo apt-get install libapache2-mod-php7.1 -y
$ sudo a2dismod php5
$ sudo a2enmod php7.1

Configure Apache to serve from ~workspace/public path

Also from Cloud9's support forums:

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

Replace MySQL with MariaDB

Not technically necessary, but I prefer this bit of consistency between local dev and production environments.

From an Ask Ubuntu forum:

$ sudo apt-get remove --purge mysql-server mysql-client mysql-common
$ sudo apt-get autoremove
$ sudo apt-get autoclean
$ sudo apt-get install mariadb-server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment