From e2db893ed32aa931f5d485d0821cca919ddac5aa Mon Sep 17 00:00:00 2001 From: emilyd Date: Sat, 26 Nov 2022 09:26:38 +0200 Subject: [PATCH] convert README to markdown, add better installation instructions --- README | 6 ------ README.md | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 6 deletions(-) delete mode 100644 README create mode 100644 README.md diff --git a/README b/README deleted file mode 100644 index 7772dea..0000000 --- a/README +++ /dev/null @@ -1,6 +0,0 @@ -~ m o o d b l o g ~ - -to set up: -1. set up the SQL database using schema.sql -2: copy templates/config.def.php to templates/config.php and change the placeholders -3: copy creds.def.php to creds.php and change the placeholders diff --git a/README.md b/README.md new file mode 100644 index 0000000..3f5cea7 --- /dev/null +++ b/README.md @@ -0,0 +1,37 @@ +![moodblog](https://donut.gq/sandbox/junk/moodblog.svg) + +![Valid RSS!](https://validator.w3.org/feed/images/valid-rss-rogers.png) +![Valid CSS!](https://jigsaw.w3.org/css-validator/images/vcss-blue) +![Valid HTML!](https://donut.gq/sandbox/junk/html-5-valid.png) +![GPLv3 Licensed](https://www.gnu.org/graphics/gplv3-88x31.png) + +## Installation + +1. Install your preferred webserver, PHP, MariaDB/MySQL, and MySQLi. +2. Start the MariaDB daemon. +3. If you haven't yet, run `mysql_secure_installation`. +4. Run `mysql -u root -p` to log in to the SQL database. (If this fails, try running it as root.) +5. Enter the following commands. Remember to change the placeholders! +```sql +CREATE DATABASE moodblog; +GRANT ALL ON moodblog.* TO 'moodblog'@'localhost' IDENTIFIED BY 'password'; +FLUSH PRIVILEGES; +EXIT; +``` + * Tip: You can use /dev/urandom encoded with base64 to create long, strong passwords. + ```sh +base64 /dev/urandom -w 512 | head -n 1 +``` +6. Use git to clone this repository to any directory in your webroot. + * Example paths: + ``` + /var/www/html + /var/www/blog + /var/www/moodblog + /var/www/html/moodblog + /var/www/html/blog + ``` +7. Copy templates/creds.def.php to templates/creds.php. Change the placeholders. +8. Copy templates/config.def.php to templates/config.php. Change the placeholders. + * You really only need to change $url and $root to get a working installation, however, you really should change everything after $password. +9. Sever your leg please. It's the greatest day.