SHARE
TWEET

Untitled

a guest Aug 17th, 2019 220 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # This tutorial is specifically for dropbox
  2. If you see something in <THESE> then you should replace the whole thing with whatever it is.
  3. For example, ssh root@<IP> would become ssh root@123.456.78.9 if 123.456.78.9 was your server's
  4. IP address.
  5.  
  6. Make a new Ubuntu droplet. Add an ssh key (google search if you do not know how to do this) and
  7. make sure you use that instead of password login. Let it spin up then copy the IP address and
  8. do the following:
  9.  
  10. # Log into the box as root
  11. ssh root@<IP>
  12.  
  13. # Make a new Linux user
  14. adduser ace
  15. usermod -aG sudo ace
  16. rsync --archive --chown ace:ace ~/.ssh /home/ace
  17.  
  18. # Firewall this bad larry
  19. ufw allow OpenSSH
  20. ufw allow 9000:9001/udp
  21. ufw enable
  22.  
  23. # Log out of root and back in as the ace user
  24. exit
  25. ssh ace@<ip>
  26.  
  27. # Install MariaDB
  28. sudo apt update && sudo apt upgrade
  29. sudo apt install mariadb-server mariadb-client
  30. sudo mysql_secure_installation
  31.  
  32. # Follow the on-screen instructions for securing the db. You want to do everything it asks if you want to do ;)
  33.  
  34. # Enter MariaDB
  35. sudo mariadb
  36.  
  37. # Make a new user and make the tables we need.
  38. create user 'ace'@'localhost' identified by '<PASSWORD>';
  39.  
  40. create database `ace_auth`;
  41. create database `ace_shard`;
  42. create database `ace_world`;
  43.  
  44. grant usage on *.* to 'ace'@localhost identified by '<PASSWORD>';
  45.  
  46. grant all privileges on `ace_auth`.* to 'ace'@localhost;
  47. grant all privileges on `ace_shard`.* to 'ace'@localhost;
  48. grant all privileges on `ace_world`.* to 'ace'@localhost;
  49.  
  50. flush privileges;
  51.  
  52. exit;
  53.  
  54. # Install dotnet (this is a little fucky)
  55. wget -q https://packages.microsoft.com/config/ubuntu/19.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
  56. sudo dpkg -i packages-microsoft-prod.deb
  57. sudo apt-get install apt-transport-https
  58. sudo apt-get update
  59. sudo apt-get install dotnet-sdk-2.2=2.2.104-1
  60. (This errored for me and the microsoft debug shit was no good, I had to remove the version pin to run it.)
  61. (only do this if the above errors out for you like it did for me: sudo apt-get install dotnet-sdk-2.2)
  62.  
  63. # Download the ACE server code to your server and get it ready to configure
  64. git clone https://github.com/ACEmulator/ACE.git
  65. cd ACE/
  66. cp Source/ACE.Server/Config.js.example Source/ACE.Server/Config.js
  67.  
  68. # Grab the world data
  69. # Right click copy link for ACE-World-Database-v<WHATEVER>.sql.zip
  70. wget <URL for latest release https://github.com/ACEmulator/ACE-World-16PY-Patches/releases>
  71. sudo apt install unzip
  72. unzip <filename>
  73.  
  74.  
  75. # Seed the databases now
  76. mysql --user='<THE USER WE MADE ABOVE>' --password='<THE PASSWORD WE SET FOR THE USER ABOVE>' ace_world < '<PATH TO THE FILE YOU JUST UNZIPPED>'
  77. mysql --user='<THE USER WE MADE ABOVE>' --password='<THE PASSWORD WE SET FOR THE USER ABOVE>' ace_shard < 'Database/Base/ShardBase.sql'
  78. mysql --user='<THE USER WE MADE ABOVE>' --password='<THE PASSWORD WE SET FOR THE USER ABOVE>' ace_auth < 'Database/Base/AuthenticationBase.sql'
  79.  
  80. # Apply shard and auth updates:
  81. touch update_the_dbs.sh
  82. vim update_the_dbs.sh
  83.  
  84. # Paste this into the file by copying it and then pressing `i` inside vim then pasting it
  85.  
  86. for filename in ./Database/Updates/Shard/*.sql; do
  87.         echo "Uploading $filename to the matrix..."
  88.         mysql --user='ace' --password='<THE PASSWORD>' ace_shard < "$filename"
  89. done
  90.  
  91. for filename in ./Database/Updates/Authentication/*.sql; do
  92.         echo "Uploading $filename to the matrix..."
  93.         mysql --user='ace' --password='<THE PASSWORD>' ace_auth < "$filename"
  94. done
  95.  
  96. # Then press `esc` followed by typing `:wq`
  97. # You should now be back in your console, let's run the script!
  98.  
  99. sh update_the_dbs.sh
  100.  
  101. # You should see a bunch of output about uploading files to the matrix
  102.  
  103. # Get the DAT files onto your server
  104. # Personally, I zipped mine up and put them on my dropbox then used the share link that dropbox provides.
  105.  
  106. mkdir DATS
  107. cd DATS/
  108. wget <URL to a zip of your dat files (client_cell_1.dat, client_portal.dat, client_local_English.dat)
  109. # If you used a dropbox share link you might run into an issue I did where the file was saved as some awful name with quotes
  110. # that unzip didn't seem to like. If this happens, just run the command
  111. # mv <terrible_file_name> acdats.zip
  112. unzip <whatever the name of the zip file you made and just downloaded is>
  113. # Don't need this any more so let's delete it to free up some space
  114. rm <the zip file>
  115.  
  116. # Update the config
  117.  
  118. cd ..
  119. vim Source/ACE.Server/Config.js
  120.  
  121. # The most important things to change are the DatFilesDirectory setting
  122. "DatFilesDirectory": "~/ACE/DATS",
  123. # And then setting the IP to your server's public IP
  124.  
  125. # Build the project
  126. cd Source/
  127. dotnet build
  128.  
  129. # Follow the instructions on how to run the server which should be in here: https://github.com/ACEmulator/ACE/blob/master/README_linux.md
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top