Can you define your own service?

Status
Not open for further replies.

n3mmr

Explorer
Joined
Jan 7, 2015
Messages
82
Or how else would you go about installing a Java based (java only and strictly so) database system, used for cataloguing Music, Books, Videos and such?
And have it start up ( and restart ) automatically?

I'm thinking about adding Data Crow's backend to my FreeNAS, and would like to see it start on boot, and restart if it should die. Like a service, yeah.
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
ANY software you want to install should go in a JAIL. PERIOD. do not mess with the FreeNAS appliance OS itself
 

n3mmr

Explorer
Joined
Jan 7, 2015
Messages
82
Fine. Jail, then. Seems right. How do I set it up to start at FreeNAS boot???

I AM a newbie in FreeBSD/FreeNAS.
In Solaris or Illumos I would write an SMF service description, which is sort of semiautomatic..
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Create a jail. The jail will, by default, start whenever you boot your server. Then, in that jail, follow whatever instructions you can find to install data crow in FreeBSD. If you can't find any such instructions, you'll need to do some googling and tinkering, but your key point will be that things inside the jail work nearly identically to an independent FreeBSD installation. You'll need a startup script in /usr/local/etc/rc.d, and you'll need a couple of entries in /etc/rc.conf.
 

n3mmr

Explorer
Joined
Jan 7, 2015
Messages
82
Thanks, danb35.

I did just that, I thought, and tried to install java, for starters.

That failed with patches being rejected and so on.

I did

cd /usr/ports/java/openjdk7
make install clean
and got a lot of "previously applied patch ignored"

and then "File to patch:"

with no hint of what to do....
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Is a precompiled package available for that? Building using ports, especially for something like Java, where Oracle has made it very difficult to obtain the necessary files, can be a frustrating train wreck.

Otherwise, I don't know what's installed into a jail by default but it can be effectively a full install of FreeBSD's userland, and if that's what is in your jail, take a look around on Google to see whether other users running FreeBSD 9.3 are having your same trouble and what they did to solve it, because that'll probably be the answer.

Package is easier though, except I'm not seeing one offhand....
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
...and it doesn't help that the data crow documentation is pretty much nonexistent as far as I can tell. As @jgreco said, though, I'd use binary packages where possible. In your jail, try this:
Code:
# pkg upgrade
# pkg install openjdk

...and then proceed with whatever procedure you think will work for data crow.
 
Status
Not open for further replies.
Top