Last active
December 26, 2021 01:55
-
-
Save KunitoishiTomii/a6e16e285a74ca9686017a0b80c4afc7 to your computer and use it in GitHub Desktop.
opwf10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CLI script for DolphinDS | |
connect | |
batch | |
# Add a non-XA datasource | |
data-source add \ | |
--name=DolphinDS \ | |
--driver-name=postgresql-42.2.10.jar \ | |
--connection-url=jdbc:postgresql://localhost:5432/dolphin \ | |
--jndi-name=java:jboss/datasources/DolphinDS \ | |
--user-name=dolphin \ | |
--password=dolphin \ | |
--jta=true \ | |
--use-ccm=false \ | |
--transaction-isolation=TRANSACTION_READ_COMMITTED \ | |
# --max-pool-size=25 \ | |
# --blocking-timeout-wait-millis=5000 \ | |
# --new-connection-sql="set datestyle = ISO, European;" | |
data-source enable --name=DolphinDS | |
# Execute and reload | |
run-batch | |
:reload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sudo apt-get install software-properties-common -y | |
sudo add-apt-repository ppa:webupd8team/java && sudo apt-get update | |
sudo apt-get install oracle-java8-installer | |
echo "next:setpgs.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sudo locale-gen ja_JP.UTF-8 | |
sudo /usr/sbin/update-locale LANG=ja_JP.UTF-8 | |
sudo ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime | |
sudo sed -i'~' -E "s@http://(..\.)?(archive|security)\.ubuntu\.com/ubuntu@http://ftp.jaist.ac.jp/pub/Linux/ubuntu@g" /etc/apt/sources.list | |
echo "next:v6off.sh¥n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CMDNAME=`basename $0` | |
if [ $# -ne 1 ]; then | |
echo "Usage: $CMDNAME dolphin201409xx.dump¥n" 1>&2 | |
exit 1 | |
fi | |
RESTORE_DUMP=$1 | |
# Stop OpenDolphin | |
echo "Stop OpenDolphin¥n" | |
sudo service wf.sh stop | |
# Drop dolphin database | |
sudo -u dolphin dropdb dolphin | |
# Create dolphin database | |
sudo -u dolphin createdb -lC -Ttemplate0 -EUTF-8 dolphin | |
echo "データをリストア中です。しばらくお待ちください。¥n" | |
sudo -u dolphin pg_restore -j2 -O -d dolphin $RESTORE_DUMP | |
if [ $? -eq 0 ]; then | |
echo "Restore $RESTORE_DUMP SUCCEED¥n" | |
else | |
echo "Restore $RESTORE_DUMP ERROR!¥n" | |
fi | |
# Start OpenDolphin | |
echo "Start OpenDolphin¥n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
WFLY_HOME=/usr/local/wildfly | |
DS_CLI=dolphin-ds.cli | |
if [ ! -f $DS_CLI ]; then | |
echo "Please SETUP $DS_CLI file to this directory." 1>&2 | |
exit 0 | |
fi | |
# Start wildfly | |
echo "Start wildfly" | |
sudo -u wildfly ${WFLY_HOME}/bin/standalone.sh & | |
sleep 10 | |
# Setting DataSource | |
sudo -u wildfly ${WFLY_HOME}/bin/jboss-cli.sh --file=./${DS_CLI} | |
sleep 5 | |
# Test connection | |
sudo -u wildfly ${WFLY_HOME}/bin/jboss-cli.sh --connect /subsystem=datasources/data-source=DolphinDS:test-connection-in-pool | |
sleep 5 | |
# Stop wildfly | |
echo "Stop Wildfly¥n" | |
sudo ${WFLY_HOME}/bin/jboss-cli.sh --connect command=:shutdown | |
sleep 5 | |
echo "next:vi custom.propaties && setwar.sh¥n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
apt-get update | |
apt-get install -y postgresql ntp | |
# Set of PostgreSQL Database | |
useradd dolphin -d /home/dolphin | |
getent passwd | grep dolphin | |
sudo -u postgres psql -c "create user dolphin with password 'dolphin';" | |
sudo -u postgres psql -c 'ALTER ROLE dolphin WITH SUPERUSER CREATEDB CREATEROLE REPLICATION;' | |
sudo -u postgres psql -c 'select rolname from pg_roles;' | |
sudo -u dolphin createdb -lC -Ttemplate0 -EUTF-8 dolphin | |
sudo -u dolphin psql -l | |
echo "next:setwf10.sh¥n" | |
# exec sudo ./setwf10&jdbc.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo cp wf.sh /etc/init.d/wf.sh | |
sudo update-rc.d wf.sh defaults | |
sudo update-rc.d wf.sh enable | |
echo "SETUP Finished!¥n" | |
echo "Check host address /etc/hosts¥n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
WFLY_HOME=/usr/local/wildfly | |
OD_DIST_PATH=./opendolphin-2.3m_wf10/dist/ | |
OD_EXTLIB_PATH=./opendolphin-2.3m_wf10/ext_lib/ | |
OD_CLI_PATH=/home/ubuntu/opendolphinclient/ | |
OD_SERVER_WAR=OpenDolphin-server-2.3m_WF10.war | |
OD_CLI_JAR=OpenDolphin-2.3m_WF10.jar | |
#FILESERV_PROP=fileservlet.properties | |
ST_XML=standalone.xml | |
CUSTOM=custom.properties | |
ST_CFG=${WFLY_HOME}/standalone/configuration/ | |
ST_DEP=${WFLY_HOME}/standalone/deployments/ | |
if [ ! -f ${OD_DIST_PATH}${OD_SERVER_WAR} -o ! -f ${OD_EXTLIB_PATH}${ST_XML} -o ! -f ${OD_EXTLIB_PATH}${CUSTOM} ]; then | |
echo "Please prepare ${OD_DIST_PATH}${OD_SERVER_WAR}, ${OD_EXTLIB_PATH}${ST_XML}, ${OD_EXTLIB_PATH}${CUSTOM} files." 1>&2 | |
exit 0 | |
fi | |
# Client | |
set -e | |
sudo -u ubuntu mkdir ${OD_CLI_PATH} | |
sudo -u ubuntu cp ${OD_DIST_PATH}${OD_CLI_JAR} ${OD_CLI_PATH} | |
sudo -u ubuntu cp ${OD_DIST_PATH}DolphinLauncher.jar ${OD_CLI_PATH} | |
sudo -u ubuntu cp ${OD_EXTLIB_PATH}OpenDolphin-m.ico ${OD_CLI_PATH} | |
sudo -u ubuntu cp -r ${OD_DIST_PATH}lib ${OD_CLI_PATH} | |
#sudo -u ubuntu sed -i 's/C:/\/home\/ubuntu/g' ${OD_EXTLIB_PATH}${FILESERV_PROP} | |
#sudo -u wildfly cp ${OD_EXTLIB_PATH}${FILESERV_PROP} ${ST_CFG}${FILESERV_PROP} | |
# Deploy war & xml & keystore | |
if [ -f ${ST_CFG}/standalone.xml ]; then | |
sudo -u wildfly mv ${ST_CFG}${ST_XML} ${ST_CFG}${ST_XML}.org 1>&2 | |
fi | |
sudo -u wildfly cp ${OD_EXTLIB_PATH}${ST_XML} ${ST_CFG}${ST_XML} | |
if [ ! -f ${ST_CFG}${CUSTOM} ]; then | |
sudo -u wildfly cp ${OD_EXTLIB_PATH}${CUSTOM} ${ST_CFG} 1>&2 | |
fi | |
# ls -al ${ST_DEP} | |
# ls -al ${ST_CFG} | |
echo "Start Opendolphin" | |
sudo -u wildfly ${WFLY_HOME}/bin/standalone.sh & | |
sleep 20 | |
#if [ ! -f ${ST_DEP}${OD_SERVER_WAR} ]; then | |
sudo -u wildfly cp ${OD_DIST_PATH}${OD_SERVER_WAR} ${ST_DEP} 1>&2 | |
#fi | |
sleep 30 | |
# Stop wildfly | |
echo "Stop Wildfly¥n" | |
sudo ${WFLY_HOME}/bin/jboss-cli.sh --connect command=:shutdown | |
sleep 5 | |
echo "next:setrcd.sh¥n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
WFLY_HOME=/usr/local/wildfly | |
WFLY_VER=wildfly-10.1.0.Final | |
JDBC_JAR=postgresql-9.4.1209.jar | |
sudo apt-get update | |
#sudo apt-get install -y default-jre wget | |
# User for Wildfly | |
sudo groupadd -r wildfly | |
sudo useradd -r -g wildfly -s /bin/false -d /nonexistent wildfly | |
if [ ! -f ${WFLY_VER}.tar.gz ]; then | |
wget http://download.jboss.org/wildfly/10.1.0.Final/${WFLY_VER}.tar.gz 1>&2 | |
fi | |
tar xvf ${WFLY_VER}.tar.gz | |
# Deploy wildfly | |
sudo mv ./${WFLY_VER} $WFLY_HOME | |
sudo chown -R wildfly:wildfly $WFLY_HOME | |
# Add admin | |
sudo ${WFLY_HOME}/bin/add-user.sh dolphin dolphin --silent | |
# Deploy jdbc driver | |
if [ ! -f $JDBC_JAR ]; then | |
wget http://jdbc.postgresql.org/download/$JDBC_JAR 1>&2 | |
fi | |
sudo -u wildfly cp $JDBC_JAR $WFLY_HOME/standalone/deployments/ | |
echo "next:setdolphinDS.sh¥n" | |
# exec sudo ./setdolphinDS.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sudo sh -c "echo 'net.ipv6.conf.all.disable_ipv6=1' >> /etc/sysctl.conf" | |
sudo sh -c "echo 'net.ipv6.conf.default.disable_ipv6=1' >> /etc/sysctl.conf" | |
sudo /sbin/sysctl -p | |
echo "next:java8.sh¥n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
case "$1" in | |
start|"") | |
sudo /usr/local/wildfly/bin/standalone.sh -b 0.0.0.0 > /dev/null & | |
;; | |
stop) | |
sudo /usr/local/wildfly/bin/jboss-cli.sh --connect --command=:shutdown | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment