问题
I have eclipse downloaded on one of my ubuntu machines. and now I want eclipse on my other ubuntu machine. how can I do this?
回答1:
In the computer you have eclipse installed:
Backup the folder containing eclipse (usually it's in the /opt folder)
sudo cp -r /opt/eclipse /folder/to/backup/eclipse
In the one you want eclipse to be installed:
- Copy eclipse to the opt folder
sudo cp -r /backup/eclipse /opt/eclipse
- Add read permission to all files
chmod -R +r /opt/eclipse
- Add the executable bit to the eclipse binary
chmod +x /opt/eclipse/eclipse
- Add an executalbe entry to /usr/bin
sudo touch /usr/bin/eclipse
sudo chmod +x /usr/bin eclipse
- Edit the created file with your favourite editor.
sudo gedit -w /usr/bin/eclipse
and paste the following content:
#!/bin/sh
export ECLIPSE_HOME="/opt/eclipse"
$ECLIPSE_HOME/eclipse $*
At this point you should be able to run eclipse
from command line, If you want to add a desktop entry, investigate how to do this in your desktop environment.
来源:https://stackoverflow.com/questions/15461716/copy-transfer-eclipse-from-one-ubuntulinux-machine-to-other