diff --git a/doc/install_on_centos6.txt b/doc/install_on_centos6.txt deleted file mode 100644 index 305ba9c7..00000000 --- a/doc/install_on_centos6.txt +++ /dev/null @@ -1,60 +0,0 @@ -With the main server inaccessibility recently I was asked by a number of people on how I compiled and hosted the cockatrice server at woogerworks.com. -In response to these questions, I have written a quick and dirty guide with exact commands to get a basic cockatrice server, the oracle tool, and cockatrice client compiled on CentOS. -These instructions can also be accessed at WoogerWorks incase this site goes offline for any reason. -I hope to improve upon the formatting of these steps when I have time, but for now this should help. -Installation script can be downloaded at: http://www.woogerworks.com/cockatrice/installatrice - -BEFORE CONTINUING, PLEASE UNDERSTAND THESE ARE THE VERY MOST BASIC STEPS. -THIS WILL NOT CONFIGURE SECURITY SETTINGS (YOU ARE RESPONSIBLE FOR YOUR OWN SECURITY)! -THIS WILL NOT CONNECT THE SERVER TO A DB! -USE AT YOUR OWN RISK. - -I RECOMMEND RUNNING THE COMMANDS AS ROOT (NOT REQUIRED) -YOU MUST HAVE INTERNET ACCESS - --- open a command shell -yum -y groupinstall "development tools" -(64bit OS) rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm -(32bit OS) rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm -iptables -F -yum -y install qt-mysql qt-devel qt-mobility-devel protobuf-devel protobuf-compiler cmake28 libgcrypt-devel -cd ~ -(github source) git clone https://github.com/Daenyth/Cockatrice -(woogerworks stable) wget http://www.woogerworks.com/files/Cockatrice_20130214.zip -(woogerworks stable) unzip Cockatrice_20130214.zip -(woogerworks unstable) wget http://www.woogerworks.com/files/Cockatrice_20130227.zip -(woogerworks unstable) unzip Cockatrice_20130227.zip -cd Cockatrice -mkdir build -cd build -cmake28 -DWITH_SERVER=1 .. -make -sudo make install -sed -e "s/number_pools=1/number_pools=0/" ../servatrice/servatrice.ini.example > ~/servatrice.ini - --- install the database server (optional) -sudo yum -y install mysql-server mysql php-mysql -sudo service mysqld start -sudo chkconfig mysqld on -mysqladmin -u root password 'password' -mysql -u root -ppassword -e "create database servatrice;" -mysql -u root -ppassword -e "create user 'servatrice'@'localhost' identified by 'password';" -mysql -u root -ppassword -e "grant all privileges on servatrice.* to 'servatrice'@'localhost';" -mysql -u servatrice -ppassword servatrice < ../servatrice/servatrice.sql -mysql -u servatrice -ppassword -e "insert into servatrice.cockatrice_users (admin,name,password_sha512,active) values (1,'servatrice','jbB4kSWDmjaVzMNdU13n73SpdBCJTCJ/JYm5ZBZvfxlzbISbXir+e/aSvMz86KzOoaBfidxO0s6GVd8t00qC0TNPl+udHfECaF7MsA==',1);" -sed -i.bak -e "s/password=foobar/password=password/" -e "s/type=none/type=mysql/" -e "s/method=none/method=sql/" ~/servatrice.ini - --- start the servatrice server -cd ~ -/usr/local/bin/servatrice & - - -You should be able to log in as a regular user using any account name. -You can login using the username "servatrice" and the password "password" as the first moderator - - -Things to consider doing: -learn linux! -update the servatrice.ini line that says "max_users_per_address=4" to something alittle higher (maybe max_users_per_address=8) -set your root password to something stong (sounds like a good idea) -if you expect to be running a server only, change your default runlevel to 3 diff --git a/doc/usermanual/Usermanual.pdf b/doc/usermanual/Usermanual.pdf index 76a0f03f..3bf5f89d 100644 Binary files a/doc/usermanual/Usermanual.pdf and b/doc/usermanual/Usermanual.pdf differ diff --git a/doc/usermanual/Usermanual.tex b/doc/usermanual/Usermanual.tex index ee7e38ee..337aea1a 100644 --- a/doc/usermanual/Usermanual.tex +++ b/doc/usermanual/Usermanual.tex @@ -288,6 +288,7 @@ The compilation works like already written above, but instead of invoking \shell \item If you want to build the server, use:\\ \shellcmd{cmake -DWITH\_SERVER=1 ..} \item If you want to build the server, but not the client, use:\\ \shellcmd{cmake -DWITH\_SERVER=1 -DWITHOUT\_CLIENT=1 ..} \end{itemize} +There is more information on compiling and running Servatrice on CentOS 6 in chapter \ref{servatrice} on page \pageref{servatrice}. \section{Downloading Card Database Using the Oracle} If you are installing Cockatrice for the first time, changing what sets are in your database or even adding the newest set to your database, this tutorial will show you how to do it properly. @@ -712,6 +713,121 @@ For example: [url]cockatrice.de[/url] \end{verbatim} + +\chapter{Servatrice on CentOS 6} +\label{servatrice} +This Howto from woogerworks.com will help you to run your own Cockatrice server (called Servatrice). +An installation script can be downloaded at: \url{http://www.woogerworks.com/cockatrice/installatrice} + +BEFORE CONTINUING, PLEASE UNDERSTAND THESE ARE THE VERY MOST BASIC STEPS. +THIS WILL NOT CONFIGURE SECURITY SETTINGS (YOU ARE RESPONSIBLE FOR YOUR OWN SECURITY)! +THIS WILL NOT CONNECT THE SERVER TO A DATABASE! +USE AT YOUR OWN RISK. + +\begin{enumerate} + \item Open a command shell and install the prerequisites +\begin{enumerate} + \item \shellcmd{yum -y groupinstall "development tools"} + \item \shellcmd{rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86\_64/epel-release-6-8.noarch.rpm} + \item \shellcmd{yum -y install qt-mysql qt-devel qt-mobility-devel protobuf-devel protobuf-compiler cmake28 libgcrypt-devel} + \item \shellcmd{cd} +\end{enumerate} + + \item Download the source code: +\begin{enumerate} + \item \shellcmd{git clone https://github.com/Daenyth/Cockatrice} + \item \shellcmd{cd Cockatrice} + \item \shellcmd{mkdir build} + \item \shellcmd{cd build} + \item \shellcmd{cmake28 -DWITH\_SERVER=1 ..} + \item \shellcmd{make} + \item \shellcmd{sudo make install} +\end{enumerate} + + \item Create a servatrice.ini file. There is an example file you can convert: +\shellcmd{sed -e "s/number\_pools=1/number\_pools=0/" ../servatrice/servatrice.ini.example > \textasciitilde/servatrice.ini} +Here is one example file: +\begin{framed} +\begin{verbatim} +[server] +port=4747 +statusupdate=15000 +logfile=server.log +name="My own Cockatrice server" +id=1 +number_pools=0 + +[servernetwork] +active=0 +port=14747 +ssl_cert=ssl_cert.pem +ssl_key=ssl_key.pem + +[authentication] +method=none + +[database] +type=none +prefix=cockatrice +hostname=localhost +database=servatrice +user=MYUSERNAMEHERE +password=MYSECUREPASSWORDHERE + +[rooms] +method=config +roomlist\size=1 +roomlist\1\name="FIRST ROOM NAME" +roomlist\1\description="FIRST ROOM DESCRIPTION" +roomlist\1\autojoin=true +roomlist\1\joinmessage="THIS IS A JOIN MESSAGE" +roomlist\1\game_types\size=11 +roomlist\1\game_types\1\name="Vintage (T1)" +roomlist\1\game_types\2\name="Legacy (T1.5)" +roomlist\1\game_types\3\name="Extended (T1.X)" +roomlist\1\game_types\4\name="Modern" +roomlist\1\game_types\5\name="Standard (T2)" +roomlist\1\game_types\6\name="Block Constructed" +roomlist\1\game_types\7\name="EDH/Commander" +roomlist\1\game_types\8\name="Highlander" +roomlist\1\game_types\9\name="2HG" +roomlist\1\game_types\10\name="Draft/Sealed" +roomlist\1\game_types\11\name="Other" + +[game] +max_game_inactivity_time=120 +max_player_inactivity_time=15 + +[security] +max_users_per_address=8 +message_counting_interval=10 +max_message_size_per_interval=1000 +max_message_count_per_interval=10 +max_games_per_user=5 +\end{verbatim} +\end{framed} + + \item Install the database server (optional) +\begin{enumerate} + \item \shellcmd{sudo yum -y install mysql-server mysql php-mysql} + \item \shellcmd{sudo service mysqld start} + \item \shellcmd{sudo chkconfig mysqld on} + \item \shellcmd{mysqladmin -u root password 'password'} + \item \shellcmd{mysql -u root -ppassword -e "create database servatrice;"} + \item \shellcmd{mysql -u root -ppassword -e "create user 'servatrice'@'localhost' identified by 'password';"} + \item \shellcmd{mysql -u root -ppassword -e "grant all privileges on servatrice.* to 'servatrice'@'localhost';"} + \item \shellcmd{mysql -u servatrice -ppassword servatrice < ../servatrice/servatrice.sql} + \item \shellcmd{mysql -u servatrice -ppassword -e "insert into servatrice.cockatrice\_users \textbackslash\\ (admin,name,password\_sha512,active) values (1,'servatrice','MYSHA512PASSWORD',1);"} + \item \shellcmd{sed -i.bak -e "s/password=foobar/password=password/" -e "s/type=none/type=mysql/" \textbackslash\\ -e "s/method=none/method=sql/" ~/servatrice.ini} +\end{enumerate} + + \item Start Servatrice for testing: \shellcmd{/usr/local/bin/servatrice}. I recommend to run it later within a \shellcmd{screen} session or write an init-script. +\end{enumerate} +You should be able to log in as a regular user using any account name. +You can login using the username \textit{servatrice} and the password \textit{password} as the first moderator. + +If everything succeeded, you should tweak the servatrice.ini and set your root password to something strong if not already done (at least 8 characters, upper case, lower case, numbers, special characters). + %\listoffigures %\listoftables %\printindex