diff --git a/install/bundle/install.sh b/install/bundle/install.sh index 8ca4ddd..0063a42 100644 --- a/install/bundle/install.sh +++ b/install/bundle/install.sh @@ -26,13 +26,17 @@ getOracleJDK(){ echo -e "\n\n==> Getting JDK runtime files" #Add judger user useradd -m local_main_judger && usermod -a -G www-data local_main_judger + #Set Oracle JDK do not track usage + mkdir -p /etc/oracle/java/ && echo 'com.oracle.usagetracker.track.last.usage=false' >/etc/oracle/java/usagetracker.properties #Get newest jdk dist file JDK_MIRROR_LINK=https://build.funtoo.org/distfiles/oracle-java/ #Deprecated #JDK_CNMIRROR_LINK=http://funtoo.neu.edu.cn/funtoo/distfiles/oracle-java/ curl -s ${JDK_MIRROR_LINK} | grep -oP '>jdk-[7,8].*-linux-x64.tar' | sed -e 's/[\",>]//g' -e 's/-linux-x64.tar//g' >jdkdist.list wget ${JDK_MIRROR_LINK}$(sed -n '1p' jdkdist.list)-linux-x64.tar.gz && wget ${JDK_MIRROR_LINK}$(sed -n '$p' jdkdist.list)-linux-x64.tar.gz - #Change jdk version to faq.php - sed -i -e "s/jdk-7u76/$(sed -n '1p' jdkdist.list)/g" -e "s/jdk-8u31/$(sed -n '$p' jdkdist.list)/g" ../../uoj/1/app/controllers/faq.php + #Change jdk and other environment version to faq.php + sed -i -e 's/Ubuntu Linux 14.04 LTS x64/Ubuntu Linux 18.04 LTS x64/' \ + -e 's/g++ 4.8.4/g++ 7.3.0/' -e 's/gcc 4.8.4/gcc 7.3.0/' -e 's/fpc 2.6.2/fpc 3.0.4/' -e 's/Python 2.7和3.4/Python 2.7和3.6/' \ + -e "s/jdk-7u76/$(sed -n '1p' jdkdist.list)/g" -e "s/jdk-8u31/$(sed -n '$p' jdkdist.list)/g" ../../uoj/1/app/controllers/faq.php #Move jdk file to judge user root chown local_main_judger jdkdist.list jdk-*-linux-x64.tar.gz mv jdkdist.list jdk-*-linux-x64.tar.gz /home/local_main_judger/ @@ -197,7 +201,12 @@ svn update /var/svn/judge_client/cur/judge_client --username root --password $_s ln -s /var/svn/judge_client/cur/judge_client/1 ~/judge_client ln -s /var/uoj_data ~/judge_client/uoj_judger/data cd ~/judge_client && chmod +x judge_client -echo '#define UOJ_WORK_PATH "/home/local_main_judger/judge_client/uoj_judger"' >uoj_judger/include/uoj_work_path.h +cat >uoj_judger/include/uoj_work_path.h <