This commit is contained in:
2025-02-26 14:49:25 +07:00
commit 1c1d9c4474
6403 changed files with 1953774 additions and 0 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,59 @@
/*
HOW TO USE IT in 192.168.0.120 (MINI PC PACS):
1. cd to `cd /pacs/pacs_installer/`
2. `export PATH=$PATH:/usr/lib/jvm/jdk1.8.0_144/bin/`
3. Compile : `javac -cp .:mysql-connector-java-8.0.22.jar MySQLConnectionTest.java`
4. Run : `java -cp .:mysql-connector-java-8.0.22.jar MySQLConnectionTest 192.168.0.120 3306 pacsdb pacs pacs`
4. Run : `java -cp .:mysql-connector-java-8.0.22.jar MySQLConnectionTest dev.sismedika.online 3306 rsabt201107 hispacs s1sm3d1k4123!`
*/
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class MySQLConnectionTestV2 {
public static void main(String[] args) {
// MySQL database details from command line arguments
if (args.length < 5) {
System.out.println("Usage: java MySQLConnectionTest <host> <port> <database> <user> <password>");
return;
}
String host = args[0];
String port = args[1];
String dbName = args[2];
String user = args[3];
String password = args[4];
String url = "jdbc:mysql://" + host + ":" + port + "/" + dbName;
Connection connection = null;
try {
// Load MySQL JDBC Driver (MySQL Connector 8.0.22 and above auto-registers the driver)
Class.forName("com.mysql.cj.jdbc.Driver"); // Optional for JDBC 4.0+
// Add timezone configuration to URL if needed
url += "?serverTimezone=Asia/Jakarta";
// Establish a connection
connection = DriverManager.getConnection(url, user, password);
System.out.println("Connection successful!");
} catch (ClassNotFoundException e) {
System.out.println("MySQL JDBC Driver not found. Include the MySQL Connector jar file.");
e.printStackTrace();
} catch (SQLException e) {
System.out.println("Failed to connect to MySQL database.");
System.out.println("Error Message: " + e.getMessage());
e.printStackTrace();
} finally {
if (connection != null) {
try {
connection.close();
System.out.println("Connection closed.");
} catch (SQLException e) {
System.out.println("Failed to close the connection.");
e.printStackTrace();
}
}
}
}
}

15
mirth/conf/dbdrivers.xml Normal file
View File

@@ -0,0 +1,15 @@
<!--
Database driver information
class = the driver class name, cannot be empty
name = database driver name to be displayed as, cannot be empty
template = the template for creating the database connection, cannot be empty
selectLimit = defines the select statement used for retrieving column information, empty means use the generic query (which could be slow)
-->
<drivers>
<driver class="sun.jdbc.odbc.JdbcOdbcDriver" name="Sun JDBC-ODBC Bridge" template="jdbc:odbc:DSN" selectLimit="" />
<driver class="com.mysql.jdbc.Driver" name="MySQL" template="jdbc:mysql://host:port/dbname" selectLimit="SELECT * FROM ? LIMIT 1" />
<driver class="oracle.jdbc.driver.OracleDriver" name="Oracle" template="jdbc:oracle:thin:@host:port:dbname" selectLimit="SELECT * FROM ? WHERE ROWNUM &lt; 2" />
<driver class="org.postgresql.Driver" name="PostgreSQL" template="jdbc:postgresql://host:port/dbname" selectLimit="SELECT * FROM ? LIMIT 1" />
<driver class="net.sourceforge.jtds.jdbc.Driver" name="SQL Server/Sybase" template="jdbc:jtds:sqlserver://host:port/dbname" selectLimit="SELECT TOP 1 * FROM ?" />
<driver class="org.sqlite.JDBC" name="SQLite" template="jdbc:sqlite:dbfile.db" selectLimit="SELECT * FROM ? LIMIT 1" />
</drivers>

View File

@@ -0,0 +1,4 @@
log4j.rootCategory=ERROR, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%-5p %d [%t] %c: %m%n

View File

@@ -0,0 +1,38 @@
# sample properties to initialize log4j
log4j.rootLogger = ERROR,stdout,fout
# stdout appender
log4j.appender.stdout = org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern = %-5p %d [%t] %c: %m%n
# file appender
dir.logs = logs
log4j.appender.fout = org.apache.log4j.RollingFileAppender
log4j.appender.fout.File = ${dir.logs}/mirth.log
log4j.appender.fout.MaxFileSize = 500KB
log4j.appender.fout.MaxBackupIndex = 20
log4j.appender.fout.layout = org.apache.log4j.PatternLayout
log4j.appender.fout.layout.ConversionPattern = %-5p %d [%t] %c: %m%n
# splash screen
log4j.logger.com.mirth.connect.server.Mirth = INFO
# Mirth Connect server logging
log4j.logger.com.mirth.connect.donkey.server.channel.RecoveryTask = INFO
# Mirth Connect channel logging
log4j.logger.transformer = DEBUG
log4j.logger.preprocessor = DEBUG
log4j.logger.postprocessor = DEBUG
log4j.logger.deploy = DEBUG
log4j.logger.undeploy = DEBUG
log4j.logger.filter = DEBUG
log4j.logger.db-connector = DEBUG
log4j.logger.js-connector = DEBUG
log4j.logger.attachment = DEBUG
log4j.logger.batch = DEBUG
log4j.logger.response = DEBUG
# SQL Logging
log4j.logger.java.sql = ERROR

View File

@@ -0,0 +1,4 @@
address=https://127.0.0.1:9443
user=admin
password=admin
version=0.0.0

View File

@@ -0,0 +1,83 @@
# Mirth Connect configuration file
# directories
dir.appdata = appdata
dir.tempdata = ${dir.appdata}/temp
# ports
http.port = 9080
https.port = 9443
# password requirements
password.minlength = 0
password.minupper = 0
password.minlower = 0
password.minnumeric = 0
password.minspecial = 0
password.retrylimit = 0
password.lockoutperiod = 0
password.expiration = 0
password.graceperiod = 0
password.reuseperiod = 0
password.reuselimit = 0
# keystore
keystore.path = ${dir.appdata}/keystore.jks
keystore.storepass = 81uWxplDtB
keystore.keypass = 81uWxplDtB
keystore.type = JCEKS
# server
http.contextpath = /
server.url =
http.host = 0.0.0.0
https.host = 0.0.0.0
https.client.protocols = TLSv1.2,TLSv1.1
https.server.protocols = TLSv1.2,TLSv1.1,SSLv2Hello
https.ciphersuites = TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384,TLS_DHE_RSA_WITH_AES_256_GCM_SHA384,TLS_DHE_DSS_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,TLS_DHE_DSS_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_RSA_WITH_AES_256_CBC_SHA256,TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384,TLS_DHE_RSA_WITH_AES_256_CBC_SHA256,TLS_DHE_DSS_WITH_AES_256_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA,TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA,TLS_ECDH_RSA_WITH_AES_256_CBC_SHA,TLS_DHE_RSA_WITH_AES_256_CBC_SHA,TLS_DHE_DSS_WITH_AES_256_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256,TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,TLS_DHE_DSS_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA,TLS_ECDH_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_DSS_WITH_AES_128_CBC_SHA,TLS_EMPTY_RENEGOTIATION_INFO_SCSV
https.ephemeraldhkeysize = 2048
# CORS headers
server.api.accesscontrolalloworigin = *
server.api.accesscontrolallowcredentials = false
server.api.accesscontrolallowmethods = GET, POST, DELETE, PUT
server.api.accesscontrolallowheaders = Content-Type
server.api.accesscontrolexposeheaders =
server.api.accesscontrolmaxage =
# Determines whether or not channels are deployed on server startup.
server.startupdeploy = true
# Determines whether libraries in the custom-lib directory will be included on the server classpath.
# To reduce potential classpath conflicts you should create Resources and use them on specific channels/connectors instead, and then set this value to false.
server.includecustomlib = false
# administrator
administrator.maxheapsize = 512m
# properties file that will store the configuration map and be loaded during server startup
configurationmap.path = ${dir.appdata}/configuration.properties
# options: derby, mysql, postgres, oracle, sqlserver
database = mysql
# examples:
# Derby jdbc:derby:${dir.appdata}/mirthdb;create=true
# PostgreSQL jdbc:postgresql://localhost:5432/mirthdb
# MySQL jdbc:mysql://localhost:3306/mirthdb
# Oracle jdbc:oracle:thin:@localhost:1521:DB
# SQLServer jdbc:jtds:sqlserver://localhost:1433/mirthdb
#database.url = jdbc:derby:${dir.appdata}/mirthdb;create=true
database.url = jdbc:mysql://128.199.154.150:3306/mirthdb
# if using a custom driver, specify it here
#database.driver =
# maximum number of connections allowed for the connection pool
database.max-connections = 20
# database credentials
database.username = mirth
database.password = mirth

Binary file not shown.