Upgrading Presently Self-Hosted
Description
This guide contains detailed information on upgrading Presently. If you have trouble finding what you’re looking for, please use the search box in the top right-hand corner of the page.
Steps
- backup your MySQL database before proceeding in case
$ mysqldump -u your_username -p your_password your_presently_database > presently_backup.sql - backup the necessary file
$ cp /var/www/presently/config/environments/production.rb /var/www/presently/config/environments/production.rb.bak - Upgrade the rpm from Intridea’s yum repository
$ yum update presently-amq - Copy back the file
$ cp /var/www/presently/config/environments/production.rb.bak /var/www/presently/config/environments/production.rb - Stop all the service
$ god terminate - Go to the presently home
$ cd /var/www/presently - Upgrade Database schema
$ RAILS_ENV=production rake db:migrate - Upgrade assets (JavaScripts package and CSS packages)
$ RAILS_ENV=production rake asset:packager:delete_all $ RAILS_ENV=production rake asset:packager:build_all - Update configuration files
$ cd /var/www/presently-camel/src/main/resources $ vi presently.properties Make sure twitter_period and feed_period has the configuration, if not, append the following two lines ~~~~~~~~~~~~~ feed_period=5 twitter_period=5 ~~~~~~~~~~~~~ - Start the service
$ god $ god load config/monitor.god - Restart the web server
$ /etc/init.d/httpd restart
IMPORTANT NOTICE FOR VERSION: There are some additional steps if you’re upgrading to versions > 1.2.0 from 1.0 or 1.1
- Remove the old ejabberd database
$ rm -rf /var/lib/ejabberd/* - Sync XMPP user accounts info
$ RAILS_ENV=production rake xmpp:migrate force=true
The last release has switch from twitter basic authentication to twitter oauth. So if you want to enable the twitter cross post feature, you should first register the twitter application and then update the following contents in the file /var/www/presently/config/settings.yml
twitter:
consumer_key: "the consumer key of your application"
consumer_secret: "the consumer secret of your application"
If you upgrade to version >= 2.0, you will meet the error such as “file conflict” when running the command “yum update presently-amq”, the following steps can help you solve the problem.
- Remove the old ruby 1.8.6 packages
$ yum clean all $ rpm -e --nodeps rubygems ruby-libs ruby-irb ruby-rdoc ruby-ri ruby ruby-devel - Then update the package
$ yum update presently-amq $ cp /var/www/presently/config/environments/production.rb.bak /var/www/presently/config/environments/production.rb - Rerun the installation script
$ cd /var/www/presently $ script/install - Refer to other steps above