Changes

Jump to navigation Jump to search
2,882 bytes added ,  00:18, 24 August 2014
Install Dropbox on a SME server
{{Level|Advanced}}
{{Warning box|At this time (August 2014) this procedure requires installation of gcc in order to compile python2.7 from source. Having gcc installed on your server could significantly compromise your server's security.<br />Thorough understanding of linux system management is required.<br /><br /><b>Proceed at your own risk</b>}}

Dropbox can be installed on a SME server that also has [[Python Altinstall|python 2.7]] installed.

Dropbox installation instructions for linux can be found here: https://www.dropbox.com/install?os=lnx

These instructions describe a way to install Dropbox and link /root/Dropbox to an existing Dropbox account.

==Prerequisites==
* Python 2.7 as described in [[Python Altinstall]]
* A dropbox account (free or paid)

==Installation==
===Install the dropbox binaries===
<nowiki>cd ~ && uname -a |grep "x86_64" \
&& wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf - \
|| wget -O - "https://www.dropbox.com/download?plat=lnx.x86" | tar xzf -
</nowiki>
===Link your SME server to an existing Dropbox account===
At the command prompt on your SME server execute this command:
cd ~ && python2.7 .dropbox-dist/dropboxd

A URL will be displayed that can be used to link your SME server to an existing dropbox account. To complete the account link, you open the provided URL in a browser on a computer that will let you login to your account.

After you have successfully opened the account link URL, your SME server will display a message similar to:
This computer is now linked to Dropbox. Welcome <name>
Press <Ctrl>-C to close the dropbox daemon.

You will also get an email at the email address used by your dropbox account indicating that a new computer has been linked to your account.

===Install the dropbox command-line manager===
The dropbox command line manager is useful for stopping, starting, and monitoring the dropbox daemon.

<nowiki>cd ~
wget -O dropbox.py https://www.dropbox.com/download?dl=packages/dropbox.py
chmod 700 dropbox.py
</nowiki>

You can now start the dropbox daemon manually using
python2.7 /root/dropbox.py start

===Configure Dropbox to start at boot===
While logged in as root, run 'crontab -e' and add the following line to the crontab file for root:
@reboot /usr/local/bin/python2.7 /root/dropbox.py start

===Update Dropbox===
<nowiki>cd ~ && python2.7 dropbox.py stop
uname -a |grep "x86_64" \
&& wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf - \
|| wget -O - "https://www.dropbox.com/download?plat=lnx.x86" | tar xzf -
python2.7 dropbox.py start
</nowiki>

===Using Dropbox===
Once the dropbox daemon is installed and linked, your existing Dropbox folder will synchronize into ~/Dropbox.

I have not tested this, but you should be able to link arbitrary ibays or user folders into your Dropbox folder using hard links and possibly symlinks.

Navigation menu