Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sudo add-apt-repository ppa:ondrej/php -y
- sudo apt-get update -y
- sudo apt-get install php7.2 php-pear php7.2-curl php7.2-dev php7.2-gd php7.2-mbstring php7.2-zip php7.2-mysql php7.2-xml
- sudo apt-get install libapache2-mod-php7.2 -y
- sudo a2dismod php5
- sudo a2enmod php7.2
- sudo service apache2 restart
- sudo composer self-update
- composer global require "laravel/installer"
- echo 'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> ~/.bashrc
- source ~/.bashrc
- # phpMyAdmin install
- phpmyadmin-ctl install #Login with the url/phpmyadmin, your c9 user and empty password
- # Create project
- laravel new project
- # As Lavarel is serving its content from the public directory we need to modify the apache config using nano (a text editor):
- # sudo nano /etc/apache2/sites-enabled/001-cloud9.conf
- # Then do the following:
- # Change this line
- # DocumentRoot /home/ubuntu/workspace
- # To following
- # DocumentRoot /home/ubuntu/workspace/yourproject/public
- # Edit the Laravel environment configuration file β.envβ (in the root directory) and add the database settings
- # DB_HOST=localhost
- # DB_DATABASE=c9
- # DB_USERNAME=USERNAME
- # DB_PASSWORD=
- # Update node
- nvm i v8
- # Set as default
- nvm alias default 8.11.3
- # change directory
- cd project
- # Install node dependencies
- npm install
- # You should put these lines for make a migration
- # path: app/Providers/AppServiceProvider.php
- # use Illuminate\Support\Facades\Schema;
- # inside of boot() function
- # Schema::defaultStringLength(191);
- # make migration
- # php artisan migrate
Add Comment
Please, Sign In to add comment