rickschneider17's picture

I was looking and searching, but didnt see if there was an OCS Inventory NG appliance available... Is there one, or something similar?  

Forum: 
John Carver's picture

Just last night a decision was made that our church needs to do a hardware/software inventory.  My first thought was "wonder if there is a Turnkey appliance for this?'.  Apparently not yet.  Would you be interested in helping develop or test one?

Information is free, knowledge is acquired, but wisdom is earned.

rickschneider17's picture

Well... I just tried an install of it on the base LAMP stack, and it installed ok as far as I can tell.  I can login, navigate around the UI...

I have a few .ocs files that I am trying to upload, but I keep getting an HTTP 1.1/500 Internal Server Error.  

 

Not sure what else we need to do to turn into a true appliance... probably allow setting of username/password/dbname on boot... dont know how to do that.

Jeremy Davis's picture

You probably installed it as root I'm guessing so all the files/folders would be owned by root. So the webserver user (www-data) probably doesn't have enough permission to save. The easy solution to that (assuming that is your issue) is to give the webserver ownership of the webroot filesystem:

chown -R www-data:www-data /var/www

As for setting passwords etc. That can be a bit tricky and will involve a little programing (bash and python). If that is something you want to take on then I suggest that you look at some of the turnkey-init scripts (/usr/lib/inithooks/firstboot and /usr/lib/inithooks/bin) and/or patches that others have produced (who have done passwords). You'll also need to find out where (and how) the passwords are stored. IIRC Alon wrote a little about that in a blog post when TKL first stopped using default passwords ( aquick search of the site should find it). Often they are stored as md5 hashes in the database...

Also, unless you are making this as a TKLpatch, then it's probably not worth worrying about...

rickschneider17's picture

I needed to modify one of the ocs .conf files in the apache/conf.d directory to have the proper DB username/password.  They were set the default.  (A quick search on the OCS Forums found the answer for me!)

John Carver's picture

Hey Rick, just wondering how the OCS Inventory was progressing.  I'm starting the process myself and plan to create a TKLpatch to document the process.  A quick survey did not turn up any pre-built Debian packages for NG.  I think those that are in the repo's are first generation.  Did you happen to make any notes about the steps it took to install?  I might be able to save some time, if you'd be willing to share.  TIA

Information is free, knowledge is acquired, but wisdom is earned.

Jeremy Davis's picture

This is the TurnKey Linux forums. We provide a Debian based library of software appliances with pre-installed and pre-configured software. So you won't get any CentOS help here sorry...
rickschneider17's picture

So, I booted a clean TKL LAMP Appliance, and then looked at the instructions on the OCS NG website, to make sure I had all proper required perl packages.  I ran the install as root, the needed to change a few directories to be group www-data with write permission (the OCS installer told me which ones it couldnt write to, I dont recall offhand).

And then the http1.1/500 error I was getting was due to needing to modify the z-ocsinventory-server.conf file (/etc/apache2/conf.d) to have the proper database name, user and password.  

So far, its working as best as I can tell.  I had one Windows agent deployed and it shows up in the respository.  And I have maunally imported a few .ocs files, and they also show up.  

I have not yet tried to deploy the nix agent to my appliance.

Add new comment