| | 11 | Execute the commands as super user |
| | 12 | |
| | 13 | == Installing using a Script == |
| | 14 | |
| | 15 | Download the script into your server |
| | 16 | |
| | 17 | `wget https://raw.githubusercontent.com/LEARN-LK/Tutorials/master/installing_icinga2_ubuntu.sh` |
| | 18 | |
| | 19 | Assign execute permission for the script |
| | 20 | |
| | 21 | `chmod +x installing_icinga2_ubuntu.sh` |
| | 22 | |
| | 23 | Then execute file using terminal |
| | 24 | |
| | 25 | `./installing_icinga2_ubuntu.sh` |
| | 26 | |
| | 27 | Select `yes` for the options pop up when icinga2-ido-mysql starts installing and creating database for module. Enter a password for when it prompt(it is used for icinga2 database) |
| | 28 | |
| | 29 | == Manual Installation == |
| | 30 | |
| 183 | | === Enabling Director in Icinga == |
| | 216 | ===== director db ===== |
| | 217 | |
| | 218 | `CREATE DATABASE director CHARACTER SET 'utf8';` |
| | 219 | |
| | 220 | `CREATE USER director@localhost IDENTIFIED BY '##PASSWORD##';` |
| | 221 | |
| | 222 | `GRANT ALL ON director.* TO director@localhost;` |
| | 223 | |
| | 224 | `Flush privileges;` |
| | 225 | |
| | 226 | `quit` |
| | 227 | |
| | 228 | === enabling reactbundle module === |
| | 229 | |
| | 230 | Copy following script to a bash flle and execute or execute in the terminal. |
| | 231 | |
| | 232 | `REACTBUNDLE_MODULE_NAME=reactbundle` |
| | 233 | |
| | 234 | `REACTBUNDLE_MODULE_VERSION=v0.9.0` |
| | 235 | |
| | 236 | `REACTBUNDLE_REPO="https://github.com/Icinga/icingaweb2-module-${REACTBUNDLE_MODULE_NAME}"` |
| | 237 | |
| | 238 | `MODULES_PATH="/usr/share/icingaweb2/modules"` |
| | 239 | |
| | 240 | `git config --global advice.detachedHead false` |
| | 241 | |
| | 242 | `git clone ${REACTBUNDLE_REPO} "${MODULES_PATH}/${REACTBUNDLE_MODULE_NAME}" --branch "${REACTBUNDLE_MODULE_VERSION}"` |
| | 243 | |
| | 244 | `icingacli module enable "${REACTBUNDLE_MODULE_NAME}"` |
| | 245 | |
| | 246 | === enabling ipl module === |
| | 247 | |
| | 248 | Copy following script to a bash flle and execute or execute in the terminal. |
| | 249 | |
| | 250 | `IPL_MODULE_NAME=ipl` |
| | 251 | |
| | 252 | `IPL_MODULE_VERSION=v0.5.0` |
| | 253 | |
| | 254 | `IPL_REPO="https://github.com/Icinga/icingaweb2-module-${IPL_MODULE_NAME}"` |
| | 255 | |
| | 256 | `MODULES_PATH="/usr/share/icingaweb2/modules"` |
| | 257 | |
| | 258 | `git clone ${IPL_REPO} "${MODULES_PATH}/${IPL_MODULE_NAME}" --branch "${IPL_MODULE_VERSION}"` |
| | 259 | |
| | 260 | `icingacli module enable "${IPL_MODULE_NAME}"` |
| | 261 | |
| | 262 | === enabling incubator module === |
| | 263 | |
| | 264 | Copy following script to a bash flle and execute or execute in the terminal. |
| | 265 | |
| | 266 | `INCUBATOR_MODULE_NAME=incubator` |
| | 267 | |
| | 268 | `INCUBATOR_MODULE_VERSION=v0.6.0` |
| | 269 | |
| | 270 | `INCUBATOR_REPO="https://github.com/Icinga/icingaweb2-module-${INCUBATOR_MODULE_NAME}"` |
| | 271 | |
| | 272 | `MODULES_PATH="/usr/share/icingaweb2/modules"` |
| | 273 | |
| | 274 | `git clone ${INCUBATOR_REPO} "${MODULES_PATH}/${INCUBATOR_MODULE_NAME}" --branch "${INCUBATOR_MODULE_VERSION}"` |
| | 275 | |
| | 276 | `icingacli module enable "${INCUBATOR_MODULE_NAME}"` |
| | 277 | |
| | 278 | === Enabling Director in Icinga === |
| 187 | | ICINGAWEB_MODULEPATH="/usr/share/icingaweb2/modules" |
| 188 | | |
| 189 | | REPO_URL="https://github.com/icinga/icingaweb2-module-director" |
| 190 | | |
| 191 | | TARGET_DIR="${ICINGAWEB_MODULEPATH}/director" |
| 192 | | |
| 193 | | MODULE_VERSION="1.8.0" |
| 194 | | |
| 195 | | git clone "${REPO_URL}" "${TARGET_DIR}" --branch v${MODULE_VERSION} |
| | 282 | `ICINGAWEB_MODULEPATH="/usr/share/icingaweb2/modules"` |
| | 283 | |
| | 284 | `REPO_URL="https://github.com/icinga/icingaweb2-module-director"` |
| | 285 | |
| | 286 | `TARGET_DIR="${ICINGAWEB_MODULEPATH}/director"` |
| | 287 | |
| | 288 | `MODULE_VERSION="1.8.0"` |
| | 289 | |
| | 290 | `git clone "${REPO_URL}" "${TARGET_DIR}" --branch v${MODULE_VERSION}` |
| 201 | | === Starting Web Setup === |
| | 296 | === enabling business process module === |
| | 297 | |
| | 298 | Copy following script to a bash flle and execute or execute in the terminal. |
| | 299 | |
| | 300 | `BS_PROCESS_ICINGAWEB_MODULEPATH="/usr/share/icingaweb2/modules"` |
| | 301 | |
| | 302 | `BS_PROCESS_REPO_URL="https://github.com/Icinga/icingaweb2-module-businessprocess"` |
| | 303 | |
| | 304 | `BS_PROCESS_TARGET_DIR="${ICINGAWEB_MODULEPATH}/businessprocess"` |
| | 305 | |
| | 306 | `git clone "${BS_PROCESS_REPO_URL}" "${BS_PROCESS_TARGET_DIR}"` |
| | 307 | |
| | 308 | `icingacli module enable businessprocess` |
| | 309 | |
| | 310 | === changing the permission for relevant users === |
| | 311 | |
| | 312 | `chown -R www-data:icingaweb2 /etc/icingaweb2/` |
| | 313 | |
| | 314 | === Running a demon for director service === |
| | 315 | |
| | 316 | `useradd -r -g icingaweb2 -d /var/lib/icingadirector -s /bin/false icingadirector` |
| | 317 | |
| | 318 | `install -d -o icingadirector -g icingaweb2 -m 0750 /var/lib/icingadirector` |
| | 319 | |
| | 320 | `MODULE_PATH=/usr/share/icingaweb2/modules/director` |
| | 321 | |
| | 322 | `cp "${MODULE_PATH}/contrib/systemd/icinga-director.service" /etc/systemd/system/` |
| | 323 | |
| | 324 | `systemctl daemon-reload` |
| | 325 | |
| | 326 | `systemctl enable icinga-director.service` |
| | 327 | |
| | 328 | `systemctl start icinga-director.service` |
| | 329 | |
| | 330 | == Starting Web Setup == |