Admin center:Installing on OSX
Our organization used the following steps to deploy the OCS Agent on MAC
- 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.
- 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/create-darwin-perl-lib_fromCPAN.pl sh ./BUILDME.sh sh ./scripts/create_install_wrapper.sh sh ./install_wrapper.sh -s your.own.server.edu
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
- Log in to an account with administrator rights.
- Mount your network share.
- Using a Terminal, navigate to /Volumes/path/to/folder/containing/osc_folder
- 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)
- 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.
- To verify that agent is working
- From the terminal, type tail –f /var/log/ocsng.log
- You should see a bunch of lines containing the text “Running Ocsinventory::Agent::Backend::OS::MacOS”, along with a bunch of XML.
- 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
- To uninstall the agent, open a Terminal and navigate to /Volumes/irt/scripts/osx/OCS/Ocsinventory-Agent-1.1.2/tools/macosx/scripts/
- Type sudo sh ./uninstaller.sh to remove the agent and uninstall the program. It must still be removed through the web interface.