mirror of https://github.com/MISP/MISP
Further work on the upgrade scripts / description
parent
f25f3f1266
commit
bfc4a1a8d4
|
@ -1,24 +1,40 @@
|
|||
|
||||
Upgrade procedure from v1 to v2
|
||||
Upgrade procedure from v2.1 to v2.2
|
||||
|
||||
- git pull the latest version of MISP from https://github.com/BeDefCERT/MISP.git
|
||||
- git pull the latest version of MISP from https://github.com/MISP/MISP.git
|
||||
|
||||
- execute the .sql file called "MYSQL.migrate.sql" found in the www/MISP/INSTALL folder. You can do this by
|
||||
using the command "mysql -u [username] -p[password] [MISP's database] < MYSQL.migrate.sql
|
||||
|
||||
- excecute the following two commands from your www/MISP/app folder:
|
||||
./Console/cake acl create aco root controllers
|
||||
./Console/cake AclExtras.AclExtras aco_sync
|
||||
- execute the .sql file called "upgrade_2.2.sql" found in the /MISP/INSTALL folder. You can do this by
|
||||
using the command "mysql -u [username] -p[password] [MISP's database] < upgrade_2.2.sql
|
||||
|
||||
- Log in with the site admin credentials and execute the following commands by changing the url
|
||||
(where <MISP> is the address of your instance):
|
||||
- https://<MISP>/events/generateCorrelation
|
||||
- https://<MISP>/events/generateCount
|
||||
- https://<MISP>/events/generateArosAcos
|
||||
- https://<MISP>/events/generateThreatLevelFromRisk
|
||||
|
||||
If all went right, then your MISP instance should now be at version 2.
|
||||
- Replace your current bootstrap.php file found in /MISP/app/Config/ with bootstrap.default.php and change set your instance up to your liking
|
||||
|
||||
Check the following:
|
||||
- That your organisation in the bootstrap.php file found in www/MISP/app/Config/ is the correct
|
||||
Organisation identifier used by the users of your organisation and by the sync users of
|
||||
other hosting organisations that synchronise with your instance.
|
||||
================================================================================================================================================
|
||||
|
||||
Enabling background jobs via CakeResque
|
||||
(assuming /var/www/MISP as your installation directory)
|
||||
|
||||
- install redis:
|
||||
- apt-get install redis-server
|
||||
- cp /etc/redis/redis.conf /etc/redis/redis.conf.default
|
||||
|
||||
- set up CakeResque:
|
||||
- cd /var/www/MISP/app/Plugin/CakeResque
|
||||
- curl -s https://getcomposer.org/installer | php
|
||||
- php composer.phar install
|
||||
- vim /var/www/MISP/app/bootstrap.php
|
||||
- set Configure::write('MISP.background_jobs', false); to Configure::write('MISP.background_jobs', true);
|
||||
- uncomment CakePlugin::load('CakeResque', array('bootstrap' => true));
|
||||
|
||||
- If you would like to use the scheduled tasks:
|
||||
- vim /var/www/MISP/app/Plugin/CakeResque/Config/config.php
|
||||
- Line 185 ('enabled' => false,) change it to 'enabled' => true,
|
||||
|
||||
- start the background workers
|
||||
- cd /var/www/MISP/app/Console/worker/
|
||||
- ./start.sh
|
||||
|
||||
================================================================================================================================================
|
|
@ -78,7 +78,11 @@ CREATE TABLE IF NOT EXISTS `jobs` (
|
|||
|
||||
|
||||
ALTER TABLE `attributes` ADD `comment` TEXT CHARACTER SET utf8 COLLATE utf8_bin NOT NULL;
|
||||
ALTER TABLE `events` ADD `threat_level_id` int(11) NOT NULL;
|
||||
|
||||
ALTER TABLE `events`
|
||||
ADD `threat_level_id` int(11) NOT NULL,
|
||||
ADD `publish_timestamp` int(11) NOT NULL;
|
||||
|
||||
ALTER TABLE `shadow_attributes`
|
||||
ADD `event_org` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
|
||||
ADD `comment` TEXT CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
|
||||
|
@ -90,6 +94,13 @@ ALTER TABLE `servers`
|
|||
|
||||
UPDATE `roles` SET `perm_site_admin` = 1 WHERE `id` = 1;
|
||||
|
||||
INSERT INTO `threat_levels` (`id`, `name`, `description`, `form_description`)
|
||||
VALUES
|
||||
(1,'High','*high* means sophisticated APT malware or 0-day attack','Sophisticated APT malware or 0-day attack'),
|
||||
(2,'Medium','*medium* means APT malware','APT malware'),
|
||||
(3,'Low','*low* means mass-malware','Mass-malware'),
|
||||
(4,'Undefined','*undefined* no risk','No risk');
|
||||
|
||||
INSERT INTO `tasks` (`id`, `type`, `timer`, `scheduled_time`, `job_id`, `description`, `next_execution_time`, `message`) VALUES
|
||||
(1, 'cache_exports', 0, '12:00', 0, 'Generates export caches for every export type and for every organisation. This process is heavy, schedule so it might be a good idea to schedule this outside of working hours and before your daily automatic imports on connected services are scheduled.', 1391601600, 'Not scheduled yet.'),
|
||||
(2, 'pull_all', 0, '12:00', 0, 'Initiates a full pull for all eligible instances.', 1391601600, 'Not scheduled yet.'),
|
||||
|
|
|
@ -5,7 +5,7 @@ App::uses('File', 'Utility');
|
|||
require_once 'AppShell.php';
|
||||
class EventShell extends AppShell
|
||||
{
|
||||
public $uses = array('Event', 'Attribute', 'Job', 'User', 'Task');
|
||||
public $uses = array('Event', 'Attribute', 'Job', 'User', 'Task', 'Whitelist');
|
||||
|
||||
public function doPublish() {
|
||||
$id = $this->args[0];
|
||||
|
@ -52,7 +52,6 @@ class EventShell extends AppShell
|
|||
}
|
||||
|
||||
// Whitelist check
|
||||
$this->loadModel('Whitelist');
|
||||
$results = $this->Whitelist->removeWhitelistedFromArray($results, false);
|
||||
|
||||
foreach ($results as $k => $result) {
|
||||
|
@ -146,7 +145,6 @@ class EventShell extends AppShell
|
|||
$this->Job->saveField('progress', $k / $eventCount * 80);
|
||||
}
|
||||
}
|
||||
$this->loadModel('Whitelist');
|
||||
$final = array();
|
||||
$final[] = 'uuid,event_id,category,type,value';
|
||||
$attributes = $this->Whitelist->removeWhitelistedFromArray($attributes, true);
|
||||
|
|
Loading…
Reference in New Issue