diff --git a/README.md b/README.md index 3836877..1ade5b2 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -1. [Overview](#overview) -2. [Features](#features) -3. [Installation](#installation) -4. [Configuration](#configuration) +1. [Overview](#1-overview) +2. [Features](#2-features) +3. [Installation](#3-installation) +4. [Configuration](#4-configuration) 5. [The API](#theapi) 6. [Conclusion](#conclusion) @@ -184,7 +184,7 @@ You first have to setup the bindAPI. Bye. Sp now we can head back to our panel and set the Document root to /home/users/tfunix/ns1.24unix.net/bindAPI/public. -OK, we are finished with the installation and head over to the [4. Configuration](#configuration). +OK, we are finished with the installation and head over to the [4. Configuration](#4-configuration). ## 3.2. Installation on a plain debian Bullseye @@ -266,10 +266,59 @@ CustomLog ${APACHE_LOG_DIR}/ns1.24unix.net/access.log combined ``` +php installer --install-dir=./bin/ TODO + +/usr/bin/keyhelp-php81 bin/composer.phar update + # 4. Configuration +So, another call of our binary, this time we agree to get a config written: + +``` +# ./bin/console +Missing config file +Should I create a new config based on config.json.sample? (y/N): y +Config file has been generated. Adjust it to your needs, then proceed to database setup. +``` + +So, what's in it? + +``` +cat config.json +{ + "dbHost": "localhost", + "dbPort": 3306, + "dbDatabase": "sampledb", + "dbUser": "sampleuser", + "dbPassword": "secret" +} +``` +We'll start the installer another time: + +``` +$ ./bin/console +SQLSTATE[HY000] [1698] Access denied for user 'sampleuser'@'localhost' +Did you create the database and adjust the config file? + +You can create database an user via a panel or manually in mysql shell: +Created an initial password: T6BpmtNk +CREATE DATABASE bindAPI; +CREATE USER 'bindAPI'@'localhost' IDENTIFIED BY 'T6BpmtNk'; +GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, INDEX, DROP, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON bindAPI.* TO 'bindAPI'@'localhost'; +There is no need to run FLUSH PRIVILEGES when using GRANT! +``` + +So, now it offers us the create statements for the needed database. +If were on plain debian, we just can copy and paste (the password is random) this as root into mysql. + +If we're using hte panel, lets create a database and write down the credential. + +Now we can finally begin to populate our configuration: + + + # 5. The API