PtokaX wiki

Hub (server) for Direct Connect

User Tools

Site Tools


guides:unix_basic_setup

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
guides:unix_basic_setup [04/07/2015 20:42]
ppk
guides:unix_basic_setup [16/08/2015 08:22]
ppk PtokaX cmd line menu instead of manual xml editing...
Line 1: Line 1:
 ====== Basic setup ====== ====== Basic setup ======
-Before we run our compiled PtokaX executable we need to do at least minimal setup.\\ +Before we run our compiled PtokaX executable we need to do at least basic configuration.\\ 
-In source we have config examples, we use them to setup your PtokaX hub.\\ +In source is in directory cfg.example file Settings.pxt with PtokaX settings. You can edit this file with text editor.\\ \\ 
-\\ +Another way is PtokaX inbuild command line menu where is possible to do basic setupcomplete setup and to add registered user.\\ 
-First we rename cfg.example directory to cfg with this command: **mv cfg.example cfg**\\ +This menu can be used for first time setup and to reconfigure PtokaXAdd reg user part can be used to add additional registered users.\\ 
-Go to cfg dir with this command: **cd cfg** +You can run PtokaX menu with command: **./PtokaX -m** 
-==== a. Minimal settings ==== +==== aBasic setup ===
-Open Setting.xml in text editor with this command (i'm using **Vi** because is available on most Unixes preinstalled): **vi Settings.xml**\\ +In menu option **1** will ask only few required things needed to run PtokaXMax users, hub name, hub address, encoding for non-unicode characters.\\ 
-  * **a. Basic settings needed to run PtokaX is Hub Name and Hub Address** +In case when PtokaX is compiled with database support then database options will be asked too
-    * **To change hub name:**\\ Search for this line **<String Name="HubName">&lt;Enter hub name here&gt;</String><!-- Hub name. Min length 1, max 256. -->** and change **&lt;Enter hub name here&gt;** to name of new hub.\\ Result can look like this: **<String Name="HubName">My first PtokaX hub</String><!-- Hub name. Min length 1max 256. -->** +==== bComplete setup ==== 
-    * **To change hub address:**\\ Search for this line **<String Name="HubAddress">&lt;Enter hub address here&gt;</String><!-- Hub address. Min length 1, max 256. -->** and change **&lt;Enter hub address here&gt;** to address of new hub.\\ Result can look like this: **<String Name="HubAddress">some-address.some-domain.eu</String><!-- Hub address. Min length 1, max 256. -->** +In menu option **2** will ask for all PtokaX settings
-  * **b. Character encoding (required for database support)**\\ To run with database we need to have set correct character encoding. 1252 is western, 1250 is central european, 1251 is cyrillic etc. More code pages can be found on [[https://en.wikipedia.org/wiki/Windows_code_page|Wikipedia]].\\ Search for this line **<String Name="Encoding">cp1252</String>** and change **cp1252** to your encoding.\\ Result can look like this: **<String Name="Encoding">cp1250</String>** +==== c. Creating registered user. ==== 
-  * **c. To run with PostgreSQL we need to have working PostgreSQL with created database and user with password for PtokaX. Guide can be found on internet. We need to set up PtokaX to use those settings.** +In menu option **3** can be used to to add one or more registered usersUser NickPassword and Profile will be asked. It will give hint about available profiles.
-    * **When non-standard host is used:**\\ Search for this line **<String Name="PostgresHost">localhost</String>** and change **localhost** to your host.\\ Result can look like this: **<String Name="PostgresHost">127.0.0.1</String>** +
-    * **When non-standard port is used:**\\ Search for this line **<String Name="PostgresPort">5432</String>** and change **5432** to your host.\\ Result can look like this: **<String Name="PostgresPort">12345</String>** +
-    * **To set database name:**\\ Search for this line **<String Name="PostgresDBName">ptokax</String>** and change **ptokax** to your database name.\\ Result can look like this: **<String Name="PostgresDBName">my_ptokax</String>** +
-    * **To set database user:**\\ Search for this line **<String Name="PostgresUser">ptokax</String>** and change **ptokax** to your database user.\\ Result can look like this: **<String Name="PostgresUser">my_ptokax_user</String>** +
-    * **To set database password:**\\ Search for this line **<String Name="PostgresPass"></String>** and insert your database password.\\ Result can look like this: **<String Name="PostgresPass">my_ptokax_db_password</String>** +
-  * **d. To run with MySQL or MariaDB we need to have working MySQL or MariaDB with created database and user with password for PtokaX. Guide can be found on internetWe need to set up PtokaX to use those settings.** +
-    * **When non-standard host is used:**\\ Search for this line **<String Name="MySQLHost">localhost</String>** and change **localhost** to your host.\\ Result can look like this: **<String Name="MySQLHost">127.0.0.1</String>** +
-    * **When non-standard port is used:**\\ Search for this line **<String Name="MySQLPort">3306</String>** and change **3306** to your host.\\ Result can look like this: **<String Name="MySQLPort">12345</String>** +
-    * **To set database name:**\\ Search for this line **<String Name="MySQLDBName">ptokax</String>** and change **ptokax** to your database name.\\ Result can look like this: **<String Name="MySQLDBName">my_ptokax</String>** +
-    * **To set database user:**\\ Search for this line **<String Name="MySQLUser">ptokax</String>** and change **ptokax** to your database user.\\ Result can look like this: **<String Name="MySQLUser">my_ptokax_user</String>** +
-    * **To set database password:**\\ Search for this line **<String Name="MySQLPass"></String>** and insert your database password.\\ Result can look like this: **<String Name="MySQLPass">my_ptokax_db_password</String>** +
-==== b. Creating registered user. (Optional) ==== +
-When we are here, it is good idea to create registered user with master account for yourself.\\ Open RegisteredUsers.xml in text editor with this command (i'm using **Vi** because is available on most Unixes preinstalled): **vi RegisteredUsers.xml**\\ +
-  * **To set nick:**\\ Search for this line **<Nick>Example_Nick</Nick>** and change **Example_Nick** to your nick.\\ Result can look like this: **<Nick>MyNick</Nick>** +
-  * **To set password:**\\ Search for this line **<Password>Example_Password</Password>** and change **Example_Password** to your password.\\ Result can look like this: **<Password>MyPassword</Password>** +
-  * **To set profile:**\\ Search for this line **<Profile>3</Profile><!-- 0 for master, 1 for operator, 2 for vip, 3 for reg -->** and change **3** to your profile.\\ Result can look like this: **<Profile>0</Profile><!-- 0 for master, 1 for operator, 2 for vip, 3 for reg -->**+
guides/unix_basic_setup.txt · Last modified: 16/08/2015 08:22 by ppk