From 9c08e5fe3e930bd0a495210b72b5ff43136bee3e Mon Sep 17 00:00:00 2001 From: Sarimoko Date: Mon, 5 Jul 2021 05:45:01 +0000 Subject: [PATCH] Add 'install.sh' --- install.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 install.sh diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..e0ba5fd --- /dev/null +++ b/install.sh @@ -0,0 +1,26 @@ + + + +sudo apt update -qq && sudo apt upgrade -y +sudo apt install lamp-server^ php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip -y +sudo systemctl restart apache2 + +sudo a2enmod rewrite +cd /tmp +curl -O https://wordpress.org/latest.tar.gz +tar xzvf latest.tar.gz +touch /tmp/wordpress/.htaccess +cp /tmp/wordpress/wp-config-sample.php /tmp/wordpress/wp-config.php +mkdir /tmp/wordpress/wp-content/upgrade +sudo cp -a /tmp/wordpress/. /var/www/shop +sudo chown -R www-data:www-data /var/www/shop +sudo find /var/www/shop/ -type d -exec chmod 750 {} \; +sudo find /var/www/shop/ -type f -exec chmod 640 {} \; + +curl -s https://api.wordpress.org/secret-key/1.1/salt/ +sudo nano /var/www/shop/wp-config.php +define('FS_METHOD', 'direct'); + +cp /etc/apache2/sites-available/default-ssl.conf /etc/apache2/sites-available/shop.conf +nano /etc/apache2/sites-available/default-ssl.conf +