Windows Server Setup - RedwoodAdmin/RedwoodFramework GitHub Wiki
For this guide, the install directory is assumed to be C:\www\redwood\
1. Install Python
- Download Python 2.7.3 for Windows from https://googledrive.com/host/0B-97c_xa0AumT2REUmNWWV96SEE/python-2.7.3.msi or http://www.python.org/download/
- Run and install using all default settings.
- Add
C:\Python27\to Path environment variable - Add system environment variable:
PYTHONPATH=C:\www\redwood\
2. Install Apache
- Download Apache 2.2 from https://googledrive.com/host/0B-97c_xa0AumT2REUmNWWV96SEE/httpd-2.2.22-win32-x86-openssl-0.9.8t.msi or http://www.softpedia.com/dyn-postdownload.php?p=12027&t=3&i=1
- Run and install using all default settings and the following inputs where required:
- Network Domain:
localhost - Server Name:
localhost - Administrator's email address: any email address you would like to use.
- Network Domain:
3. Install mod_wsgi
- Download mod_wsgi-win32-ap22py27-3.3.so from https://googledrive.com/host/0B-97c_xa0AumT2REUmNWWV96SEE/mod_wsgi-win32-ap22py27-3.3.so or http://code.google.com/p/modwsgi/downloads/list
- Rename file to
mod_wsgi.soand copy toC:\Program Files\Apache Software Foundation\Apache2.2\modules - Open
C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.confand add the line:LoadModule wsgi_module modules/mod_wsgi.soat the end of the list ofLoadModule ...lines.
4. Install GoLang
- Download go1.0.3 from https://googledrive.com/host/0B-97c_xa0AumT2REUmNWWV96SEE/go1.1rc2.windows-386.msi or http://code.google.com/p/go/downloads/list
- Run and install using all default settings.
5. Install Redis
- Download Redis 2.4.6 from https://googledrive.com/host/0B-97c_xa0AumT2REUmNWWV96SEE/redis-2.4.6-setup-32-bit.exe or https://github.com/rgl/redis/downloads
- Run and install using all default settings.
6. Install Python-redis interface
- Download Python-redis-2.7.4 from https://googledrive.com/host/0B-97c_xa0AumT2REUmNWWV96SEE/andymccurdy-redis-py-2.7.4-7-g57f92d9.zip or http://kushal.fedorapeople.org/redispy/html/user/install.html
- Unzip and navigate to folder in command prompt.
- Run
> setup.py install
7. Copy Source
- Navigate to https://github.com/RedwoodAdmin/RedwoodFramework?source=c and click Download ZIP.
- Extract the contents of the zip to
C:\www\redwood\ - Create empty file log.txt in
C:\www\redwood\ - Open
C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf, and change theDocumentRootpath toC:/www(Also replace the path further down in the file where it says This should be changed to whatever you set DocumentRoot to.)
8. Apache Config
- Copy the folder
C:\www\redwood\install\windows\apachetoC:\www\redwood\(Contains 2 files: config.json and django.wsgi) - Update the paths in both files if installing to a directory other than C:\www\redwood\
9. Install Router
- Create system environment variable:
GOPATH=C:\www\redwood\go\ - In command prompt navigate to C:\www\redwood\go\src\expecon-router and run
>go install - Create shortcut to
C:\www\redwood\go\bin\expecon-router.exeinC:\Users\User\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
10.Apache Virtual Host
- Overwrite contents of
C:\Program Files\Apache Software Foundation\Apache2.2\conf\extra\httpd-vhosts.confWith:
<VirtualHost *:80>
ServerName redwood.example.com
ServerAdmin [email protected]
WSGIScriptAlias / C:/www/redwood/apache/django.wsgi
Alias /static C:/www/redwood/static
</VirtualHost>
- In
C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf, uncomment the line:Include conf/extra/httpd-vhosts.conf
11.Install Django
- Download and run ez_setup.py from https://googledrive.com/host/0B-97c_xa0AumT2REUmNWWV96SEE/ez_setup.py
- Download Django 1.7.1 from https://googledrive.com/host/0B-97c_xa0AumT2REUmNWWV96SEE/Django-1.7.1.zip or https://www.djangoproject.com/download/
- Unzip and navigate to the resulting folder in a command prompt.
- run
>setup.py install(This will install Django in your Python installation’s site-packages directory) - Download django-reversion from https://googledrive.com/host/0B-97c_xa0AumT2REUmNWWV96SEE/django-reversion-1.8.4.zip or https://pypi.python.org/pypi/django-reversion/1.8.4
- Unzip and navigate to the resulting folder in a command prompt.
- run
>setup.py install
12.Initialize
- Restart Apache
- Start Redis service (service manager)
- Run
C:\www\redwood\go\bin\expecon-router.exeand add exception to Windows firewall if prompted. - In command prompt navigate to C:\www\redwood\ and run:
>manage.py syncdbproviding the following inputs when prompted:yes- username:
admin(or any other username) - email:
[email protected](or any other email) password: ubcecon(or any other password)
>manage.py collectstaticYes
13.Run
- Open Google Chrome and enter
localhost/adminin the address bar. - Login with the admin credentials provided during initialization.
- Click Sites -> example.com and set
- Domain name:
localhost - Display name:
localhost
- Domain name:
- Click save
Troubleshooting
- Cannot open “localhost/admin” and apache error.log shows something like “no module urls” Solution: Try rebooting
- Clients can’t connect to server Try turning off windows firewall – if that works then need to create inbound rule to allow tcp connections on port 80.