Skip to content
This repository has been archived by the owner on Apr 16, 2021. It is now read-only.

Snorby 2.5.1 #237

Closed
GoogleCodeExporter opened this issue Mar 24, 2015 · 8 comments
Closed

Snorby 2.5.1 #237

GoogleCodeExporter opened this issue Mar 24, 2015 · 8 comments

Comments

@GoogleCodeExporter
Copy link

Bugfixes for 2.5.0

Original issue reported on code.google.com by doug.bu...@gmail.com on 20 Mar 2012 at 6:33

@GoogleCodeExporter
Copy link
Author

[deleted comment]

1 similar comment
@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

sudo -v

cd /usr/local/share/
sudo rm -rf snorby
sudo git clone git://github.com/Snorby/snorby.git
cd snorby
sudo bundle install --deployment

# configure Snorby
cd config
sudo cp database.example.yml database.yml
cat << EOF | sudo tee -a snorby_config.yml
production:
  domain: localhost
  wkhtmltopdf: /usr/bin/wkhtmltopdf
  mailer_sender: 'snorby@securityonion.local'
  geoip_uri: "http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz"
  rules:
    - "/etc/nsm/rules"
  authentication_mode: database
EOF
cd ..

# create db/seeds.rb.securityonion
cd db
sudo cp seeds.rb seeds.rb.securityonion

#######################################################
# Default user setup
User.create(:name => 'Administrator', :email => 'ReplaceWithDesiredEmail', 
:password => 'ReplaceWithDesiredPassword', :password_confirmation => 
'ReplaceWithDesiredPassword', :admin => true) if User.all.blank?
# Snorby General Settings
Setting.set(:company, 'Snorby.org') unless Setting.company?
Setting.set(:email, 'snorby@securityonion.local') unless Setting.email?
#######################################################

cd ..

# fix permissions
sudo chmod 777 log
sudo chmod 777 tmp
sudo chmod 777 public

# package snorby dir
mkdir ~/20120321 && cd ~/20120321/
/usr/bin/fpm -s dir -t deb -n securityonion-snorby -v 20120321 
/usr/local/share/snorby

Original comment by doug.bu...@gmail.com on 21 Mar 2012 at 5:14

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

Added the following to security-onion-upgrade.sh:

if [ "$VERSION" = "20120312" ]; then
        NEW="20120321"
        echo "**********************************************"   | $LOGGER
        echo "* Upgrading from $VERSION to $NEW."               | $LOGGER
        echo "**********************************************"   | $LOGGER
        DIR="/nsm/backup/$NEW"
        mkdir -p $DIR                                           | $LOGGER
        cd $DIR

        for FILE in securityonion-snorby_20120321_i386.deb; do
                echo -n "* Downloading $FILE..."                | $LOGGER
                wget -q http://sourceforge.net/projects/security-onion/files/$NEW/$FILE -O $FILE | $LOGGER
                if [ $? -eq 1 ]; then
                        echo "FAIL"     | $LOGGER
                        exit 1
                else
                        echo "OK"       | $LOGGER
                fi
        done

        if [ -d /var/lib/mysql/snorby ]; then
                echo -n "* Stopping Snorby processes..."              | $LOGGER
        pkill -9 -f '^delayed_job'
                echo "OK"       | $LOGGER
        fi

        echo -n "* Installing downloaded packages..." | $LOGGER
        dpkg -i *.deb                                           >> $LOG
        if [ $? -eq 1 ]; then
                echo "FAIL"     | $LOGGER
                exit 1
        else
                echo "OK"       | $LOGGER
        fi

        if [ -d /var/lib/mysql/snorby ]; then
                echo -n "* Starting Snorby jobs..." | $LOGGER
                su www-data -c "cd /usr/local/share/snorby; bundle exec rake snorby:update RAILS_ENV=production" >> $LOG
                if [ $? -eq 1 ]; then
                        echo "FAIL"     | $LOGGER
                else
                        echo "OK"       | $LOGGER
                fi
                echo -n "* Restarting Apache..." | $LOGGER
                /etc/init.d/apache2 restart >> $LOG 2>&1
                if [ $? -eq 1 ]; then
                        echo "FAIL"     | $LOGGER
                else
                        echo "OK"       | $LOGGER
                fi
        fi

        sed -i "s|VERSION=$VERSION|VERSION=$NEW|g" $CONF        | $LOGGER
        echo "* Upgrade to $NEW complete."                      | $LOGGER
        echo 
fi

Original comment by doug.bu...@gmail.com on 21 Mar 2012 at 5:14

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Tested by:
Scott Runnels
Heine Lysemose

Original comment by doug.bu...@gmail.com on 22 Mar 2012 at 12:30

  • Changed state: Verified
  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Published:
http://securityonion.blogspot.com/2012/03/security-onion-20120321-now-available.
html

Original comment by doug.bu...@gmail.com on 22 Mar 2012 at 12:30

  • Added labels: ****
  • Removed labels: ****

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant