Configure GlassFish 4.1 with JAVA 8 in Ubuntu 15.04

GlassFish is an open source application server for the development and deployment of Java Platform, Enterprise Edition (Java EE platform) applications and web technologies based on Java technology. It supports different Java based technologies like Enterprise JavaBeans, JPA, JavaServer Faces, JMS, RMI, JavaServer Pages, servlets and more. Glassfish provides a lightweight and extensible core based on OSGi Alliance standards with a web container. For ther configuration and management, it has a very good easy-to-use administration console with update tool for updates and add-on components. Glassfish has a good support for high availability clustering and load balancing.

Now, we’ll go for installing Glassfish in Ubuntu 15.04 with pretty easy steps.

1. Adding Java PPA

First of all, we’ll need to install Oracle JDK 8. As Oracle Java is not available in the repository of Ubuntu, we’ll need to add a PPA for the access of the Oracle java 8 installer. So, we’ll first install python-software-properties if not installed and add PPA into our Ubuntu 15.04 machine.

# apt-get install python-software-properties

Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
libpython-stdlib libpython2.7-minimal libpython2.7-stdlib python python-apt python-minimal
python-pycurl python2.7 python2.7-minimal
Suggested packages:
python-doc python-tk python-apt-dbg python-gtk2 python-vte python-apt-doc
libcurl4-gnutls-dev python-pycurl-dbg python-pycurl-doc python2.7-doc binutils
binfmt-support
The following NEW packages will be installed:
libpython-stdlib libpython2.7-minimal libpython2.7-stdlib python python-apt python-minimal
python-pycurl python-software-properties python2.7 python2.7-minimal
0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
Need to get 4,126 kB of archives.
After this operation, 17.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

Now, we’ll add the ppa for Java using add-apt-repository command as shown below.

# add-apt-repository ppa:webupd8team/java

Oracle Java (JDK) Installer (automatically downloads and installs Oracle JDK7 / JDK8 / JDK9). There are no actual Java files in this PPA.

More info (and Ubuntu installation instructions):
– for Oracle Java 7: http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
– for Oracle Java 8: http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html

Debian installation instructions:
– Oracle Java 7: http://www.webupd8.org/2012/06/how-to-install-oracle-java-7-in-debian.html
– Oracle Java 8: http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html

Important!!! For now, you should continue to use Java 8 because Oracle Java 9 is available as an early access release (it should be released in 2016)! You should only use Oracle Java 9 if you explicitly need it, because it may contain bugs and it might not include the latest security patches! Also, some Java options were removed in JDK9, so you may encounter issues with various Java apps. More information and installation instructions (Ubuntu / Linux Mint / Debian): http://www.webupd8.org/2015/02/install-oracle-java-9-in-ubuntu-linux.html
More info: https://launchpad.net/~webupd8team/+archive/ubuntu/java
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmpahw0r1nh/secring.gpg’ created
gpg: keyring `/tmp/tmpahw0r1nh/pubring.gpg’ created
gpg: requesting key EEA14886 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpahw0r1nh/trustdb.gpg: trustdb created
gpg: key EEA14886: public key “Launchpad VLC” imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK

After adding the PPA repository, we’ll want to update the local package repository index. To do so, we’ll need to run the following command.

# apt-get update

2. Installing Oracle JDK 8

After updating the repository index, we’ll want to install Oracle JDK 8 by running the following command.

# apt-get install oracle-java8-installer

Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
binutils gsfonts gsfonts-x11 java-common libfontenc1 libxfont1 x11-common xfonts-encodings
xfonts-utils
Suggested packages:
binutils-doc default-jre equivs binfmt-support visualvm ttf-baekmuk ttf-unfonts
ttf-unfonts-core ttf-kochi-gothic ttf-sazanami-gothic ttf-kochi-mincho ttf-sazanami-mincho
ttf-arphic-uming firefox firefox-2 iceweasel mozilla-firefox iceape-browser
mozilla-browser epiphany-gecko epiphany-webkit epiphany-browser galeon midbrowser
moblin-web-browser xulrunner xulrunner-1.9 konqueror chromium-browser midori google-chrome
The following NEW packages will be installed:
binutils gsfonts gsfonts-x11 java-common libfontenc1 libxfont1 oracle-java8-installer
x11-common xfonts-encodings xfonts-utils
0 upgraded, 10 newly installed, 0 to remove and 22 not upgraded.
Need to get 6,579 kB of archives.
After this operation, 20.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

3.  Setting “JAVA_HOME” Variable

Now, after installing the Oracle JDK 8, we’ll now want to set the environment variable “JAVA_HOME” as the path of the newly installed Oracle JDK 8. To set the variable, we’ll need to edit /etc/environment file using our favorite text editor.

# nano /etc/environment

After opening with the text editor, we’ll need to add the following line into the bottom of the file.

JAVA_HOME=”/usr/lib/jvm/java-8-oracle”

Once, the line is added, we’ll need to reload file.

# source /etc/environment

After installing and setting the Oracle JDK 8, we’ll run the following command to check and confirm.

# java -version

java version “1.8.0_45”
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

If we see the output as shown above, it is confirmed that we have Java 8 installed in our machine.

4. Installing GlassFish 4.1

After our Java is installed correctly, we’ll now march towards installing Glassfish 4.1 which is the latest version till date. We can even download the older versions from the GlassFish official download page https://glassfish.java.net/download.html .

# cd /tmp
# wget ‘http://download.java.net/glassfish/4.1/release/glassfish-4.1.zip’

–2015-05-26 05:53:22– http://download.java.net/glassfish/4.1/release/glassfish-4.1.zip
Resolving download.java.net (download.java.net)… 137.254.120.26
Connecting to download.java.net (download.java.net)|137.254.120.26|:80… connected.
HTTP request sent, awaiting response… 302 Moved Temporarily
Location: http://dlc-cdn.sun.com/glassfish/4.1/release/glassfish-4.1.zip [following]
–2015-05-26 05:53:22– http://dlc-cdn.sun.com/glassfish/4.1/release/glassfish-4.1.zip
Resolving dlc-cdn.sun.com (dlc-cdn.sun.com)… 23.0.160.207, 23.0.160.198
Connecting to dlc-cdn.sun.com (dlc-cdn.sun.com)|23.0.160.207|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 107743725 (103M) [application/zip]
Saving to: ‘glassfish-4.1.zip’

glassfish-4.1.zip 100%[===============================>] 102.75M 78.7MB/s in 1.3s

2015-05-26 05:53:23 (78.7 MB/s) – ‘glassfish-4.1.zip’ saved [107743725/107743725]

Now, we’ll want to extract the downloaded zip package of the latest GlassFish 4.1 . To do that, we’ll need to install unzip and then extract the package into /opt directory.

# apt-get install unzip
# unzip glassfish-4.1.zip -d /opt

5. Setting GlassFish PATH

Now, we’ll want to setup PATH variable for GlassFish so that the GlassFish executable files will be accessible directly from any directory. To do that, we’ll edit ~/.profile file and add the PATH to the directory where GlassFish is extracted.

# nano ~/.profile

Then add the following lines into it.

export PATH=/opt/glassfish4/bin:$PATH

# source ~/.profile

6. Starting GlassFish server

Finally, after installing Oracle Java 8 and GlassFish 4.1 in our Ubuntu 15.04 machine. We’ll want to start the GlassFish server. To do so, we’ll run asadmin as follows.

# asadmin start-domain

Waiting for domain1 to start …………
Successfully started the domain : domain1
domain Location: /opt/glassfish4/glassfish/domains/domain1
Log File: /opt/glassfish4/glassfish/domains/domain1/logs/server.log
Admin Port: 4848
Command start-domain executed successfully.

A domain is a set of one or more GlassFish Server instances managed by one administration server. The default GlassFish Server’s port is 8080 and administration server’s port is 4848 with the administration user name as admin with no password. We can visit http://ip-address:8080/ to check the homepage of GlassFish Server and http://ip-address:4848/ to get the admin login page in our web browser.

GlassFish Home Page

GlassFish Login

7. Enabling Secure Admin

Now, inorder to access the administration panel remotely via webpage, we’ll need to enable secure adminusing asadmin by running the following command.

# asadmin enable-secure-admin

Enter admin user name> admin
Enter admin password for user “admin”>
You must restart all running servers for the change in secure admin to take effect.
Command enable-secure-admin executed successfully.

This will ask us the username and password we want to set.

Note: If you get this error “remote failure: At least one admin user has an empty password, which secure admin does not permit. Use the change-admin-password command or the admin console to create non-empty passwords for admin accounts.” you’ll need to run as admin change-admin-password and enter a new password for the admin then retry above command.

# asadmin change-admin-password

Enter admin user name [default: admin]>admin
Enter the admin password>
Enter the new admin password>
Enter the new admin password again>
Authentication failed for user: admin (Usually, this means invalid user name and/or password)
Command change-admin-password failed.

After setting, we’ll need to restart the domain.

# asadmin restart-domain

Successfully restarted the domain
Command restart-domain executed successfully.

After enabling the secure admin, we are able to access the administration panel by pointing our web browser to http://ip-address:4848 . Then, access the admin panel by entering the credentials entered above.

GlassFish Administration Panel

8. Deploying WAR on GlassFish

Now, after we have successfully installed GlassFish and running the server, we’ll want to deploy a WAR application into the GlasFish. Here, in this tutorial we’ll deploy hello.war for the test of the server. So, first we’ll download hello.war from the official sample page of GlassFish using wget command.

# wget https://glassfish.java.net/downloads/quickstart/hello.war

–2015-05-26 06:46:19– https://glassfish.java.net/downloads/quickstart/hello.war
Resolving glassfish.java.net (glassfish.java.net)… 137.254.56.48
Connecting to glassfish.java.net (glassfish.java.net)|137.254.56.48|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 4102 (4.0K) [text/plain]
Saving to: ‘hello.war’

hello.war 100%[===============================>] 4.01K –.-KB/s in 0s

2015-05-26 06:46:19 (36.7 MB/s) – ‘hello.war’ saved [4102/4102]

After downloading the war file, we’ll now deploy the war file using asadmin command.

# asadmin deploy hello.war

Enter admin user name> admin
Enter admin password for user “admin”>
Application deployed with name hello.
Command deploy executed successfully.

This will ask us to enter the username and password for the application deployment.

As the war application has been deployed, we can check it by visiting http://ip-address:8080/hello using our web browser.

GlassFish Hello Deploy

9. Undeploying and Stopping Server

Now, if we have done our task with the GlassFish Server and the deployed application, we can simply undeploy the application and stop the GlassFish server.

To undeploy a running application, we can simply run asadmin undeploy with the application name we want to undeploy.

# asadmin undeploy hello

Enter admin user name> admin
Enter admin password for user “admin”>
Command undeploy executed successfully.

To stop the running GlassFish domain, we can simply run asadmin stop-domain .

# asadmin stop-domain

Waiting for the domain to stop .
Command stop-domain executed successfully.

Creating a password file

If you are tired of entering the username and password everytime you deploy or undeploy an application, you can simply create a file named pwdfile with a text editor and add the following lines into it.

# nano pwdfile

AS_ADMIN_PASSWORD=your_admin_password

Now, after that file is created, we can just add –passwordfile flag pointing the pwdfile and then deploy the war application as shown below.

# asadmin –passwordfile pwdfile deploy hello.war

Application deployed with name hello.
Command deploy executed successfully.

Now, the prompt for username and password won’t appear further.

Conclusion

GlassFish is an awesome open source application server that implements Java EE. We can install GlassFish with different methods like ZIP Package, Self-Extracting Bundle and Full Platform or Web Profile Distribution. Here, in this tutorial we’ve used full platform with zip package. The latest GlassFish version 4.1 includes new support for Java API for JSON Processing (JSON-P) 1.0, Java API for WebSocket 1.1, Batch Applications for the Java Platform 1.0, Concurrency Utilities for Java EE 1.0, Java Message Service (JMS) 2.0, Java API for RESTful Web Services (JAX-RS) 2.0 and many updated JAVA EE Standards. GlassFish has made the deployment of war java application very fast, secure and easy. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy 🙂

Reference: http://linoxide.com/ubuntu-how-to/setup-glassfish-4-1-java-8-ubuntu-15-04/

Advertisements

Basic guide to setup Ruby and Ruby on Rail in Ubuntu

This beginner’s guide will set up with Ruby 1.9.3, RVM and Rails 3.2.1 and is specifically written for a development environment on Ubuntu (versions 10 through 12), but will probably work on many other operating systems, including older / newer versions of Ubuntu and Debian. YMMV.

If you’re looking for a way to set this up on a production server then I would recommend the use of the railsready script which installs all the necessary packages for Ruby 1.9.3p0 and then that version of Ruby itself, Bundler and Rails. Then it leaves it up to you to install Apache or nginx to get your application online.

If you’re not using Ubuntu then try Wayne E. Seguin’s rails_bootstrap_script which probably gets Rails 3.0.9 working for you, albeit with 1.9.1 rather than 1.9.3. But in this guide, we’re going to want to use Ruby 1.9.3 and Rails 3.2.1.

Under no circumstance should you install Ruby, Rubygems or any Ruby-related packages from apt-get. This system is out-dated and leads to major headaches. Avoid it for Ruby-related packages. We do Ruby, we know what’s best. Trust us.

Still not convinced? Read this.

This guide will go through installing the RVM (Ruby Version Manager), then a version of Ruby (1.9.3), then Rails and finally Bundler.

By the end of this guide, you will have these things installed and have some very, very easy ways to manage gem dependencies for your different applications / libraries, as well as having multiple Ruby versions installed and usable all at once.

We assume you have sudo access to your machine, and that you have an understanding of the basic concepts of Ruby, such as “What is Rubygems?” and more importantly “How do I turn this computer-thing on?”. This knowledge can be garnered by reading the first chapter of any Ruby book.

If you’re looking for a good Rails book, I wrote one called Rails 3 in Action.

Housekeeping

First of all, we’re going to run sudo apt-get update so that we have the latest sources on our box so that we don’t run into any package-related issues, such as not being able to install some packages.

Next, we’re going to install Git (a version control system) and curl which are both required to install and use RVM, and build-essential which is required to compile Ruby versions, amongst other compilable things. To install these three packages we use this command:

sudo apt-get install build-essential git-core curl

RVM

RVM is a Ruby Version Manager created by Wayne E. Seguin and is extremely helpful for installing and managing many different versions of Ruby all at once. Sometimes you could be working on a project that requires an older (1.8.7) version of Ruby but also need a new version (1.9.3) for one of your newer projects. This is a problem that RVM solves beautifully.

Another situation could be that you want to have different sets of gems on the same version of Ruby but don’t want to have to do deal with Gem Conflict Hell. RVM has gemsets for this. This is a feature you wouldn’t have if you used the packaged Ruby.

We’re going to use it to install only one version of Ruby, but we can consult the documentation if we want to install a different version of Ruby.

With git-core and curl installed we’ll be able to install RVM with this command:

curl -L get.rvm.io | bash -s stable

The beautiful part of this is that it installs Ruby to our home directory, providing a sandboxed environment just for us.

Once that’s done, we’re going to need to add a line to ~/.bashrc file (the file responsible for setting up our bash session) which will load RVM. Do this by running this command in the terminal:

echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"' >> ~/.bashrc 

Then we’ll need to reload the ~/.bashrc file which we can do with this small command:

. ~/.bashrc

The next command we run will tell us what other packages we need to install for Ruby to work:

rvm requirements
...
# For Ruby / Ruby HEAD (MRI, Rubinius, & REE), install the following:
ruby: /usr/bin/apt-get install build-essential openssl libreadline6 libreadline6-dev 
curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev
libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion

A couple of these packages we’ve already installed, such as git-core and curl. They won’t be re-installed again.

These packages will lessen the pain when we’re working with Ruby. For example, the libssl-dev package will make OpenSSL support in Ruby work, libsqlite3-0 and libsqlite3-dev are required for the sqlite3-ruby gem and the libxml2-dev and libxslt-dev packages are required for the nokogiri gem. Let’s install all these packages now using this command:

sudo apt-get install build-essential openssl libreadline6 libreadline6-dev \
curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 \
libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison  \
subversion

Now our Ruby lives will be as painless as possible.

Ruby

With RVM and these packages we can install Ruby 1.9.3:

rvm install 1.9.3

This command will take a couple of minutes, so grab your $DRINKOFCHOICE and go outside or something. Once it’s done, we’ll have Ruby 1.9.3 installed. To begin using it we can use this lovely command:

rvm use 1.9.3

Please note, using ‘1.9.3’ as a default allows for when ruby is updated for that version then ALL projects using 1.9.3 as their string will be updated as well. This is a side affect people might not want. The preferred method is to include the patch level to the ’–default’ parameter so that if 1.9.3 gets updated, other projects don’t automatically have that change applied to to them as well. If, say for example, for some reason some method/action gets deprecated in a patchlevel or some method signature gets changed between patchlevels, this will affect all projects defined using the ‘1.9.3’ string. This may or may not be what people want. Please be aware of this! Now, to continue on..

Are we using 1.9.3? You betcha:

ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]

Or, even better, would be to make this the default for our user! Oooh, yes! Noting the ‘1.9.3’ side-note above, lets take note of the patchlevel, which in this case is ‘-p194’ and add that to our default selection.

rvm --default use 1.9.3-p194

Now whenever we open a new bash session for this user we’ll have Ruby available for us to use! Yay!

As an additional side-note: Users can, and should, use a gemset when possible so that they don’t pollute their ‘default’ which is what is selected when a gemset is not specified in either a project’s .rvmrc, or at the command-line. Each installed Ruby has a ‘@global’ gemset. This is used to share gems with other gemsets created under that specific Ruby, and with the ‘default’ gemset. This can be selected by running ‘rvm gemset use global’ and then installing the gems you wish to share to other gemsets including ‘default’. You can, of course simply install in each gemset but this will cause needless duplication and use up more disk-space and bandwidth.

Rails

Now that RVM and a version of Ruby is installed, we can install Rails. Because RVM is installed to our home directory, we don’t need to use that nastysudo to install things; we’ve got write-access! To install the Rails gem we’ll run this command:

gem install rails -v 3.2.3

This will install the rails gem and the other 28 gems that it and its dependencies depend on, including Bundler.

MySQL

If you’re planning on using the mysql2 gem for your application then you’ll want to install the libmysqlclient-dev package before you do that. Without it, you’ll get an error when the gem tries to compile its native extensions:

Building native extensions.  This could take a while...
ERROR:  Error installing mysql2:
	ERROR: Failed to build gem native extension.

/home/ryan/.rvm/rubies/ruby-1.9.3-p0/bin/ruby extconf.rb
checking for rb_thread_blocking_region()... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lmygcc... no
checking for mysql_query() in -lmysqlclient... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

PostgreSQL

Similar to the mysql2 gem’s error above, you’ll also get an error with the pg gem if you don’t have the libpq-dev package installed you’ll get this error:

    Building native extensions.  This could take a while...
ERROR:  Error installing pg:
	ERROR: Failed to build gem native extension.

/home/ryan/.rvm/rubies/ruby-1.9.3-p0/bin/ruby extconf.rb
checking for pg_config... no
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Fin.

And that’s it! Now you’ve got a Ruby environment you can use to write your (first?) Rails application in with such minimal effort. A good read after this would be the official guides for Ruby on Rails. Or perhaps the documentation on the RVM site which goes into using things such as gemsets and the exceptionally helpful per-project .rvmrc file. A quick way to generate an .rvmrc file is to run a command like this inside the project:

rvm use 1.9.3-p194@rails3 --rvmrc

RVM is such a powerful tool and comes in handy for day-to-day Ruby development. Use it, and not the packages from apt to live a life of development luxury.

 

Reference : http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/

Install Burg in Ubuntu

Introduction

BURG stands for Brand-new Universal loadeR from GRUB. It’s based on GRUB, and add features like new object format and configurable menu system. This page shows its usage.

Install using binary package

  • For Ubuntu 10.04 and 10.10 users, add the following PPA :
sudo add-apt-repository ppa:bean123ch/burg
  • For Ubuntu 11.04 users, add the following PPA :
sudo add-apt-repository ppa:n-muench/burg
  • Then use the following command to download and install the loader, themes and emulator:
sudo apt-get update && sudo apt-get install burg
  • During the installation, it should ask you to write the new boot loader to MBR. If you skip that step, you can later use the following command to update MBR of hd0:
sudo burg-install "(hd0)"

or ( FIXME ??? burg-pc package does not exist ! )

sudo dpkg-reconfigure burg-pc

Reference : https://help.ubuntu.com/community/Burg

How to install Aptana Studio 3 on Ubuntu 11.10 (Oneiric)

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. You may need to log out and back in it to show in the menu.

Reference : http://www.samclarke.com/2011/11/how-to-install-aptana-studio-3-on-ubuntu-11-10-oneiric/