Search the Community
Showing results for tags 'mta-server'.
-
This tutorial will guide you to install MTA-Server 64 bits and NGINX as external web server. What is NGINX? Is a high performance web server, it can be used to make players download your server at full available link speed with a high compression rate. Droplet used: 512MB Ram 1vCore 100/100 Uplink Centos 7.3.1611 x64 Requirements: Root permissions. Here is the resources used in IDLE (6 hours graph). 1 - Lets prepare our system! Change to root user. $ sudo su We need to update our distro, we want the latest packages. $ yum -y update Now we will install some packages that we will use along this tutorial (screen to manage screens, unzip to .zip and EPEL for extra RHEL packages). $ yum -y install screen $ yum -y install unzip $ wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm $ rpm --install --nosignature epel-release-latest-7.noarch.rpm Start your firewall (You can check firewall status with service firewalld status). $ service firewalld start Lets open just ports that we use on MTA and NGINX. 22126 for MTA Query list, 22003 for MTA Server, 22005 for HTTP files and 20080 for NGINX server. $ firewall-cmd --permanent --zone=public --add-port=22126/udp $ firewall-cmd --permanent --zone=public --add-port=22003/udp $ firewall-cmd --permanent --zone=public --add-port=22005/tcp $ firewall-cmd --permanent --zone=public --add-port=20080/tcp You should see "success" at the end of each command from firewall Now we will reload firewall to make active our new rules. $ firewall-cmd --reload 2 - Setting up MTA Server. Now we will download all necessaries files to start our MTA Server. Navigate to /home and create a directory called MTA. $ cd /home $ mkdir MTA $ cd MTA Download all files (Server, base config and resources). $ wget https://linux.multitheftauto.com/dl/multitheftauto_linux_x64.tar.gz $ wget https://linux.multitheftauto.com/dl/baseconfig.tar.gz $ wget https://mirror.multitheftauto.com/mtasa/resources/mtasa-resources-latest.zip Extract everything. $ tar -xvf multitheftauto_linux_x64.tar.gz $ tar -xvf baseconfig.tar.gz $ unzip mtasa-resources-latest.zip Rename multitheftauto_linux_x64 to server. $ mv multitheftauto_linux_x64 server Now we will move our baseconfig files to server folder and remove old files. $ cd baseconfig $ mv * ../server/mods/deathmatch $ cd .. $ rm baseconfig -f -r $ rm baseconfig.tar.gz -f Now we will do the same thing as we did above, but with our resources files, just create folder, and move everything. $ mkdir server/mods/deathmatch/resources $ mv -t server/mods/deathmatch/resources [admin] [editor] [gameplay] [gamemodes] [managers] [web] Ok, now that we finished with server files, we will move our server folder to / and remove MTA folder (MTA folder is inside /home directory). $ mv server / $ cd .. $ rm * -f -r We need to set 777 permission to mta-server64 bin file. $ cd /server $ chmod -R 777 mta-server64 Now we will create a screen called "server-screen" and start our server (Just for test). $ screen -S server-screen $ ./mta-server64 We expect to see a message like this: Server started and is ready to accept connections! Now that everything is working we will stop MTA server and minimize our screen. CTRL + c $ clear CTRL a + CTRL d 3 - The fun part. Lets install NGINX and create a server file. (NGINX uses modular server files). $ yum -y install nginx $ service nginx stop $ cd /etc/nginx/conf.d $ vi mta-server.conf Lets insert some lines of code inside our .conf file. Don't break the indentation of the file. (Use INSERT in your keyboard to insert files and not replace) server { listen 20080; root /server/mods/deathmatch/resource-cache/http-client-files; server_name localhost; access_log off; } Save and exit. Press ESC Press : Type wq and hit enter Now we will change our global NGINX server configs. $ vi /etc/nginx/nginx.conf On the top of the file put this: worker_rlimit_nofile 5000; Increase worker_connections 1024 to 5000 worker_connections 5000; Below access_log /var/log/nginx/access.log main; insert this lines: gzip on; gzip_types *; We don't want to use NGINX as public web server, so lets change the default port. Change: listen 80 default_server; and listen [::]:80 default_server; to listen 8081 default_server; listen [::]:8081 default_server; The top of your config file need to look like this: Start your NGINX server. $ service nginx start Test NGINX config. If you open this address and download a file, MTA Server block is ok. http://YOUR_SERVER_IP:20080/admin/client/admin_ACL.lua To test compression, navigate to: http://www.whatsmyip.org/http-compression-test/ And use this URL: http://YOUR_SERVER_IP:20080/admin/client/admin_ACL.lua 4 - Change MTA config file. Now we will point our download URL to NGINX URL. $ cd / $ vi /server/mods/deathmatch/mtaserver.conf Change <httpdownloadurl></httpdownloadurl> to: <httpdownloadurl>http://YOUR_SERVER_IP:20080</httpdownloadurl> 5 - Starting MTA Server. Resume screen. $ screen -r server-screen Start MTA Server. $ ./mta-server64 Minimize screen. CTRL a + CTRL d Its done, now your server is ready to accept connections and download all mods with fast speed. Useful links:
- 11 replies
-
- 4
-
- mta-server
- setup
-
(and 1 more)
Tagged with:
-
Hi I have a problem whit starting the linux server i use ubunu 19.XX the ssh says: root@server:~/mta# ./mta-server64 libncursesw.so.5: cannot open shared object file: No such file or directory ERROR: Could not load ./x64/core.so * Check installed data files. Press enter to continue... q root@server:~/mta# ldd /x64/core.so ldd: /x64/core.so: No such file or directory root@server:~/mta# ldd root/mta/x64/core.so ldd: root/mta/x64/core.so: No such file or directory root@server:~/mta# ldd x64/core.so linux-vdso.so.1 (0x00007fff41da0000) libncursesw.so.5 => not found libtinfo.so.5 => not found librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f43d12c7000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f43d1179000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f43d1158000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f43d0f6d000) /lib64/ld-linux-x86-64.so.2 (0x00007f43d164b000) #root@server:~/mta# ./mta-server64 libncursesw.so.5: cannot open shared object file: No such file or directory ERROR: Could not load ./x64/core.so * Check installed data files. Press enter to continue... root@server:~/mta# I have core.so i also try apt-get install lib32readline5
- 5 replies
-
- mta
- multhitheftauto
- (and 16 more)