This is a work in progress, I get it to build and run the game no problem now, still working out a few issues. Main one I know of right now is that any gm/@ command crashes the game server.
I choose to install everything from ports I like to have full control of source and how programs install.
First log in as root
# su
password:"enter your password"
Second update ports
# portsnap fetch
# portsnap extract
I find it easier to install sudo and add my user to visudo
# cd /usr/ports/security/sudo/ && make install clean
default install
# visudo
add this to file
user ALL=(ALL) ALL
I also like to have bash installed
# cd /usr/ports/shells/bash/ && make install clean
# echo /usr/local/bin/bash >> /etc/shells
# chsh -s /usr/local/bin/bash
Install git from ports
# cd /usr/ports/devel/git/ && make install clean
add subversion to default install
Install libzmq4
# cd /usr/ports/net/libzmq4/ && make install clean
Install czmq
# cd /usr/ports/net/czmq/ && make install clean
Install luajit
# cd /usr/ports/lang/luajit/ && make install clean
Install Autotools
# cd /usr/ports/devel/autotools/ && make install clean
default setup
Install gcc5
# cd /usr/ports/lang/gcc5/ && make install clean
default setup
Install GDB
# cd /usr/ports/devel/gdb/ && make install clean
Install MySQL
# cd /usr/ports/databases/mysql56-server/ && make install clean
Setup to autoboot
# echo 'mysql_enable="YES"' >> /etc/rc.conf
Start MySQL
# /usr/local/etc/rc.d/mysql-server start
Adding exports to .bashrc file
# ee /home/yourusername/.bashrc
*Add these lines
export LD_LIBRARY_PATH="/usr/local/lib/gcc5"
export CPPFLAGS='-I /usr/local/include'
export LDFLAGS='-l /usr/local/lib'
Add zmq.hpp file to includes
This file can be found at https://github.com/zeromq/cppzmq/blob/master/zmq.hpp
The raw of the file is at https://raw.githubusercontent.com/zerom ... er/zmq.hpp
# ee /usr/local/include/zmq.hpp
Download Darkstar Source
# git clone http://github.com/DarkstarProject/darkstar.git/
Get into directory
# cd /darkstar
Setting up MySQL
Setting up MySQL passwords/database
# mysql -u root
SET PASSWORD FOR ''@'localhost' = PASSWORD('newpwd-here');
SET PASSWORD FOR ''@'host_name' = PASSWORD('newpwd-here');
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpwd-here');
CREATE USER 'darkstar'@'localhost' IDENTIFIED BY 'password';
CREATE DATABASE dspdb;
USE dspdb;
GRANT ALL PRIVILEGES ON dspdb.* TO 'darkstar'@'localhost';
exit
Populate the database
*! If this is a upgrade this will override all of you server information!!!!
cd /darkstar/sql
Make the below into a script
Code: Select all
#!/usr/local/bin/bash
for f in *.sql
do
echo -n "Importing $f into the database..."
mysql dspdb -u darkstar -ppassword < $f && echo "Success"
done
# chmod 755 ./name_of_script
# ./name_of_script
Set Zone IP
# mysql -u darkstar -ppassword
USE dspdb;
UPDATE zone_settings SET zoneip = '127.0.0.1';
exit
Exit root!
# exit
*Do this till it fully exits root
Compile the Server
# sudo sh autogen.sh
# sudo ./configure --enable-debug=gdb
# sudo make
Configuring Server edit with your database information
# cd /darkstar/conf
# sudo ee login_darkstar.conf
# sudo ee map_darkstar.conf
# sudo ee search_server.conf
Start servers and exit root!
# exit
# cd /darkstar
# ./dsconnect
# ./dsgame
# ./dssearch