Difference between revisions of "Eathena Debian Openvz Compile"

From MS Computech
Jump to: navigation, search
(New page: How to Compile Eathena On Openvz Container<br> <pre>#apt-get install build-essential zlib1g-dev mysql-server libmysqlclient15-dev php5 apache2 phpmyadmin php5-mysql </pre> Cd to your eathe...)
 
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
How to Compile Eathena On Openvz Container<br>
+
How to Compile Eathena mscompute
<pre>#apt-get install build-essential zlib1g-dev mysql-server libmysqlclient15-dev php5 apache2 phpmyadmin php5-mysql
+
<br>
</pre>
+
 
 +
Edit source apt-get
 +
<pre>#nano /etc/apt/source.list
 +
#apt-get update</pre><pre>deb http://packages.dotdeb.org stable all
 +
deb-src http://packages.dotdeb.org stable all</pre><pre>#apt-get install build-essential zlib1g-dev mysql-server libmysqlclient15-dev php5 apache2 phpmyadmin php5-mysql php5-gd </pre>
 
Cd to your eathena folder and extract em all<br>
 
Cd to your eathena folder and extract em all<br>
 
<pre>#./configure --with-MYSQL_LIBS=/usr/lib/libmysqlclient.so
 
<pre>#./configure --with-MYSQL_LIBS=/usr/lib/libmysqlclient.so
 
</pre><pre>#make sql
 
</pre><pre>#make sql
 
</pre>
 
</pre>
Make Luncher : Credit EA Bord User Jabber<br>
+
<br>Finish Compile
<pre>#nano Ealuncher
 
</pre><pre>#!/bin/bash
 
# eAthena generic server starter v1.0, by Kant
 
#
 
# author contact info:
 
# e-mail / jabber: [email protected]
 
# msn messenger: [email protected]
 
#
 
# note: the original filename of this script is "srv"
 
# Usage:
 
# /.srv A B
 
# A is the server you want to start (login, char or map)
 
# B is the type (sql or txt). if none given, txt will be chosen.(see comments
 
# below for details on this)
 
 
 
# Which server to start?
 
case $1 in
 
login )    srv=$1;;
 
char )    srv=$1;;
 
map )    srv=$1;;
 
* )    echo wrong server
 
    exit;;
 
esac
 
 
 
# SQL or TXT?
 
# this check is done because the eA makefile spits the "_sql" at the end of
 
# binaries when it compiles for sql usage.
 
case $2 in
 
sql )    type="_sql";;
 
txt )    type="";;
 
* )    type="";;
 
esac
 
 
 
# Check if selected server exists. If not, exit with message
 
test -e ${srv}-server${type}
 
case $? in
 
1 )    echo server does not exist!
 
    exit;;
 
esac
 
 
 
# Check if selected is executable. If not, exit with message
 
test -x ${srv}-server${type}
 
case $? in
 
1 )    echo server is not executable!
 
    exit;;
 
esac
 
 
 
 
 
# Test a control file. 1 means the server starts, 0 means the server doesnt
 
# start. if there is no file, the scripts ignore the check.
 
test -e start.txt
 
case $? in
 
0 )    case $(cat start.txt) in
 
    0 )    echo server deactivated, look in start.txt
 
        exit;;
 
    esac;;
 
esac
 
 
 
# server restart loop
 
while true
 
do
 
 
 
# Notify server start
 
echo \[`date +"%Y-%m-%d--%H:%M:%S"`\] starting ${1}-server... | tee -a logs/${1}-server.txt
 
# start server acording to parameters
 
./${srv}-server${type}
 
exit=$?
 
 
 
# depending on exit code, stop the loop or restart
 
case $exit in
 
# there is something wring in the configuration, do not restart
 
1 )    echo \[`date +"%Y-%m-%d--%H:%M:%S"`\] ${1}-server config is wrong | tee -a logs/${1}-server.txt
 
    exit;;
 
# the server was killed by the user, restart
 
0 )    echo \[`date +"%Y-%m-%d--%H:%M:%S"`\] ${1}-server killed by user | tee -a logs/${1}-server.txt
 
    sleep 5;;
 
# there was a crash because of a bug, restart
 
# exit code 127 means server crash
 
*)    echo \[`date +"%Y-%m-%d--%H:%M:%S"`\] !!! ${1}-server down,  exit code is $exit | tee -a logs/${1}-server.txt
 
    sleep 5;;
 
esac
 
 
 
done
 
 
 
</pre><pre>#chmod +x Ealuncher
 
</pre>
 
 
 
 
 
Finish Compile
 

Latest revision as of 20:08, 31 March 2010

How to Compile Eathena mscompute

Edit source apt-get

#nano /etc/apt/source.list
#apt-get update
deb http://packages.dotdeb.org stable all
deb-src http://packages.dotdeb.org stable all
#apt-get install build-essential zlib1g-dev mysql-server libmysqlclient15-dev php5 apache2 phpmyadmin php5-mysql php5-gd 

Cd to your eathena folder and extract em all

#./configure --with-MYSQL_LIBS=/usr/lib/libmysqlclient.so
#make sql


Finish Compile