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 | |
#### | |
# Install Requirements | |
#### | |
sudo apt-get install jq -y | |
######## | |
## Envirioment @var TOKEN in OS Linux | |
######## |
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
server { | |
server_name domain.host; | |
listen 443 ssl http2; # managed by Certbot | |
ssl_certificate /etc/letsencrypt/live/domain.host/fullchain.pem; # managed by Certbot | |
ssl_certificate_key /etc/letsencrypt/live/domain.host/privkey.pem; # managed by Certbot | |
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot | |
ssl_protocols TLSv1.2 TLSv1.1 TLSv1; |
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
// Uninstall Nginx | |
sudo apt-get remove nginx nginx-full nginx-common | |
//Then, install Nginx following document: http://nginx.org/en/linux_packages.html#Ubuntu | |
sudo apt install curl gnupg2 ca-certificates lsb-release | |
echo "deb http://nginx.org/packages/ubuntu `lsb_release -cs` nginx"| sudo tee /etc/apt/sources.list.d/nginx.list | |
curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add - | |
sudo apt update | |
sudo apt install nginx nginx-full nginx-common |
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
sudo a2dismod php7.0 | |
sudo a2enmod php5.6 | |
sudo service apache2 restart | |
sudo update-alternatives --set php /usr/bin/php5.6 | |
sudo update-alternatives --set phar /usr/bin/phar5.6 | |
sudo update-alternatives --set phar.phar /usr/bin/phar.phar5.6 |
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
sudo a2dismod php7.0 | |
sudo a2enmod php7.1 | |
sudo service apache2 restart | |
sudo update-alternatives --set php /usr/bin/php7.1 | |
sudo update-alternatives --set phar /usr/bin/phar7.1 | |
sudo update-alternatives --set phar.phar /usr/bin/phar.phar7.1 |
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
sudo a2dismod php5.6 | |
sudo a2enmod php7.0 | |
sudo service apache2 restart | |
sudo update-alternatives --set php /usr/bin/php7.0 | |
sudo update-alternatives --set phar /usr/bin/phar7.0 | |
sudo update-alternatives --set phar.phar /usr/bin/phar.phar7.0 |
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 | |
## Update and Upgrade Distro | |
sudo apt update && sudo apt upgrade -y && | |
## Install Addons Codecs | |
sudo apt install ubuntu-restricted-extras -y && | |
## Setting Buttons to Left Side | |
gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize' && | |
gsettings set org.gnome.desktop.wm.preferences button-layout 'close,minimize,maximize:' && | |
## Install VLC Player | |
sudo apt-get install vlc -y && |
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 | |
echo "project folder: " | |
read project_folder | |
echo "suffix symbolic link nginx: " | |
read suffix_symbol | |
echo "IP destiny migrate:" | |
read server_ip |
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 install software-properties-common && | |
sudo add-apt-repository ppa:ondrej/php && | |
sudo apt-get update && | |
sudo apt-get install nginx -y && | |
sudo apt-cache search php7.1 && | |
sudo apt-get install php7.1-fpm php7.1-cli php7.1 php7.1-common php7.1-gd php7.1-mysql php7.1-curl php7.1-intl php7.1-xsl php7.1-mbstring php7.1-mcrypt php7.1-zip php7.1-bcmath php7.1-iconv php7.1-soap -y && | |
sudo apt-get install curl -y && | |
sudo curl -s https://getcomposer.org/installer | php && | |
sudo mv composer.phar /usr/local/bin/composer && |
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
#### Optimize Images with jpegoptim, optipng, advpng | |
>> jpg | |
find -name '*.jpeg' -print0 | xargs -0 sudo -u www-data jpegoptim --strip-all --max=80 | |
find -name '*.jpg' -print0 | xargs -0 sudo -u www-data jpegoptim --strip-all --max=80 | |
>> png | |
find -name '*.png' -print0 | xargs -0 sudo -u www-data optipng -o7 -f4 -strip all -quiet |