Last active
May 24, 2018 21:35
-
-
Save wesleyserafim/e0dbf8acfc7f3cf6c03782809c0391f5 to your computer and use it in GitHub Desktop.
Deploy Stack Lnmp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!#/bin/bash/ | |
sudo apt-get update | |
echo '### Instalando Web Server Nginx ###' | |
sudo apt-get install -y nginx | |
nginx -v | |
echo '### Instalando Mysql' | |
sudo apt-get install -y mysql-server | |
mysql -v | |
echo '### Prepearando para instalar a última versão do PHP ###' | |
sudo add-apt-repository ppa:ondrej/php | |
sudo apt-get update | |
echo '### Instalando o PHP 7.2 ###' | |
sudo apt-get install -y php7.2-cli | |
php -v | |
echo '### Instalando extensões do PHP' | |
sudo apt-get install -y php7.2-mysql php7.2-intl php7.2-mbstring php7.2-xml php7.2-soap php7.2-json php7.2-zip php7.2-gd sudo apt-get install php7.2-redis php7.2-curl | |
echo "### Instlando PHP FPM ###" | |
sudo apt-get install -y php7.2-fpm | |
echo "### Instalando composer ###" | |
sudo apt-get install -y unzip | |
cd ~ | |
sudo apt-get install -y composer | |
composer | |
echo '### Configurando o PHP no Nginx ###' | |
sudo mv /etc/nginx/sites-available/default /etc/nginx/sites-available/default.bkp | |
sudo cp ~/stack-laravel-php/nginx-default-php /etc/nginx/sites-available/default | |
echo '### Instalando NodeJs ###' | |
cd ~ | |
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - | |
sudo apt-get install -y nodejs | |
node -v | |
echo '### Instalando Supervisor ###' | |
sudo apt-get install supervisor -y | |
echo '### Instalando Redis ###' | |
sudo apt-get install -y build-essential tcl | |
cd /tmp | |
curl -O http://download.redis.io/redis-stable.tar.gz | |
tar xzvf redis-stable.tar.gz | |
cd redis-stable | |
make | |
make test | |
sudo make install | |
sudo mkdir /etc/redis | |
sudo cp /tmp/redis-stable/redis.conf /etc/redis | |
sudo mkdir /var/lib/redis | |
echo '### Configuração Redis ###' | |
echo '1 - No arquivo /etc/redis/redis.conf faça as configurações recomendadas em: https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-redis-on-ubuntu-16-04#configure-redis' | |
echo '2 - Após configurar /etc/redis/redis.conf crie o serviço do redis no systemd: https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-redis-on-ubuntu-16-04#create-a-redis-systemd-unit-file' | |
echo '3 - Crie o usuário/grupo/diretório Redis seguindo o passo em: https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-redis-on-ubuntu-16-04#create-the-redis-user-group-and-directories' | |
echo '4 - Start and Test Redis: https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-redis-on-ubuntu-16-04#start-and-test-redis' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment