Setting Up the Money Server
Complete Step-by-Step Guide
The Money Server is like your OpenSim economy manager.
It handles virtual cash so users can send money, buy virtual goods, and generally pretend they’re running a shadow banking system.
Our job is to install, configure, and connect this server to OpenSim.
Preparation
- Download OpenSim:
OpenSim is the platform that runs your virtual world.
Clone the OpenSim repository to get the latest version of the code:
git clone git://opensimulator.org/git/opensim opensim
- Download the Money Server:
The Money Server will handle virtual currency.
Fetch its source code:
svn co http://www.nsl.tuis.ac.jp/svn/opensim/opensim.currency/trunk opensim.currency
Ensure Version Compatibility:
Visit the NSL Money Server to download the correct version for your OpenSim release.
Match versions to avoid compatibility issues.
Compiling the Code
- Navigate to the OpenSim folder:
After downloading OpenSim, you need to go into the folder where it was downloaded to start building it.
cd opensim
- Run the pre-build script:
This step prepares the source code for building. It handles dependencies and initial setup.
./runprebuild.sh && xbuild
- Build the Money Server:
Now, move to the Money Server folder and build it as well.
cd opensim.currency
./build.sh
cd ../bin
Configuring the Money Servere
- Edit MoneyServer.ini:
This file contains important settings, like the server address and database connection.
You need to open this file in an editor to modify it.
vi MoneyServer.ini
- Server URL:
This tells the Money Server where to listen for requests.
If it's on the same machine,localhost
is fine. You can also use the server’s IP address.
http://localhost:8008/money
- Database Connection:
The Money Server needs a database to store transaction data.
This section connects it to a MySQL database. Replace"yourpassword"
with your actual password for MySQL.
[MySql]
Host = "127.0.0.1"
Database = "MoneyDB"
User = "root"
Password = "yourpassword" - Banker UUID:
This unique identifier represents the virtual banker who manages money transactions.
You’ll replace the zeros with your actual banker’s UUID.
Banker = "00000000-0000-0000-0000-000000000000"
Set Up the Database
- Log into MySQL:
This allows you to interact with your database.
mysql -u root -p
- Create the database:
The Money Server requires a database where it can store all the financial data.
CREATE DATABASE MoneyDB;
- Import the schema:
This command imports the necessary structure (tables, columns) for the Money Server’s database.
mysql -u root -p MoneyDB < schema.sql
Connect OpenSim to the Money Server
- Edit OpenSim.ini:
You need to tell OpenSim to connect to the Money Server by adding the following configuration inOpenSim.ini
:
[Economy]
CurrencyServer = "http://localhost:8008/money"
EconomyModule = DTLNSLMoneyModule
Start the Server
- Start the Money Server:
You can now start the Money Server using this command.
./MoneyServer.exe # Linux
MoneyServer.exe # Windows - Start OpenSim:
Once the Money Server is running, start OpenSim normally.
Test the Setup
- Check Logs
If there are issues, you can check the logs (likeMoneyServer.log
) to understand what went wrong. - Test Transactions:
Try performing transactions within OpenSim to ensure the Money Server is functioning correctly. You can check if virtual money can be sent, received, and stored.
Fix Issues
- database connection errors (check your password) or
- firewall blocks (open port 8008).