You can use the editor on GitHub to maintain and preview the content for your website in Markdown files.
Whenever you commit to this repository, GitHub Pages will run Jekyll to rebuild the pages in your site, from the content in your Markdown files.
Markdown is a lightweight and easy-to-use syntax for styling your writing. It includes conventions for
Syntax highlighted code block
# Header 1
## Header 2
### Header 3
- Bulleted
- List
1. Numbered
2. List
**Bold** and _Italic_ and `Code` text
[Link](url) and ![Image](src)
For more details see GitHub Flavored Markdown.
Your Pages site will use the layout and styles from the Jekyll theme you have selected in your repository settings. The name of this theme is saved in the Jekyll _config.yml
configuration file.
Having trouble with Pages? Check out our documentation or contact support and we’ll help you sort it out.
-
Install Python 2.7
-
Visit Python Official Website to download 64-bit python2;
-
Run the .exe file you've just download by double clicking, and finish installation follow the instructions; (Make sure to tick "add to path" during installation)
-
Check version after finishing by command:
>
py -2 --version
-
To find out more about python2, see Python2 Documents;
-
-
Install & Build Virtual Environment
-
Open a cmd and type commands below:
>
cd C:\Users\xxx\
// xxx is your user name on Windows, same notation below.-
Installation
>
py -2 -m pip install virtualenv
-
Build Environment
>
mkdir Envs
>
cd Envs
>
py -2 -m virtualenv stardust
-
Activate Environment
>
C:\Users\xxx\Envs\stardust\Script\activate
Note: Make sure there is a (stardust) on the right side of the command prompt looks like
(stardust) C:\Users\xxx\Envs\>
Then, if you type
where python
, the feedback should beC:\Users\xxx\Envs\stardust\Scripts\python.exe
on the first line. -
Deactivate Environment
>
deactivate
-
-
-
Install Pycharm
- Visit Pycharm Official Website and download Pycharm Professional version.
- Install Pycharm follow the installer instruction;
- To activate Pycharm, ask your predecessor for help;
- To get started with Pycharm, see Pycharm Documents.
-
Install GitHub
-
Visit https://git-scm.com/download/win to download git with command prompt only; Alternatively, you can choose GUI or portable version if you like;
-
Run the .exe file you've just downloaded, and finish installation follow the instructions.
-
Open git.cmd (windows command prompt) or git.bash (linux command prompt) as you like, and type command:
>
git --version
It should show you the version of the git that was downloaded just now;
Then type:
>
git clone https://github.com/callzhang/stardust_server
to get our project files;
-
For more usage about git, see Git documents.
-
-
Install Project Dependencies
Open git.cmd as Administrator and go through instructions below:
-
Install Aliyun API
- Activate Virtual Environment stardust if inactive (See 2.i.c);
- Go to the directory \stardust_server\ and decompress the file aliyun_api.tar.gz;
- Install API according to the readme.txt.
-
Install Shaply
-
Visite website: https://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely and download "Shapely‑1.6.3‑cp27‑cp27m‑win_amd64.whl" onto working directory
-
Input command:
>
pip install Shapely‑1.6.3‑cp27‑cp27m‑win_amd64.whl
-
-
Install Other Dependences
-
Change working directory to the directory stardust_server which contains project files;
-
Edit file "requirements.txt" by deleting the line "shapely" as we've already installed that;
-
Download & install Microsoft Visual C++ Compiler for Python 2.7 from HERE;
-
Download stdint.h from HERE and save it to the path
C:\Users\xxx\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\include
-
Run command:
>
pip install -r requirements.txt
-
After it finished, you can check which packets has been installed by typing:
>
pip list
-
-
-
Install postgreSQL
- Visit postgreSQL Offical Website to download postgreSQL (version >= 9.6.6), Here We take Graphical installer by BigSQL as an example;
- Run the installer and follow the installer prompt to finish installing as usual;
- To find more about postgreSQL, visit website postgreSQL Documents.
-
Install Redis for Windows
- Visit https://github.com/MicrosoftArchive/redis/releases to download MSI installer;
- Run the installer and finish the installation.
-
Configure Local Settings
- Create a copy of file settings_local.py.tmpl and rename it as "settings_local.py";
- Edit the new file settings_local.py:
- Modify the line
#DEBUG = False
toDEBUG = True
; - Add a new line with
PYBOSSA_REDIS_CACHE_DISABLED = True
; - Save & close the file.
- Modify the line
- Create a copy of file alembic.ini.template and rename it as alembic.ini;
-
Create User and Database for Pybossa
-
Run postgreSQL service from "start" button;
If the service was launched successfully, you can verify this by:
- Tap keyboard shortcut "Windows + R";
- Input "services" and run;
- Check out if the service postgreSQL does exist and is running.
-
Open a cmd and run:
>
psql -U postgres -h localhost -p 5432
if there is a warning like:
8-bit characters might not work correctly. See psql reference page "Notes for Windows users" for details.
then exit the psql and type:
>
cmd /c chcp 1252
// will silence the warning >psql -U postgres -h localhost -p 5432
-
Now you will see the prompt start with
postgre=#
on each new line, type: postgre=#CREATE USER pybossa WITH PASSWORD 'tester';
postgre=#CREATE DATABASE pybossa;
postgre=#GRANT ALL PRIVILEGES ON DATABASE pybossa TO pybossa
;
-
-
Configure Database
-
Open our project stardust_server on Pycharm;
-
On menu bar, select View->Tool Windows->Database;
-
On the right side, select Database-> + ->Datasource->postgreSQL
-
Fill in the blanks:
- Host:
localhost
- Database:
pybossa
- User:
pybossa
- Password:
tester
Then click
Test Connection
, it should say "Successful". - Host:
-
See menu bar again and select View->Tool Windows->Terminal;
-
In the terminal window, activate Virtual Environment stardust first, then run:
>
python settings_local.py
>
python cli.py db_create
It should show you that several SQL statements has been executed. (If there's a error message similar to "<packet_name> not found", just install corresponding packet by: >
pip install <packet_name>
)
-
-
Start Redis Service
-
Open cmd as Administrator;
-
Change working directory to stardust_server;
-
Copy file sentinel.conf under stardust_server\contrib to where the Redis was installed; By default, just type ...\stardust_server>
cp contrib\sentinel.conf C:\Program Files\Redis
-
Then, change working directory to Redis; By default, type
>
cd C:\Program Files\Redis
-
Install sentinel as system service with config file:
>
redis-server --service-install --service-name Sentinel_1 sentinel.conf --sentinel
-
Run Sentinel_1 service:
>
redis-server --service-run --service-name Sentinel_1 sentinel.conf --sentinel
-
Start Redis server with config file:
>
redis-server redis.windows.conf
To verify whether Redis service is running, just check it on service (refer to method mentioned in session 2.1)
-
If you'd like to remove the Sentinel_1 service, here's the command:
>
sc delete Sentinel_1
-
> python run.py
Visit http://localhost:5000 to check