Admin center:Installing on OSX

From OCS Inventory NG
Jump to: navigation, search

Before Deployment

Our organization used the following steps to deploy the OCS Agent on MAC

  1. Download and build the UNIX Agent. This will require the "make" command and XCode from the Apple Developer Kit. It's on the rescue disk for your version of OSX under "Optional Components", and copy it to a network share. For the sake of simplicity, copy it to a folder named OSC.
  2. Write a shell script with the following commands, taking care to change the server name in line 5 to your own OCS inventory server. Save it in the same directory as the OSC folder, but not within it:
 cd ./OCS/Ocsinventory-Agent-1.1.2/tools/macosx/
 sh ./scripts/
 sh ./
 sh ./scripts/
 sh ./ -s

Be sure to run chmod +x osc on your script to make it executable. Basically, this script does the following: change directory to osx-specific code within the Unix agent, use CPAN to install all (or most) required dependencies, build the OCSNG client using Xcode, wrap it into an OSX server, and start it with organization specific settings.

Deploying Via Terminal

  1. Log in to an account with administrator rights.
  2. Mount your network share.
  3. Using a Terminal, navigate to /Volumes/path/to/folder/containing/osc_folder
  4. Type sudo sh ./osc (or whatever you named it). Enter admin password for currently logged in user (you must have a password set to use sudo in OSX)
  5. A LOT of text will appear, including many error messages. Just ignore them all – when the script is finished, you’ll be able to type in the terminal again.
  6. To verify that agent is working
    1. From the terminal, type tail –f /var/log/ocsng.log
    2. You should see a bunch of lines containing the text “Running Ocsinventory::Agent::Backend::OS::MacOS”, along with a bunch of XML.
    3. If you see something along the lines of “cannot contact hostname”, the agent was not installed properly and it will not ever connect without intervention
  7. To uninstall the agent, open a Terminal and navigate to /Volumes/irt/scripts/osx/OCS/Ocsinventory-Agent-1.1.2/tools/macosx/scripts/
    1. Type sudo sh ./ to remove the agent and uninstall the program. It must still be removed through the web interface.