Compare commits
No commits in common. "8edf01460288df9510510aca593954669d41eb11" and "6e106dbc2c84d9d291e2cbc7e5986562cfb4dcfa" have entirely different histories.
8edf014602
...
6e106dbc2c
24
README.md
24
README.md
|
@ -2,8 +2,8 @@
|
||||||
2. [Features](#2-features)
|
2. [Features](#2-features)
|
||||||
3. [Installation](#3-installation)
|
3. [Installation](#3-installation)
|
||||||
4. [Configuration](#4-configuration)
|
4. [Configuration](#4-configuration)
|
||||||
5. [The API](#5-the-api)
|
5. [The API](#theapi)
|
||||||
6. [Conclusion](#6-conclusion)
|
6. [Conclusion](#conclusion)
|
||||||
|
|
||||||
<a name="overview"></a>
|
<a name="overview"></a>
|
||||||
# 1. Overview
|
# 1. Overview
|
||||||
|
@ -80,7 +80,7 @@ I created the domain in ns1.24unix.net below the /www folder.
|
||||||
|
|
||||||
We'll change the base directory later.
|
We'll change the base directory later.
|
||||||
|
|
||||||
Now we need to log into our server, using e.g. iTerm2 or under Linux whichever terminal you prefer.
|
Now we need to log into our server, using e.g. iTerm2 or under Linux whichever Terminal you prefer.
|
||||||
|
|
||||||
As root (or via sudo):
|
As root (or via sudo):
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ Receiving objects: 100% (878/878), 3.25 MiB | 4.46 MiB/s, done.
|
||||||
Resolving deltas: 100% (510/510), done.
|
Resolving deltas: 100% (510/510), done.
|
||||||
```
|
```
|
||||||
|
|
||||||
We need to pull the dependencies for composer:
|
We need to pill the dependencies for composer:
|
||||||
|
|
||||||
`/usr/bin/keyhelp-php81 /usr/local/bin/composer update`
|
`/usr/bin/keyhelp-php81 /usr/local/bin/composer update`
|
||||||
|
|
||||||
|
@ -137,7 +137,7 @@ KeyHelp relies on the default PHP installation, so the php binary will always po
|
||||||
|
|
||||||
So, in bin/console the path to /usr/bin/keyhelp-php81 is hardcoded after the shebang, a step we have to remind if we install the standalone version.
|
So, in bin/console the path to /usr/bin/keyhelp-php81 is hardcoded after the shebang, a step we have to remind if we install the standalone version.
|
||||||
|
|
||||||
Now make the CLI executable:
|
Now make the CLU executable:
|
||||||
|
|
||||||
`chmod +x bin/console`
|
`chmod +x bin/console`
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ Should I create a new config based on config.json.sample? (y/N): n
|
||||||
You first have to setup the bindAPI. Bye.
|
You first have to setup the bindAPI. Bye.
|
||||||
```
|
```
|
||||||
|
|
||||||
So now we can head back to our panel and set the Document root to
|
Sp now we can head back to our panel and set the Document root to
|
||||||
/home/users/tfunix/ns1.24unix.net/bindAPI/public.
|
/home/users/tfunix/ns1.24unix.net/bindAPI/public.
|
||||||
|
|
||||||
OK, we are finished with the installation and head over to the [4. Configuration](#4-configuration).
|
OK, we are finished with the installation and head over to the [4. Configuration](#4-configuration).
|
||||||
|
@ -174,13 +174,13 @@ wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
|
||||||
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list
|
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list
|
||||||
apt update
|
apt update
|
||||||
```
|
```
|
||||||
We need at least php-fpm, php-cli, and besides that php-curl, php-xml and php-mbstring:
|
We need at leas php-fpm, php-cli, and besides that php-curl, php-xlm and php-mbstring:
|
||||||
|
|
||||||
`apt install ph8.1-fpm, php8.1-cli, and besides that php8.1-curl, php8.1-xml and php8.1-mbstring`
|
`apt install ph8.1-fpm, php8.1-cli, and besides that php8.1-curl, php8.1-xml and php8.1-mbstring`
|
||||||
|
|
||||||
We also need MariaDB, the successor of MySQL.
|
We also need MariaDB, the successor of MySQL.
|
||||||
(Maria is the second daughter of Michael Widenius, guess what, his first is named My.
|
(Maria is the second daughter of Michael Widenius, guess what, his first is named My.
|
||||||
So MySQL and MariaDB even makes more sense ^^)
|
So MySQl and MariDB even makes more sense ^^)
|
||||||
|
|
||||||
`apt install mysql`
|
`apt install mysql`
|
||||||
|
|
||||||
|
@ -282,12 +282,10 @@ There is no need to run FLUSH PRIVILEGES when using GRANT!
|
||||||
So, now it offers us the create statements for the needed database.
|
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 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 credentials and update config.json.
|
If we're using hte panel, lets create a database and write down the credential.
|
||||||
|
|
||||||
|
|
||||||
Now we can finally begin to populate our configuration:
|
Now we can finally begin to populate our configuration:
|
||||||
|
|
||||||
TODO
|
|
||||||
|
|
||||||
|
|
||||||
<a name="theapi"></a>
|
<a name="theapi"></a>
|
||||||
|
@ -314,12 +312,12 @@ And then hit Execute:
|
||||||
|
|
||||||
Of course, you can issue the same command in your shell:
|
Of course, you can issue the same command in your shell:
|
||||||
|
|
||||||
```
|
`
|
||||||
curl -X 'GET' \
|
curl -X 'GET' \
|
||||||
'https://ns1.24unix.net/api/ping' \
|
'https://ns1.24unix.net/api/ping' \
|
||||||
-H 'accept: application/json' \
|
-H 'accept: application/json' \
|
||||||
-H 'X-API-Key: 61f27a57c9d1f.[truncated]'
|
-H 'X-API-Key: 61f27a57c9d1f.[truncated]'
|
||||||
```
|
`
|
||||||
|
|
||||||
A helpful tool when dealing with API is [Postman](https://https://www.postman.com/), if offers the same options as from the OpenAPI interface or via shell with curl.
|
A helpful tool when dealing with API is [Postman](https://https://www.postman.com/), if offers the same options as from the OpenAPI interface or via shell with curl.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue