Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Hi I have a headless ubuntu server and would like to install some sort of cloud9 like IDE - any suggestions with instructions?

Code highlighting and hinting would be excellent. This is for mainly PHP development.

share|improve this question
add comment

1 Answer

I just installed cloud9 IDE yesterday (and tried the whole last week) on ubuntu server 12.04, it's kind of tricky, but I figured out how to do it (with the help of http://www.samclarke.com/2012/07/how-to-install-cloud-9-ide-on-ubuntu-12-04-lts-precise-pangolin/).

If you have nodejs installed, you first have to uninstall it and you need to install some extra packages: sudo apt-get install build-essential g++ curl libssl-dev apache2-utils git libxml2-dev

You should create a new user called "cloud9" for example sudo adduser cloud9. Everything that follows has to be done as the new user!

Install the node version manager (nvm) in the home directory of cloud9 by using:

  • git clone git://github.com/creationix/nvm.git ~/nvm
  • echo '. ~/nvm/nvm.sh' >> ~/.bashrc && . ~/.bashrc

Now install nodejs 0.8.23 using nvm:

  • nvm install v0.8.23
  • nvm use v0.8.23

Install sourcemint via npm:

  • npm install sm

Clone the cloud9 git repository into the home directory of cloud9:

  • git clone git://github.com/ajaxorg/cloud9.git

Change into the directory "cloud9" and run sourcemint:

  • ../node_modules/sm/bin/sm install

Now you can start cloud9 with ~/cloud9/bin/cloud9.sh.

To automatically start cloud9 you need a script:

#!/bin/bash
# It is important to use bash here and not sh!
. ~/nvm/nvm.sh
nvm use v0.8.23
~/cloud9/bin/cloud9.sh

The script has to have executable permissions!

You can start the server at startup by adding the following line to /etc/rc.local: su cloud9 -c /home/cloud9/scriptname.sh &

If you want cloud9 to be accessible on port 80 add the following to your virtualhost entry in apache2:

ProxyPass / http://localhost:3131
ProxyPassReverse / http://localhost:3131

(maybe / and http://... need to be the other way round, I'm not sure)

Then enable the mod_proxy module of apache2: sudo a2enmod mod_proxy

And restart apache2: sudo service apache2 restart

That's it, now you have a working installation of cloud9 on ubuntu server!

share|improve this answer
    
I have since switched to my original love; Debian. But I will try then when I get home. Hope it works :) –  Omar Mir Mar 20 '13 at 14:49
    
@OmarMir I made a mistake in the script. The point in the 3rd line was missing. –  FSMaxB Mar 20 '13 at 21:11
    
As time passes, the compatibility with different versions of nodejs is changing, so the only way to make it work is trying node-versions until sourcemint (sm) installs properly and everything else is working. –  FSMaxB Apr 29 '13 at 8:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.