Skip to content

Commit

Permalink
adjustments while testing the installation
Browse files Browse the repository at this point in the history
  • Loading branch information
amuehlem committed Sep 20, 2024
1 parent 8cdf0e9 commit 2a9c754
Show file tree
Hide file tree
Showing 2 changed files with 122 additions and 6 deletions.
117 changes: 115 additions & 2 deletions INSTALL8.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,118 @@
- enable repos
- enable php7.4
# MISP-RPM installation for RHEL8

This document is specifically written for RHEL 8.x installation with not external repositories as the epel repository or remi repo for PHP packages. Please follow the MISP upstream official documentation for anything MISP related.

The main differences with a regular MISP installed are around RHEL software collection specifics and packaging.

To start, you need a valid RHEL subscription and minimal system installed.

## enable necessary RHEL repos
The rhel-8-for-x86_64-baseos-rpms should be enabled by default. To check which repositories are already configured just use the following command

```
subscription-manager repos --list-enabled
```

The following repos must be activated to proceed with the installation

```
subscription-manager repos --enable=rhel-8-for-x86_64-baseos-rpms
subscription-manager repos --enable=rhel-8-for-x86_64-appstream-rpms
subscription-manager repos --enable=codeready-builder-for-rhel-8-x86_64-rpms
```

## enable specific software modules

```
dnf module enable php:7.4
dnf module enable mariadb:10.11
```

## install provided RPMs

```
# prereq for misp
sudo yum install -y gtcaca-*.rpm libcaca*.rpm imlib2*.rpm
sudo yum install -y faup-*.rpm
sudo yum install -y ssdeep-libs*.rpm
sudo yum install -y libbrotli*.rpm
sudo yum install -y misp-php74-*rpm
# install misp rpm
sudo yum install -y misp-python-virtualenv-2.4.*.rpm misp-2.4.*.rpm
```

## Adjust PHP settings
All PHP related settings are in ```/etc/php.ini```

```
- max_execution_time = 30
+ max_execution_time = 300
- memory_limit = 128M
+ memory_limit = 2048M
- post_max_size = 8M
+ post_max_size = 50M
- upload_max_filesize = 2M
+ upload_max_filesize = 50M
```

## MISP configuration
Setting up default bare configuration (please check MISP documentation for full proper setup):

```
# set DB details in database.php
# set baseurl in config.php
# set python_bin => '/var/www/cgi-bin/misp-virtualenv/bin/python3'
sudo chown apache:apache /var/www/MISP/app/Config/config.php
sudo chcon -t httpd_sys_rw_content_t /var/www/MISP/app/Config/config.php
```

## Install MariaDB database

It's recommended to secure mariadb with the provided script

```
mysql_secure_installation
```

Now you can create the MISP database
```
CREATE DATABASE misp;
CREATE USER misp@'localhost' IDENTIFIED BY 'changeme';
GRANT USAGE ON *.* to 'misp'@'localhost';
GRANT ALL PRIVILEGES on misp.* to 'misp'@'localhost';
FLUSH PRIVILEGES;
exit;
```

Install the base database schema

```
mysql -u misp -p misp < /var/www/MISP/INSTALL/MYSQL.sql
```

## enable services

```
systemctl enable mariadb
systemctl start mariadb
systemctl enable redis
systemctl start redis
systemctl enable php-fpm
systemctl start php-fpm
systemctl enable httpd
systemctl start httpd
systemctl enable misp-workers
systemctl start misp-workers
```

## open firewall for access on http and https

```
firewall-cmd --permanent --zone=public --add-service http
firewall-cmd --permanent --zone=public --add-service https
systemctl restart firewalld
```

reboot to make sure all services are started correctly
11 changes: 7 additions & 4 deletions SPECS/misp8-pure.spec
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
# exclude for requirements
%global __requires_exclude ^/opt/python/cp3.*

%define pymispver 2.4.196
%define pymispver 2.4.198
%define mispstixver 2.4.196
%define pythonver python3.8
%define pythonver_short python38

Name: misp
Version: 2.4.197
Version: 2.4.198
release: 1%{?dist}
Summary: MISP - malware information sharing platform

Expand Down Expand Up @@ -50,8 +50,8 @@ Requires: php-bcmath, php-opcache, php-json
Requires: php-pecl-zip, php-intl
Requires: misp-php74-pecl-ssdeep, php-process
Requires: php-pecl-apcu, misp-php74-pecl-brotli, misp-php74-pecl-rdkafka
Requires: misp-php74-pear-crypt-gpg, misp-php74-pear-commandline
Requires: supervisor, faup, gtcaca
Requires: misp-php74-pear-crypt-gpg, misp-php74-pear-command-line
Requires: faup, gtcaca

%package python-virtualenv
Summary: the python virtual environment for MISP
Expand Down Expand Up @@ -270,6 +270,9 @@ semodule -i /usr/share/MISP/policy/selinux/misp-ps.pp
semodule -i /usr/share/MISP/policy/selinux/misp-workers8.pp

%changelog
* Wed Sep 18 2024 Andreas Muehlemann <amuehlem@gmail.com> - 2.4.198
- update to v2.4.198

* Thu Sep 5 2024 Andreas Muehlemann <amuehlem@gmail.com> - 2.4.197
- first version for RHEL8

0 comments on commit 2a9c754

Please sign in to comment.