diff --git a/.gitignore b/.gitignore index 049205d..f2d877a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,4 @@ build/run-phar.sh build/debug/* build/release/* -src/vendor/ -Client.php -test.php \ No newline at end of file +src/vendor/ \ No newline at end of file diff --git a/build/build-phar.php b/build/build-phar.php index 2c60ece..15853da 100644 --- a/build/build-phar.php +++ b/build/build-phar.php @@ -64,7 +64,7 @@ try { builderLog("[INFO] Phar archive created successfully"); builderLog("[RUN] Generating run script"); - file_put_contents("./build/run-phar.sh", "cd ".$path." ; php ".$filename."-".$version.".phar -dextension=openswoole.so"); + file_put_contents("./build/run-phar.sh", 'cd '.$path.' ; printf "test\n" php -dextension=openswoole.so '.$filename.'-'.$version.'.phar'); builderLog("[RUN] Adding Permissions to run script"); exec("chmod 777 ./build/run-phar.sh"); diff --git a/build/run-phar.sh b/build/run-phar.sh index 748aad5..875e8a9 100755 --- a/build/run-phar.sh +++ b/build/run-phar.sh @@ -1 +1 @@ -cd build/debug ; php LonaDB-4.0.0-beta.phar -dextension=openswoole.so \ No newline at end of file +cd build/debug ; printf "test\n" | php -dextension=openswoole.so LonaDB-4.0.0-beta.phar \ No newline at end of file diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..aaa6445 --- /dev/null +++ b/readme.md @@ -0,0 +1,35 @@ +# Installation + +To install the LonaDB server, follow these steps: + +## 1. Run the install script with sudo: + +```bash +sudo curl -fsSL https://lona-development.org/download/install.sh | sh +``` + +## 2. Start the Server: + +```bash +./start.sh +``` + +## 3. Configure everything: + +On every start, you have to put in your encryption key. +If the wrong key has been provided, the configuration file cannot be read and the Server will stop instantly. + +If wanted, you can change the ```php ...``` line in the start.sh file to automatically put in your encryption key: +```bash +printf "yourEncryptionKey\n" | php ... +``` +But this is not recommended since it will basically make everyone be able to find your root user password, wich is stored in the config file, which is encrypted with this key. + +We don't store the key by default because of security of the root user. + +If you don't have a configuration file, a users table or any data tables, the Server will run you through initial setup and create everything needed for the database to run. + +## 4. Use your database: + +Thats it! +You now have your own instance of LonaDB! \ No newline at end of file