login

Author Topic: Linux/Wine server setup instructions  (Read 2102 times)

Led

  • Administrator
  • The Chosen One
  • *****
  • Posts: 6454
  • The 82nd Element
  • Awards Special Award for players of the EA's SWBF (2015) Special Award for those that play the original SWBF
    • View Profile
    • Awards
  • Steam ID:
  • Tunngle ID: _PLA-Led
  • Origin ID: plaled
Linux/Wine server setup instructions
« on: March 19, 2015, 07:56:59 PM »
Here is a video tutorial
https://www.youtube.com/watch?v=4Q7XXT_gbVE

Thanks to SleepKiller for setting up the initial server, and JediKiller for looking into server issues with me.



1) obtain NFO linux server; choose single core with Ubuntu 14.04 x64


2) obtain tigervnc and putty software; note server IP address and vnc server address from control panel and note root password

putty:  http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
tiger vnc: https://bintray.com/tigervnc/stable/tigervnc/1.4.3  (get the viewer: probably this one for you
vncviewer-1.4.3.exe

3) login as root using putty
execute these commands:
apt-get update
apt-get install wine
apt-get install lubuntu-desktop


apt-get update
apt-get upgrade
apt-get dist-upgrade

useradd -m USERNAMEGOESHERE
passwd USERNAMEGOESHERE
You'll then be asked to enter a password for the user, and to confirm it.

reboot

4) log in to your server account with VNC
start firefox, download and install the server software
http://www.swbfgamers.com/index.php?action=downloads;sa=view;down=441
You must install it, as it will not work by just copying the folders from a PC.  (right click and run Wine Program Loader)
The location of the server install will be in the user home directory in the .wine location

If your server account is called swbf, then it will be in /home/swbf/.wine
Navigate through to C drive, program files x86, lucas arts
/home/swbf/.wine/drive_c/Program Files (x86)/LucasArts/Star Wars Battlefront PC Server


find battlefront server.exe and run it (right click wine program loader)tes



5)update the server with the new exe that has the masterserver IPs by using the gameshare links.
Use the server software for your region.
eu server https://gameshare.co/forum/download/file.php?id=55
usa server https://gameshare.co/forum/download/file.php?id=54
local link:  http://www.swbfgamers.com/index.php?action=downloads;sa=view;down=1268


Gameshare is outdated, I suggest you use the hosts file edit instead for SWBFspy

hosts file information here:
http://www.swbfgamers.com/index.php?topic=10542.0

on linux, it is located in /etc
NOTE:  you will need to be root to be able to write to /etc

(if you don't use these, then you have to edit your hosts file to get the the Gameshare Master Server)
update the battlefront.ini with /noaim /tps 30  as appropriate and set the ini path


6) run the server using the GUI by selecting the wine loader option
batch files can be run too, by copying the CMD.exe over to your install folder, and starting it with wine, and then running the batch file




--------
Notes:  never use the root account to run the server
you can install your own vnc server with apt-get install vnc4server
but the set up of this is beyond the scope of this guide

This would be fine to run one or two SWBF servers.  CPU usage runs about 50% for one server or 25% each for two, with spikes to 100% as new maps load.


here are instructions for installing TS3
http://blog.bobbyallen.me/2014/01/11/setting-up-teamspeak-3-on-ubuntu-server-12-04-lts/

I have not tried it yet, but I will.


TS3 server notes:  guide above is fairly useful, but not exact

as root:
get gz server binaries by using firefox to download file


tar xzf teamspeak3-server-xxxxxxxxxxxxxxxxxxxx 
(xxxxxxxxxx is the appropriate binary file)

useradd -m ts3ServerUserNameHere
passwd ts3ServerUserNameHere
(enter and confirm password)
mv teamspeak3-server-xxxxxxxxxxxx /usr/local/teamspeak3



I did not change ownership, but you can
chown -R ts3ServerUserNameHere /usr/local/teamspeak3


make a symbolic link
ln -s /usr/local/teamspeak3/ts3server_startscript.sh /etc/init.d/teamspeak3

update-rc.d teamspeak3 defaults

service teamspeak3 start

write down/copy and paste TS3 server key information

reboot

log in as serveradmin, use token, set up server


here are my exact commands, note that I have edited out some that did not work and hopefully kept the right ones  This is not quite right, but it is close.
Code: [Select]
  23  cd Downloads
   24  ls -al
   25  tar xzf teamspeak3-server_linux-x86-3.0.11.z.tar.gz
   26  ls -al

 
   29  useradd -m swbfts3
   30  passwd swbfts3

   32  ls -al
   33  mv teamspeak3-server_linux-x86 /usr/local/teamspeak3
   34  ln -s /usr/local/teamspeak3/ts3server_startscript.sh /etc/init.d/teamspeak

   58  update-rc.d teamspeak defaults
   59  service teamspeak start






-------------------

When moving NFO locations, you need to change the IP address
see this guide
http://www.simpleprecision.com/how-to-set-a-static-ip-to-ubuntu-14-04-server/

Edit “/etc/network/interfaces”  with the new IP address, reboot, that should do it.

http://www.nfoservers.com/forums/viewtopic.php?f=68&t=5418



-----------------
To apply security updates, see this link
https://wiki.ubuntu.com/Security/Upgrades

apt-get update
apt-get dist-upgrade

« Last Edit: September 24, 2016, 08:14:26 AM by Led »
Don't believe everything you read on the internet

Anyder

  • SWBFSpy Manager
  • Community Ambassador
  • Lavish Poster
  • ****
  • Posts: 3715
  • Awards DET1-admin To recognize Modders that make a most excellent contribution within the Month SWBF LeaderBoards 2-first ICW4 Winner A member of the winning team of ICW6 Recognizes someone who most generously donated funds to the site or the site Special Award for players of the EA's SWBF (2015)
    • View Profile
    • Awards
  • Steam ID:
  • Origin ID: AnyderMotionless
Re: Linux/Wine server setup instructions
« Reply #1 on: March 20, 2015, 11:42:03 AM »
Here is a video tutorial
https://www.youtube.com/watch?v=4Q7XXT_gbVE

is it me the only one with some kind of weird annoying sounds at the background ?
EDIT: Ok nvm, it's just the first 3 mins...

Thanks for the vid  :cheers:
« Last Edit: March 20, 2015, 11:50:59 AM by Anyder »
| SWBFSpy Manager | Community Ambassador | communityambassador@swbfgamers.com

 | WhatsApp: +34 602 67 61 20

SWBFSpy Info Website: http://info.swbfspy.com

Led

  • Administrator
  • The Chosen One
  • *****
  • Posts: 6454
  • The 82nd Element
  • Awards Special Award for players of the EA's SWBF (2015) Special Award for those that play the original SWBF
    • View Profile
    • Awards
  • Steam ID:
  • Tunngle ID: _PLA-Led
  • Origin ID: plaled
Re: Linux/Wine server setup instructions
« Reply #2 on: March 20, 2015, 01:09:29 PM »
is it me the only one with some kind of weird annoying sounds at the background ?
EDIT: Ok nvm, it's just the first 3 mins...

Thanks for the vid  :cheers:

Yeah, sorry, some static for a while, but hopefully it is not too bad  ;)
Don't believe everything you read on the internet

Anyder

  • SWBFSpy Manager
  • Community Ambassador
  • Lavish Poster
  • ****
  • Posts: 3715
  • Awards DET1-admin To recognize Modders that make a most excellent contribution within the Month SWBF LeaderBoards 2-first ICW4 Winner A member of the winning team of ICW6 Recognizes someone who most generously donated funds to the site or the site Special Award for players of the EA's SWBF (2015)
    • View Profile
    • Awards
  • Steam ID:
  • Origin ID: AnyderMotionless
Re: Linux/Wine server setup instructions
« Reply #3 on: March 21, 2015, 05:07:21 AM »
Yeah, sorry, some static for a while, but hopefully it is not too bad  ;)

I forgot to ask, how much CPU Usage and physical memory is being used atm (with those 2 swbf1 servers and the ts)
| SWBFSpy Manager | Community Ambassador | communityambassador@swbfgamers.com

 | WhatsApp: +34 602 67 61 20

SWBFSpy Info Website: http://info.swbfspy.com

Led

  • Administrator
  • The Chosen One
  • *****
  • Posts: 6454
  • The 82nd Element
  • Awards Special Award for players of the EA's SWBF (2015) Special Award for those that play the original SWBF
    • View Profile
    • Awards
  • Steam ID:
  • Tunngle ID: _PLA-Led
  • Origin ID: plaled
Re: Linux/Wine server setup instructions
« Reply #4 on: March 21, 2015, 06:46:50 AM »
two server instances running, not during map change:

Code: [Select]
top - 08:44:37 up 13:30,  2 users,  load average: 0.93, 1.05, 1.04
Tasks: 177 total,   2 running, 175 sleeping,   0 stopped,   0 zombie
%Cpu(s): 29.9 us, 20.9 sy,  0.0 ni, 48.8 id,  0.0 wa,  0.0 hi,  0.0 si,  0.3 st
KiB Mem:   1012216 total,   904540 used,   107676 free,    47328 buffers
KiB Swap:        0 total,        0 used,        0 free.   368968 cached Mem

  PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND
 2064 swbf      20   0 2660352  99480   9136 S 24.6  9.8 200:51.69
 2059 swbf      20   0 2660416  98944   8980 S 24.3  9.8 198:18.06
 1082 root      20   0   63516  13668   1788 S  1.3  1.4  10:39.09 ts3server_l+
 1405 root      20   0  202268  24844   5948 S  0.3  2.5   2:21.72 Xorg
    1 root      20   0   33764   3084   1444 S  0.0  0.3   0:01.36 init
    2 root      20   0       0      0      0 S  0.0  0.0   0:00.00 kthreadd
    3 root      20   0       0      0      0 S  0.0  0.0   0:00.07 ksoftirqd/0
    5 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 kworker/0:0H
    7 root      20   0       0      0      0 S  0.0  0.0   0:00.58 rcu_sched
    8 root      20   0       0      0      0 R  0.0  0.0   0:01.66 rcuos/0
    9 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuos/1
   10 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuos/2
   11 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuos/3
   12 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuos/4
   13 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuos/5
   14 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuos/6
   15 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuos/7


during map change (cpu core saturated)
Code: [Select]
top - 08:52:44 up 13:38,  2 users,  load average: 0.74, 0.99, 1.03
Tasks: 177 total,   4 running, 173 sleeping,   0 stopped,   0 zombie
%Cpu(s): 52.8 us, 46.8 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.3 st
KiB Mem:   1012216 total,   910896 used,   101320 free,    47336 buffers
KiB Swap:        0 total,        0 used,        0 free.   376324 cached Mem

  PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND
 2059 swbf      20   0 2660416  98944   8980 R 42.9  9.8 200:20.55
 2012 swbf      -4   0   33192   8996   1144 S 28.6  0.9   8:06.63 wineserver
 2064 swbf      20   0 2660352  99480   9136 R 26.9  9.8 202:50.97
 1082 root      20   0   63516  13668   1788 S  1.3  1.4  10:45.44 ts3server_l+
 9711 root      20   0   24948   1680   1176 R  0.7  0.2   0:00.69 top
    7 root      20   0       0      0      0 S  0.3  0.0   0:00.59 rcu_sched
    1 root      20   0   33764   3084   1444 S  0.0  0.3   0:01.36 init
    2 root      20   0       0      0      0 S  0.0  0.0   0:00.00 kthreadd
    3 root      20   0       0      0      0 S  0.0  0.0   0:00.07 ksoftirqd/0
    5 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 kworker/0:0H
    8 root      20   0       0      0      0 R  0.0  0.0   0:01.67 rcuos/0
    9 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuos/1
   10 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuos/2
   11 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuos/3
   12 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuos/4
   13 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuos/5
   14 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuos/6

one server, during map change
Code: [Select]
top - 08:58:21 up 13:43,  2 users,  load average: 1.00, 1.00, 1.03
Tasks: 167 total,   4 running, 163 sleeping,   0 stopped,   0 zombie
%Cpu(s): 50.8 us, 48.5 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.7 st
KiB Mem:   1012216 total,   827756 used,   184460 free,    47624 buffers
KiB Swap:        0 total,        0 used,        0 free.   419324 cached Mem

  PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND
 9750 swbf      20   0 2660472  98920   9028 R 59.5  9.8   0:24.98
 2012 swbf      -4   0   33192   8996   1144 S 38.9  0.9   8:32.15 wineserver
 1082 root      20   0   63516  13668   1788 S  1.0  1.4  10:49.63 ts3server_l+
    1 root      20   0   33764   3084   1444 S  0.0  0.3   0:01.36 init
    2 root      20   0       0      0      0 S  0.0  0.0   0:00.00 kthreadd
    3 root      20   0       0      0      0 S  0.0  0.0   0:00.07 ksoftirqd/0
    5 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 kworker/0:0H
    7 root      20   0       0      0      0 S  0.0  0.0   0:00.59 rcu_sched
    8 root      20   0       0      0      0 R  0.0  0.0   0:01.69 rcuos/0
    9 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuos/1
   10 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuos/2
   11 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuos/3
   12 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuos/4
   13 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuos/5
   14 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuos/6
   15 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuos/7
   16 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuos/8

« Last Edit: March 21, 2015, 06:59:06 AM by Led »
Don't believe everything you read on the internet

Anyder

  • SWBFSpy Manager
  • Community Ambassador
  • Lavish Poster
  • ****
  • Posts: 3715
  • Awards DET1-admin To recognize Modders that make a most excellent contribution within the Month SWBF LeaderBoards 2-first ICW4 Winner A member of the winning team of ICW6 Recognizes someone who most generously donated funds to the site or the site Special Award for players of the EA's SWBF (2015)
    • View Profile
    • Awards
  • Steam ID:
  • Origin ID: AnyderMotionless
Re: Linux/Wine server setup instructions
« Reply #5 on: March 21, 2015, 06:57:16 AM »
does that mean it will spike?
| SWBFSpy Manager | Community Ambassador | communityambassador@swbfgamers.com

 | WhatsApp: +34 602 67 61 20

SWBFSpy Info Website: http://info.swbfspy.com

Led

  • Administrator
  • The Chosen One
  • *****
  • Posts: 6454
  • The 82nd Element
  • Awards Special Award for players of the EA's SWBF (2015) Special Award for those that play the original SWBF
    • View Profile
    • Awards
  • Steam ID:
  • Tunngle ID: _PLA-Led
  • Origin ID: plaled
Re: Linux/Wine server setup instructions
« Reply #6 on: March 21, 2015, 07:01:03 AM »
does that mean it will spike?

yes, CPU spikes during map changes.  I am restricted to one CPU core.  It may not bottleneck if you have access to more that one core.
Don't believe everything you read on the internet

Anyder

  • SWBFSpy Manager
  • Community Ambassador
  • Lavish Poster
  • ****
  • Posts: 3715
  • Awards DET1-admin To recognize Modders that make a most excellent contribution within the Month SWBF LeaderBoards 2-first ICW4 Winner A member of the winning team of ICW6 Recognizes someone who most generously donated funds to the site or the site Special Award for players of the EA's SWBF (2015)
    • View Profile
    • Awards
  • Steam ID:
  • Origin ID: AnyderMotionless
Re: Linux/Wine server setup instructions
« Reply #7 on: March 21, 2015, 07:05:07 AM »
yes, CPU spikes during map changes.  I am restricted to one CPU core.  It may not bottleneck if you have access to more that one core.
What about lag, do players ingame notice anything if they play in server A and server B is changing map ?
| SWBFSpy Manager | Community Ambassador | communityambassador@swbfgamers.com

 | WhatsApp: +34 602 67 61 20

SWBFSpy Info Website: http://info.swbfspy.com

Led

  • Administrator
  • The Chosen One
  • *****
  • Posts: 6454
  • The 82nd Element
  • Awards Special Award for players of the EA's SWBF (2015) Special Award for those that play the original SWBF
    • View Profile
    • Awards
  • Steam ID:
  • Tunngle ID: _PLA-Led
  • Origin ID: plaled
Re: Linux/Wine server setup instructions
« Reply #8 on: March 21, 2015, 07:14:20 AM »
What about lag, do players ingame notice anything if they play in server A and server B is changing map ?

We have not had many players to be able to test this out.  However, I was in server A when server B was changing and experienced no lag. 

But I was the only player on the server.

If you want to get on xfire, we can test it out.
« Last Edit: March 21, 2015, 07:16:01 AM by Led »
Don't believe everything you read on the internet

Anyder

  • SWBFSpy Manager
  • Community Ambassador
  • Lavish Poster
  • ****
  • Posts: 3715
  • Awards DET1-admin To recognize Modders that make a most excellent contribution within the Month SWBF LeaderBoards 2-first ICW4 Winner A member of the winning team of ICW6 Recognizes someone who most generously donated funds to the site or the site Special Award for players of the EA's SWBF (2015)
    • View Profile
    • Awards
  • Steam ID:
  • Origin ID: AnyderMotionless
Re: Linux/Wine server setup instructions
« Reply #9 on: March 22, 2015, 05:53:13 AM »
We have not had many players to be able to test this out.  However, I was in server A when server B was changing and experienced no lag. 

But I was the only player on the server.

If you want to get on xfire, we can test it out.
Just so that people know, yesterday Led and i tested some stuff:

1) When u host 2 swbf1 servers on wine, cpu usage might spike, but there are no lags.
2) (swbf2) For some reason if u use the eu server patch and eu client u'll lose connection to the server, but if u have the usa client u wont (this is really funny)
| SWBFSpy Manager | Community Ambassador | communityambassador@swbfgamers.com

 | WhatsApp: +34 602 67 61 20

SWBFSpy Info Website: http://info.swbfspy.com