zoukankan      html  css  js  c++  java
  • 搭建OJ-这个版本 并一直解决 RE 问题

    #!/bin/bash
    #before install check DB setting in 
    #	judge.conf 
    #	hustoj-read-only/web/include/db_info.inc.php
    #	and down here
    #and run this with root
    
    #CENTOS/REDHAT/FEDORA WEBBASE=/var/www/html APACHEUSER=apache 
    WEBBASE=/var/www/
    APACHEUSER=www-data
    DBUSER=root
    DBPASS=root
    
    #try install tools
    sudo apt-get install make
    sudo apt-get install flex
    sudo apt-get install g++
    sudo apt-get install libmysql++-dev
    sudo apt-get install php5 
    sudo apt-get install apache2
    sudo apt-get install mysql-server
    sudo apt-get install php5-mysql
    sudo apt-get install php5-gd
    sudo apt-get install php5-cli
    sudo apt-get install mono-gmcs
    sudo apt-get install subversion
    
    sudo /etc/init.d/mysql start
    
    #sudo yum -y update
    #sudo yum -y install php httpd php-mysql mysql-server php-xml php-gd gcc-c++  mysql-devel php-mbstring glibc-static flex
    sudo /etc/init.d/mysqld start
    
    sudo svn checkout http://hustoj.googlecode.com/svn/trunk/ hustoj-read-only
    #http://hustoj.googlecode.com/svn/tags/1.2rc/ 解决 一直 RE 问题
    #create user and homedir
    sudo  /usr/sbin/useradd -m -u 1536 judge
    
    #compile and install the core
    cd hustoj-read-only/core/
    sudo ./make.sh
    cd ../..
    #install web and db
    sudo mkdir -p $WEBBASE/JudgeOnline
    sudo cp -R hustoj-read-only/web $WEBBASE/JudgeOnline
    sudo chmod -R 771 $WEBBASE/JudgeOnline
    sudo chown -R $APACHEUSER $WEBBASE/JudgeOnline
    sudo mysql -h localhost -u$DBUSER -p$DBPASS < db.sql
    
    #create work dir set default conf
    sudo    mkdir /home/judge
    sudo    mkdir /home/judge/etc
    sudo    mkdir /home/judge/data
    sudo    mkdir /home/judge/log
    sudo    mkdir /home/judge/run0
    sudo    mkdir /home/judge/run1
    sudo    mkdir /home/judge/run2
    sudo    mkdir /home/judge/run3
    sudo cp java0.policy  judge.conf /home/judge/etc
    sudo chown -R judge /home/judge
    sudo chgrp -R $APACHEUSER /home/judge/data
    sudo chgrp -R root /home/judge/etc /home/judge/run?
    sudo chmod 775 /home/judge /home/judge/data /home/judge/etc /home/judge/run?
    
    #boot up judged
    sudo cp judged /etc/init.d/judged
    sudo chmod +x  /etc/init.d/judged
    sudo ln -s /etc/init.d/judged /etc/rc5.d/S93judged
    sudo ln -s /etc/init.d/judged /etc/rc3.d/S93judged
    sudo ln -s /etc/init.d/judged /etc/rc2.d/S93judged
    sudo /etc/init.d/judged start
    sudo /etc/init.d/apache2 restart
    sudo /etc/init.d/httpd restart
    

  • 相关阅读:
    图像检索(image retrieval)- 11
    图像检索(image retrieval)- 10相关
    Mock.js简易教程,脱离后端独立开发,实现增删改查功能
    Azure Monitor (3) 对虚拟机磁盘设置自定义监控
    Azure Monitor (1) 概述
    Azure SQL Managed Instance (2) 备份SQL MI
    Azure Virtual Network (17) Private Link演示
    Azure Virtual Network (16) Private Link
    Azure Virtual Network (15) Service Endpoint演示
    Azure Virtual Network (14) Service Endpoint服务终结点
  • 原文地址:https://www.cnblogs.com/robbychan/p/3786770.html
Copyright © 2011-2022 走看看