WordPress Install: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 3: | Line 3: | ||
= VPS = | |||
* https://www.interserver.net/vps/ | * https://www.interserver.net/vps/ | ||
Line 14: | Line 12: | ||
* DNS: go to namecheap.com and point schneier.deadmandao.com at the IP | * DNS: go to namecheap.com and point schneier.deadmandao.com at the IP | ||
= Initial Setup = | |||
<pre> | <pre> | ||
Line 25: | Line 23: | ||
</pre> | </pre> | ||
= Apache Basic = | |||
== Setting Apache to Localhost == | |||
On schneier: | On schneier: | ||
Line 46: | Line 44: | ||
</pre> | </pre> | ||
== SSH Tunnel == | |||
<pre> | <pre> | ||
Line 54: | Line 52: | ||
Now you should be able to point your local browser at localhost:8080 and see Apache2 on schneier. | Now you should be able to point your local browser at localhost:8080 and see Apache2 on schneier. | ||
= Database = | |||
== DB Setup == | |||
The config will need an account on a local database. We'll use MariaDB. | The config will need an account on a local database. We'll use MariaDB. | ||
Line 81: | Line 79: | ||
= WordPress (WordPress version) = | |||
== Install == | |||
<pre> | <pre> | ||
Line 108: | Line 106: | ||
</pre> | </pre> | ||
== Configure == | |||
Apparently the preceding only gets us to the point where we can run the install, which will be presented when we go to: | Apparently the preceding only gets us to the point where we can run the install, which will be presented when we go to: | ||
Line 114: | Line 112: | ||
http://localhost:8080/wp-admin/install.php | http://localhost:8080/wp-admin/install.php | ||
== Move to 0.0.0.0:443 == | |||
=== Listen on All Addresses === | |||
'''Note:''' As you do this, you'll have to keep updating the host url in the WordPress settings. | '''Note:''' As you do this, you'll have to keep updating the host url in the WordPress settings. | ||
Line 130: | Line 128: | ||
</pre> | </pre> | ||
=== Install Let's Encrypt === | |||
<pre> | <pre> |
Revision as of 02:06, 27 February 2022
VPS
- https://www.interserver.net/vps/
- $6 instance, 2 gigs, 2 terabytes, 1 core, 30 gigs
- Debian 10 64
- KVM
- Reverse DNS: schneier.deadmandao.com
- DNS: go to namecheap.com and point schneier.deadmandao.com at the IP
Initial Setup
$ ssh root@schneier.deadmandao.com # apt update -y && apt upgrade -y && apt install -y sudo emacs-nox net-tools # adduser bob ... # usermod -G sudo bob # exit
Apache Basic
Setting Apache to Localhost
On schneier:
$ sudo apt install apache2 $ cd /etc/apache2 $ sudo emacs -nw ports.conf ... change the Listen line from: Listen 80 ... to: Listen 127.0.0.1:80 ... save and exit $ sudo service apache2 restart $ sudo netstat -lnp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:80 0.0.0.0:* LISTEN 17467/apache2
SSH Tunnel
$ ssh -L 8080:localhost:80 schneier.deadmandao.com
Now you should be able to point your local browser at localhost:8080 and see Apache2 on schneier.
Database
DB Setup
The config will need an account on a local database. We'll use MariaDB.
$ sudo apt install -y mariadb-client mariadb-server $ sudo mariadb > create user 'dmd-wordpress'@'localhost' identified by '[password]'; > create database dmd_wordpress; > grant all on dmd_wordpress.* to 'dmd-wordpress'@'localhost'; > flush privileges; > exit; $ mariadb -p -u dmd-wordpress dmd_wordpress
Confirm that MariaDB is only listening on localhost (it should be, by default):
$ sudo netstat -lnp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 17976/mysqld
WordPress (WordPress version)
Install
$ cd /home/bob $ mkdir Downloads $ cd Downloads $ wget https://wordpress.org/latest.tar.gz $ cd /var/www/ $ sudo tar -xvzf /home/bob/Downloads/wordpress-latest.tar.gz $ sudo service apache2 restart
Now let's try hitting http://localhost:8080/wp-admin/install.php
... that's looking better.
Go through the config script, write the resulting config to a local file, then:
$ scp path/to/wp-config.php schneier.deadmandao.com:./ $ ssh schneier.deadmandao.com $ cd /var/www/wordpress/ $ sudo cp /home/bob/wp-config.php ./
Configure
Apparently the preceding only gets us to the point where we can run the install, which will be presented when we go to:
http://localhost:8080/wp-admin/install.php
Move to 0.0.0.0:443
Listen on All Addresses
Note: As you do this, you'll have to keep updating the host url in the WordPress settings.
$ sudo emacs -nw /etc/apache2/ports.conf ... change Listen 127.0.0.1:80 ... to Listen 80 ... save and exit $ sudo service apache2 restart
Install Let's Encrypt
sudo apt install snapd sudo snap install core sudo snap refresh core
sudo snap install --classic certbot sudo ln -s /snap/bin/certbot /usr/bin/certbot
sudo certbot --apache -d www.deadmandao.com