Solaris
Wazuh provides an automated way of building a solaris 10 and 11, keep in mind that to build these packages you must use the corresponding system.
To create an Solaris package follow these steps:
Requirements
Git
Download our wazuh-packages repository from GitHub and go to the solaris
directory of the 4.0 branch.
$ git clone https://github.com/wazuh/wazuh-packages && cd wazuh-packages/solaris && git checkout 4.0
Choose the version of solaris you want to build the package for and go to that directory.
Execute the generate_wazuh_packages.sh
script to build the package. Here you can see all the different parameters:
# ./generate_wazuh_packages.sh -h
Usage: ./generate_wazuh_packages.sh [OPTIONS]
-b, --branch <branch> [Required] Select Git branch or tag.
-e, --environment Install all the packages necessaries to build the pkg package.
-s, --store <pkg_directory> Directory to store the resulting pkg package. By default, an output folder will be created.
-p, --install-path <pkg_home> Installation path for the package. By default: /var.
-c, --checksum Compute the SHA512 checksum of the pkg package.
-h, --help Shows this help.
Below, you will find an example of how to build a Solaris package.
First install the needed dependencies:
# ./generate_wazuh_packages.sh -e
Download and build the sources:
# ./generate_wazuh_packages.sh -b v4.0.4
To build a SPARC package you just need to run the same script in a SPARC system.
We also provide an automated way of building packages for i386 Solaris systems using vagrant, to use this download our wazuh-packages repository from GitHub, change to 4.0 branch and go to the solaris/package_generation
directory.
Requirements
Virtual Box
Vagrant
Bring the machine up vagrant [OPTION] ... up solaris10/solaris11/both
:
# vagrant -h up
-- CUSTOM USE OF VAGRANT FOR THIS MACHINE --
vagrant [OPTION] ... up X
To bring up a Solaris machine, X must be solaris10 or solaris11 or both.
vagrant [OPTION] ... ssh/provision/delete
Example:
vagrant --branch-tag=v4.0.4 --ram=1024 --cpus=4 up solaris10 solaris11
-h, --help:
Show help
--branch-tag x, -b x:
Generate package for branch/tag x
--ram x
Select the amount of ram assigned to the new machine.
--cpus x
Select the number of CPUs assigned to the new machine.
-- DEFAULT USE OF VAGRANT (FOR ALL MACHINES) --
Usage: vagrant [options] <command> [<args>]
-v, --version Print the version and exit.
-h, --help Print this help.
Below, you will find some examples of how to build a Solaris package using this tool.
# vagrant --branch-tag=v4.0.4 up solaris10
This will generate a 4.0.4 Wazuh agent package for Solaris 10
# vagrant --branch-tag=v4.0.4 up solaris11
This will generate a 4.0.4 Wazuh agent package for Solaris 11
# vagrant --branch-tag=v4.0.4 up solaris10 solaris 11
This will generate a 4.0.4 Wazuh agent package for Solaris 10 and Solaris 11
After the process has ended the package will be stored in the src
folder.
To finish destroy the machines:
# vagrant destroy solaris10 solaris 11