Dev Env #2

Posted about the basic set up yesterday, but while I was trying to view the site on the dev environment found a few other little problems going on. One Apache was still hooked into php 5 which no longer existed, and after fixing that there was a missing permissions in that original post – which if I had done my usual laravel install I would have followed.

So in addition to the post at Tildee you have to do a few more commands. In order to simplify the resource I’m going to post all the commands (and their corrections) here.

In the Code Anywhere terminal (or if you’ve ssh’d into from your computer)

sudo apt-get update
sudo apt-get install npm

sudo apt-get purge php5-common -y
sudo apt-get install software-properties-common python3-software-properties
sudo apt-get update
sudo apt-get autoremove

sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.0 php7.0-common php7.0-mysql php7.0-mbstring php7.0-zip php7.0-xml

curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer

sudo a2dismod php5
sudo a2enmod php7.0

Go back into the IDE and delete the current directories and files i.e. larval application by right clicking on it and delete DON’T delete .htaccess. As a side note, don’t remove everything in the directory with a terminal command, you delete some codeanywhere files (I’m assuming) that make ‘running the project’ work. (I had to redo this entire setup because I did just that).

Now you can install Laravel per your favorite method.

Advertisements

Dev Environment

I typically develop at work so my system is pretty standard, but I like to code and learn new things everywhere so I try to keep that learning stuff to some sort of online environment so I can do it at both home and work. I typically use Cloud 9 IDE, but Codeanywhere has been looking pretty good lately so today I went ahead and started using it for my current home grown project and to learn more about TDD, Laravel 5.4 and Vue. Considering throwing Spark in, but I think I’ll stick with straight Laravel for now.

Laravel in the future will requires PHP 7 so I wanted to cut that out of the upgrade process for now. I could install that with CentOS, but I’d prefer to stick with Ubuntu since that’s what I use at work and would likely use if I could dual box my machine at home without worrying I’m going to lose information (I’m highly paranoid!!!) I had to upgrade the default install. Which actually was pretty easy with the nice handy guide over at Tildee. There was only one caveat: I had to use php7.0-xml instead of php-xml as composer gave an error for phpunit.

The upside to using Codeanywhere is it has a mobile app – so I can at least use it to some degree on my phone when I’m not at home and bored.