Removed Tatooine Commoner Double Spawns
[swg-src.git] / README_LINUX.md
blob7a97a4394490653c4ab3517f6462c69236afc00d
1 # Game Server Setup (Debian and Ubuntu derivatives)
3 ## System Requirements
5 ### sudo and passwordless elevation
7 Before you do anything, make sure to install sudo if it isn't already, and add your normal user to the sudoers file! For ease of use, you can disable the password requirement as specified below.
9     su #and enter your root password at the prompt
10     apt-get install sudo
12     visudo
14 Add the following line anywhere in the file, replacing "user" with your username:
16     user ALL=(ALL) NOPASSWD: ALL
18 To save, hit the ESC key, then type wq! and hit enter. You may then exit from your root shell. 
20 ## Specifications
22 To run this game in any capacity, you MUST have an Oracle database server setup and configured for remote access.
24 To run 1 zone, you need:
26 * At least 4GB RAM
27 * Preferably 2 or more CPU cores
29 To run all zones and buildouts, you need:
31 * 8 or more CPU cores
32 * 16GB minimum with 24-32GB of RAM preferred
34 ## Java Notes
36 Since we ONLY want to compile and run with javac and javaw specified by IBM in the RPMs, remove other javac's from path.
37         
38         sudo update-alternatives --remove-all javac
39         
40 Then, double check path directories...
41         
42         whereis javac
43         whereis javaw
45 They should both ONLY say the IBM path.
47 ## Environment Setup
49 Add the following to your ~/.bashrc, replacing "swg" with your database name
51     export ORACLE_SID=swg;
53 ## Compilation
55 Using a 32 bit installation of Ubuntu or Debian Linux, clone this repo and execute the build_linux.sh script from a terminal. While building, if you haven't already, go ahead and setup the database server, as build time is quite long.
57 If you get errors about a CFLAG, remove the offending cflag from src/CMakeLists.txt and try again. gcc-5.2 is HIGHLY suggested, it builds a much more efficient server and supports all cflags. This is why using Debian Sid is a good option, else you can build gcc yourself or find a PPA to supply it.
59 ## Configuration
61 Add preload files:
63     cd exe/linux
64     find ../../data/sku.0/sys.server/compiled/game/object/ -name \"*.iff\" > objectTemplates.plf
65     find ../../data/sku.0/sys.server/compiled/game/datatables/ -name \"*.iff\" > datatables.plf
67 ### Oracle Access
69 For the Oracle DSN, the format is //[ip or hostname][optional port]/[resource name]. For a DB on a server named "server" with resource "swg" it would thus be:
71     //server/swg
72     
73 Enter the user and password.
75 ### Networking
77 Always select "local," as it works best. For IP address, use the SWG server's internal LAN address. Make sure that whatever the server's hostname is, that you have it set in the hosts file.
79 hosts example for "swg":
81     10.0.0.32           swg
82     127.0.0.1           localhost
83     
84     
85 If you wish to externally host a server, either use 1:1 NAT (DMZ) and set your external IP as your hostname in your hosts file, or forward the SWG ports (todo, list here). Then, set your login server in default.cfg to 0.0.0.0 and the IP address in the CLUSTERS database table to your external (WAN/ISP) provided IP address.
87 ### Configuration Options
89 If your machine has the CPU power and RAM required per the requirements to do so, you can uncomment startPlanet lines in the localOptions.cfg file. You may also enable Tansarii Station, and buildouts, amongst other options. In the taskmanager.rc file, you may also uncomment and enable the commodities server, to make the bazaar work.
91 ## Server Execution
93 Simply
95     ./startServer.sh
97 # Oracle Database Setup
99 See ORACLE.md
101 # Other notes, questions
103 See NOTES.md