5

I'm new to programming; however i have been able to read and research the programs i need to set-up for a GIS system. I chose to use Geoserver (as WMS) Postgresql, postgis, Qgis and Openlayers. I am setting up a web-based map platform. I have been able to install ubuntu on AWS on which i successfully installed postgresql and postgis. However, am finding it hard to follow tutorials through a command line as I need to see the file structure, etc as well as pgadmin3. is there any way i could access the instance through a gui to perform further installations and tutorials?

6

Probably not exactly a GIS question, but since I have some notes about this, I will paste some of it here.

When I need to access amazon services through gui, I use xubuntu (since it is more lightweight) and VNC. The following steps do the install, assuming you have xubuntu-desktop already installed. It comes from several online resources patched together long time ago. I am afraid I can't cite all the original resources, sorry about that. Anyways:

Install vnc:

sudo apt-get install vnc4server 

Set up VNC server, define a password:

vncpasswd

Configure VNC to start the XFCE desktop. Create a file:

$HOME/.vnc/xstartup

that contains:

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
ssh-agent xfce4-session &

Make it executable:

chmod +x $HOME/.vnc/xstartup

Create a ‘bin‘ directory in your home directory:

mkdir $HOME/bin
cd $HOME/bin

Create a script start_vnc.sh with the following content:

vncserver -geometry 1200x700 -depth 16 :1

This script will start a VNC server with a resolution of 1200×700 pixels.

Make it executable:

chmod +x $HOME/bin/start_vnc.sh

To get VNC server to start on boot, append the following lines to /etc/rc.local:

su youruser -c "/home/youruser/bin/start_vnc.sh"

Then you can connect with a VNC client to the machine and use the gui.

Another option is to use FreeNX. It worked for me following these instructions: http://blog.restbackup.com/2011/01/how-to-use-amazon-ec2-as-your-desktop.html

  • Thanks moovida am going to try the vnc option. The reason why i posted it as a GIS question is that I want to install and setup GIS application but need to see what am doing as opposed to the command line which as not particularly used to. Thanks for the answer – David Oct 15 '13 at 14:51
  • Be aware that VNC traffic isn't encrypted so if it's going over the internet you should tunnel it through SSH. – George Oct 15 '13 at 16:48
4

Another option that you might find useful is Vagrant, which allows you to set up a virtualbox instance using a scripting language and then deploy it to Amazon after you are happy (though I haven't yet tried this). I have a basic vagrant setup which will get you GeoServer in a tomcat instance on GitHub.

This will at least let you play with linux and get used to a command line before you try to get to grips with Amazon.

  • Thanks iant, you have been ahead of me because i was going to ask in the near future regarding the Geoserver in a Tomcat instance. – David Oct 15 '13 at 14:54
  • Thanks iant, you have been ahead of me because i was going to ask in the near future regarding the Geoserver in a Tomcat instance. My other question is whether its advisable to install all the tomcat instance within the same ubuntu instance that holds the Postrgresql. For better explanation: I have a ubuntu instance on Amazon EC2 and within that instance I have installed Postgresql, Postgis, pgadmin3, qgis. Should my Geoserver in tomcat instance be within this ubuntu? please advice and thanks in advance – David Oct 15 '13 at 15:01
  • 1
    technically there's no problem on having them together, at least if your EC2 machine has enough resources. On the other hand having them separated is a typical architecture decision as the database can be accesed by several web servers and users. It depends a lot on your context. – Jorge Sanz Oct 16 '13 at 11:21
1

You should set up and open an ssh tunnel, bind it to your local port and then connect to that local port with pgAdmin3 or other client application.

This should get you started.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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