-
Notifications
You must be signed in to change notification settings - Fork 283
Replace a Manual Install with Deb Package
If you did a Manual Installation of OneBody, or if you installed using our DigitalOcean Installer, Virtual Appliance, or Amazon AMI, you may wish to convert this installation to use our newer Deb Package. Here's roughly how to do it:
-
Backup the database.
mysqldump -u onebody -p onebody > /var/www/onebody/db/onebody.sql
Enter "onebody" for the password when prompted (unless you changed it to something else).
-
Follow the instructions here to install the deb package on your machine. Do not install nginx as suggested by the package itself -- we'll use your existing Apache server instead.
-
Copy the user-generated files (documents, pictures, etc.) over to the new install directory:
rsync -av /var/www/onebody/public/system/ /opt/onebody/public/system/
-
Edit the file
/etc/apache2/sites-available/000-default.conf
.-
Comment out the following lines (put a
#
in front of them):#DocumentRoot /var/www/onebody/public #XSendFile On #XSendFilePath /var/www/onebody/public/system
Once everything is running on the new OneBody instance, you can delete these lines.
-
Past the following lines below them:
<Proxy "balancer://onebody"> BalancerMember "http://localhost:3000" </Proxy> ProxyPass / balancer://onebody/ ProxyPassReverse / balancer://onebody/
-
Save the file and exit the editor.
-
-
Enable the proxy modules:
sudo a2enmod proxy proxy_http proxy_balancer lbmethod_byrequests sudo service apache2 restart
That's it! Check that your site is still running and everything looks ok.
If something goes terribly wrong and you don't want to debug it, you can point Apache back to your existing install like this:
-
Delete the lines added to
/etc/apache2/sites-available/000-default.conf
and uncomment (remove the#
) the lines we hid before. -
Restart Apache:
sudo service apache2 restart
-
Restore your database:
mysql -u onebody -p onebody < /var/www/onebody/db/onebody.sql
-
(Optional) uninstall the OneBody package.