For PtokaX compile you need make (tool controlling executable generation from sources), g++ (c++ compiler), zlib (compression library used to save hub badwith), tinyxml (library used to read and write xml files) and Lua (programming language used for scripting).
For database support you need database development files for database that will be used.
They can be installed using package manager (Note: to install packages using package manager you need root permissions).
a. Make, g++, zlib, tinyxml
Install them with command: apt-get install make g++ zlib1g-dev libtinyxml-dev
b. Lua
When you want Lua 5.3 then install it with command: apt-get install liblua5.3-dev
When you want Lua 5.2 then install it with command: apt-get install liblua5.2-dev
When you want Lua 5.1 then install it with command: apt-get install liblua5.1-dev
c. Database support (optional)
When you want PostgreSQL then install development files with command: apt-get install libpq-dev
When you want MySQL then install development files with command: apt-get install libmysqlclient-dev
When you want MariaDB then install development files with command: apt-get install libmariadb-client-lgpl-dev-compat
When you want SQLite then install development files with command: apt-get install libsqlite3-dev
Important note: SQLite on Debian is compiled without ICU support. Because of that case-insensitive string comparing is working only for simple a-z and A-Z characters. When you want correct behavior, then recompile SQLite library with ICU support.
2. Downloading source and compile.
a. PtokaX source
Download it with command: wget http://www.PtokaX.org/files/0.5.2.2-nix-src.tgz
Unpack downloaded archive with command: tar -xf 0.5.2.2-nix-src.tgz
Now we have in actual directory new directory PtokaX. Go to that directory with command: cd PtokaX
b. PtokaX compile
PtokaX without database support
When you have Lua 5.3 then compile PtokaX with command: make
When you have Lua 5.2 then compile PtokaX with command: make lua52
When you have Lua 5.1 then compile PtokaX with command: make lua51
PtokaX with PostgreSQL database support
When you have Lua 5.3 then compile PtokaX with command: make -f makefile-postgres
When you have Lua 5.2 then compile PtokaX with command: make -f makefile-postgres lua52
When you have Lua 5.1 then compile PtokaX with command: make -f makefile-postgres lua51
PtokaX with MySQL or MariaDB database support
When you have Lua 5.3 then compile PtokaX with command: make -f makefile-mysql
When you have Lua 5.2 then compile PtokaX with command: make -f makefile-mysql lua52
When you have Lua 5.1 then compile PtokaX with command: make -f makefile-mysql lua51
PtokaX with SQLite database support
When you have Lua 5.3 then compile PtokaX with command: make -f makefile-sqlite
When you have Lua 5.2 then compile PtokaX with command: make -f makefile-sqlite lua52
When you have Lua 5.1 then compile PtokaX with command: make -f makefile-sqlite lua51
PtokaX
Moderator: frogmaker
Re: PtokaX
./PtokaX - w jego adresie wyzwala proces/ -m -opcje
Re: PtokaX
! lua5.1 --> lua 5.3 doesn't work
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 Debian GNU/Linux 5.0 and Ubuntu GNU/Linux 9.04. 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. First thing needed for PtokaX compile is source, you will download it with this command:
Code: [Select]
wget http://www.PtokaX.org/files/0.4.1.1-posix-src.tgz
Result should looks similar to this:
To decompress source use this command:
Code: [Select]
tar -xf 0.4.1.1-posix-src.tgz
2. Next thing needed for PtokaX compile is tinyxml, for that you need to go to PtokaX source tinyxml directory.
Use these to commands to change working directory:
Code: [Select]
cd PtokaX
cd tinyxml
Result looks like this:
Download tinyxml source with this command:
Code: [Select]
wget http://downloads.sourceforge.net/projec ... 5_3.tar.gz
Result should looks similar to this:
To decompress tinyxml source use this command:
Code: [Select]
tar -xf tinyxml_2_5_3.tar.gz
Because my makefile want tinyxml source in src subdir (now is empty) and tinyxml was unpacked to tinyxml remove that src directory with this command:
Code: [Select]
rmdir src
And rename tinyxml directory to src with this command:
Code: [Select]
mv tinyxml src
3. Before we can start tinyxml compile we need make and g++ packages.
We can install them using apt-get. In case when you are not root you need to get root permissions to install new packages with apt-get.
I'm used for that this command:
Code: [Select]
su
Another way is to use sudo command, but that was not installed in my case.
To install make package use this command:
Code: [Select]
apt-get install make
Result can looks similar to this:
To install g++ package use this command:
Code: [Select]
apt-get install g++
Result can looks similar to this:
4. Now we can compile tinyxml, use this command:
Code: [Select]
make
Result should looks similar to this:
5. Now when tinyxml is compiled we can prepare things for PtokaX compile.
First change directory from tinyxml sub dir to PtokaX root, use this command:
Code: [Select]
cd ..
Again we use apt-get to get packages needed for compile.
Install zlib with this command:
Code: [Select]
apt-get install zlib1g-dev
Result can looks similar to this:
Install Lua 5.1 with this command:
Code: [Select]
apt-get install liblua5.1-dev
Result can looks similar to this:
6. Now we can start PtokaX compile.
Use this command:
Code: [Select]
make
Result should looks similar to this and this (images not posted here because they are f*cking big ;D)
7. If everything was ok you now have PtokaX executable. Before you run it you should do atleast basic 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:
Code: [Select]
mv cfg.example cfg
Go to cfg dir with this command:
Code: [Select]
cd cfg
To be able to run PtokaX we need to set atleast hubname and hub address.
Open Setting.xml in text editor with this command:
Code: [Select]
vim Settings.xml
Use cursor keys on keyboard to move in that file. To start editing press Insert key on keyboard.
Search for this line:
Code: [Select]
<String Name="HubName"><Enter hub name here></String><!-- Hub name. Min length 1, max 256. -->
And change this:
Code: [Select]
<Enter hub name here>
To your hubname. For example like that:
Code: [Select]
<String Name="HubName">PtokaX test</String><!-- Hub name. Min length 1, max 256. -->
Search for this line:
Code: [Select]
<String Name="HubAddress"><Enter hub address here></String><!-- Hub address. Min length 1, max 256. -->
And change this:
Code: [Select]
<Enter hub address here>
To your hub address. For example like that:
Code: [Select]
<String Name="HubAddress">192.168.0.19</String><!-- Hub address. Min length 1, max 256. -->
To end editing press Esc key on keyboard.
To save file use this:
Code: [Select]
:w
And to quit editor use this:
Code: [Select]
:q
8. This part is not needed, but is good to create registered user for yourself.
Open RegisteredUsers.xml in text editor with this command:
Code: [Select]
vim RegisteredUsers.xml
And edit it similar as Settings.xml...
Search for this line:
Code: [Select]
<Nick>Example_Nick</Nick>
And change this:
Code: [Select]
Example_Nick
To your nick name. For example like that:
Code: [Select]
<Nick>PPK</Nick>
Search for this line:
Code: [Select]
<Password>Example_Password</Password>
And change this:
Code: [Select]
Example_Password
To your password. For example like that:
Code: [Select]
<Password>test</Password>
Search for this line:
Code: [Select]
<Profile>3</Profile><!-- 0 for master, 1 for operator, 2 for vip, 3 for reg -->
And change this:
Code: [Select]
3
To your profile. For example like that:
Code: [Select]
<Password><Profile>0</Profile><!-- 0 for master, 1 for operator, 2 for vip, 3 for reg --></Password>
End editing, save file and quit editor like before with Settings.
9. Now you can run PtokaX.
Change from cfg directory to PtokaX root with this command:
Code: [Select]
cd ..
And run PtokaX with this command:
Code: [Select]
./PtokaX
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 Debian GNU/Linux 5.0 and Ubuntu GNU/Linux 9.04. 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. First thing needed for PtokaX compile is source, you will download it with this command:
Code: [Select]
wget http://www.PtokaX.org/files/0.4.1.1-posix-src.tgz
Result should looks similar to this:
To decompress source use this command:
Code: [Select]
tar -xf 0.4.1.1-posix-src.tgz
2. Next thing needed for PtokaX compile is tinyxml, for that you need to go to PtokaX source tinyxml directory.
Use these to commands to change working directory:
Code: [Select]
cd PtokaX
cd tinyxml
Result looks like this:
Download tinyxml source with this command:
Code: [Select]
wget http://downloads.sourceforge.net/projec ... 5_3.tar.gz
Result should looks similar to this:
To decompress tinyxml source use this command:
Code: [Select]
tar -xf tinyxml_2_5_3.tar.gz
Because my makefile want tinyxml source in src subdir (now is empty) and tinyxml was unpacked to tinyxml remove that src directory with this command:
Code: [Select]
rmdir src
And rename tinyxml directory to src with this command:
Code: [Select]
mv tinyxml src
3. Before we can start tinyxml compile we need make and g++ packages.
We can install them using apt-get. In case when you are not root you need to get root permissions to install new packages with apt-get.
I'm used for that this command:
Code: [Select]
su
Another way is to use sudo command, but that was not installed in my case.
To install make package use this command:
Code: [Select]
apt-get install make
Result can looks similar to this:
To install g++ package use this command:
Code: [Select]
apt-get install g++
Result can looks similar to this:
4. Now we can compile tinyxml, use this command:
Code: [Select]
make
Result should looks similar to this:
5. Now when tinyxml is compiled we can prepare things for PtokaX compile.
First change directory from tinyxml sub dir to PtokaX root, use this command:
Code: [Select]
cd ..
Again we use apt-get to get packages needed for compile.
Install zlib with this command:
Code: [Select]
apt-get install zlib1g-dev
Result can looks similar to this:
Install Lua 5.1 with this command:
Code: [Select]
apt-get install liblua5.1-dev
Result can looks similar to this:
6. Now we can start PtokaX compile.
Use this command:
Code: [Select]
make
Result should looks similar to this and this (images not posted here because they are f*cking big ;D)
7. If everything was ok you now have PtokaX executable. Before you run it you should do atleast basic 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:
Code: [Select]
mv cfg.example cfg
Go to cfg dir with this command:
Code: [Select]
cd cfg
To be able to run PtokaX we need to set atleast hubname and hub address.
Open Setting.xml in text editor with this command:
Code: [Select]
vim Settings.xml
Use cursor keys on keyboard to move in that file. To start editing press Insert key on keyboard.
Search for this line:
Code: [Select]
<String Name="HubName"><Enter hub name here></String><!-- Hub name. Min length 1, max 256. -->
And change this:
Code: [Select]
<Enter hub name here>
To your hubname. For example like that:
Code: [Select]
<String Name="HubName">PtokaX test</String><!-- Hub name. Min length 1, max 256. -->
Search for this line:
Code: [Select]
<String Name="HubAddress"><Enter hub address here></String><!-- Hub address. Min length 1, max 256. -->
And change this:
Code: [Select]
<Enter hub address here>
To your hub address. For example like that:
Code: [Select]
<String Name="HubAddress">192.168.0.19</String><!-- Hub address. Min length 1, max 256. -->
To end editing press Esc key on keyboard.
To save file use this:
Code: [Select]
:w
And to quit editor use this:
Code: [Select]
:q
8. This part is not needed, but is good to create registered user for yourself.
Open RegisteredUsers.xml in text editor with this command:
Code: [Select]
vim RegisteredUsers.xml
And edit it similar as Settings.xml...
Search for this line:
Code: [Select]
<Nick>Example_Nick</Nick>
And change this:
Code: [Select]
Example_Nick
To your nick name. For example like that:
Code: [Select]
<Nick>PPK</Nick>
Search for this line:
Code: [Select]
<Password>Example_Password</Password>
And change this:
Code: [Select]
Example_Password
To your password. For example like that:
Code: [Select]
<Password>test</Password>
Search for this line:
Code: [Select]
<Profile>3</Profile><!-- 0 for master, 1 for operator, 2 for vip, 3 for reg -->
And change this:
Code: [Select]
3
To your profile. For example like that:
Code: [Select]
<Password><Profile>0</Profile><!-- 0 for master, 1 for operator, 2 for vip, 3 for reg --></Password>
End editing, save file and quit editor like before with Settings.
9. Now you can run PtokaX.
Change from cfg directory to PtokaX root with this command:
Code: [Select]
cd ..
And run PtokaX with this command:
Code: [Select]
./PtokaX
