Nervi Roberto

Consulente Informatico

Base:http://www.dropboxwiki.com/Text_Based_Linux_Install

  1. Log in to your Linux server so you obtain a shell prompt, and change to your home directory.
cd
  1. Stable 32-bit:
wget -O dropbox.tar.gz "http://www.dropbox.com/download/?plat=lnx.x86" 

Stable 64-bit:

wget -O dropbox.tar.gz "http://www.dropbox.com/download/?plat=lnx.x86_64"
  1. Sanity check to make sure we're not going to clog our home directory.
tar -tzf dropbox.tar.gz 
  1. Extract
tar -xvzf dropbox.tar.gz
  1. Make sure the LANG environment variable is set to something other than NULL, e.g. en_US.iso88591. If it is NULL, you'll get a cryptic error.
  2. Run dropboxd
~/.dropbox-dist/dropboxd
  1. You should see output like this:
This client is not linked to any account... Please visit https://www.dropbox.com/cli_link?host_id=7d44a557aa58f285f2da0x67334d02c1 to link this machine.

dropboxd will create a ~/Dropbox folder and start synchronizing it after this step! Go to the URL given; you should see a success message at the top of your screen.

Eseguire fino a quando appare il link per agganciare il pc all'account.

Lasciare la riga che dia errore in continuo.

Copiare il link ed incolarlo in windows browser, dare la password dell'account dropbox.

Se tutto regolare si ferma dicendo "Client successfull linked, wencome <nome>"

Viene creata una cartella Dropbox ed inizia a sincronizzare.

 

Varianti per centOS: Come usare dropbox "come un servizio"

1

sudo vi /etc/init.d/dropbox

and paste in the below

# chkconfig: 345 85 15
# description: Startup script for dropbox daemon
#
# processname: dropboxd
# pidfile: /var/run/dropbox.pid
# config: /etc/sysconfig/dropbox
#
 
### BEGIN INIT INFO
# Provides: dropboxd
# Required-Start: $local_fs $network $syslog
# Required-Stop: $local_fs $syslog
# Should-Start: $syslog
# Should-Stop: $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start up the Dropbox file syncing daemon
# Description: Dropbox is a filesyncing sevice provided by dropbox.com
# This service starts up the dropbox daemon.
### END INIT INFO
 
# Source function library.
. /etc/rc.d/init.d/functions
 
DROPBOX_USERS="root"
 
[ -f /etc/sysconfig/dropbox ] && . /etc/sysconfig/dropbox
prog=dropboxd
lockfile=${LOCKFILE-/var/lock/subsys/$prog}
config=${CONFIG-/etc/sysconfig/dropbox}
RETVAL=0
 
start() {
echo -n $"Starting $prog"
if [ -z $DROPBOX_USERS ] ; then
echo -n ": unconfigured: $config"
echo_failure
echo
rm -f ${lockfile} ${pidfile}
RETURN=6
return $RETVAL
fi
for dbuser in $DROPBOX_USERS; do
daemon --user $dbuser /bin/sh -c "~/.dropbox-dist/dropboxd &"
done
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch ${lockfile}
return $RETVAL
}
 
status() {
for dbuser in $DROPBOX_USERS; do
dbpid=`pgrep -u $dbuser dropbox | grep -v grep`
if [ -z $dbpid ] ; then
echo "dropboxd for USER $dbuser: not running."
else
echo "dropboxd for USER $dbuser: running (pid $dbpid)"
fi
done
}
 
stop() {
echo -n $"Stopping $prog"
for dbuser in $DROPBOX_USERS; do
killproc /home/$dbuser/.dropbox-dist/dropbox
done
RETVAL=$?
echo
[ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
}
 
# See how we were called.
case "$1" in
start)
start
;;
status)
status
;;
stop)
stop
;;
restart)
stop
start
;;
*)
echo $"Usage: $prog {start|status|stop|restart}"
RETVAL=3
esac
exit $RETVAL

----------------------------------

qundi dare i permessi al file

sudo chmod +x /etc/init.d/dropbox

sudo /sbin/chkconfig --add dropbox

sudo chmod 755 /etc/init.d/dropbox

Si può quindi usare cosi:

service dropbox start|stop|status|restart