mirror of https://github.com/MISP/MISP
84 lines
4.3 KiB
Plaintext
Executable File
84 lines
4.3 KiB
Plaintext
Executable File
# 1. Upgrade procedure from v2.2 to v2.3
|
|
|
|
# - git pull the latest version of MISP from https://github.com/MISP/MISP.git
|
|
|
|
# delete everything from MISP's cache directory to get rid of the cached models
|
|
find /var/www/MISP/app/tmp/cache/ -type f -not -name 'empty' -delete
|
|
|
|
# clear the old submodule cached entry for CakeResque
|
|
cd /var/www/MISP
|
|
git rm --cached app/Plugin/CakeResque/
|
|
|
|
|
|
# Check if the permissions are set correctly using the following commands as root:
|
|
chown -R www-data:www-data /var/www/MISP
|
|
chmod -R 750 /var/www/MISP
|
|
chmod -R g+ws /var/www/MISP/app/tmp
|
|
chmod -R g+ws /var/www/MISP/app/files
|
|
chmod -R g+ws /var/www/MISP/app/files/scripts/tmp
|
|
|
|
# 2. Get the new dependencies introduced in version 2.3
|
|
|
|
# install Mitre's STIX and its dependencies by running the following commands:
|
|
apt-get install python-dev python-pip libxml2-dev libxslt-dev zlib1g-dev
|
|
cd /var/www/MISP/app/files/scripts
|
|
git clone https://github.com/CybOXProject/python-cybox.git
|
|
git clone https://github.com/STIXProject/python-stix.git
|
|
cd /var/www/MISP/app/files/scripts/python-cybox
|
|
git checkout v2.1.0.10
|
|
python setup.py install
|
|
cd /var/www/MISP/app/files/scripts/python-stix
|
|
git checkout v1.1.1.4
|
|
python setup.py install
|
|
|
|
# install / update CakeResque (using the background workers is optional buy highly recommended)
|
|
cd /var/www/MISP/app
|
|
curl -s https://getcomposer.org/installer | php
|
|
php composer.phar require kamisama/cake-resque:4.1.2
|
|
php composer.phar config vendor-dir Vendor
|
|
php composer.phar install
|
|
|
|
# To use the scheduler worker for scheduled tasks, do the following:
|
|
cp -fa /var/www/MISP/INSTALL/setup/config.php /var/www/MISP/app/Plugin/CakeResque/Config/config.php
|
|
|
|
# 3. Update the database and settings to be compatible with MISP 2.3
|
|
|
|
# Update the database of MISP by running the following command
|
|
mysql -u <database login> -p<database password> <misp table name> < /var/www/MISP/INSTALL/upgrade_2.3.sql
|
|
|
|
# MISP has moved to a new configuration system. It might be a good idea to note down the old settings before removing them.
|
|
# Wherever applicable, you can remove .b from the default configuration file's name to get the non-background worker enabled version, however this is not recommended
|
|
mv /var/www/MISP/app/Config/bootstrap.b.default.php /var/www/MISP/app/Config/bootstrap.php
|
|
mv /var/www/MISP/app/Config/core.b.default.php /var/www/MISP/app/Config/core.php
|
|
mv /var/www/MISP/app/Config/config.default.php /var/www/MISP/app/Config/config.php
|
|
|
|
# Enable the background workers by uncommenting CakePlugin::loadall(array('CakeResque' => array('bootstrap' => true))); in /var/www/MISP/app/Config/bootstrap.php
|
|
|
|
# Make sure that the files in config are owned by the apache user
|
|
chown -R www-data:www-data /var/www/MISP/app/Config/*
|
|
|
|
# Log into MISP using your site admin credentials
|
|
# navigate to Administration -> Server settings
|
|
# Make sure that all of settings related tabs are filled out correctly.
|
|
# The tool will tell you about any potential issues and remedies, just follow the instructions
|
|
|
|
# Once done, have a look at the diagnostics
|
|
|
|
# If any of the directories that MISP uses to store files is not writeable to the apache user, change the permissions
|
|
# you can do this by running the following commands:
|
|
|
|
chmod -R 750 /var/www/MISP/<directory path with an indicated issue>
|
|
chown -R www-data:www-data /var/www/MISP/<directory path with an indicated issue>
|
|
|
|
# Make sure that the STIX libraries and GnuPG work as intended, if not, refer to INSTALL.txt's paragraphs dealing with these two items
|
|
|
|
# If you still have the background workers started from before the upgrade, the interface will not allow you to restart the workers
|
|
# This is because according to the install script in the previous version the background workers were advised to be started after boot in rc.local using the root user
|
|
# If this is the case for you, make sure that you stop the workers using the command line with the following command:
|
|
/var/www/MISP/app/Console/cake CakeResque.CakeResque stop --all
|
|
|
|
# Amend your rc.local using the following command to always start the background workers using the apache user (substitute www-data with your apache user)
|
|
su www-data -c 'bash /var/www/MISP/app/Console/worker/start.sh'
|
|
|
|
# Start the background workers using the application by navigating to the workers tab in the server settings and clicking on the "Restart all workers" button.
|