Skip to content

Instantly share code, notes, and snippets.

@Ashrafdev
Created February 25, 2018 05:01
Show Gist options
  • Save Ashrafdev/7e22b755fdada242d96b704227f9720a to your computer and use it in GitHub Desktop.
Save Ashrafdev/7e22b755fdada242d96b704227f9720a to your computer and use it in GitHub Desktop.
Setup Openresty, php7.1,
#!/bin/bash
# apt common
sudo apt-get install -y python-software-properties
sudo apt-get install -y software-properties-common
# setup webserver
sudo apt-get install -y curl
# import our GPG key:
wget -qO - https://openresty.org/package/pubkey.gpg | sudo apt-key add -
# add the our official APT repository:
sudo add-apt-repository -y "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main"
# to update the APT index:
sudo apt-get update
#begin
sudo apt-get install openresty
# php repo
sudo add-apt-repository -y ppa:ondrej/php
# update
sudo apt update
sudo apt upgrade
sudo apt dist-upgrade
# php env
apt-get install -y php7.1 php7.1-cli php7.1-common php7.1-mbstring php7.1-gd php7.1-intl php7.1-xml php7.1-mysql php7.1-mcrypt php7.1-zip php7.1-pdo-pgsql php7.1-dom php7.1-bcmath php7.1-curl php7.1-fpm
# composer
sudo apt install -y composer
# speedup composer package
sudo composer global require hirak/prestissimo
#chown app dir
sudo chown -R www-data:www-data /var/www
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment