MOSSi is an automated installer for the MOSS server software for the game Uru. It requires a fresh installation of Ubuntu 10.04.3 (other systems might work; not tested; must be Debian-based... for now). A proper guide will be written shortly. For now, simply follow the directives below.
Planned updates: multi-Linux compatability, init script for startup, more flexible installation system, improved configurability, other management scripts (user account manager, configuration editor).
Requirements
Here are a few standard requirements:
* Computer or server connected to the Internet,
* Basic Linux and computer skills.
This installer does NOT configure a Cyan content-serving server. Neither does it create a client that can connect to the installed server.
1. Install Ubuntu 10.04 LTS
So far, MOSSi has only been tested with Ubuntu 10.04 LTS (current version: 10.04.3). Visit the Ubuntu website and download the server version.
Install it on the computer you wish to set up MOSS. A fresh installation is recommended. Make sure your computer is connected to the Internet (in Ubuntu 10.04 LTS, wired connections should be detected and configured automatically).
2. Download MOSSi
After starting your operating system, type the following command in your terminal:
Code: Select all
cd ~
wget http://www.lyros.net/uru/moss_i.sh
chmod 700 ~/moss_i.sh
3. Install MOSS
Here we go. Type:
Code: Select all
~/moss_i.sh
4. Done
All done. MOSS is installed and running under ~/moss. Enjoy!
Note: to start MOSS if you reboot your computer, enter the following commands :
Code: Select all
cd ~/moss
bin/moss_backend
bin/moss
Source code for MOSSi is available here. Version: 0.0.1, code-named please-Yahvo-make-it-work.
Code: Select all
#!/bin/bash
##################################################################
# MOSS installer #
# Author: Lyrositor #
# Version: 0.0.1 #
# Description: Automated MOSS installation script for deployment #
# on Ubuntu 10.04 LTS machines. Not tested on other systems. #
##################################################################
# Introduction.
echo "MOSSi - MOSS installer"
echo "By Lyrositor."
echo ""
sudo -p "Enter your password:" echo ""
# Installing programs.
echo "Installing programs..."
sudo apt-get -yqq install libssl-dev postgresql postgresql-server-dev-8.4 libpqxx-dev g++ autoconf automake libtool mercurial unzip > /dev/null 2>&1
# Cloning of repository.
echo "Cloning repository..."
cd ~
hg -q clone https://foundry.openuru.org/hg/MOSS
# Configuring and installing.
echo "Configuring..."
cd MOSS
./bootstrap.sh > /dev/null 2>&1
./configure --enable-fast-download --prefix ~/moss > /dev/null 2>&1
echo "Installing..."
make -s > /dev/null 2>&1
make -s install > /dev/null 2>&1
cd ~
# Setting up database.
echo "Setting up database..."
cd ~/MOSS/postgresql
make -s > /dev/null 2>&1
sudo make -s install > /dev/null 2>&1
sudo service postgresql-8.4 restart > /dev/null 2>&1
sudo -u postgres createuser -lsdr $USER > /dev/null 2>&1
read -s -p "Enter database user's password (thrice): " db_password # TODO: automate process; password should only be entered once.
echo -en "\n"
createuser -lSDRP moss
createdb -E UTF-8 -O moss moss > /dev/null 2>&1
psql moss -f moss.sql > /dev/null 2>&1
cd ~
# Creating directories.
echo "Creating directories..."
mkdir ~/moss/auth
mkdir ~/moss/auth/default
mkdir ~/moss/etc
mkdir ~/moss/file
mkdir ~/moss/game
mkdir ~/moss/game/age
mkdir ~/moss/game/SDL
mkdir ~/moss/game/SDL/common
mkdir ~/moss/log
# Populating directories.
echo "Populating directories..."
cd ~/moss/file
wget -q http://www.lyros.net/uru/Files.zip
unzip -qq Files.zip
rm Files.zip
cd ~
wget -q http://assets.openuru.org/cyan/AuthFiles.zip
unzip -qq AuthFiles.zip
cp -r AuthFiles/893/* moss/auth/default
rm AuthFiles.zip
rm -r AuthFiles
echo "Python\python.pak" > ~/moss/auth/default/Python.txt
echo -e "SDL/ahnonaycathedral.sdl
SDL/ahnonay.sdl
SDL/animation.sdl
SDL/avatar.sdl
SDL/ayoheek.sdl
SDL/BaronCityOffice.sdl
SDL/city.sdl
SDL/Cleft.sdl
SDL/cloneMessage.sdl
SDL/clothing.sdl
SDL/Dereno.sdl
SDL/Descent.sdl
SDL/EderDelin.sdl
SDL/EderTsogal.sdl
SDL/ErcanaCitySilo.sdl
SDL/Ercana.sdl
SDL/Garden.sdl
SDL/Garrison.sdl
SDL/Gira.sdl
SDL/GreatTreePub.sdl
SDL/GreatZero.sdl
SDL/grsnTrnCtrDoors.sdl
SDL/Jalak.sdl
SDL/Kadish.sdl
SDL/Kveer.sdl
SDL/Minkata.sdl
SDL/morph.sdl
SDL/Myst.sdl
SDL/Negilahn.sdl
SDL/Neighborhood02.sdl
SDL/Neighborhood.sdl
SDL/Nexus.sdl
SDL/particle.sdl
SDL/Payiferen.sdl
SDL/PelletBahroCave.sdl
SDL/Personal.sdl
SDL/PhilRelto.sdl
SDL/physical.sdl
SDL/responder.sdl
SDL/RestorationGuild.sdl
SDL/sound.sdl
SDL/SpyRoom.sdl
SDL/Teledahn.sdl
SDL/Tetsonot.sdl
SDL/tldnPwrTwrPeriscope.sdl
SDL/tldnVaporScope.sdl
SDL/tldnWRCCBrain.sdl
SDL/x2wayLever.sdl
SDL/xButtonLeverSwitchPowered.sdl
SDL/xChatChannel.sdl
SDL/xConcentration.sdl
SDL/xHighLevelStarTrekDoor.sdl
SDL/xPassiveIndicatorLight.sdl
SDL/xPowerLightSwitch.sdl
SDL/xPowerStarTrekDoor.sdl
SDL/xregion.sdl
SDL/xStateToggler.sdl
SDL/xTelescope.sdl" > ~/moss/auth/default/SDL.txt
perl ~/MOSS/support/make-mbam.pl ~/moss/auth/default/Python.txt
perl ~/MOSS/support/make-mbam.pl ~/moss/auth/default/SDL.txt
wget -q http://assets.openuru.org/cyan/Scripts.zip
unzip -qq ~/Scripts.zip
cp -r ~/Scripts/SDL ~/moss/game
cp ~/Scripts/dat/*.age ~/moss/game/age
cp ~/moss/game/SDL/*.sdl ~/moss/game/SDL/common
rm ~/moss/game/SDL/*.sdl
rm ~/Scripts.zip
rm -r ~/Scripts
# Generating keys.
echo "Generating keys..."
~/moss/bin/make_cyan_dh -g 41 -s ~/moss/etc/auth_key.der -C pnNbAuthKey.hpp
~/moss/bin/make_cyan_dh -g 73 -s ~/moss/etc/game_key.der -C pnNbGameKey.hpp
~/moss/bin/make_cyan_dh -g 4 -s ~/moss/etc/gatekeeper_key.der -C pnNbGatekeeperKey.hpp
chmod 400 ~/moss/etc/*
# Setting up configuration files.
echo "Setting up configuration files..."
cp ~/MOSS/main.cfg ~/moss/etc/moss.cfg
cp ~/MOSS/backend.cfg ~/moss/etc/moss_backend.cfg
read -p "Enter server external address: " external_address
moss_i=$(cat ~/moss/etc/moss.cfg)
moss_backend_i=$(cat ~/moss/etc/moss_backend.cfg)
moss_f="$moss_i
external_address = $external_address"
moss_backend_f="$moss_backend_i
db_password = $db_password"
echo "$moss_f" > ~/moss/etc/moss.cfg
echo "$moss_backend_f" > ~/moss/etc/moss_backend.cfg
# Adding admin account.
echo "Adding admin account..."
read -s -p "Enter admin password: " password
password=$(echo -n $password | openssl dgst -sha1)
psql moss -c "INSERT INTO accounts (name, hash, id, class, visitor) VALUES ('admin', '$password', uuid(), 'default', 'false');" > /dev/null 2>&1
# Write licenses.
echo "Python code: http://assets.openuru.org/cyan/Scripts.zip" > ~/moss/licenses.txt
# Starting MOSS.
echo "Starting MOSS..."
cd ~/moss
bin/moss_backend
bin/moss
# Tidying up.
echo "Tidying up..."
~/moss/bin/global_sdl_manager ~/moss/game/SDL < ~/MOSS/support/set_to_moul.txt > /dev/null 2>&1
rm -r ~/MOSS
# Done.
echo "Installation complete."