Skip to content

Instantly share code, notes, and snippets.

@DilwoarH
Last active October 5, 2019 16:12
Show Gist options
  • Save DilwoarH/ca590bf5620753bf8845d41b675b537b to your computer and use it in GitHub Desktop.
Save DilwoarH/ca590bf5620753bf8845d41b675b537b to your computer and use it in GitHub Desktop.
# php & apache2
sudo apt-get -y update;
sudo apt-get install -y php libapache2-mod-php;
sudo apt-get install -y php7.2 php7.2-fpm php-mysql php7.2-mysql php-mbstring php-gettext libapache2-mod-php7.2 php-doctrine-dbal php7.2-pgsql php7.2-bcmath php-xml redis-server;
sudo systemctl restart php7.2-fpm;
# set up git
sudo apt-get install -y git curl wget;
# composer
sudo apt install -y curl php-cli php-mbstring git unzip;
cd ~;
curl -sS https://getcomposer.org/installer -o composer-setup.php;
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer;
## install node js
sudo apt install -y nodejs npm
## Tutorial followed from here https://medium.com/@grmcameron/deploying-your-laravel-web-app-1faaa66f3302
# block hackers
sudo apt-get install -y fail2ban;
# website symlink
sudo ln -s /home/ubuntu/website.com /var/www/website.com
sudo chown -R $USER:www-data /home/ubuntu/website.com/storage
chmod -R 775 /home/ubuntu/website.com/storage
# routes
sudo a2enmod rewrite
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment