Kebutuhan:
- JDK 1.8
- Git
Langkah-langkah:
- Clone repository
git clone https://github.com/ftisunpar/IFStudentPortal - Masuk ke direktori proyek
cd IFStudentPortal - Submodule update
git submodule update --init -- SIAModels - Create Eclipse project
./activator eclipse - Import project di Eclipse (File > Import > Existing Projects into Workspace)
Langkah-langkah (pada direktori proyek Play IFStudentPortal/StudentPortal):
- Activator Run
./activator run - Buka http://localhost:9000 di browser
Saat ini hanya bisa dilakukan di Linux
Langkah-langkah (pada direktori proyek Play IFStudentPortal/StudentPortal):
- Install Firefox
- Copy
functionaltest-template.confpada direktoriconf/kefunctionaltest.confdan sesuaikan isinya dengan username/password yang benar - Activator Test
./activator test
Kebutuhan:
- Linux
- JDK 1.8
- Git
Langkah-langkah:
- Clone repository
git clone https://github.com/ftisunpar/IFStudentPortal - Masuk ke direktori proyek
cd IFStudentPortal - Submodule update
git submodule update --init -- SIAModels - Masuk ke direktori konfigurasi proyek Play
cd conf - Buat password acak: ketik
cat > password.conf, ketikkan huruf/angka acak, dan tekan Ctrl+D - Pindah ke direktori sertifikat
cd ../certs - Jalankan script untuk membuat sertifikat
./gencerts.sh - Naik satu level direktori
cd ..dan eksekusi build./activator stage
Hasil build ada di target/universal/stage
- Masuk ke direktori
target/universal/stage/bin - Jalankan salah satu dari:
./ifstudentportal -Dhttps.port=9443 -Dplay.server.https.keyStore.path=../conf/IFStudentPortal.jks -Dplay.server.https.keyStore.password="$(cat ../conf/password.conf)" -Dapplication.secret="$(cat ../conf/password.conf)"(jika tidak punya akses root)sudo ./ifstudentportal -Dhttps.port=443 -Dhttp.port=80 -Dplay.server.https.keyStore.path=../conf/IFStudentPortal.jks -Dplay.server.https.keyStore.password="$(cat ../conf/password.conf)" -Dapplication.secret="$(cat ../conf/password.conf)"(jika punya akses root)
Di Ubuntu, buat file /etc/init.d/ifstudentportal yang isinya seperti di bawah (lihat keterangan juga di bawah):
#!/bin/bash
#
### BEGIN INIT INFO
# Provides: ifstudentportal
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start and stop the ifstudentportal server daemon
# Description: Start and stop the ifstudentportal server daemon
### END INIT INFO
#
# Get function from functions library
. /lib/lsb/init-functions
# Start the service IFStudentPortal
PIDNUM=""
HOMEDIR="/home/pascal/IFStudentPortal/target/universal/stage/"
PIDFILE="RUNNING_PID"
PIDDIR="$HOMEDIR$PIDFILE"
BINFILE="bin/ifstudentportal"
BINDIR="$HOMEDIR$BINFILE"
start() {
if [ ! -f $PIDDIR ]
then
$BINDIR -Dhttps.port=443 -Dhttp.port=80 -Dplay.server.https.keyStore.path=$HOMEDIR/conf/IFStudentPortal.jks -Dplay.server.https.keyStore.password="$(cat $HOMEDIR/conf/password.conf)" -Dapplication.secret="$(cat $HOMEDIR/conf/password.conf)" &
echo "IFStudentPortal Started"
else
echo "IFStudentPortal is already Running"
fi
}
# Restart the service IFStudentPortal
stop() {
if [ -f $PIDDIR ]
then
PIDNUM=$(cat $PIDDIR)
kill $PIDNUM
### Now, delete the pid file ###
rm -f $PIDDIR
echo "IFStudentPortal Stopped"
else
echo "IFStudentPortal is not Running"
fi
}
status() {
if [ -f $PIDDIR ]
then
echo "IFStudentPortal is Running"
else
echo "IFStudentPortal is not Running"
fi
}
restart() {
if [ -f $PIDDIR ]
then
stop
start
else
echo "IFStudentPortal is not Running"
fi
}
### main logic ###
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status
;;
restart|reload|condrestart)
restart
;;
*)
echo $"Usage: $0 {start|stop|restart|reload|status}"
exit 1
esac
exit 0Keterangan:
- Ganti
$HOMEDIRdengan path yang sesuai chmodfile tersebut dengan 744 (sebaiknya hanya boleh dieksekusi olehroot)- Ketikkan perintah
sudo update-rc.d ifstudentportaluntuk mendaftarkan ke startup
- Masuk ke direktori
StudentPortaldan jalankan./activator stage - Restart IFStudentPortal