PtokaX forum

PtokaX => FAQ section => Topic started by: PPK on 20 September, 2009, 03:20:53

Title: HOW-TO: Compile and setup PtokaX on CentOS GNU/Linux
Post by: PPK on 20 September, 2009, 03:20:53
First important note. It is looks long, it is looks hard, but it is easy and everything can be done in less than 5 minutes ;)

This guide was tested on clean installation of CentOs GNU/Linux 5.3 (x86_64). Everything is done from command line, that means that everything can be done over ssh on remote server.

In my case was only base system installed, that means that after startup and login i was already in command line and working directory was my home directory. If you are not in command line then you need to go here some way (ie if gnome is installed then open terminal).

1. Prerequisites.
For PtokaX compile you need make (tool controling executable generation from sources), g++ (c++ compiler), zlib (compression library used to save hub badwith) and Lua (programming language used for scripting).
They can be installed using package manager. Note: to install packages using package manager you need root permissions.


2. Sources and compile.


3. Basic setup.
Now you should have PtokaX executable, but before we run it we need to make at least minimal setup.
In source we have config examples, we use them to setup your PtokaX hub.
First we rename cfg.example directory to cfg with this command:
Quotemv cfg.example cfg
Go to cfg dir with this command:
Quotecd cfg


Leave cfg directory and go back to PtokaX root with this command:
Quotecd ..

4. Run PtokaX, run!

Title: Re: HOW-TO: Compile and setup PtokaX on CentOS GNU/Linux
Post by: PPK on 10 September, 2011, 18:06:44
Updated version of this guide is in PtokaX Wiki (http://wiki.ptokax.org/doku.php/settingup/compile_and_setting_centos)  8)
Title: Re: HOW-TO: Compile and setup PtokaX on CentOS GNU/Linux
Post by: kleelof on 03 November, 2011, 03:15:52
Hello,

   I found these instructions great. I was able to just copy and paste all the commands and had it up and running the first try.

   I am having 2 issues that I could use some help with:

   1. Where can I find a start/stop script for CentOS?

   2. I am trying to use the Windows version of the admin app to connect to my CentOS install of PtokaX. However, it will connect, but will not stay connected. I checked the FAQ and it mentioned making sure the LUA script is started. Do I need to start this manually or is it automatically started when you start PtokaX? I've never worked with or even heard of LUA until I went to install PX.

take care,
lee
Title: Re: HOW-TO: Compile and setup PtokaX on CentOS GNU/Linux
Post by: PPK on 04 November, 2011, 16:31:48
Quote from: kleelof on 03 November, 2011, 03:15:52
   1. Where can I find a start/stop script for CentOS?
You can start/stop script when you connect to hub as OP/Master with chat commands !startscript scriptfilename / !stopscript scriptfilename  ::)
Or you can edit manually Scripts.xml config file:

<?xml version="1.0" encoding="windows-1252" standalone="yes" ?>
<Scripts>
    <Script>
        <Name>example_script.lua</Name>
        <Enabled>1</Enabled><!-- 1 for enabled, 0 for disabled -->
    </Script>
</Scripts>


Admin app is third-party creation and i'm not using it, so i cant help you with that one  :P
Title: Re: HOW-TO: Compile and setup PtokaX on CentOS GNU/Linux
Post by: kleelof on 04 November, 2011, 23:21:52
Hello,

   Thanks for your response.

   Actually, I meant start the Ptokax on my server. Right now I am using ./Ptokax. But of course that is no good because as soon as I log out the app stops running.

take care,
lee
Title: Re: HOW-TO: Compile and setup PtokaX on CentOS GNU/Linux
Post by: PPK on 04 November, 2011, 23:26:35
Quote from: ReadMe.txtCommand line commands available:
-c <configdir>      - absolute path to PtokaX config directory (where will PtokaX have cfg, logs, scripts and texts directories).
-d         - run as daemon.
-h         - show help.
-v         - show PtokaX version with build date and time.
/generatexmllanguage   - generate english language example file.
Title: Re: HOW-TO: Compile and setup PtokaX on CentOS GNU/Linux
Post by: modswat on 06 March, 2017, 17:23:37
How to start as daemon?

From PtokaX map or in other map for example?
Title: Re: HOW-TO: Compile and setup PtokaX on CentOS GNU/Linux
Post by: PPK on 06 March, 2017, 17:48:57
http://wiki.ptokax.org/doku.php?id=guides:unix_run
http://wiki.ptokax.org/doku.php?id=guides:unix_advanced_setup
Title: Re: HOW-TO: Compile and setup PtokaX on CentOS GNU/Linux
Post by: modswat on 06 March, 2017, 18:58:03
If i start PtokaX in the same map as it is installed with the comand " ./ptokaX -d" its running in daemon. But hub is not starting.
With comand "./PtokaX" hub is starting but if i close terminal hub is ofline??  :punch: