RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[Guide]RunUO SVN & Debian Lenny

unixfreak

Sorceror
[Guide]RunUO SVN & Debian Lenny

What this guide will not cover:
The install of debain itself you can go to HowtoForge - Linux Howtos and Tutorials there are plenty guides over there.


Requirements:
Debian netinstall cd (150mb) get it here Downloading Debian CD/DVD images via HTTP/FTP
20-60mins of your life(if all goes well)

So lets begin
Boot up your server and login with root (to setup basic stuff, then we will work with regular user)
Lets update our system
Code:
apt-get update && apt-get upgrade
Next we going to install sudo

Code:
apt-get install sudo
when installed we are going to add our regular user to sudoers file
I'm going to use nano as texteditor
Code:
nano /etc/sudoers
What you will see is this
Code:
# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#

Defaults        env_reset

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL) ALL
#Add your user here, you have created at install of debian
[COLOR="YellowGreen"]your_user_name    ALL=(ALL) ALL[/COLOR]
# Uncomment to allow members of group sudo to not need a password
# (Note that later entries override this, so you might need to move
# it further down)
# %sudo ALL=NOPASSWD: ALL
We also going to need an ssh server, so we can remotly connect to our server and do stuff...
Code:
apt-get install openssh-server
After install, edit sshd_config , so root can't connect via ssh
Code:
nano /etc/ssh/shhd_config
You will have to edit line saying PermitRootLogin yes to PermitRootLogin no
Code:
# Authentication:
LoginGraceTime 120
PermitRootLogin no
StrictModes yes
Now we have up and running shh server and we can connect to it via other linux "desktop" machine or on windows machine via PuTTY Download Page
Logout from root account with
Code:
exit
Now connect via putty with your username you added to sudoers
Next we are going to install all needed packets for running runuo
First edit sources.list
Code:
sudo nano /etc/apt/sources.list
Add the following line to your sources.list
Code:
deb http://www.backports.org/debian lenny-backports main
so it looks like this
Code:
#
# deb cdrom:[Debian GNU/Linux 5.0.6 _Lenny_ - Official i386 NETINST Binary-1 20100905-11:24]/ lenny main

#deb cdrom:[Debian GNU/Linux 5.0.6 _Lenny_ - Official i386 NETINST Binary-1 20100905-11:24]/ lenny main

deb http://ftp.belnet.be/debian/ lenny main
deb-src http://ftp.belnet.be/debian/ lenny main

deb http://security.debian.org/ lenny/updates main
deb-src http://security.debian.org/ lenny/updates main

deb http://volatile.debian.org/debian-volatile lenny/volatile main
deb-src http://volatile.debian.org/debian-volatile lenny/volatile main
#mono rep
deb http://www.backports.org/debian lenny-backports main
Now update update repo
Code:
sudo apt-get update
Finaly we can install all needed packeges (one line :) )
Code:
sudo apt-get -t lenny-backports install mono-devel libmono-winforms2.0-cil mono-2.0-service subversion
After install we are going to create some dirs
Code:
sudo mkdir /opt/runuo_svn
cd /opt/runuo_svn
get fresh copy of runuo svn
Code:
sudo svn checkout http://svn.runuo.com/repos/runuo/devel
lets export it
Code:
sudo svn export devel/ ../runuo_server/
Code:
cd ../runuo_server/Server
now compile
Code:
sudo gmcs -out:../runuo.exe -d:MONO -optimize+ -unsafe -recurse:*.cs
Code:
cd ..
create zlib config
Code:
nano runuo.exe.config
content of the .config file
Code:
<configuration>
<dllmap dll="libz" target="//usr/lib/libz.so.1.2.3.3" />
</configuration>
create uo dir for ultima files
Code:
sudo mkdir /opt/runuo_server/uo
connect to server via sftp (use FileZilla - The free FTP solution) and upload the whole ultima dir to server
move files from uploaded dir to
Code:
sudo mv /home/duke/Ultima\ Online\ Stygian\ Abyss\ Classic/* /opt/runuo_server/uo/
now we will have to edit DataPath.cs
Code:
sudo nano /opt/runuo_server/Scripts/Misc/DataPath.cs
modd this line
Code:
private static string CustomPath ="/opt/runuo_server/uo”;
lets clean up
Code:
sudo apt-get clean
Moment of truth
Code:
sudo mono runuo.exe
create account login to world to test if all works then you can proceed to next step
shutdown runuo.exe (and kill any mono processes running
Code:
 ps -aux | grep mono
Code:
sudo kill #number
now when you close ur ssh connection it will also close runuoserver so we are going to run it as service
Code:
sudo mono-service2 runuo.exe
Thats all folks.
Hope this guide will help someone, if I will have some more free time I'll make similar guide for CentOS (as I saw someone mentioned it here on forums)
 

shtoink

Sorceror
Hey thanks for taking the time to write this. While not a linux noob, and not a runuo noob, I AM a runuo on linux noob and you have helped me.
 

Pure Insanity

Sorceror
Yes, I'm necroing a pretty old post. But my question is still valid and related.

We just recently purchased a dedicated server for our shard/site. I have experience with Linux, I have used it for many years. Compiled many applications on it. Then I went to drop RunUO on it today and realized that I have never had to compile anything on Linux to use multiple cores...is there an argument that I'm missing in the compile command? Our server is a quad core, and I'd really like to be able to use them...This is also my first time ever needing to use Mono on Linux. As I've never really had much demand for .net programs on Linux in the past before. Was hoping someone could push me in the right direction...
 

Lichtblitz

Sorceror
I don't know if the kind of functionality is completely implemented in Mono but if it is, RunUO automatically detects your CPUs and uses them at runtime. Multiple Threads are almost only used for performing a world save. Apart from that there's one thread that contains the main game loop and one that manages all the timers. This configuration is more than sufficient. RunUO is pretty light weight.
 

Pure Insanity

Sorceror
Yeah, I got it. Thanks for the help. And that's not true, as there are other threads that handle the network connections. Or else it wouldn't be very useful as an online game, as the world would freeze and stuff as the players got on and stuff, to make characters and what-not. At least that's how it appears in the source...

Only real roadblock I ran into was trying to remember the keyword to include assembly references when compiling. For those people that go to this thread in the future, all you do is change your compile command to this.

Code:
gmcs -out:../runuo.exe -d:MONO /reference:System.Drawing.dll,Ultima.dll -optimize+ -unsafe -recurse:*.cs

Note, you still may need to use sudo when you do it.

But the /reference part is needed to compile the newer svn.
 

Lichtblitz

Sorceror
And that's not true, as there are other threads that handle the network connections.
Have you looked it up? You will notice that packet management resides in the same thread as the main game loop. The .NET framework notifies it via callback. There are several bits and pieces where the server uses threads (like generating the compressed data stream for custom houses) but those threads are all generated regardless of the amount of CPUs you got.
 
Top