Bundleexecrailsserver-eproduction if one of the following components has been installed, ignore 1. refer to CentOS6.5 to install snort2.GIT. 3. ruby Version restrictions & gt; 1.9.2: the built-in version is too low. uninstall it first.
bundle exec rails server -e production
If one of the following components has been installed, ignore
1.Snort
Refer to CentOS6.5 to install snort
2.GIT
Built-in system
3.RubyVersion limit> 1.9.2
The system's built-in version is too low. uninstall it first. Note that the version must be 1.9. *.
yum erase ruby ruby-libs ruby-mode ruby-rdoc ruby-irb ruby-ri ruby-docs
Then go to ruby official website to download 1.9.3 Ruby 1.9.3-p547 http://ruby.taobao.org/mirrors/ruby/
Install yaml
yum list libyaml*
Install ruby
tar -zxvf ruby-1.9.3-p547.tar.gzcd ruby-1.9.3-p547./configuremake make install
4.RailsVersion limit> 3.0.0
gem install rails -V
5.ImageMagickVersion limit> 6.6.4
Because the yum source version is too low, go to the official website to renew
Uninstall the original system version before installation
yum erase ImageMagick
Install basic Library
yum install bzip2-devel freetype-devel libjpeg-devel libpng-devel libtiff-devel giflib-devel zlib-devel ghostscript-devel djvulibre-devel libwmf-devel jasper-devel libtool-ltdl-devel libX11-devel libXext-devel libXt-devel lcms-devel libxml2-devel librsvg2-devel OpenEXR-develyum --enablerepo=epel install jasper jasper-libs jasper-devel
Due to various problems that may occur when you install ImageMagick with rpm, you need to install ImageMagick with the source code. download and install the latest source code package http://www.imagemagick.org/script/install-source.php?unix.
tar xvzf ImageMagick.tar.gzcd ImageMagick-6.8.9-7./configuremakemake installldconfig /usr/local/lib
Check whether the installation is complete
make check
6.InstallWkhtmltopdf
Go to the official website to download the latest http://wkhtmltopdf.org wkhtmltox-0.12.1_linux-centos6-amd64.rpm
rpm -ivh wkhtmltox-0.12.1_linux-centos6-amd64.rpm
7.Go to the topic and install snorby
git clone git://github.com/Snorby/snorby.gitcd snorbygem install bundlerbundle install
8.Configuration
vim config/database.yml
Change as needed
# Snorby Database Configuration## Please set your database password/user below#snorby: &snorby adapter: mysql username: root password: 123123 host: localhostdevelopment: database: snorby <<: *snorbytest: database: snorby <<: *snorbyproduction: database: snorby <<: *snorby
ConfigurationSnorby_config.yml
vi snorby_config.yml
development: domain: localhost:3000 wkhtmltopdf:/usr/local/bin/wkhtmltopdf mailer_sender: 'snorby@snorby.org' rules: - "/etc/snort/rules" - "/etc/snort/so_rules"test: domain: localhost:3000 wkhtmltopdf: /usr/local/bin/wkhtmltopdf mailer_sender: 'snorby@snorby.org'# Change the production configuration# for your environment.production: domain: 'demo.snorby.org' wkhtmltopdf: /usr/local/bin/wkhtmltopdf mailer_sender: 'snorby@snorby.org' rules: - "/etc/snort/rules/folder" - "/etc/snort/so_rules/folder"
vi script/rails
#! /Usr/bin/env ruby #! /Usr/local/bin/ruby
Uninstall an i18n gem (the one with the largest version)
gem uninstall i18n
Install
bundle exec rake snorby:setup
Run
bundle exec rails server -e production