1. Edit interfaces file
sudo gedit /etc/network/interfaces
add lines:
auto eth0
iface eth0 inet static
address 192.168.0.108
netmask 255.255.255.0
gateway 192.168.0.1
If there is a line like:
iface eth0 inet dhcp
need to add # before the line to comment it.
2. Edit file /etc/resolv.conf
sudo gedit /etc/resolv.conf
Add lines:
search 64.59.144.93
nameserver 64.59.144.92
These are DNS, that might be different for different ISP
If you do only step 1, not step 2, you can only visite web site by using number IP not domain name.
3. Restart network
sudo /etc/init.d/networking restart
You should see the static IP you setup.
Note: the graphic thing (for net work configure) on the top bar is not working even I set up everything there.
Wednesday, December 24, 2008
Install Eclipse 3.4 (jee) in Ubuntu 8.10
Download packages
Java - Application--Add/Remove -- Programming to get the latest version, as the time this is written, the version is 1.6
There are many articles about the java installation.
Eclipse - Eclipse website -eclipse-jee-ganymede-SR1-linux-gtk.tar.gz
I download this one is because no plugin is required to run with Apache-tomcat
Tomcat -- apache website - the version i got is apache-tomcat-6.0.18.tar.gz
Install packages
Sun's Java JDK: Many ways to do this. there are many different way on the website. I will put one here later.
Tomcat:
tar xzf apache-tomcat-6.0.18.tar.gz
sudo mv apache-tomcat-6.0.18 /usr/local
cd /usr/local
sudo chown -R root:root apache-tomcat-6.0.18
sudo chmod -R +r apache-tomcat-6.0.18
sudo chmod +x `sudo find apache-tomcat-6.0.18 -type d`
sudo ln -s apache-tomcat-6.0.18 tomcat
Edit tomcat users:
sudo gedit /usr/local/tomcat/conf/tomcat-users.xml
And add an admin and your username and password:
Eclipse:
Extract the eclipse download and move to opt.
tar zxvf eclipse-jee-ganymede-SR1-linux-gtk.tar.gz
sudo mv eclipse /opt/eclipse
cd /opt
sudo chown -R root:root eclipse
sudo chmod -R +r eclipse
sudo chmod +x `sudo find eclipse -type d`
Then create an eclipse executable in your path
sudo touch /usr/bin/eclipse
sudo chmod 755 /usr/bin/eclipse
sudo gedit /usr/bin/eclipse
With this contents
#!/bin/sh
#export MOZILLA_FIVE_HOME="/usr/lib/mozilla/"
export ECLIPSE_HOME="/opt/eclipse"
$ECLIPSE_HOME/eclipse $*
Then create a gnome menu item
sudoedit /usr/share/applications/eclipse.desktop
With this contents
[Desktop Entry]
Encoding=UTF-8
Name=Eclipse
Comment=Eclipse IDE
Exec=eclipse
Icon=/opt/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=GNOME;Application;Development;
StartupNotify=true
Configure
You now have a working eclipse.
But run this command first to initialise the set up.
/opt/eclipse/eclipse -clean
Then from here on you can run from the menu item
applications/programming/eclipse
Java - Application--Add/Remove -- Programming to get the latest version, as the time this is written, the version is 1.6
There are many articles about the java installation.
Eclipse - Eclipse website -eclipse-jee-ganymede-SR1-linux-gtk.tar.gz
I download this one is because no plugin is required to run with Apache-tomcat
Tomcat -- apache website - the version i got is apache-tomcat-6.0.18.tar.gz
Install packages
Sun's Java JDK: Many ways to do this. there are many different way on the website. I will put one here later.
Tomcat:
tar xzf apache-tomcat-6.0.18.tar.gz
sudo mv apache-tomcat-6.0.18 /usr/local
cd /usr/local
sudo chown -R root:root apache-tomcat-6.0.18
sudo chmod -R +r apache-tomcat-6.0.18
sudo chmod +x `sudo find apache-tomcat-6.0.18 -type d`
sudo ln -s apache-tomcat-6.0.18 tomcat
Edit tomcat users:
sudo gedit /usr/local/tomcat/conf/tomcat-users.xml
And add an admin and your username and password:
user name="admin" password="admin" roles="manager,admin"
user name="yourname" password="blah" roles="manager,admin"
Eclipse:user name="yourname" password="blah" roles="manager,admin"
Extract the eclipse download and move to opt.
tar zxvf eclipse-jee-ganymede-SR1-linux-gtk.tar.gz
sudo mv eclipse /opt/eclipse
cd /opt
sudo chown -R root:root eclipse
sudo chmod -R +r eclipse
sudo chmod +x `sudo find eclipse -type d`
Then create an eclipse executable in your path
sudo touch /usr/bin/eclipse
sudo chmod 755 /usr/bin/eclipse
sudo gedit /usr/bin/eclipse
With this contents
#!/bin/sh
#export MOZILLA_FIVE_HOME="/usr/lib/mozilla/"
export ECLIPSE_HOME="/opt/eclipse"
$ECLIPSE_HOME/eclipse $*
Then create a gnome menu item
sudoedit /usr/share/applications/eclipse.desktop
With this contents
[Desktop Entry]
Encoding=UTF-8
Name=Eclipse
Comment=Eclipse IDE
Exec=eclipse
Icon=/opt/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=GNOME;Application;Development;
StartupNotify=true
Configure
You now have a working eclipse.
But run this command first to initialise the set up.
/opt/eclipse/eclipse -clean
Then from here on you can run from the menu item
applications/programming/eclipse
Eclipse 3.4 (Ganymede) on Ubuntu
Eclipse Ganymede (the successor to Europa) has nice features that we are missing out on (Mylyn, inline renames, etc.).
JDK
Make sure that it is at least Java 5.
sudo apt-get install openjdk-6-jdk
Then update your ~./bashrc file, appending the JAVA_HOME (adjust this if you use a different JDK).
export JAVA_HOME=/usr/lib/jvm/java-6-openjdk/
Get Ganymede
wget http://ftp.osuosl.org/pub/eclipse/technology/epp/downloads/release/ganymede/R/eclipse-java-ganymede-linux-gtk.tar.gz
tar xzvf eclipse-java-ganymede-linux-gtk.tar.gz
mv eclipse eclipse3.4
We should be ready to go:
eclipse3.4/eclipse
And your nice new Eclipse is up and running.
Suggested Plugins
Eclipse is great because it has so many plugins. I even use it as my default Python editor. If you go to Help > Software Updates, you will see a vastly improved update dialog (the previous one was painful).
- EclEmma is a great code coverage tool. Update site: http://update.eclemma.org/
- Subclipse is the best Subversion plugin I have come across. Update site: http://subclipse.tigris.org/update_1.2.x
- PyDev one of the best editors I have come across (Code completition, refactoring, etc.). Update site: http://pydev.sourceforge.net/updates/
- Mecrurial My favorite new DVCS tool inside Eclipse. Update site: http://www.vectrace.com/eclipse-update/
- Regular Expressions can be easily tested with this plugin. Update site: http://brosinski.com/regex/update/
- Maven the Ant-replacement build tool for Java. Update site: http://m2eclipse.sonatype.org/update/
Update: As Scott points out in the comments, there is an open request on launchpad to include a more recent version of Eclipse in the Ubuntu repositories: https://bugs.edge.launchpad.net/ubuntu/+source/eclipse/+bug/123064
Subscribe to:
Posts (Atom)