This post is for those who find it much easier to program in a cloud based IDE, straight from their browser. The following instructions are for Cloud 9 IDE installation on Centos, RHEL or Amazon Linux.
First of all login to your Linux machine using SSH and cd to your home folder, or wherever you want to install C9.
In my case:
Then run the following command, which will install all dependencies required for Cloud 9 to run on a Linux machine:
yum -y install nodejs git gcc glibc-static ncurses-devel
Now we will clone the C9 github project and build the installation from it, run the following command (note c9sdk at the end, that’s the folder in your home directory where the project will be cloned to):
git clone git://github.com/c9/core.git c9sdk
Now we should be able to switch to a newly cloned C9sdk folder:
Now we can start the installation process:
The process will go for about 2-3 minutes and once installed, you’d see the following message:
This is saying that we should be ready t0 start the Cloud 9 IDE by running the startup command:
node server.js -p 8080 -a :
Note: You can change the port to your liking, especially if you don’t want to run it on a default port 8080 which is often used by application servers such as Tomcat or JBoss.
The following options can be used for server.sj:
--settings Settings file to use --help Show command line options. -t Start in test mode -k Kill tmux server in test mode -b Start the bridge server - to receive commands from the cli [default: false] -w Workspace directory --port Port --debug Turn debugging on --listen IP address of the server --readonly Run in read only mode --packed Whether to use the packed version. --auth Basic Auth username:password --collab Whether to enable collab. --no-cache Don't use the cached version of CSS
Anyhow, I’ve decided to run it on a little less used port 9191, like this:
node server.js -p 9191 -a username:password
Note the two additional parameters at the end (access credentials), which you should consider supplying, especially if you’re planning to log into Cloud9 IDE from a remote machine.
This is also a command that you should perhaps schedule to autostart with your Linux system on boot, so you don’t have to run it every single time you want to code using your browser.
Running above command confirms that my server is up and running now:
Now, if this is a remote server, which you’ll be accessing from your own workstation, make sure to add a firewall exception for the port you’ve decided to use.
Once done, visit http://server-address:9191 , it’ll ask you for a login name and password for the user under which we’ve started Cloud9 IDE, just type it in:
Then you’ll be able to see your cloud IDE:
If you want to change in which workspace you want your IDE to start, for example if you want to live edit your files in /var/www folder where you’re hosting your website, you can start the server with -w option like this:
node server.js -p 9191 -a username:password -w /var/www
Another option is to change the following workspaceDir variable (but I didn’t test if this works)
If you ever need to upgrade Cloud 9 SDK to the latest version, simply go back to your home folder, cd to c9sdk folder and run:
git pull origin master scripts/install-sdk.sh