Created
July 4, 2018 16:09
-
-
Save amanjuman/ea0e93730df43e5de046f907b123aa2b to your computer and use it in GitHub Desktop.
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
apt-get update && apt-get upgrade -y | |
apt-get install nginx -y | |
apt-et install mysql-server -y | |
apt-get install php -y | |
apt-get install php7.0-fpm php7.0-mcrypt php7.0-curl php7.0-cli php7.0-mysql php7.0-gd php7.0-xsl php7.0-json php7.0-bcmath php7.0-intl php-pear php7.0-dev php7.0-common php7.0-mbstring php7.0-zip php-soap libcurl3 curl -y | |
apt-get install zip unzip -y | |
mkdir /var/www/magento2 | |
cd /var/www/magento2/ | |
unzip /root/Magento-CE-2.2.5-2018-06-26-09-16-26.zip | |
sudo usermod -aG www-data root | |
chown -R www-data:www-data /var/www/magento2/ | |
chown -R www-data:www-data /var/www/magento2 | |
chmod -R 755 /var/www/magento2/ | |
find var vendor pub/static pub/media app/etc -type f -exec chmod g+w {} \; | |
find var vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} \; | |
chmod u+x bin/magento | |
mysql -u root -p | |
REATE DATABASE magento2; | |
CREATE USER 'magento2'@'localhost' IDENTIFIED BY 'password'; | |
GRANT ALL PRIVILEGES ON magento2 . * TO 'magento2'@'localhost'; | |
FLUSH PRIVILEGES; | |
nano /etc/nginx/sites-available/magento2 | |
upstream fastcgi_backend | |
{ | |
server unix:/run/php/php7.0-fpm.sock; | |
} | |
server | |
{ | |
listen 80; | |
listen [::]:80; | |
server_name example.com www.example.com; | |
set $MAGE_ROOT /var/www/magento2; | |
set $MAGE_MODE developer; | |
include /var/www/magento2/nginx.conf.sample; | |
} | |
sudo add-apt-repository ppa:certbot/certbot | |
sudo apt-get update | |
sudo apt-get install python-certbot-nginx | |
sudo certbot --nginx -d example.com -d www.example.com | |
service nginx restart | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment