Kissdx on FreeNAS

From KiSS DP 558 STAGE2 WiKi
Revision as of 09:31, 3 February 2012 by Lars (talk | contribs) (Created page with "Back The kissdx daemon can be used on FreeNAS to further extend the functionality of FreeNAS. However, I have not been able (nor have I tried) to embed the ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Back

The kissdx daemon can be used on FreeNAS to further extend the functionality of FreeNAS. However, I have not been able (nor have I tried) to embed the kissdx functionality in the webfront end. Therefor, I have created this little how-to to help with running kissdx on FreeNAS

First, the assumptions:

  The FreeNAS version used is (at least) 0.686b2 
  The FreeNAS system has direct access to the internet 
  You have root access to the FreeNAS system's command line 

Phase 1

Now here are the steps to take to get your FreeNAS system to run kissdx:

  1. Access the FreeNAS system's command line as root 
  2. Run the following command: fetch http://www.godfried.com/kissdx/FreeNAS.kissdx.tar.gz 
  3. cd to one of your mount in /mnt (It is savest to store the kissdx extension on a mount so that it will not get lost upon reboot) 

Steps 4 and 5 are optional but can help to keep your filesystem nice and tidy

  4. Create a subdirectory in which you can store the extension (i.e.: mkdir myextensions) 
  5. cd to the newly created subdirectory 
  6. Run the following command: tar -xzvf /root/FreeNAS.kissdx.tar.gz 

This completes phase 1. The kissdx daemon is now on your FreeNAS system and is ready for configuration.

Phase 2

Now, to configure FreeNAS to run your kissdx automatically at boot time follow these steps: First the kissdx daemon needs to be configurd

  1. Fire up a webbrowser and access your FreeNAS system 
  2. Navigate to Advanced: Edit File 
  3. Open the file: /mnt/[your mount]/myextensions/kissdx/etc/kissdx.conf 
     Replace [your mount] with the mount in which you installed kissdx (see Phase 1, step 3) 
     Replace myextensions with the directory you created in Phase 1, step 4 or if you skipped step 4 and 5 you have to ommit this directory 
  4. Addjust the kissdx.conf file to your requirements 

Next, configure FreeNAS to run the kissdx daemon at startup

  5. Navigate to System: Advanced: Command Scripts 
  6. Click on the + to add a new command script 
  7. Enter the following in the command text box: /mnt/[your mount]/myextensions/start.kissdx /mnt/[your mount]/myextensions/kissdx 
     Replace [your mount] with the mount in which you installed kissdx (see Phase 1, step 3) 
     Replace myextensions with the directory you created in Phase 1, step 4 or if you skipped step 4 and 5 you have to ommit this directory 
  8. As the Type, select PostInit 

Finally, start the kissdx daemon

  9. Navigate to Advanced: Command (the screen header is Advanced: Execute command) 
  10. Type in the same as you typed in step 7 and click on Execute 

That's it. your FreeNAS is now running the kissdx daemon!

How to stop the kissdx daemon:

  1. Type in the following command: ps ax | grep "[k]issdx" 
     This will result in a line that looks like this:  3716  ??  S      0:00.07 /usr/local/bin/kissdx --config=/usr/local/etc/kissdx.conf --daemon 
     Note down the number at the beginning of the line, in the example this is 3716. 
  2. Type in the following command: kill [3716] 
     Replace [3716] with the number found in step 1. 

A quicker, but less secure, way to kill the deamon is to use the following command:

  kill `ps ax | grep "[k]issdx"`

This combines steps 1 and 2 but is much less secure because you don't know in advance what you will be killing and should only be used by experienced Unix/Linux/BSD users/operators.

Now the kissdx daemon is no longer running. To start the daemon again, go to Phase 2 step 9.