guides:unix_advanced_setup
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | guides:unix_advanced_setup [06/07/2015 00:02] (current) – created ppk | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Advanced setup ====== | ||
+ | This guide was tested on clean installation of Debian GNU/Linux 8.1. Should be same or very similar on other Linux distributions.\\ | ||
+ | ==== Running on ports 1024 and below without Root ==== | ||
+ | * **a.** Install file capabilites with command: **apt-get install libcap2-bin** | ||
+ | * **b.** You can set capabilities to run on ports 1024 and below manually or use makefile to set them.\\ Set PtokaX capabilities manually with command: **setcap ' | ||
+ | ==== Creating unprivileged user for PtokaX and run PtokaX on system startup ==== | ||
+ | We assume that you installed PtokaX binary with command: **make install** | ||
+ | * **a.** Create new home directory for new user with command: **mkdir / | ||
+ | * **b.** Create new user for PtokaX with command: **adduser --system --group --home / | ||
+ | * **c.** Move PtokaX config files to **/ | ||
+ | * **d.** Set ownership to PtokaX user for that directory and it's content with command: **chown -R ptokax: | ||
+ | * **e.** Copy init script from PtokaX source to / | ||
+ | * **f.** Move to /etc/init.d directory with command: **cd / | ||
+ | * **g.** Now PtokaX should start with system start. If you want, then you can test if PtokaX can start with this script using command: **/ | ||
+ | ==== Multiple PtokaX instances starting with system ==== | ||
+ | This is similar as above. But we need one settings directory and one init script per instance. | ||
+ | So we have **/ | ||
+ | * **a.** Create new subdirectory (for this example i'm using **px1**) with command: **mkdir / | ||
+ | * **b.** Move PtokaX config files to **/ | ||
+ | * **c.** Set ownership to PtokaX user for that directory and it's content with command: **chown -R ptokax: | ||
+ | * **d.** Copy init script from PtokaX source to / | ||
+ | * **e.** Open init script in text editor with this command (i'm using **Vi** because is available on most Unixes preinstalled): | ||
+ | * **f.** Move to /etc/init.d directory with command: **cd / | ||
+ | * **g.** Now PtokaX using **px1** directory and init script should start with system start. If you want, then you can test if PtokaX can start with this script using command: **/ | ||
+ | * **h.** Repeat and use another directory/ |
guides/unix_advanced_setup.txt · Last modified: 06/07/2015 00:02 by ppk