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 chown -R www-data:www-data /var/www/html/{folder} && | |
sudo rm -rf /var/www/html/{folder}/var/* && | |
sudo rm -rf /var/www/html/{folder}/generated/* && | |
sudo rm -rf /var/www/html/{folder}/pub/static/* && | |
sudo chmod -R 777 /var/www/html/{folder}/pub/static && | |
php /var/www/html/{folder}/bin/magento setup:upgrade && | |
php /var/www/html/{folder}/bin/magento setup:di:compile && | |
php /var/www/html/{folder}/bin/magento setup:static-content:deploy pt_BR -f && | |
chmod -R 777 /var/www/html/{folder}/var && | |
chmod -R 777 /var/www/html/{folder}/pub/static && |
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 chown -R www-data:www-data /var/www/html/{folder} && | |
sudo rm -rf /var/www/html/{folder}/var/* && | |
sudo rm -rf /var/www/html/{folder}/pub/static/* && | |
sudo chmod -R 777 /var/www/html/{folder}/pub/static && | |
php /var/www/html/{folder}/bin/magento setup:upgrade && | |
php /var/www/html/{folder}/bin/magento setup:di:compile && | |
php /var/www/html/{folder}/bin/magento setup:static-content:deploy pt_BR && | |
chmod -R 777 /var/www/html/{folder}/var && | |
chmod -R 777 /var/www/html/{folder}/pub && | |
sudo chown -R www-data:www-data /var/www/html/{folder} && |
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
https://explainshell.com/ | |
https://chmod-calculator.com/ | |
https://crontab.guru/ |
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
syncWithCdn.sh >> | |
#!/bin/bash | |
s3cmd sync /PATH s3://bucket-name/ | |
#~ sync path in S3 Amazon | |
* * * * * /PATH/syncWithCdn.sh >> /PATH/log_sync.txt | |
#~ |
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
>> add lines in host nginx.conf | |
location ~ /.well-known{ | |
allow all; | |
} | |
>> restart nginx | |
service nginx restart | |
>> create folder ".well-known" in root path project | |
mkdir {PATH}/.well-known |
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 |
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
#!/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 | |
## 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
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 |
OlderNewer