How to install Laravel 5.5 on Cloud9?

2

Installing Laravel 5.5 on Cloud 9

Procedure to create a workspace in Cloud9 with laravel 5.5

1. Create Workspace in cloud 9

1.1

1.2

1.3

2. Update version of php 5 to 7.1

2.1 we check the current version of php

2.2 Command to update php

sudo add-apt-repository ppa:ondrej/php –y
sudo apt-get update -y
sudo apt-get install php7.1-curl php7.1-cli 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 php7.1-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.1 -y
sudo cp /etc/apache2/envvars.bak /etc/apache2/envvars

3. Installing phpmyadmin

sudo mysql-ctl install 

(if it is already installed we will not continue "N" and go to the next command)

sudo mysql-ctl start

sudo phpmyadmin-ctl install

After executing the command, it will show us the link for the use of phpmyadmin the user without password. If you wish, log in with your user in the console and define a password

mysql -u tuUsuario

4. Installing composer

curl -sS https://getcomposer.org/installer | php

sudo mv composer.phar /usr/local/bin/composer

5. Install laravel 5.5

composer create-project --prefer-dist laravel/laravel blog "5.5.*"

Change "blog" to the desired name

6. Configuring the virtual host

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

We edit, and leave as shown below:

<VirtualHost *:8080>
    DocumentRoot /home/ubuntu/workspace/blog/public
    ServerName https://${C9_HOSTNAME}:443

    LogLevel info

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    <Directory /home/ubuntu/workspace/blog/public>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

ServerName https://${C9_HOSTNAME}
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Well, we only added the location of the public folder of our project.

then:

sudo /etc/init.d/apache2 restart

We finally run our application with the Run Project button at the top.

    
asked by Gal05 06.05.2018 в 04:49
source

0 answers