Archive for the ‘Development Environments’ Category

Install (Set up) Aptana Studio on Ubuntu x64 Revisited

Aptana Studio just updated to version 1.5, this means great things for the native linux users! Now all you need to do is simply extract the tar some place and run the AptanaStudio script. For my purposes I extracted the tar to my desktop then:

sudo mv ~/Desktop/Aptana\ Studio\ 1.5/ /usr/local/aptana
sudo ln -sf /usr/local/aptana/AptanaStudio /usr/local/bin/aptana

Now you can run Aptana Studio by typing ‘aptana’ in your terminal or create a nice menu icon for the program. Happy developing!

Install (Set Up) Git and Gitosis on Ubuntu

Git is a free distribution revision control initially created by Linus Torvalds for the Linux kernel development. Git is different from subversion in several was, a good solid reference for explanation can be found from a 2008 RailsConf talk on Git by Scott Chacon: (Link).

I will be using Gitosis for this setup, Gitosis is a tool written for Git that helps in the setup of secure access controlled repositories. It will manage multiple repositories under one user account on the host machine. Using SSH keys to identify users, your repositories will be securely accessed and controlled. One large advantage to Gitosis is that your users will not need shell accounts on the machine to access repositories, they will however speak to a singular account what will not allow arbitrary commands.

Git is very local in nature, with remote distributed features. One major thing to wrap your head around is that git resides on your machine and tracks files locally, so if you create a new file and want git to track that file you need to let git know through the add command. Git also has remote locations that give it the ability to push to a, you guessed it…, remote location. You can add many remotes, typically you will see the “origin” remote location in most projects, we will be using origin in this article.

Before you start with this, note that I will try to explain every step as best possible. Some of the other guides out there will lead you along without the explanation, do yourself a favor and avoid the temptation to try and do this quickly… understand as much of git as possible, it will save you time down the road.

(more…)

Install (Set Up) OpenGoo on Ubuntu

OpenGoo is requires PHP 5.2+, MySQL 4.1+ and Apache 2.0+ so to get your AMP stack installed you can run the taskel command here:

sudo tasksel install lamp-server

Now there are more things you might want to address regarding that install, there is quite a bit of configuration that I hope to cover in a later post. The default install should be adequate except for a change to the php setup, you will want to edit the /etc/php5/apache2/php.ini file. Find the “memory_limit=” line so that you can modify it from probably 16MiB to 32MiB, OpenGoo requires at minimum 10MiB but we moved this to 32MiB just to be safe. Also you will want to install the gd module for php:

sudo apt-get install php5-gd

Once that is completed you can move on to the install. First thing will be to create a schema in your database, and a user that has access to that schema. I suggest giving the user access specifically over the localhost connection and none other. Once the database is prepped you just need to download opengoo and unzip it into a folder in your webroot. Navigate to this folder using your web browser and opengoo will ask you for some database credentials… and your finished.

If you have any tips and tricks with this software I would be happy to hear about it!

Install (Set up) Aptana Studio on Ubuntu x64

I have used Aptana Studio in the past under windows and loved the development environment… especially code completion for the fancy javascript libraries. Aptana is really easy to install under windows but its a little less easy under linux (at least until someone in the ubuntu realm packages it).

UPDATE: With the new Aptana Studio these directions are obsolete, see here.

JVM

You will need the jvm to run aptana, some of you might do what I do on a new ubuntu install and get the ‘ubuntu-restricted-extras’ however aptana requires a 32-bit jvm to operate. Run this command to pull down the 32-bit java6 binaries:

sudo apt-get install ia32-sun-java6-bin

*Not Required* Now if you want to run everything on your machine under this jvm then you can run this command to switch to the 32-bit jvm:

sudo update-alternatives –config java

This will give you a screen where you can select from the jvm’s installed.

XULRunner

XULRunner is a runtime environment that has replaced mozilla’s gecko environment. You will need to nab XULRunner 1.8.* even though your machine probably already has XULRunner 1.9.* installed. The new XULRunner is not compatible so you will need to download a 1.8.* version from mozilla directly. Unzip the contents of the tar.gz and move them to a /usr/lib directory, I unzipped my tar.gz to my desktop:

sudo mkdir /usr/lib/xulrunner-1.8.1.3
sudo cp -R ~/Desktop/xulrunner/* /usr/lib/xulrunner-1.8.1.3

Get Aptana and move it to the proper place

Now go and download aptana and unzip it onto your desktop. Then run the following command to move aptana from your desktop to the /usr/local directory.

sudo mv ~/Desktop/aptana /usr/local

Create a Launch Script

Create the following launch script in the aptana directory (/usr/local/aptana) name it aptana.sh or something else that makes sense to you.

#!/bin/sh
MOZILLA_FIVE_HOME=/usr/lib/xulrunner-1.8.1.3
if [ $LD_LIBRARY_PATH ]; then
LD_LIBRARY_PATH=$MOZILLA_FIVE_HOME:$LD_LIBRARY_PATH
else
LD_LIBRARY_PATH=$MOZILLA_FIVE_HOME
fi
export MOZILLA_FIVE_HOME LD_LIBRARY_PATH
/usr/local/aptana/AptanaStudio -vm /usr/lib/jvm/ia32-java-6-sun/jre/bin/java

You will then want to change the permissions of the script to make it executable:

sudo chmod a+x /usr/local/aptana/aptana.sh

Now with that script you can create a symbolic link to the /usr/local/bin directory and/or add a item to your menu:

sudo ln -sf /usr/local/aptana/aptana.sh /usr/local/bin/aptana

I did both just to try them out and it works great.

Happy Coding!

Resources:

Installing Aptana Studio Standalone on Ubuntu Intrepid 64bit (Aptana Forums)

Installing Aptana Studio on Linux (Aptana Documentation)

Install (Set up) Eclipse 3.4 & 3.5 on Ubuntu x64

Ubuntu is stuck with an older version of Eclipse (3.2 Europa) I love installing things from the repos because its easier than breathing however Ganymede is required for several new plugins and some more intricate java material (mylyn, inline, renames etc.)

JDK

You need to nab the JDK in order to run eclipse, if you are like me as soon as you install ubuntu you nab the ‘ubuntu-restricted-extras’ this installs the java JRE which will allow you to run java applications but you still need the JDK. Sun has an open source JDK available that has reached full JDK compliance so I will be installing that, however any JDK will do.

sudo apt-get install openjdk-6-jdk

Now you need to update your ~/.bashrc file to include the JAVA_HOME varialbe, since I installed openJDK I will point the variable to that directory.

export JAVA_HOME=/usr/lib/jvm/java-6-openjdk

Eclipse

Download the eclipse tar.gz and unzip it anywhere, mine is unzipped to my desktop in this example. Now you will want to move it to the /usr/local directory”

cd ~/Desktop
sudo mv eclipse /usr/local

Now create a symbolic link from /usr/local/bin/eclipse to /usr/local/eclipse/eclipse so you can run from the command line or add it to the start menu.

sudo ln -sf /usr/local/eclipse/eclipse /usr/local/bin/eclipse

With that symlink you can now launch eclipse by type ‘eclipse’ in the terminal or you can add an item to your menu under programming like I did.

Now you should be up and running fine, write some code!