Download at
wget "https://github.com/cms-dev/cms/releases/download/v1.2.0/v1.2.0.tar.gz"
sudo apt-get install build-essential fpc postgresql postgresql-client \
gettext python2.7 python-setuptools python-tornado python-psycopg2 \
python-sqlalchemy python-psutil python-netifaces python-crypto \
python-tz python-six iso-codes shared-mime-info stl-manual \
python-beautifulsoup python-mechanize python-coverage python-mock \
cgroup-lite python-requests python-werkzeug python-gevent patool
sudo pip install -r REQUIREMENTS.txt
- Remove printing service
- Change default port
- Change
secret_key
./setup.py build
sudo ./setup.py install
sudo su - postgres
createuser cmsuser -P
createdb -O cmsuser database
psql database -c 'ALTER SCHEMA public OWNER TO cmsuser'
psql database -c 'GRANT SELECT ON pg_largeobject TO cmsuser'
Use htpasswd to generate password file at /etc/nginx/.htpasswd.
sudo htpasswd -b /etc/nginx/.htpasswd admin p4ssw0rd
File /etc/nginx/sites-available/default
location /rank/ {
proxy_pass http://127.0.0.1:8081/;
proxy_set_header Connection '';
proxy_http_version 1.1;
chunked_transfer_encoding off;
}
location /admin/ {
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/.htpasswd;
proxy_pass http://127.0.0.1:9000/;
}
location / {
proxy_pass http://127.0.0.1:8080/;
}
File start.sh
#!/bin/sh
cmsRankingWebServer -d
cmsLogService 0 &
cmsRankingWebServer &
cmsResourceService -a 1 && fg