2018-01-02 00:40:32 +00:00
#!/bin/bash
# Wordpress install script
# Written by Joshua Mudge
# Ad Mejorem Dei Glorium
2018-01-28 00:19:13 +00:00
version = "v1.0.3"
2018-01-02 00:40:32 +00:00
curl -s "https://gitlab.daplie.com/sysadmin/daplie-snippets/raw/master/dss/setup.sh" | bash
dss --user $USER init
2018-01-02 02:35:40 +00:00
#sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
2018-01-02 00:40:32 +00:00
2018-01-07 23:43:25 +00:00
sudo apt-get install nginx unzip php7.0-fpm php-xml php-xmlrpc software-properties-common php7.0-mysql mysql-server -y
2018-01-02 00:40:32 +00:00
wget https://wordpress.org/latest.zip
sudo mkdir /var/www/wordpress
2018-01-02 02:35:40 +00:00
unzip latest.zip
2018-01-28 00:19:13 +00:00
sudo mv wordpress/* /var/www/website/
2018-01-02 00:40:32 +00:00
2018-01-07 23:43:25 +00:00
sudo add-apt-repository -y ppa:certbot/certbot
2018-01-02 02:35:40 +00:00
sudo apt-get update
2018-01-07 23:43:25 +00:00
sudo apt-get install -y python-certbot-nginx
2018-01-07 23:55:11 +00:00
# user input required
2018-01-28 00:19:13 +00:00
echo "run: sudo certbot --authenticator webroot --installer nginx after configuring default_server and root directory"
2018-01-02 02:35:40 +00:00
2018-01-07 23:55:11 +00:00
#echo "run: sudo certbot certonly --webroot --webroot-path=/var/www/wordpress -d www.youdomain.com -d yourdomain.com"
2018-01-02 00:40:32 +00:00
echo "Update Nginx configuration in /etc/nginx/sites-enabled/ with using example configuration."
2018-01-28 00:19:13 +00:00
# Change Table prefix if multiple sites.
# For uploading: sudo chown -R www-data:www-data /var/www/dir
2018-01-02 02:35:40 +00:00
#mysql -u root mysql -p CREATE DATABASE ideside; CREATE USER 'ideuser'@'localhost' IDENTIFIED BY 'yourpassword'; GRANT ALL PRIVILEGES ON ideside.* TO 'ideuser'@'localhost'; FLUSH PRIVILEGES;
2018-01-02 02:38:25 +00:00
# mysql -u root mysql -p
#CREATE DATABASE wordpress;
#CREATE USER 'wordpress'@'localhost' IDENTIFIED BY 'newpassword';
#GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpress'@'localhost';
#FLUSH PRIVILEGES;
2018-01-02 02:35:40 +00:00
#https://askubuntu.com/questions/705458/ubuntu-15-10-mysql-error-1524-unix-socket
#https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04