• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[Autoinstaller] Compiles TFS + LAMP Stack + Dummy MySQL Database+User for Ubuntu (tested with 18.04 LTS 64bit)

Damon

Check my status to contact me :)
Joined
Mar 26, 2011
Messages
6,209
Solutions
1
Reaction score
2,025
Location
Germany
Difficulty: Basic command line knowledge is required/recommended.
Tested on: Ubuntu 18.04 LTS, 64bit

This little bash script will automatically install a LAMP Stack (Linux, Apache, MySQL, PHP ), compile latest TFS version and create a Dummy MySQL User and Database (also imports schema.sql to dummydb) to test if TFS server starts up.

I am aware that there is already @Don Daniello setup script but since I am not a big fan of Ansible I thought I'd create this alternative Ubuntu setup script for testing purposes.

Installation instructions:
1.
SSH into your VPS as a user with sudo privileges.
2. Enter the following command: wget --no-check-certificate https://raw.githubusercontent.com/NicolasLoew/vps/master/tfsauto.sh
3. Make the downloaded script executable by typing chmod +x tfsauto.sh
4. Then start the script by typing sudo ./tfsauto.sh
5. The script will run on auto-pilot for the most part. After TFS has been compiled (when the green text in console stops) user input will be required:
7934b01b253796fb26ccdb742fead3e0.png


6. You will be prompted to enter a password. The password is password. Enter the password and press ENTER.
(For your information: This is simply the mysql pw of the dummy user created and it's needed to import schema.sql to the dummy db.)



7. Shortly after this the script finishes. All that's left for you is to edit the config.lua.dist file and add the following dummy mysql information:
MySQL Username: otsuser Password: password MySQL Database name: otsdb

You can do this for example by connecting to your server via SFTP (Connection data: Linuxusername and Linuxuserpw which you normally use to SSH and Port 22)
Alternatively you can cd into the forgottenserver in your home directory and edit the file using sudo nano config.lua.dist and CTRL + O and CTRL + X to save and exit. You need to rename config.lua.dist to config.lua and fire up TFS which will be in /home/yourusername/forgottenserver (basically in your homedirectory in the forgottenserver folder).

1a4dc5c37b25d08e51454b145b9e9202.png


8. Since you are already in the forgottenserver folder, use ./tfs to start the Server :)
14f8ac3062010ed3ad4aa961b93b101c.png


9. Possibly go ahead and install ZnoteAAC or smth else ;)

Hope this script will be of help to some. Also to perhaps study the script to learn some linux commands^^

Next project will be a Ympkit clone for OTS usage. Will include options like compile TFS, install LAMP, backup TFS, backup dtb (mysqldump), backup WWW/HTML/WEB, view server resource usage, disable SSH root login, harden firewall, setup network monitoring.. and maybe some other useful commands/scripts :)
 
Difficulty: Basic command line knowledge is required/recommended.
Tested on: Ubuntu 18.04 LTS, 64bit

This little bash script will automatically install a LAMP Stack (Linux, Apache, MySQL, PHP ), compile latest TFS version and create a Dummy MySQL User and Database (also imports schema.sql to dummydb) to test if TFS server starts up.

I am aware that there is already @Don Daniello setup script but since I am not a big fan of Ansible I thought I'd create this alternative Ubuntu setup script for testing purposes.

Installation instructions:
1.
SSH into your VPS as a user with sudo privileges.
2. Enter the following command: wget --no-check-certificate https://raw.githubusercontent.com/NicolasLoew/vps/master/tfsauto.sh
3. Make the downloaded script executable by typing chmod +x tfsauto.sh
4. Then start the script by typing sudo ./tfsauto.sh
5. The script will run on auto-pilot for the most part. After TFS has been compiled (when the green text in console stops) user input will be required:
7934b01b253796fb26ccdb742fead3e0.png


6. You will be prompted to enter a password. The password is password. Enter the password and press ENTER.
(For your information: This is simply the mysql pw of the dummy user created and it's needed to import schema.sql to the dummy db.)



7. Shortly after this the script finishes. All that's left for you is to edit the config.lua.dist file and add the following dummy mysql information:
MySQL Username: otsuser Password: password MySQL Database name: otsdb

You can do this for example by connecting to your server via SFTP (Connection data: Linuxusername and Linuxuserpw which you normally use to SSH and Port 22)
Alternatively you can cd into the forgottenserver in your home directory and edit the file using sudo nano config.lua.dist and CTRL + O and CTRL + X to save and exit. You need to rename config.lua.dist to config.lua and fire up TFS which will be in /home/yourusername/forgottenserver (basically in your homedirectory in the forgottenserver folder).

1a4dc5c37b25d08e51454b145b9e9202.png


8. Since you are already in the forgottenserver folder, use ./tfs to start the Server :)
14f8ac3062010ed3ad4aa961b93b101c.png


9. Possibly go ahead and install ZnoteAAC or smth else ;)

Hope this script will be of help to some. Also to perhaps study the script to learn some linux commands^^

Next project will be a Ympkit clone for OTS usage. Will include options like compile TFS, install LAMP, backup TFS, backup dtb (mysqldump), backup WWW/HTML/WEB, view server resource usage, disable SSH root login, harden firewall, setup network monitoring.. and maybe some other useful commands/scripts :)
Where were you a week ago when I was setting up a test server on 18.04 with no knowledge of Linux? 😥
 
Thank you @Damon, is it needed to edit any text or link it to the ots?
You can check if the ots db is already imported. If not sqldump and import it, or create a new dtb for ots in phpmyadmin, import sql schema and edit config.lua
 
I finally completed the installation. Thank you for sharing this post.
It worked on Ubuntu 18.04, using TFS 1.2 and Znote Acc!
 
Since I can't update the OP just saying that this is still working well with Ubuntu 18.04 LTS and won't be necessarily upgraded to any higher version before it reaches EOL. Ubuntu 18.04 LTS will be stable and patched for another few years.

b60e4f5b09445f0292862c5e01d1fd95.png
 
getting this

-- Found Threads: TRUE
-- Found PugiXML: /usr/include
-- Could NOT find LuaJIT (missing: LUA_LIBRARIES LUA_INCLUDE_DIR)
-- Found Lua: /usr/lib/x86_64-linux-gnu/liblua5.2.so;/usr/lib/x86_64-linux-gnu/libm.so (found version "5.2.4")
CMake Error at /usr/share/cmake-3.10/Modules/FindBoost.cmake:1947 (message):
Unable to find the requested Boost libraries.

Boost version: 1.65.1

Boost include path: /usr/include

Detected version of Boost is too old. Requested version was 1.66 (or
newer).
Call Stack (most recent call first):
CMakeLists.txt:63 (find_package)


-- IPO / LTO enabled
-- Configuring incomplete, errors occurred!
See also "/root/forgottenserver/build/CMakeFiles/CMakeOutput.log".
See also "/root/forgottenserver/build/CMakeFiles/CMakeError.log".
 
When Im done with this, and i run ./tfs it says no file or directory, any idea what to do?
 
When Im done with this, and i run ./tfs it says no file or directory, any idea what to do?

Which directory are you in when running the command?

You can run
Code:
pwd
to check this. You should be in the correct directory to run tfs (usually /home/username/forgottenserver ).
Post automatically merged:

getting this

-- Found Threads: TRUE
-- Found PugiXML: /usr/include
-- Could NOT find LuaJIT (missing: LUA_LIBRARIES LUA_INCLUDE_DIR)
-- Found Lua: /usr/lib/x86_64-linux-gnu/liblua5.2.so;/usr/lib/x86_64-linux-gnu/libm.so (found version "5.2.4")
CMake Error at /usr/share/cmake-3.10/Modules/FindBoost.cmake:1947 (message):
Unable to find the requested Boost libraries.

Boost version: 1.65.1

Boost include path: /usr/include

Detected version of Boost is too old. Requested version was 1.66 (or
newer).
Call Stack (most recent call first):
CMakeLists.txt:63 (find_package)


-- IPO / LTO enabled
-- Configuring incomplete, errors occurred!
See also "/root/forgottenserver/build/CMakeFiles/CMakeOutput.log".
See also "/root/forgottenserver/build/CMakeFiles/CMakeError.log".
Which OS were you using? It seems like you are missing some libraries. Did all dependencies install without error messages? Were there any errors during installation?
 
Back
Top