Freeciv-web FCW Install

This page describes how to setup and install Freeciv-web (FCW) on your own computer. Freeciv-web can be setup using Vagrant on VirtualBox to quickly create a local developer image running Freeciv-web on Ubuntu on your host operating system such as Windows, OSX or Linux. This guide uses Windows, and will be similar on Linux.

System requirements:
Note that running Freeciv-web using Vagrant requires about 4Gb of memory and 3 Gb of harddisk space.

1. Enable Virtualization in your BIOS.

Link with how-to 1. Restart your computer. 2. Then press the specific hotkey to enter BIOS. The hotkeys may vary due to different brands. It usually is Esc, F2 or Del, etc. 3. Then navigate to the Advanced tab, press Enter to continue. 4. Select Virtualization and enable it. 5. After that, save the changes and reboot your computer. (source)

2. Install VirtualBox: https://www.virtualbox.org/

3. Install Vagrant: http://www.vagrantup.com/

4. Install Git:

http://git-scm.com/ (Git console)

or: https://desktop.github.com/ (GitHub Desktop)

5. Check out Freeciv-web from git

Checkout to a directory on your computer, by running these two git commands. For example to C:\git\.

This will checkout the active FCW version: git config --global core.autocrlf false git clone https://github.com/Lexxie9952/fcw.org-server.git

6. Run Vagrant up with the following commands in your Freeciv-web directory from step 5: vagrant plugin install vagrant-vbguest vagrant up

This will build, compile, install and run Freeciv-web on the virtual server image. Wait for the installation process to complete, watching for any error messages in the logs.

If you get errors related to Symlinks in Windows, you must run the console window as Administrator.

7. (Skip this step if you run Windows) For Linux or OS X, then you need to setup a SSH tunnel to port 80 like this: sudo ssh -p 2222 -gNfL 80:localhost:80 vagrant@localhost -i ~/.vagrant.d/insecure_private_key

8. Then test Freeciv-web by pointing your web-browser to http://localhost/ on your host operating system.

9. To login to your Vagrant server, run the command: vagrant ssh The Freeciv-web code can then be browsed under the /vagrant directory.

10. Making code changes

Making changes to the Freeciv-web webapp:

Rebuild the Freeciv-web webapp here: /vagrant/freeciv-web

Then rebuild with the ./build.sh command.

Making changes to the Freeciv C server: (TODO)

11. Further work suggestions:

Now study the code on https://github.com/Lexxie9952/fcw.org-server

Start and Stop of FCW:

/vagrant/scripts/start-freeciv-web.sh

/vagrant/scripts/stop-freeciv-web.sh

It is also possible to build FCW with Docker instead of Vagrant, which is documented in the README.

When successful, you can go to http://localhost to play FCW!