src/front/config/params.php
和src/front/config/db.php
中的字段按照需要进行修改
如果使用Nginx则需要sudo chown -R www-data:www-data src/front/uploads/avatar/user/ src/front/ckfinder
sudo apt-get install php5.6-gd && sudo service nginx restart
sudo gedit /etc/nginx/nginx.conf
添加client_max_body_size 20M;
sudo /etc/php/5.6/fpm/php.ini
修改post_max_size 64M
和upload_max_filesize 64M
sudo vim /etc/mysql/my.cnf
- Add this to the end of the file
[mysqld]
sql_mode = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
sudo apt-get install memcached
sudo apt-get install php5.6-memcached
- 重启php-fpm
sudo service php5.6-fpm restart
- 修改
/etc/memcached.conf
文件中的-m
项为128 - 重启memcached
sudo service memcached restart
通过src/front/config/params.php
文件contestWhiteList
字段以白名单方式管理,若这个列表为空则表示无限制,否则只有列表中的比赛可以提交,非比赛提交id
为0
。
例:
- 没有限制:
[]
- 只有比赛1和比赛2可以提交:
[1, 2]
- 只有比赛3和非比赛提交:
[0, 3]
Run src/memcached/start.sh
Set up environment variables and run src/mysql/start.sh
Run src/web/builddocker.sh
to build.
Set environment variable USE_CDN
to true
if use CDN to get some javascript and css libs.
Set environment variable WEB_DEV
to true
, set permission of src/front/runtime
and src/front/views/smarty/templates_c
and data folders properly, then run src/web/rundocker.sh
.
Set environment variables properly and set permission of data folders properly, then run src/web/rundocker.sh
.