• 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!

compiling on ubuntu 22.04

Bowstons

New Member
Joined
Nov 15, 2020
Messages
19
Solutions
1
Reaction score
1
hello. Im looking for tfs 8.6 and myaac files, Im using ubuntu 22.04, can anyone help me? I tried a lot of sources but I had a lot of problems :((
 
MyAAC - you can use newest version:

TFS with 8.6 protocol:

1. You can download TFS 0.4 from 8.6 times:
and fix compilation errors using:

2. You can download TFS 1.3+ (10.98) downgraded to 8.6 protocol:

Problem with option no 1 is that you will have to fix C++ compilation errors.
Problem with option no 2 is that some things (spells, monsters etc.) may work different than on 8.6 (as it's 10.98 with downgrade and it wasn't finished by author).
 
ill leave this here:

this is all the needed stuff for setting up the server :)
for ubuntu.v22

Bash:
sudo apt update && sudo apt upgrade -y &&

sudo apt install nginx php-fpm mariadb-server -y &&

sudo apt install phpmyadmin -y &&

sudo apt-get install git cmake build-essential liblua5.2-dev libgmp3-dev libmysqlclient-dev libboost-system-dev libboost-iostreams-dev libboost-filesystem-dev libpugixml-dev libcrypto++-dev libfmt-dev libboost-date-time-dev



#after setting up the nginx etc :
sudo chown -R www-data:www-data /var/www/html/engine/cache/ &&
sudo chmod -R 775 /var/www/html/engine/cache/

here is the web stuff or how it should look:
Bash:
nano /etc/nginx/sites-available/default






server {
        listen 80 default_server;
        listen [::]:80 default_server;

        root /home/html;

        # Add index.php to the list if you are using PHP
        index index.php index.html index.htm index.nginx-debian.html;

        server_name _;

        location / {
                # First attempt to serve request as file, then
                # as directory, then fall back to displaying a 404.
                try_files $uri $uri/ =404;
        }

        # pass PHP scripts to FastCGI server
        #
        location ~ \.php$ {
               include snippets/fastcgi-php.conf;
        #
        #       # With php-fpm (or other unix sockets):
        ################## UBUNTU 18.04 LTS ##################
               fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
        ################## UBUNTU 20.04 LTS ##################
        #       fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;

        }

}


nano /etc/nginx/sites-available/phpmyadmin

server {
    listen      2344;
    server_name  _;
    root /usr/share/phpmyadmin;

    add_header X-Frame-Options DENY;
    add_header X-Content-Type-Options nosniff;
    add_header X-XSS-Protection "1; mode=block";

    client_max_body_size 256M;
    error_page 404 @notfound;

    location / {
        index index.html index.php;
        try_files $uri $uri/ /index.php?$args;
    }

    location ~* \.(gif|jpg|jpeg|png|bmp|js|css)$ {
        expires max;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;

    ################## UBUNTU 18.04 LTS ##################
           fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
    ################## UBUNTU 20.04 LTS ##################
    #       fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;

    }

    location @notfound {
        return 404 "You're not browsing correctly.";
        add_header Content-Type text/plain always;
    }

}


sudo ln -s /etc/nginx/sites-available/phpmyadmin /etc/nginx/sites-enabled/phpmyadmin

sudo systemctl restart nginx

here is cloudflare stuff:
Bash:
# Source:
# https://www.cloudflare.com/ips
# https://support.cloudflare.com/hc/en-us/articles/200169166-How-do-I-whitelist-CloudFlare-s-IP-addresses-in-iptables-

for i in `curl https://www.cloudflare.com/ips-v4`; do iptables -I INPUT -p tcp -m multiport --dports http,https -s $i -j ACCEPT; done
for i in `curl https://www.cloudflare.com/ips-v6`; do ip6tables -I INPUT -p tcp -m multiport --dports http,https -s $i -j ACCEPT; done

# Avoid racking up billing/attacks
# WARNING: If you get attacked and CloudFlare drops you, your site(s) will be unreachable.
iptables -A INPUT -p tcp -m multiport --dports http,https -j DROP
ip6tables -A INPUT -p tcp -m multiport --dports http,https -j DROP
 
MyAAC - you can use newest version:

TFS with 8.6 protocol:

1. You can download TFS 0.4 from 8.6 times:
and fix compilation errors using:

2. You can download TFS 1.3+ (10.98) downgraded to 8.6 protocol:

Problem with option no 1 is that you will have to fix C++ compilation errors.
Problem with option no 2 is that some things (spells, monsters etc.) may work different than on 8.6 (as it's 10.98 with downgrade and it wasn't finished by author).
I downloaded second option but I have errors while compiling source and error 500 when I uploaded myaac files
 

Attachments

  • Zrzut ekranu 2025-01-16 204217.webp
    Zrzut ekranu 2025-01-16 204217.webp
    181.3 KB · Views: 10 · VirusTotal
I downloaded second option but I have errors while compiling source
I tried Ubuntu 22.04 with docker and got some errors about lua_* , when I've installed libluajit-5.1-dev (LuaJIT).
So maybe you have to uninstall it ex. apt remove --purge libluajit-5.1-dev and then install all required packages:
Code:
apt update && apt install -yq cmake build-essential ninja-build libcrypto++-dev libfmt-dev liblua5.4-dev libmysqlclient-dev libboost-iostreams-dev libboost-locale-dev libboost-system-dev libpugixml-dev
Then you can execute in main OTS directory:
Code:
cmake --preset default && cmake --build --config RelWithDebInfo --preset default
to compile and it should work.

At least it worked for me on Ubuntu 22.04 docker:
Code:
FROM ubuntu:22.04

RUN apt update && \
    apt install -yq cmake build-essential ninja-build \
    libcrypto++-dev libfmt-dev liblua5.4-dev libluajit-5.1-dev libmysqlclient-dev \
    libboost-iostreams-dev libboost-locale-dev libboost-system-dev libpugixml-dev

COPY cmake /usr/src/forgottenserver/cmake/
COPY src /usr/src/forgottenserver/src/
COPY CMakeLists.txt CMakePresets.json /usr/src/forgottenserver/
WORKDIR /usr/src/forgottenserver

RUN cmake --preset default && cmake --build --config RelWithDebInfo --preset default
 
ill leave this here:

this is all the needed stuff for setting up the server :)
for ubuntu.v22

Bash:
sudo apt update && sudo apt upgrade -y &&

sudo apt install nginx php-fpm mariadb-server -y &&

sudo apt install phpmyadmin -y &&

sudo apt-get install git cmake build-essential liblua5.2-dev libgmp3-dev libmysqlclient-dev libboost-system-dev libboost-iostreams-dev libboost-filesystem-dev libpugixml-dev libcrypto++-dev libfmt-dev libboost-date-time-dev



#after setting up the nginx etc :
sudo chown -R www-data:www-data /var/www/html/engine/cache/ &&
sudo chmod -R 775 /var/www/html/engine/cache/

here is the web stuff or how it should look:
Bash:
nano /etc/nginx/sites-available/default






server {
        listen 80 default_server;
        listen [::]:80 default_server;

        root /home/html;

        # Add index.php to the list if you are using PHP
        index index.php index.html index.htm index.nginx-debian.html;

        server_name _;

        location / {
                # First attempt to serve request as file, then
                # as directory, then fall back to displaying a 404.
                try_files $uri $uri/ =404;
        }

        # pass PHP scripts to FastCGI server
        #
        location ~ \.php$ {
               include snippets/fastcgi-php.conf;
        #
        #       # With php-fpm (or other unix sockets):
        ################## UBUNTU 18.04 LTS ##################
               fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
        ################## UBUNTU 20.04 LTS ##################
        #       fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;

        }

}


nano /etc/nginx/sites-available/phpmyadmin

server {
    listen      2344;
    server_name  _;
    root /usr/share/phpmyadmin;

    add_header X-Frame-Options DENY;
    add_header X-Content-Type-Options nosniff;
    add_header X-XSS-Protection "1; mode=block";

    client_max_body_size 256M;
    error_page 404 @notfound;

    location / {
        index index.html index.php;
        try_files $uri $uri/ /index.php?$args;
    }

    location ~* \.(gif|jpg|jpeg|png|bmp|js|css)$ {
        expires max;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;

    ################## UBUNTU 18.04 LTS ##################
           fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
    ################## UBUNTU 20.04 LTS ##################
    #       fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;

    }

    location @notfound {
        return 404 "You're not browsing correctly.";
        add_header Content-Type text/plain always;
    }

}


sudo ln -s /etc/nginx/sites-available/phpmyadmin /etc/nginx/sites-enabled/phpmyadmin

sudo systemctl restart nginx

here is cloudflare stuff:
Bash:
# Source:
# https://www.cloudflare.com/ips
# https://support.cloudflare.com/hc/en-us/articles/200169166-How-do-I-whitelist-CloudFlare-s-IP-addresses-in-iptables-

for i in `curl https://www.cloudflare.com/ips-v4`; do iptables -I INPUT -p tcp -m multiport --dports http,https -s $i -j ACCEPT; done
for i in `curl https://www.cloudflare.com/ips-v6`; do ip6tables -I INPUT -p tcp -m multiport --dports http,https -s $i -j ACCEPT; done

# Avoid racking up billing/attacks
# WARNING: If you get attacked and CloudFlare drops you, your site(s) will be unreachable.
iptables -A INPUT -p tcp -m multiport --dports http,https -j DROP
ip6tables -A INPUT -p tcp -m multiport --dports http,https -j DROP
I formatted Ubuntu 22 to its default state, followed your instructions, but later it stopped reading PHP code. The page displayed raw PHP code instead. After installing PHP, a 500 error occurs on the website. If I test it with a page using the IP /test.php containing <?php echo 'Current PHP version: ' . phpversion(); ?>, it shows version 8.1 and PHP code execution works. However, when I upload the source code of MyAAC, Gesior, or Znote to the /var/www/html folder, I keep getting a 500 error.
 
Back
Top