Reference: https://linux4one.com/how-to-install-dropbox-on-centos-8-server/
Install Dropbox on CentOS 8
Prerequisites
Before you start to install Dropbox on CentOS. You must have the non-root user account on your server with sudo privileges.
Install Dropbox Client
Here we will first install Dropbox Client. Download Dropbox Client using the following command.
curl -Lo dropbox-linux-x86_64.tar.gz https://www.dropbox.com/download?plat=lnx.x86_64
Create a directory for Dropbox installation by using the following command.
sudo mkdir -p /opt/dropbox
Now extract the downloaded file inside /opt/dropbox
directory.
sudo tar xzfv dropbox-linux-x86_64.tar.gz --strip 1 -C /opt/dropbox
Setup account for Dropbox
In this section, we will link your Dropbox account to Dropbox client on your server to do so execute the following command.
/opt/dropbox/dropboxd
You will get the following output, just copy the link given inside output and run it inside your favorite browser on your local machine.
Host ID Link: This computer isn't linked to any Dropbox account... Please visit https://www.dropbox.com/cli_link_nonce?nonce=3d88f2e1f2949265ebcac8d159913770 to link this device.
Now copy this link and paste it into the browser address bar on ANY computer. You will be prompted to login to link the account.
If you have existing Dropbox account then just Sign in otherwise create a new account on Dropbox.
Once you complete above process you will see the following output on your CentOS system.
This computer is now linked to Dropbox. Welcome Saeed
A new /home/username/Dropbox/
directory is created inside the HOME directory to store synchronised Dropbox files. Now Enter Ctrl+c
to set up Dropbox as a service.
Setup Dropbox as a Service
To set up Dropbox as a service, you should create a init script and Systemd unit file to do so enter the following command.
sudo curl -o /etc/init.d/dropbox https://gist.githubusercontent.com/thisismitch/6293d3f7f5fa37ca6eab/raw/2b326bf77368cbe5d01af21c623cd4dd75528c3d/dropbox
sudo curl -o /etc/systemd/system/dropbox.service https://gist.githubusercontent.com/thisismitch/6293d3f7f5fa37ca6eab/raw/99947e2ef986492fecbe1b7bfbaa303fefc42a62/dropbox.service
Run following script to make above files executables.
sudo chmod +x /etc/systemd/system/dropbox.service /etc/init.d/dropbox
/etc/sysconfig/dropbox
file should contain system user names who will run Dropbox. Run following command to edit this file.
sudo vim /etc/sysconfig/dropbox
Set username as given in below example then save and exit the file.
DROPBOX_USERS="username"
Now reload the Systemd daemon.
sudo systemctl daemon-reload
Now start and enable Dropbox service executing following command.
sudo systemctl start dropbox sudo systemctl enable dropbox
Unlink Dropbox Account
First stop the Dropbox service.
sudo service dropbox stop
Remove the user from /etc/default/dropbox
file.
sudo vim /etc/default/dropbox
Then delete Dropbox user directry using following command replacing USERNAME with the real username of system.
sudo rm -r ~/USERNAME/Dropbox
Now start the Dropbox service.
Conclusion
You have successfully learned how to install Dropbox on CentOS 8.
new update needs few manual dependency installs.
sudo yum install libglapi libXdamage libxshmfence libXxf86vm