Showing posts with label Lucee. Show all posts
Showing posts with label Lucee. Show all posts

Wednesday, August 19, 2026

.::: Test Pgpool-II Monitor PostgreSQL Routing to Master or Slave replication streaming Using Lucee & PHP PGPASSWORD :::.

 

1. PostgreSQL Connection

chmod 755 /opt/lucee/bin/pgpool_connection.sh
chmod 755 /opt/lucee/bin/pgpool_nodes.sh
chmod 755 /opt/lucee/bin/pgpool_replication.sh


[root@teguhth-all ROOT]# cat /opt/lucee/bin/pgpool_connection.sh
#!/bin/bash

export PGPASSWORD='admin'

/usr/bin/psql -h 10.10.10.25 -p 9999 -U userpgpool -d teguhth -c "SELECT inet_client_addr(), inet_client_port(), inet_server_addr(), inet_server_port(),'PostgreSQL ' || current_setting('server_version') as edbversion;"
[root@teguhth-all ROOT]#
 

Tuesday, July 14, 2026

.::: Sample Access Database MariaDB via Frontend & Backend using Lucee with access login Application.cfc, users save in table users, insert, update, delete with confirm :::.

 
 
hanya berubah pembelian_all.cfm n lanjutan dari https://teguhth.blogspot.com/2026/07/sample-access-database-mariadb-via_01669209479.html

1. create user for login

CREATE TABLE users (
    id INT AUTO_INCREMENT PRIMARY KEY,
    username VARCHAR(50) NOT NULL,
    password VARCHAR(100) NOT NULL,
    nama VARCHAR(100),
    aktif CHAR(1) DEFAULT 'Y'
);

INSERT INTO users(username,password,nama,aktif)
VALUES
('admin','123456','Administrator','Y');

INSERT INTO users(username,password,nama,aktif)
VALUES
('aisyah','123456','Administrator','Y');

INSERT INTO users(username,password,nama,aktif)
VALUES
('teguh','123456','readonly','Y');
 

Monday, July 13, 2026

.::: Sample Access Database MariaDB via Frontend & Backend using Lucee with accecc login Application.cfc, users save in table users :::

 

 
correlation https://teguhth.blogspot.com/2026/07/sample-access-database-mariadb-via.html

1. create user for login

CREATE TABLE users (
    id INT AUTO_INCREMENT PRIMARY KEY,
    username VARCHAR(50) NOT NULL,
    password VARCHAR(100) NOT NULL,
    nama VARCHAR(100),
    aktif CHAR(1) DEFAULT 'Y'
);

INSERT INTO users(username,password,nama,aktif)
VALUES
('admin','123456','Administrator','Y');

INSERT INTO users(username,password,nama,aktif)
VALUES
('aisyah','123456','Administrator','Y');

INSERT INTO users(username,password,nama,aktif)
VALUES
('teguh','123456','readonly','Y');

 

Friday, July 10, 2026

.::: Sample Access Database MariaDB via Frontend & Backend using Lucee with accecc login Application.cfc :::.

  
https://teguhth.blogspot.com/2026/02/sample-access-database-mariadb-via.html

Kalau tujuan Anda adalah setiap kali membuka:

http://10.10.10.90:8888/pembelian_front.cfm

maka pengguna harus login terlebih dahulu, saya sarankan menggunakan Session Login. Cara ini lebih sederhana dibanding CFLOGIN dan umum dipakai di Lu

1. Struktur file

root@teguhth-all ROOT]# pwd
/opt/lucee/tomcat/webapps/ROOT
[root@teguhth-all ROOT]#
[root@teguhth-all ROOT]# ls -lh Application.cfc login.cfm logout.cfm pembelian_front.cfm pembelian_api.cfm
-rw-r--r-- 1 root root  744 Jul 10 15:06 Application.cfc
-rw-r--r-- 1 root root 1.1K Jul 10 14:57 login.cfm
-rw-r--r-- 1 root root   76 Jul 10 14:57 logout.cfm
-rw-r--r-- 1 root root  296 Jul 10 15:07 pembelian_api.cfm
-rw-r--r-- 1 root root  912 Jul 10 15:09 pembelian_front.cfm
[root@teguhth-all ROOT]#

 

Wednesday, February 18, 2026

.::: Sample Access Database MariaDB via Backend Golang & Frontend using Lucee & PHP :::.

 


1. Sample for table pembelian

mkdir -p /opt/go-pembelian
cd /opt/go-pembelian

mkdir backend
cd backend

2. run mod & driver 

cd backend
go mod init pembelian-api
go get github.com/go-sql-driver/mysql

[root@teguhth-all go-pembelian]# cd backend
[root@teguhth-all backend]# go mod init pembelian-api
go: creating new go.mod: module pembelian-api
[root@teguhth-all backend]# ls
go.mod
[root@teguhth-all backend]# go get github.com/go-sql-driver/mysql
go: downloading github.com/go-sql-driver/mysql v1.9.3
go: downloading filippo.io/edwards25519 v1.1.0
go: added filippo.io/edwards25519 v1.1.0
go: added github.com/go-sql-driver/mysql v1.9.3

[root@teguhth-all backend]# pwd
/opt/go-pembelian/backend
[root@teguhth-all backend]# ls
go.mod  go.sum
[root@teguhth-all backend]#
 

Monday, February 9, 2026

.::: Sample Access Database MariaDB via Frontend & Backend using Lucee :::.

 


1. enable datasource 
 


2. backend 


http://10.10.10.90:8888/pembelian_api.cfm

[root@teguhth-all ROOT]# pwd
/opt/lucee/tomcat/webapps/ROOT
[root@teguhth-all ROOT]#
[root@teguhth-all ROOT]# cat pembelian_api.cfm
<cfquery name="
qPembelian" datasource="dbteguhth">
 SELECT
        KODE_PEMBELIAN,
        KODE_BARANG,
        KODE_CUSTOMER,
        TANGGAL_PEMBELIAN,
        JUMLAH_PEMBELIAN
    FROM pembelian
</cfquery>

<cfcontent type="application/json">
<cfoutput>#serializeJSON(qPembelian)#</cfoutput>

[root@teguhth-all ROOT]#

Tuesday, November 25, 2025

.::: Install Lucee 6 In Almalinux 9 Centos 9 :::.

 



1. Install httpd & enable 

dnf install httpd -y

systemctl enable httpd
systemctl start httpd


2. download lucee wget https://cdn.lucee.org/lucee-6.2.3.35-linux-x64-installer.run

3. install lucee 


/opt/lucee-6.2.3.35-linux-x64-installer.run

[root@teguhth nitip2]# /opt/lucee-6.2.3.35-linux-x64-installer.run
----------------------------------------------------------------------------
Welcome to the Lucee Installer.

Tomcat Version: 11.0.13
Bundled Java: 21.0.9+10-LTS

----------------------------------------------------------------------------
Please read the following License Agreement. You must accept the terms of this
agreement before continuing with the installation.
 

Monday, November 24, 2025

.::: Testing Script Lucee using Driver MariaDB & MySQL to access MariaDB Database :::.

 

1. create database & access

CREATE DATABASE testdb;
CREATE USER 'luceeuser'@'%' IDENTIFIED BY 'Password123!';
GRANT ALL PRIVILEGES ON testdb.* TO 'luceeuser'@'%';
FLUSH PRIVILEGES;

CREATE TABLE IF NOT EXISTS test_table (
            id INT AUTO_INCREMENT PRIMARY KEY,
            pesan VARCHAR(255)
        );

INSERT INTO test_table (pesan) VALUES ('Halo dari Lucee di CentOS 9!');

SELECT * FROM test_table ORDER BY id DESC LIMIT 5;

 

Popular Posts