# process execute directory. self configuration, please make sure the directory exists and have read write permissions
process.exec.basepath=/tmp/escheduler/exec
# data base dir, resource file will store to this hadoop hdfs path, self configuration, please make sure the directory exists on hdfs and have read write permissions。"/escheduler" is recommended
data.store2hdfs.basepath=/escheduler
# whether hdfs starts
hdfs.startup.state=false
# system env path. self configuration, please make sure the directory and file exists and have read write execute permissions
# the Destroy thread detects the connection interval and closes the physical connection in milliseconds if the connection idle time is greater than or equal to minEvictableIdleTimeMillis.
#the SQL used to check whether the connection is valid requires a query statement. If validation Query is null, testOnBorrow, testOnReturn, and testWhileIdle will not work.
spring.datasource.validationQuery=SELECT 1
#check whether the connection is valid for timeout, in seconds
spring.datasource.validationQueryTimeout=3
# when applying for a connection, if it is detected that the connection is idle longer than time Between Eviction Runs Millis,
# validation Query is performed to check whether the connection is valid
spring.datasource.testWhileIdle=true
#execute validation to check if the connection is valid when applying for a connection
spring.datasource.testOnBorrow=true
#execute validation to check if the connection is valid when the connection is returned
spring.datasource.testOnReturn=false
spring.datasource.defaultAutoCommit=true
spring.datasource.keepAlive=true
# open PSCache, specify count PSCache for every connection
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN' 'http://www.w3.org/TR/html4/loose.dtd'><html><head><title> easyscheduler</title><metaname='Keywords'content=''><metaname='Description'content=''><style type="text/css">table{margin-top:0px;padding-top:0px;border:1pxsolid;font-size:14px;color:#333333;border-width:1px;border-color:#666666;border-collapse:collapse;}tableth{border-width:1px;padding:8px;border-style:solid;border-color:#666666;background-color:#dedede;}tabletd{border-width:1px;padding:8px;border-style:solid;border-color:#666666;background-color:#ffffff;}</style></head><bodystyle="margin:0;padding:0"><tableborder="1px"cellpadding="5px"cellspacing="-10px"><thead><#iftitle??> ${title}</#if></thead><#ifcontent??> ${content}</#if></table></body></html>
find /var/lib/mysql -type f -exectouch{}\;&& service mysql restart $ sleep 10
if[!-f /nohup.out ];then
echo"设置mysql密码"
mysql --user=root --password=root -e"UPDATE mysql.user set authentication_string=password('$MYSQL_ROOT_PWD') where user='root'; FLUSH PRIVILEGES;"
echo"设置mysql权限"
mysql --user=root --password=$MYSQL_ROOT_PWD-e"GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '$MYSQL_ROOT_PWD' WITH GRANT OPTION; FLUSH PRIVILEGES;"
echo"创建escheduler数据库"
mysql --user=root --password=$MYSQL_ROOT_PWD-e"CREATE DATABASE IF NOT EXISTS \`$ESZ_DB\` CHARACTER SET utf8 COLLATE utf8_general_ci; FLUSH PRIVILEGES;"
if[`mysql --user=root --password=$MYSQL_ROOT_PWD-s-r-e"SELECT count(TABLE_NAME) FROM information_schema.TABLES WHERE TABLE_SCHEMA='escheduler';" | grep-v count`-eq 38 ];then
echo"\`$ESZ_DB\` 表个数正确"
else
echo"\`$ESZ_DB\` 表个数不正确"
mysql --user=root --password=$MYSQL_ROOT_PWD-e"DROP DATABASE \`$ESZ_DB\`;"
echo"创建escheduler数据库"
mysql --user=root --password=$MYSQL_ROOT_PWD-e"CREATE DATABASE IF NOT EXISTS \`$ESZ_DB\` CHARACTER SET utf8 COLLATE utf8_general_ci; FLUSH PRIVILEGES;"
# process execute directory. self configuration, please make sure the directory exists and have read write permissions
process.exec.basepath=/tmp/escheduler/exec
# Users who have permission to create directories under the HDFS root path
hdfs.root.user=hdfs
# data base dir, resource file will store to this hadoop hdfs path, self configuration, please make sure the directory exists on hdfs and have read write permissions。"/escheduler" is recommended
# the Destroy thread detects the connection interval and closes the physical connection in milliseconds if the connection idle time is greater than or equal to minEvictableIdleTimeMillis.
#the SQL used to check whether the connection is valid requires a query statement. If validation Query is null, testOnBorrow, testOnReturn, and testWhileIdle will not work.
spring.datasource.validationQuery=SELECT 1
#check whether the connection is valid for timeout, in seconds
spring.datasource.validationQueryTimeout=3
# when applying for a connection, if it is detected that the connection is idle longer than time Between Eviction Runs Millis,
# validation Query is performed to check whether the connection is valid
spring.datasource.testWhileIdle=true
#execute validation to check if the connection is valid when applying for a connection
spring.datasource.testOnBorrow=true
#execute validation to check if the connection is valid when the connection is returned
spring.datasource.testOnReturn=false
spring.datasource.defaultAutoCommit=true
spring.datasource.keepAlive=true
# open PSCache, specify count PSCache for every connection
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN' 'http://www.w3.org/TR/html4/loose.dtd'><html><head><title> easyscheduler</title><metaname='Keywords'content=''><metaname='Description'content=''><style type="text/css">table{margin-top:0px;padding-top:0px;border:1pxsolid;font-size:14px;color:#333333;border-width:1px;border-color:#666666;border-collapse:collapse;}tableth{border-width:1px;padding:8px;border-style:solid;border-color:#666666;background-color:#dedede;}tabletd{border-width:1px;padding:8px;border-style:solid;border-color:#666666;background-color:#ffffff;}</style></head><bodystyle="margin:0;padding:0"><tableborder="1px"cellpadding="5px"cellspacing="-10px"><thead><#iftitle??> ${title}</#if></thead><#ifcontent??> ${content}</#if></table></body></html>
find /var/lib/mysql -type f -exectouch{}\;&& service mysql restart $ sleep 10
if[!-f /nohup.out ];then
echo"设置mysql密码"
mysql --user=root --password=root -e"UPDATE mysql.user set authentication_string=password('$MYSQL_ROOT_PWD') where user='root'; FLUSH PRIVILEGES;"
echo"设置mysql权限"
mysql --user=root --password=$MYSQL_ROOT_PWD-e"GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '$MYSQL_ROOT_PWD' WITH GRANT OPTION; FLUSH PRIVILEGES;"
echo"创建escheduler数据库"
mysql --user=root --password=$MYSQL_ROOT_PWD-e"CREATE DATABASE IF NOT EXISTS \`$ESZ_DB\` CHARACTER SET utf8 COLLATE utf8_general_ci; FLUSH PRIVILEGES;"
if[`mysql --user=root --password=$MYSQL_ROOT_PWD-s-r-e"SELECT count(TABLE_NAME) FROM information_schema.TABLES WHERE TABLE_SCHEMA='escheduler';" | grep-v count`-eq 38 ];then
echo"\`$ESZ_DB\` 表个数正确"
else
echo"\`$ESZ_DB\` 表个数不正确"
mysql --user=root --password=$MYSQL_ROOT_PWD-e"DROP DATABASE \`$ESZ_DB\`;"
echo"创建escheduler数据库"
mysql --user=root --password=$MYSQL_ROOT_PWD-e"CREATE DATABASE IF NOT EXISTS \`$ESZ_DB\` CHARACTER SET utf8 COLLATE utf8_general_ci; FLUSH PRIVILEGES;"