-
Notifications
You must be signed in to change notification settings - Fork 5
Installing
<<toc>>
Important: Nuntium runs only on unix-based systems.
- Download the source code: git clone https://github.com/instedd/nuntium
- Download and install the required libraries by running bundle
# mysql -u root -p mysql> create database nuntium; mysql> create database nuntium_development; mysql> create database nuntium_test; mysql> create user 'nuntium'@'localhost'; mysql> set password for 'nuntium'@'localhost' = PASSWORD('secret'); mysql> grant all on nuntium_test.* to 'nuntium'@'localhost'; mysql> grant all on nuntium_development.* to 'nuntium'@'localhost'; mysql> grant all on nuntium.* to 'nuntium'@'localhost' identified by 'secret';
Modify you config/database.yml to match the settings above
development: adapter: mysql database: nuntium_development username: nuntium password: pool: 5 timeout: 5000 reconnect: true test: adapter: mysql database: nuntium_test username: nuntium password: pool: 5 timeout: 5000 production: adapter: mysql database: nuntium username: nuntium password: secret pool: 5 timeout: 5000 reconnect: true
# cd path/to/nuntium # bundle exec rake db:schema:load # bundle exec rake db:test:clone # bundle exec rake db:schema:load RAILS_ENV=production # bundle exec rake db:seed # bundle exec rake db:seed RAILS_ENV=production
- First install Sun-Java http://www.duinsoft.nl/packages.php?t=en
- Then compile the assets:
cd path/to/nuntium bundle exec smart_asset
Nuntium depends on:
- http://www.rabbitmq.com/ for it's background job processing
- http://memcached.org/ for improved performance
- http://nokogiri.org for fast XML parsing You will need to install these before running Nuntium.
- Follow the http://www.rabbitmq.com/install.html
- Run the RabbitMQ server
- Once you have it installed, run the following command on your Nuntium directory:
sudo rake rabbit:prepare
This will create the RabbitMQ user and vhost specified in the config/amqp.yml file.
Make sure you have RabbitMQ running before running Nuntium. You can restart the RabbitMQ server by issuing this command:
sudo /etc/init.d/rabbitmq-server restart
Follow the http://code.google.com/p/memcached/wiki/NewStart
Make sure you have Memcached running before running Nuntium:
memcached -d
Follow the http://nokogiri.org/tutorials/installing_nokogiri.html
You can use the script in script/nuntium_service.sh to start the Nuntium services in daemon mode e.g.
# cd <<nuntium_clone_dir>> # ./script/nuntium_service.sh cron_daemon_ctl.rb start development # ./script/nuntium_service.sh cron_daemon_ctl.rb start development # ./script/nuntium_service.sh generic_worker_daemon_ctl.rb start development slow 1 # ./script/nuntium_service.sh generic_worker_daemon_ctl.rb start development fast 1 # ./script/nuntium_service.sh managed_processes_daemon_ctl.rb start development # ./script/nuntium_service.sh scheduled_jobs_service_daemon_ctl.rb start development
To start the services manually (useful for debugging)
# cd <<nuntium clone dir>> # bundle exec ruby ./lib/services/cron_daemon.rb # bundle exec ruby ./lib/services/generic_worker_daemon.rb development slow 1 # bundle exec ruby ./lib/services/generic_worker_daemon.rb development fast 1 # bundle exec ruby ./lib/services/managed_processes_daemon.rb development # bundle exec rails server
To avoid problems issues with different versions of Ruby, it's recommended to use https://rvm.io
If you do this in your production environment ensure that you uninstall the system installed ruby to avoid conflicts
# sudo apt-get uninstall ruby1.8
You might want to use passenger for the web server and monit for monitoring the services.
Follow the http://www.modrails.com/install.html
- Put the Virtual Host configuration (instructions given when installing passenger) in /etc/apache2/sites-enabled/nuntium.conf e.g.
<VirtualHost *:80> ServerName your_elastic_ip_or_dns DocumentRoot path/to/nuntium/public PassengerSpawnMethod conservative <Directory path/to/nuntium/public> AllowOverride all Options -MultiViews </Directory> </VirtualHost>
- Remember to restart apache sudo apachectl restart
- Test it out by pointing your browser to your_elastic_ip
If you run the tests and they pass there is a very high chance that Nuntium is correctly installed on your system. ;-)
- Run the RabbitMQ rake task for test environment:
RAILS_ENV=test rake rabbit:prepare
- Prepare the database for testing:
rake db:test:prepare
- Run the tests:
rake test
That probably means you don't have #RabbitMQ.
Please send a message to our http://tech.groups.yahoo.com/group/nuntiumusers/.