2015-09-25 11:58:42 +02:00
|
|
|
# 1. Upgrade procedure from v2.3 to v2.4
|
2016-02-10 16:38:44 +01:00
|
|
|
# it is assumed that the upgrade happens from an up-to-date 2.3 instance
|
2016-01-04 21:33:51 +01:00
|
|
|
# It is a good idea to back up your MISP installation and data before upgrading to a new release.
|
2013-05-31 17:50:00 +02:00
|
|
|
|
2016-07-11 02:19:38 +02:00
|
|
|
# 2. git pull the latest version of MISP from https://github.com/MISP/MISP.git
|
|
|
|
cd /var/www/MISP
|
2016-01-04 21:33:51 +01:00
|
|
|
git pull
|
2016-07-11 02:19:38 +02:00
|
|
|
git checkout tags/$(git describe --tags `git rev-list --tags --max-count=1`)
|
|
|
|
# if the last shortcut doesn't work, specify the latest version manually
|
|
|
|
# example: git checkout tags/v2.4.XY
|
|
|
|
# the message regarding a "detached HEAD state" is expected behaviour
|
|
|
|
# (you only have to create a new branch, if you want to change stuff and do a pull request for example)
|
|
|
|
|
|
|
|
# 3. Update CakePHP to the latest supported version
|
|
|
|
cd /var/www/MISP
|
|
|
|
rm -rf app/Lib/cakephp/
|
2016-07-13 18:08:37 +02:00
|
|
|
git submodule update --init --force
|
2013-05-31 17:50:00 +02:00
|
|
|
|
2016-07-11 02:19:38 +02:00
|
|
|
# 4. delete everything from MISP's cache directory to get rid of the cached models
|
2014-10-13 10:49:56 +02:00
|
|
|
find /var/www/MISP/app/tmp/cache/ -type f -not -name 'empty' -delete
|
|
|
|
|
2016-07-11 02:19:38 +02:00
|
|
|
# 5. clear the old submodule cached entry for CakeResque
|
2014-10-20 14:44:03 +02:00
|
|
|
cd /var/www/MISP
|
|
|
|
git rm --cached app/Plugin/CakeResque/
|
|
|
|
|
2016-07-11 02:19:38 +02:00
|
|
|
# 6. make sure that your database is backed up
|
2016-01-20 11:45:23 +01:00
|
|
|
mysqldump -u [misp_mysql_user] -p [misp_database] > /home/[my_user]/misp_db_pre_migration.sql
|
2016-07-11 02:19:38 +02:00
|
|
|
|
|
|
|
# 7. upgrade your database with the new tables / fields introduced in 2.4
|
2015-09-25 11:58:42 +02:00
|
|
|
cd /var/www/MISP/INSTALL
|
|
|
|
mysql -u [misp_mysql_user] -p [misp_database] < upgrade_2.4.sql
|
2014-10-20 14:44:03 +02:00
|
|
|
|
2016-07-11 02:19:38 +02:00
|
|
|
# 8. run the upgrade script from within the application
|
2016-01-20 11:45:23 +01:00
|
|
|
# simply navigate to Administration -> Administrative Tools -> "Upgrade to 2.4"
|
|
|
|
# Once that has completed successfully run the 2.3->2.4 cleanup script
|
2016-02-10 16:38:44 +01:00
|
|
|
# simply navigate to Administration -> Administrative Tools -> "2.3->2.4 cleanup script"
|
2013-05-31 17:50:00 +02:00
|
|
|
|
2016-01-11 16:12:46 +01:00
|
|
|
# If everything went fine, switch the system to live:
|
|
|
|
# Administration -> Server Settings -> MISP Settings -> MISP.live -> True
|
|
|
|
# NOTE: if nothing happens, please check the permissions of the config files in /var/www/MISP/app/Config/
|
2016-06-04 01:10:45 +02:00
|
|
|
# and make sure the webserver has the write permissions on them:
|
2016-01-11 16:12:46 +01:00
|
|
|
# chown -R www-data:www-data /var/www/MISP/app/Config/
|
|
|
|
|
2016-01-04 21:33:51 +01:00
|
|
|
# Let us know if you run into any issues during or after the upgrade
|