Skip to main content
Jump to: navigation, search

Eclipse Server Sandbox Setup

Revision as of 20:55, 29 August 2006 by (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This page documents how to set up your local Linux system to spoof most of the ( and infrastructure in order to test - in a sandbox - changes to your web and downloads content.

Thanks to Neil Skypuch for the initial setup work.

You will need to be root for most of the steps below.


To make your local machine think it's add this line to /etc/hosts:

Apache2 configuration

Add something like the following into your apache config file, /etc/apache2/sites-available/default:

<VirtualHost *>
       DocumentRoot "/var/www/"
<VirtualHost *>
       DocumentRoot "/var/www/"

Create vhost directories

Create the directories from which you'll be serving the spoofed content:

mkdir -p /var/www/; \
mkdir -p  /var/www/

Restart Apache2

apache2ctl restart
  - or -
/etc/init.d/apache2 restart

Phoenix content

Extract from CVS and put it in the root of your webserver:

cd /var/www; \
cvs -d -Q ex -r HEAD -d org.eclipse.phoenix/

Now, symlink the Phoenix content from within your vhost htdocs folders:

cd /var/www/; ln -s /var/www/; \
cd /var/www/; ln -s /var/www/; \

Web content

You can checkout the content from CVS and put it into the htdocs folders, or you can check out the content in Eclipse and symlink your checked out projects from the htdocs folder.

Checkout directly

This is handy for maintaining a mirror server (eg., an internal build server which contains the same files as on Changes you make to code - once committed back to CVS - can be updated running cvs update in the htdocs folder. This can be run as a cronjob at some regular interval.

cd /var/www/; \
cvs -d -Q co -d emf www/emf

This is also useful for editing code on a machine which does not have an X server running or on which you don't have Eclipse installed. After making changes to code, simply check it back in to cvs.

cd /var/www/; \
cvs -d -Q co -d emf www/emf

vi emf/somefile.php

cvs -d -Q ci "emf/somefile.php" -m "[bug#] some commit comment"

Symlink workspace projects

This is handy for sandbox testing of code changes on your local workstation. Every change you make in Eclipse to your code will immediately be reflected on your local webserver.

cd /var/www/; ln -s ~/workspace/emf

cd /var/www/; \
  mkdir -p tools/emf; cd tools/emf; \
  ln -s ~/workspace/emf-home/scripts; \
  ln -s ~/workspace/emf-home/_projectCommon.php

Vhost directory listings

# ls -lA /var/www/
lrwxrwxrwx 1 root root 28 2006-08-29 20:37 -> /var/www/
lrwxrwxrwx 1 root root 25 2006-08-29 20:29 emf -> /home/nickb/workspace/emf

# ls -lA /var/www/
lrwxrwxrwx 1 root root   27 2006-08-29 20:35 -> /var/www/
drwxr-xr-x 3 root root 4096 2006-08-29 20:33 tools
# ls -lA /var/www/
lrwxrwxrwx 1 root root 49 2006-08-29 20:34 _projectCommon.php -> /home/nickb/workspace/emf-home/_projectCommon.php
lrwxrwxrwx 1 root root 38 2006-08-29 20:33 scripts -> /home/nickb/workspace/emf-home/scripts

This text's title tends toward a tame tongue twister. ;-)

Back to the top