Single-Use Server - WordPress Installation Tutorial
The following tutorial was written by James J. Scherick as part of
a National Science Foundation (NSF) Research Experience for
Undergraduates (REU) project in Summer 2020.
FIRST SETUP
Install Docker using the steps found at: https://docs.docker.com/engine/install/ubuntu/
Install pip3 by using: sudo apt install python3-pip
SETUP MYSQL
To get into mysql type: sudo mysql
Then create a database with the following command: CREATE DATABASE wpdb_511;
then type "exit" to exit mysql
Edit line 145 in wpdb_511.sql to replace the two first ip addresses with your ip address.
Then import the database using the following command: sudo mysql wpdb_511 < /path/to/wpdb_511.sql
go back into mysql to create some Users. Then run the following commands. (you should probably replace the usernames and passwords of the users to something more secure)
CREATE USER 'User'@'%' IDENTIFIED BY 'Pass';
CREATE USER 'User2'@'%' IDENTIFIED WITH mysql_native_password BY 'Pass';
GRANT ALL PRIVILEGES ON *.* TO 'User'@'%' WITH GRANT OPTION;
GRANT SELECT ON wpdb_511.* TO 'User2'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
change the bind-address to your IP in /etc/mysql/mysql.conf.d/mysqld.cnf.
you can edit the file using the command: sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
Then run "sudo service mysql restart" to load these changes.
DOCKER NETWORKS
run the following commands to create two docker networks. The first one is for single use servers, the second one is for the auth-net containers.
sudo docker network create --driver=bridge --subnet=172.18.0.0/16 --ip-range=172.18.0.0/16 sus
Change "http_remote_url" and "http_local_url" to the ip address you are running the website on. Also change all of the database information to your database and credentials to the first user you created.
Making edits in "wp-versions/wp-511/wordpress/wp-config-base.php"
Change all IP addresses to the ip address you are running the website on.
make edits in "proxy/src/proxy-config.config"
change "HOST_IP" and "SUS_MANAGER_IP" to the ip address you are running the website on.
make edits in "resource-guard\proxy-config.yaml"
change "proxy_client_host" and "server_host" to the ip address you are running the website on.
make edits to "sus-auth-container/wordpress/sus-config.php"
change all ip addresses to the ip address you are running the website on, also change the database credentials to the second user we created.
MAKE FILES EXECUTABLE
There are some files that you need to be able to run. To make sure that you have permissions to execute some files run chmod in the following directories.
in "wp-versions/wp-511" and "sus-auth-container" run "sudo chmod +rwx ./*.sh"
in "proxy/src" run "sudo chmod +rwx proxy"
in "resource-guard" run "sudo chmod +rwx rg_proxy"
BUILD FILES
run build.sh in wp-versions/wp-511
run build.sh in sus-auth-container
INSTALL MODULES AND LIBRARY PREREQUISITES
You need to run the following commands to install all modules and library prerequisites:
Download axTLS from the following website: https://sourceforge.net/projects/axtls/files/
Download Botan from the following website: https://botan.randombit.net/
when in the axTLS folder run "sudo make" this will bring up a menu, you can just edit out of it. Then run "sudo make install"
When in the Botan folder run "sudo python3 configure.py" this will create a makefile. Then run "sudo make install" this will take a very very long time.
Then afterwards run the following commands to create the path needed to find the libraries