-
-
Save wesleysaraujo/ae3e71f8989f5668717c2763f8055ef5 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 nginx -y | |
nginx -v | |
echo '### Instalando Mysql' | |
sudo apt-get install mysql -y | |
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 php7.2-cli | |
php -v | |
echo '### Instalando extensões do PHP' | |
sudo apt-get install -y php7.2-fpm php7.2-mysql php7.2-intl php7.2-mbstring php7.2-xml php7.2-soap php7.2-json php7.2-zip php7.2-gd | |
echo "### Instalando composer ###" | |
sudo apt-get install -y unzip | |
cd ~ | |
sudo apt-get install composer | |
composer | |
echo '### Configurando o PHP no Nginx ###' | |
sudo mv /etc/nginx/sites-available/default /etc/nginx/sites-available/default.bkp | |
sudo cp 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 Redis ###' | |
sudo apt-get install 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