-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
563 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
Linux scripts for Rust | ||
|
||
Rust homepage: http://playrust.com | ||
http://playrust.com/dedicated-server/ | ||
|
||
By the date 2015-12-25 there is no native Linux dedicated server for Rust. | ||
It is possible to install the dedicated with some effort, but one of the | ||
libraries as unsolvable dependencies to GLX-functions. It seems this is | ||
a packaging/build problem of the Rust developers. | ||
The most (community) recommended way for a Linux dedicated Server is running | ||
wine as emulation. At least wine 1.7 is required. | ||
|
||
I'm using Archlinux, because it uses the latest possible wine version. | ||
The following scripts should help you to create a linux dedicated server | ||
including systemd start/stop stuff. | ||
I also included inside the startscript a few comments about command line | ||
parameters. | ||
|
||
To Install wine, you need to enable the "multilib" repository for pacman, | ||
see: | ||
|
||
https://wiki.archlinux.org/index.php/Multilib | ||
|
||
Some informations about wine: | ||
https://wiki.archlinux.org/index.php/Wine | ||
|
||
I installed the following packages for wine: | ||
|
||
wine wine-mono wine_gecko winetricks | ||
|
||
The wine application will run inside a x11 framebuffer version, which | ||
we won't directly access using "xvfb-run", this needs the package: | ||
|
||
extra/xorg-server-xvfb | ||
|
||
A complete list of the installed packages can be found in installed_packages.txt | ||
|
||
I'm running the server under an extra user called "rust", which you need to | ||
create as root user and set a password: | ||
|
||
useradd -m rust | ||
passwd rust | ||
|
||
Login via SSH to your new rust account rust@servername and do the following | ||
steps: | ||
|
||
# git clone https://github.com/MaStr/rust_dedicated_linux.git | ||
|
||
Get the Rust server, this URL may change, check rust homepage link above: | ||
|
||
# wget http://playrust.com/wp-content/uploads/2015/04/Rust_Server.zip | ||
# unzip Rust_Server.zip | ||
|
||
Now prepare the server | ||
|
||
# ~/rust_dedicated_linux/wine_update_rust.sh | ||
|
||
The next step is to create a copy of the instance script with your details | ||
|
||
# cd ~/rust_dedicated_linux/ | ||
# cp wine_rust_instance.sh wine_rust_myserver.sh | ||
|
||
Edit and adjust your server settings: | ||
|
||
# nano wine_rust_myserver.sh | ||
|
||
Test the server instance, the startup may take a while: | ||
|
||
# ./wine_rust_myserver.sh | ||
|
||
To check what is going on, open a second session, change the folder, you | ||
will find a logfile named by your server instace file: | ||
|
||
# cd ~/Server/rustds/ | ||
# tail myserver_output.txt | ||
|
||
Maybe you can't find the server in your client's server list (community servers), | ||
so to connect to your server by hand, open up the console with the "F1" key. | ||
Enter the following line to manually connect to your server: | ||
|
||
client.connect <ip>:<port> | ||
|
||
|
||
---- Prepare for automatic startup | ||
Create a copy of the service file and adjust it with your script name | ||
|
||
# cp rust.service rustmyserver.service | ||
# nano rustmyserver.service | ||
|
||
Switch to user root (su) and that place the file to your service folders: | ||
|
||
# cp rustmyserver.service /etc/systemd/system/ | ||
# systemct daemon-reload | ||
|
||
To start the server run | ||
|
||
# systemctl start rustmyserver.service | ||
|
||
To enable autostart | ||
|
||
# systemctl enable rustmyserver.service | ||
|
||
The service-file will restart the dedicated server if it fails unexpectetly. | ||
|
||
---- RCON tools | ||
I wasn't able to find a command line tool for connecting to the server, so you | ||
need at least a windows tool like "Rusty" for remote administration: | ||
http://oxidemod.org/threads/rusty-server-rcon-administration-tool.543/page-30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
bash | ||
bzip2 | ||
coreutils | ||
cryptsetup | ||
device-mapper | ||
dhcpcd | ||
diffutils | ||
e2fsprogs | ||
file | ||
filesystem | ||
findutils | ||
gawk | ||
gcc-libs | ||
gettext | ||
glibc | ||
grep | ||
gzip | ||
htop | ||
inetutils | ||
iproute2 | ||
iputils | ||
jfsutils | ||
less | ||
lib32-ocl-icd | ||
licenses | ||
linux | ||
logrotate | ||
lvm2 | ||
man-db | ||
man-pages | ||
mdadm | ||
nano | ||
net-tools | ||
netctl | ||
ocl-icd | ||
openssh | ||
pacman | ||
pciutils | ||
pcmciautils | ||
perl | ||
procps-ng | ||
psmisc | ||
pulseaudio | ||
pulseaudio-alsa | ||
reiserfsprogs | ||
s-nail | ||
sed | ||
shadow | ||
sudo | ||
sysfsutils | ||
syslinux | ||
systemd-sysvcompat | ||
tar | ||
texinfo | ||
usbutils | ||
util-linux | ||
vim | ||
wget | ||
which | ||
wine | ||
wine-mono | ||
wine_gecko | ||
winetricks | ||
xf86-video-fbdev | ||
xf86-video-vesa | ||
xfsprogs | ||
xorg-bdftopcf | ||
xorg-iceauth | ||
xorg-luit | ||
xorg-mkfontdir | ||
xorg-mkfontscale | ||
xorg-server | ||
xorg-server-utils | ||
xorg-server-xvfb | ||
xorg-sessreg | ||
xorg-setxkbmap | ||
xorg-smproxy | ||
xorg-x11perf | ||
xorg-xauth | ||
xorg-xbacklight | ||
xorg-xcmsdb | ||
xorg-xcursorgen | ||
xorg-xdpyinfo | ||
xorg-xdriinfo | ||
xorg-xev | ||
xorg-xgamma | ||
xorg-xhost | ||
xorg-xinput | ||
xorg-xkbcomp | ||
xorg-xkbevd | ||
xorg-xkbutils | ||
xorg-xkill | ||
xorg-xlsatoms | ||
xorg-xlsclients | ||
xorg-xmodmap | ||
xorg-xpr | ||
xorg-xprop | ||
xorg-xrandr | ||
xorg-xrdb | ||
xorg-xrefresh | ||
xorg-xset | ||
xorg-xsetroot | ||
xorg-xvinfo | ||
xorg-xwd | ||
xorg-xwininfo | ||
xorg-xwud |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[Unit] | ||
Description=Rust-Server | ||
After=syslog.target network.target | ||
|
||
[Service] | ||
ExecStart=/home/rust/rust_dedicated_linux/wine_rust_myserver.sh | ||
User=rust | ||
Group=rust | ||
Type=simple | ||
Restart=on-failure | ||
RestartSec=42s | ||
|
||
|
||
[Install] | ||
WantedBy=multi-user.target |
Oops, something went wrong.