3 Kasım 2018 Cumartesi

Cloud 9, Laravel setup and configuration

Hi everyone,

First just create workspace on Cloud 9 for Laravel project. Then we will start.

-Now go to the Terminal and download laravel project with below command.
composer create-project --prefer-dist laravel/laravel blog "5.5.*"
"blog" is your temp project directory, don't worry about this we will change root directory.

Write bellow command step by step

1-) shopt -s dotglob
2-) mv blog/* ./ 
3-) rm -rf blog

Well done,
Step 2 is copying all file in "blog" directory to root directory,
Step 3 is just remove "blog" folder.

Then now we need to modify the apache config beacuse Lavarel is serving its content from the public directory.

Write bellow comment for to open cloud 9 config,

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

Now you can see "001-cloud9.conf"
Find this "DocumentRoot /home/ubuntu/workspace"
Change like this "DocumentRoot /home/ubuntu/workspace/public"

if you can correctly the last step is To save the file press F2, then ‘Y’ and ‘Enter’.

Best regards.

Cloud 9 upgrade php 5 to 7

sudo add-apt-repository ppa:ondrej/php -y
sudo apt-get update -y

sudo apt-get install php7.0-curl php7.0-cli php7.0-dev php7.0-gd php7.0-intl php7.0-mcrypt php7.0-json php7.0-mysql php7.0-opcache php7.0-bcmath php7.0-mbstring php7.0-soap php7.0-xml php7.0-zip -y

sudo mv /etc/apache2/envvars /etc/apache2/envvars.bak
sudo apt-get remove libapache2-mod-php5 -y
sudo apt-get install libapache2-mod-php7.0 -y
sudo cp /etc/apache2/envvars.bak /etc/apache2/envvars