diff --git a/docs/generic/misp-dashboard-centos.md b/docs/generic/misp-dashboard-centos.md index 9a91c8213..96421b371 100644 --- a/docs/generic/misp-dashboard-centos.md +++ b/docs/generic/misp-dashboard-centos.md @@ -60,20 +60,20 @@ sudo systemctl reload apache2 sudo sed -i -e '$i \sudo -u apache bash /var/www/misp-dashboard/start_all.sh > /tmp/misp-dashboard_rc.local.log\n' /etc/rc.local # Enable ZeroMQ for misp-dashboard -sudo $RUN_PHP "$CAKE Admin setSetting "Plugin.ZeroMQ_enable" true" -sudo $RUN_PHP "$CAKE Admin setSetting "Plugin.ZeroMQ_event_notifications_enable" true" -sudo $RUN_PHP "$CAKE Admin setSetting "Plugin.ZeroMQ_object_notifications_enable" true" -sudo $RUN_PHP "$CAKE Admin setSetting "Plugin.ZeroMQ_object_reference_notifications_enable" true" -sudo $RUN_PHP "$CAKE Admin setSetting "Plugin.ZeroMQ_attribute_notifications_enable" true" -sudo $RUN_PHP "$CAKE Admin setSetting "Plugin.ZeroMQ_sighting_notifications_enable" true" -sudo $RUN_PHP "$CAKE Admin setSetting "Plugin.ZeroMQ_user_notifications_enable" true" -sudo $RUN_PHP "$CAKE Admin setSetting "Plugin.ZeroMQ_organisation_notifications_enable" true" -sudo $RUN_PHP "$CAKE Admin setSetting "Plugin.ZeroMQ_port" 50000" -sudo $RUN_PHP "$CAKE Admin setSetting "Plugin.ZeroMQ_redis_host" "localhost"" -sudo $RUN_PHP "$CAKE Admin setSetting "Plugin.ZeroMQ_redis_port" 6379" -sudo $RUN_PHP "$CAKE Admin setSetting "Plugin.ZeroMQ_redis_database" 1" -sudo $RUN_PHP "$CAKE Admin setSetting "Plugin.ZeroMQ_redis_namespace" "mispq"" -sudo $RUN_PHP "$CAKE Admin setSetting "Plugin.ZeroMQ_include_attachments" false" -sudo $RUN_PHP "$CAKE Admin setSetting "Plugin.ZeroMQ_tag_notifications_enable" false" -sudo $RUN_PHP "$CAKE Admin setSetting "Plugin.ZeroMQ_audit_notifications_enable" false" +$SUDO_WWW $RUN_PHP "$CAKE Admin setSetting "Plugin.ZeroMQ_enable" true" +$SUDO_WWW $RUN_PHP "$CAKE Admin setSetting "Plugin.ZeroMQ_event_notifications_enable" true" +$SUDO_WWW $RUN_PHP "$CAKE Admin setSetting "Plugin.ZeroMQ_object_notifications_enable" true" +$SUDO_WWW $RUN_PHP "$CAKE Admin setSetting "Plugin.ZeroMQ_object_reference_notifications_enable" true" +$SUDO_WWW $RUN_PHP "$CAKE Admin setSetting "Plugin.ZeroMQ_attribute_notifications_enable" true" +$SUDO_WWW $RUN_PHP "$CAKE Admin setSetting "Plugin.ZeroMQ_sighting_notifications_enable" true" +$SUDO_WWW $RUN_PHP "$CAKE Admin setSetting "Plugin.ZeroMQ_user_notifications_enable" true" +$SUDO_WWW $RUN_PHP "$CAKE Admin setSetting "Plugin.ZeroMQ_organisation_notifications_enable" true" +$SUDO_WWW $RUN_PHP "$CAKE Admin setSetting "Plugin.ZeroMQ_port" 50000" +$SUDO_WWW $RUN_PHP "$CAKE Admin setSetting "Plugin.ZeroMQ_redis_host" "localhost"" +$SUDO_WWW $RUN_PHP "$CAKE Admin setSetting "Plugin.ZeroMQ_redis_port" 6379" +$SUDO_WWW $RUN_PHP "$CAKE Admin setSetting "Plugin.ZeroMQ_redis_database" 1" +$SUDO_WWW $RUN_PHP "$CAKE Admin setSetting "Plugin.ZeroMQ_redis_namespace" "mispq"" +$SUDO_WWW $RUN_PHP "$CAKE Admin setSetting "Plugin.ZeroMQ_include_attachments" false" +$SUDO_WWW $RUN_PHP "$CAKE Admin setSetting "Plugin.ZeroMQ_tag_notifications_enable" false" +$SUDO_WWW $RUN_PHP "$CAKE Admin setSetting "Plugin.ZeroMQ_audit_notifications_enable" false" ``` diff --git a/docs/xINSTALL.centos7.md b/docs/xINSTALL.centos7.md index 40b6357a4..92a4c7aa2 100644 --- a/docs/xINSTALL.centos7.md +++ b/docs/xINSTALL.centos7.md @@ -147,9 +147,31 @@ $SUDO_WWW $PATH_TO_MISP/venv/bin/pip install -U zmq # install redis $SUDO_WWW $PATH_TO_MISP/venv/bin/pip install -U redis -# install magic, lief, pydeep +# lief needs manual compilation +sudo yum install devtoolset-7 cmake3 -y + +cd $PATH_TO_MISP/app/files/scripts +$SUDO_WWW git clone --branch master --single-branch https://github.com/lief-project/LIEF.git lief + +# TODO: Fix static path with PATH_TO_MISP +cd $PATH_TO_MISP/app/files/scripts/lief +$SUDO_WWW mkdir build +cd build +$SUDO_WWW scl enable devtoolset-7 rh-python36 'bash -c "cmake3 \ +-DLIEF_PYTHON_API=on \ +-DLIEF_DOC=off \ +-DCMAKE_INSTALL_PREFIX=$LIEF_INSTALL \ +-DCMAKE_BUILD_TYPE=Release \ +-DPYTHON_VERSION=3.6 \ +-DPYTHON_EXECUTABLE=/var/www/MISP/venv/bin/python \ +.."' +$SUDO_WWW make -j3 +sudo make install +cd api/python/lief_pybind11-prefix/src/lief_pybind11 +$SUDO_WWW $PATH_TO_MISP/venv/bin/python setup.py install $SUDO_WWW ${PATH_TO_MISP}/venv/bin/pip install https://github.com/lief-project/packages/raw/lief-master-latest/pylief-0.9.0.dev.zip +# install magic, pydeep $SUDO_WWW $PATH_TO_MISP/venv/bin/pip install -U python-magic git+https://github.com/kbandla/pydeep.git # install mixbox to accommodate the new STIX dependencies: @@ -364,6 +386,13 @@ sudo chcon -t httpd_sys_rw_content_t $PATH_TO_MISP/app/files/terms sudo chcon -t httpd_sys_rw_content_t $PATH_TO_MISP/app/files/scripts/tmp sudo chcon -t httpd_sys_rw_content_t $PATH_TO_MISP/app/Plugin/CakeResque/tmp sudo chcon -t httpd_sys_script_exec_t $PATH_TO_MISP/app/Console/cake +sudo chcon -t httpd_sys_script_exec_t $PATH_TO_MISP/app/Console/worker/start.sh +sudo chcon -t httpd_sys_script_exec_t $PATH_TO_MISP/app/files/scripts/mispzmq/mispzmq.py +sudo chcon -t httpd_sys_script_exec_t $PATH_TO_MISP/app/files/scripts/mispzmq/mispzmqtest.py +sudo chcon -t httpd_sys_script_exec_t /usr/bin/ps +sudo chcon -t httpd_sys_script_exec_t /usr/bin/grep +sudo chcon -t httpd_sys_script_exec_t /usr/bin/awk +sudo chcon -t httpd_sys_script_exec_t /usr/bin/gpg sudo chcon -R -t usr_t $PATH_TO_MISP/venv sudo chcon -R -t httpd_sys_rw_content_t $PATH_TO_MISP/.git sudo chcon -R -t httpd_sys_rw_content_t $PATH_TO_MISP/app/tmp @@ -372,6 +401,7 @@ sudo chcon -R -t httpd_sys_rw_content_t $PATH_TO_MISP/app/Config sudo chcon -R -t httpd_sys_rw_content_t $PATH_TO_MISP/app/tmp sudo chcon -R -t httpd_sys_rw_content_t $PATH_TO_MISP/app/webroot/img/orgs sudo chcon -R -t httpd_sys_rw_content_t $PATH_TO_MISP/app/webroot/img/custom +sudo chcon -R -t httpd_sys_rw_content_t $PATH_TO_MISP/app/files/scripts/mispzmq ``` !!! warning @@ -509,7 +539,8 @@ then sudo chmod u+x /etc/rc.local fi -sudo sed -i -e '$i \su -s /bin/bash apache -c "scl enable rh-php72 $PATH_TO_MISP/app/Console/worker/start.sh" > /tmp/worker_start_rc.local.log\n' /etc/rc.local +# TODO: Fix static path with PATH_TO_MISP +sudo sed -i -e '$i \su -s /bin/bash apache -c "scl enable rh-php72 /var/www/MISP/app/Console/worker/start.sh" > /tmp/worker_start_rc.local.log\n' /etc/rc.local # Make sure it will execute sudo chmod +x /etc/rc.local @@ -539,7 +570,8 @@ $SUDO_WWW ${PATH_TO_MISP}/venv/bin/pip install git+https://github.com/kbandla/py # Start misp-modules $SUDO_WWW ${PATH_TO_MISP}/venv/bin/misp-modules -l 0.0.0.0 -s & -sudo sed -i -e '$i \sudo -u apache $PATH_TO_MISP/venv/bin/misp-modules -l 127.0.0.1 -s &\n' /etc/rc.local +# TODO: Fix static path with PATH_TO_MISP +sudo sed -i -e '$i \sudo -u apache /var/www/MISP/venv/bin/misp-modules -l 127.0.0.1 -s &\n' /etc/rc.local ``` {!generic/misp-dashboard-centos.md!}