Install Java and Java browser plugin ubantu 11.10


Oracle’s Java 6 and 7.

Ubuntu 11.10 does not offer Oracle’s Java because OpenJDK can now replace it.

However you can install Oracle’s Java 6.2 from this PPA (Private Package Archive).
Please see ppa:flexiondotorg/java…

sudo add-apt-repository ppa:flexiondotorg/java
sudo apt-get update
sudo apt-cache search sun-java6
sudo apt-get install –reinstall sun-java6-jre sun-java6-plugin sun-java6-fonts

Then set java-6-sun as default. Choose java-6-sun/jre/ from the list. This step is important:
sudo update-alternatives –config java

This command does it directly without asking:
sudo update-alternatives –set java /usr/lib/jvm/java-6-sun/jre/bin/java

 

if above bold command is giving error then use blow that must be work(i wasted my 2 days on it)

sudo apt-get install –reinstall sun-java6-jre sun-java6-plugin sun-java6-fonts sun-java6-bin gsfonts-x11 unixodbc odbcinst1debian2 odbcinst

How to install Aptana Studio 3 on Ubuntu 11.10


These instructions are for installing the standalone version of Aptana Studio 3.

1. Install Sun Java – Aptana Studio doesn’t currently work with OpenJDK:

sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jdk sun-java6-plugin

2. Download & install xulrunner – Ubuntu 11.10 doesn’t include xulrunner so it must be downloaded.

If you are using Ubuntu 64 bit use:

wget -O xulrunner.deb http://launchpadlibrarian.net/70321329/xulrunner-1.9.2_1.9.2.17%2Bbuild3%2Bnobinonly-0ubuntu1_amd64.deb
sudo dpkg -i xulrunner.deb

If you are using Ubuntu 32 bit use:

wget -O xulrunner.deb http://launchpadlibrarian.net/70321863/xulrunner-1.9.2_1.9.2.17%2Bbuild3%2Bnobinonly-0ubuntu1_i386.deb
sudo dpkg -i xulrunner.deb

3. Download the Standalone version of Aptana Studio 3 from the Aptana Studio website.

4. Unzip it to /opt/aptana-studio-3:

sudo unzip [name of Aptana Studio ZIP file here].zip -d /opt
sudo mv /opt/Aptana\ Studio\ 3 /opt/aptana-studio-3

5. Install the menu item:
wget http://www.samclarke.com/wp-content/uploads/2011/11/AptanaStudio.desktop
sudo mv AptanaStudio.desktop /usr/share/applications/AptanaStudio.desktop

That’s it, Aptana Studio 3 should now be installed and ready to use.

Installing MongoDB 2.0 on Ubuntu 11.10


Ubuntu 11.10 ships with an older version of MongoDB, in this article I’m going to show how to install properly the latest version MongoDB which the 2.0.1.

First you have to download the 32bit or 64bit Linux binaries and unzip the contents to /usr/local.

1 cd /tmp
2 wget http://fastdl.mongodb.org/linux/mongodb-linux-i686-2.0.1.tgz
3 sudo tar -zxf /tmp/mongodb-linux-i686-2.0.1.tgz -C /usr/local

Then you need to configure some symbolic links.

01 sudo ln -s /usr/local/mongodb-linux-i686-2.0.1 /usr/local/mongodb
02 sudo ln -s /usr/local/mongodb/bin/bsondump /usr/local/bin/bsondump
03 sudo ln -s /usr/local/mongodb/bin/mongo /usr/local/bin/mongo
04 sudo ln -s /usr/local/mongodb/bin/mongod /usr/local/bin/mongod
05 sudo ln -s /usr/local/mongodb/bin/mongodump /usr/local/bin/mongodump
06 sudo ln -s /usr/local/mongodb/bin/mongoexport /usr/local/bin/mongoexport
07 sudo ln -s /usr/local/mongodb/bin/mongofiles /usr/local/bin/mongofiles
08 sudo ln -s /usr/local/mongodb/bin/mongoimport /usr/local/bin/mongoimport
09 sudo ln -s /usr/local/mongodb/bin/mongorestore /usr/local/bin/mongorestore
10 sudo ln -s /usr/local/mongodb/bin/mongos /usr/local/bin/mongos
11 sudo ln -s /usr/local/mongodb/bin/mongosniff /usr/local/bin/mongosniff
12 sudo ln -s /usr/local/mongodb/bin/mongostat /usr/local/bin/mongostat

All you need to do now is to setup the Linux service which will be used to start MongoDB server, to do so download this script.

1 wget https://github.com/ijonas/dotfiles/raw/master/etc/init.d/mongod
2 sudo mv mongod /etc/init.d/mongod
3 sudo chmod +x /etc/init.d/mongod

After this, you’ll need to create a new system user ‘mongodb’ and prepare some folders.
1 sudo useradd mongodb
2 sudo mkdir -p /var/lib/mongodb
3 sudo mkdir -p /var/log/mongodb
4 sudo chown mongodb.mongodb /var/lib/mongodb
5 sudo chown mongodb.mongodb /var/log/mongodb

And finally you need to activate you MongoDB service’s by adding it to your system’s run-level. That way the service will startup during the boot sequence and stop nicely during the OS shutdown procedure.

1 sudo update-rc.d mongod defaults

That’s all, now you have a cleanly installed MongoDB on your server.