From e25efe2d17383893e960990bdd431f21aedb8bce Mon Sep 17 00:00:00 2001 From: Steve Clement Date: Thu, 4 Nov 2021 15:25:54 +0100 Subject: [PATCH] chg: [doc] Varios small fixes --- INSTALL/INSTALL.tpl.sh | 4 ---- docs/generic/MISP_CAKE_init.md | 11 ++++++---- docs/generic/globalVariables.md | 3 ++- docs/generic/misp-modules-debian.md | 1 + ...L.ubuntu2204.md => xINSTALL.ubuntu2204.md} | 21 +++++++++++-------- mkdocs.yml | 1 + 6 files changed, 23 insertions(+), 18 deletions(-) rename docs/{INSTALL.ubuntu2204.md => xINSTALL.ubuntu2204.md} (96%) diff --git a/INSTALL/INSTALL.tpl.sh b/INSTALL/INSTALL.tpl.sh index 8369623c8..9a970ce84 100755 --- a/INSTALL/INSTALL.tpl.sh +++ b/INSTALL/INSTALL.tpl.sh @@ -260,10 +260,6 @@ installSupported () { echo "Proceeding with the installation of MISP core" space - # Set Base URL - functionLocation('generic/supportFunctions.md') - [[ -n $CORE ]] || [[ -n $ALL ]] && setBaseURL - progress 4 - # Check if sudo is installed and etckeeper - functionLocation('generic/sudo_etckeeper.md') [[ -n $CORE ]] || [[ -n $ALL ]] && checkSudoKeeper [[ ! -z ${MISP_USER} ]] && [[ ! -f /etc/sudoers.d/misp ]] && echo "%${MISP_USER} ALL=(ALL:ALL) NOPASSWD:ALL" |sudo tee /etc/sudoers.d/misp diff --git a/docs/generic/MISP_CAKE_init.md b/docs/generic/MISP_CAKE_init.md index b6fd02a23..cecf4fe65 100644 --- a/docs/generic/MISP_CAKE_init.md +++ b/docs/generic/MISP_CAKE_init.md @@ -25,6 +25,9 @@ coreCAKE () { ${SUDO_WWW} ${RUN_PHP} -- ${CAKE} Admin setSetting "Session.autoRegenerate" 0 ${SUDO_WWW} ${RUN_PHP} -- ${CAKE} Admin setSetting "Session.timeout" 600 ${SUDO_WWW} ${RUN_PHP} -- ${CAKE} Admin setSetting "Session.cookieTimeout" 3600 + + # Set the default temp dir + ${SUDO_WWW} ${RUN_PHP} -- ${CAKE} Admin setSetting "MISP.tmpdir" "${PATH_TO_MISP}/app/tmp" # Change base url, either with this CLI command or in the UI [[ ! -z ${MISP_BASEURL} ]] && ${SUDO_WWW} ${RUN_PHP} -- ${CAKE} Baseurl $MISP_BASEURL @@ -46,7 +49,7 @@ coreCAKE () { # Enable installer org and tune some configurables ${SUDO_WWW} ${RUN_PHP} -- ${CAKE} Admin setSetting "MISP.host_org_id" 1 ${SUDO_WWW} ${RUN_PHP} -- ${CAKE} Admin setSetting "MISP.email" "info@admin.test" - ${SUDO_WWW} ${RUN_PHP} -- ${CAKE} Admin setSetting "MISP.disable_emailing" true + ${SUDO_WWW} ${RUN_PHP} -- ${CAKE} Admin setSetting "MISP.disable_emailing" true --force ${SUDO_WWW} ${RUN_PHP} -- ${CAKE} Admin setSetting "MISP.contact" "info@admin.test" ${SUDO_WWW} ${RUN_PHP} -- ${CAKE} Admin setSetting "MISP.disablerestalert" true ${SUDO_WWW} ${RUN_PHP} -- ${CAKE} Admin setSetting "MISP.showCorrelationsOnIndex" true @@ -57,7 +60,7 @@ coreCAKE () { ${SUDO_WWW} ${RUN_PHP} -- ${CAKE} Admin setSetting "Plugin.Cortex_services_url" "http://127.0.0.1" ${SUDO_WWW} ${RUN_PHP} -- ${CAKE} Admin setSetting "Plugin.Cortex_services_port" 9000 ${SUDO_WWW} ${RUN_PHP} -- ${CAKE} Admin setSetting "Plugin.Cortex_timeout" 120 - ${SUDO_WWW} ${RUN_PHP} -- ${CAKE} Admin setSetting "Plugin.Cortex_authkey" "" + ${SUDO_WWW} ${RUN_PHP} -- ${CAKE} Admin setSetting "Plugin.Cortex_authkey" false ${SUDO_WWW} ${RUN_PHP} -- ${CAKE} Admin setSetting "Plugin.Cortex_ssl_verify_peer" false ${SUDO_WWW} ${RUN_PHP} -- ${CAKE} Admin setSetting "Plugin.Cortex_ssl_verify_host" false ${SUDO_WWW} ${RUN_PHP} -- ${CAKE} Admin setSetting "Plugin.Cortex_ssl_allow_self_signed" true @@ -116,7 +119,7 @@ coreCAKE () { Plugin.ElasticSearch_logging_enable Plugin.S3_enable) for PLUG in "${PLUGS[@]}"; do - ${SUDO_WWW} ${RUN_PHP} -- ${CAKE} Admin setSetting ${PLUG} false + ${SUDO_WWW} ${RUN_PHP} -- ${CAKE} Admin setSetting ${PLUG} false 2> /dev/null done # Plugin CustomAuth tuneable @@ -132,7 +135,7 @@ coreCAKE () { ${SUDO_WWW} ${RUN_PHP} -- ${CAKE} Admin setSetting "Plugin.RPZ_minimum_ttl" "1h" ${SUDO_WWW} ${RUN_PHP} -- ${CAKE} Admin setSetting "Plugin.RPZ_ttl" "1w" ${SUDO_WWW} ${RUN_PHP} -- ${CAKE} Admin setSetting "Plugin.RPZ_ns" "localhost." - ${SUDO_WWW} ${RUN_PHP} -- ${CAKE} Admin setSetting "Plugin.RPZ_ns_alt" "" + ${SUDO_WWW} ${RUN_PHP} -- ${CAKE} Admin setSetting "Plugin.RPZ_ns_alt" false ${SUDO_WWW} ${RUN_PHP} -- ${CAKE} Admin setSetting "Plugin.RPZ_email" "root.localhost" # Kafka settings diff --git a/docs/generic/globalVariables.md b/docs/generic/globalVariables.md index bca8b71b7..a6f06f18a 100644 --- a/docs/generic/globalVariables.md +++ b/docs/generic/globalVariables.md @@ -59,7 +59,8 @@ MISPvars () { # MISP configuration variables PATH_TO_MISP="${PATH_TO_MISP:-/var/www/MISP}" PATH_TO_MISP_SCRIPTS="${PATH_TO_MISP}/app/files/scripts" - + ## For future use + # TMPDIR="${TMPDIR:-$PATH_TO_MISP/app/tmp}" FQDN="${FQDN:-misp.local}" diff --git a/docs/generic/misp-modules-debian.md b/docs/generic/misp-modules-debian.md index 65dbd9a84..c5fedb220 100644 --- a/docs/generic/misp-modules-debian.md +++ b/docs/generic/misp-modules-debian.md @@ -38,6 +38,7 @@ mispmodules () { # If you build an egg, the user you build it as need write permissions in the CWD sudo chgrp $WWW_USER . sudo chmod og+w . + $SUDO_WWW ${PATH_TO_MISP}/venv/bin/pip install pillow $SUDO_WWW ${PATH_TO_MISP}/venv/bin/pip install -I -r REQUIREMENTS sudo chgrp staff . $SUDO_WWW ${PATH_TO_MISP}/venv/bin/pip install -I . diff --git a/docs/INSTALL.ubuntu2204.md b/docs/xINSTALL.ubuntu2204.md similarity index 96% rename from docs/INSTALL.ubuntu2204.md rename to docs/xINSTALL.ubuntu2204.md index 04f198088..8bece86c8 100644 --- a/docs/INSTALL.ubuntu2204.md +++ b/docs/xINSTALL.ubuntu2204.md @@ -73,7 +73,7 @@ Once the system is installed you can perform the following steps. installCoreDeps () { debug "Installing core dependencies" # Install the dependencies: (some might already be installed) - sudo apt-get install curl gcc git gpg-agent make python python3 openssl redis-server sudo vim zip unzip virtualenv libfuzzy-dev sqlite3 moreutils -qy + sudo apt-get install curl gcc git gpg-agent make python3 openssl redis-server sudo vim zip unzip virtualenv libfuzzy-dev sqlite3 moreutils -qy # Install MariaDB (a MySQL fork/alternative) sudo apt-get install mariadb-client mariadb-server -qy @@ -88,19 +88,22 @@ installCoreDeps () { # # Install Php 8.0 dependencies +# FIXME: Ugly hack to get 7.4 working until 8.0 (cake4) will be implemented. +echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu devel main" |sudo tee /etc/apt/sources.list.d/ondrej-ubuntu-php-devel.list +sudo apt update installDepsPhp80 () { debug "Installing PHP 8.0 dependencies" - PHP_ETC_BASE=/etc/php/8.0 + PHP_ETC_BASE=/etc/php/7.4 PHP_INI=${PHP_ETC_BASE}/apache2/php.ini checkAptLock sudo apt install -qy \ - libapache2-mod-php8.0 \ - php8.0 php8.0-cli \ - php8.0-dev \ - php-json php8.0-xml php8.0-mysql php8.0-opcache php8.0-readline php8.0-mbstring php8.0-zip \ - php8.0-redis php-gnupg \ - php8.0-intl php8.0-bcmath \ - php8.0-gd + libapache2-mod-php7.4 \ + php7.4 php7.4-cli \ + php7.4-dev \ + php-json php7.4-xml php7.4-mysql php7.4-opcache php7.4-readline php7.4-mbstring php7.4-zip \ + php7.4-redis php-gnupg \ + php7.4-intl php7.4-bcmath \ + php7.4-gd for key in upload_max_filesize post_max_size max_execution_time max_input_time memory_limit do diff --git a/mkdocs.yml b/mkdocs.yml index 7b4ffd98b..7cb3686a2 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -77,6 +77,7 @@ nav: - 'Debian 10': 'xINSTALL.debian10.md' - 'Tsurugi Linux': 'xINSTALL.tsurugi.md' - 'OpenBSD 7.0': 'xINSTALL.OpenBSD.md' + - 'Ubuntu 22.04': 'xINSTALL.ubuntu2204.md' - Config Guides: - 'Elastic Search Logging': 'CONFIG.elasticsearch-logging.md' - 'Amazon S3 attachments': 'CONFIG.s3-attachments.md'