Tutorial Cloudflare Tunnel di Proxmox (Auto Start dengan Systemd)


1. Install cloudflared

wget -O /usr/local/bin/cloudflared https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64
chmod +x /usr/local/bin/cloudflared


Cek versi:

cloudflared --version

2. Login ke Cloudflare


Jalankan:

cloudflared tunnel login



?? Browser akan terbuka ? pilih akun & domain (misal: rsimadinah.com)
?? Cloudflare akan mengirim sertifikat ke /root/.cloudflared/cert.pem.

3. Buat Tunnel Baru

cloudflared tunnel create prox-tunnel


Hasilnya keluar Tunnel UUID, contoh:

Tunnel credentials written to /root/.cloudflared/bexxxxx72d-b839-47eb-9220-40e4b054xxxxxx.json


?? Simpan UUID: bexxxxx72d-b839-47eb-9220-40e4b054xxxxxx

4. Konfigurasi Tunnel


Buat config file:

nano /root/.cloudflared/config.yml


Isi contoh (untuk Proxmox web GUI di https://localhost:8006):

tunnel: bexxxxx72d-b839-47eb-9220-40e4b054xxxxxx
credentials-file: /root/.cloudflared/bexxxxx72d-b839-47eb-9220-40e4b054xxxxxx.json

ingress:
  - hostname: prox.rsimadinah.com
    service: https://localhost:8006
  - service: http_status:404


Save & keluar.

5. Buat CNAME di Cloudflare


Masuk dashboard Cloudflare ? DNS ? Add record

Type: CNAME

Name: prox

Target: bexxxxx72d-b839-47eb-9220-40e4b054xxxxxx.cfargotunnel.com

Proxy Status: Proxied (Orange Cloud)

6. Uji Manual


Tes dulu jalanin manual:

cloudflared tunnel run prox-tunnel


Kalau benar ? akses https://prox.rsimadinah.com ?

7. Setup Systemd Service (Auto Start)


Buat service file:

nano /etc/systemd/system/cloudflared.service


Isi:

[Unit]
Description=cloudflared tunnel
After=network-online.target

[Service]
TimeoutStartSec=0
Type=notify
ExecStart=/usr/local/bin/cloudflared --no-autoupdate tunnel run prox-tunnel
Restart=on-failure
RestartSec=5s

[Install]
WantedBy=multi-user.target

8. Enable & Start Service

systemctl daemon-reload
systemctl enable cloudflared
systemctl start cloudflared
systemctl status cloudflared -l


Kalau aktif ? berarti berhasil.

9. Verifikasi


Jalankan:

curl -I https://prox.rsimadinah.com


Harus dapat respon HTTP/1.1 200 dari Proxmox GUI.

Reboot server ? cek:

systemctl status cloudflared


Harus auto start ?

?? Jadi alurnya:

Install ? Login ? Buat Tunnel ? Config ? DNS CNAME

Test manual ? bikin systemd ? enable

Domain bisa diakses tanpa harus run manual lagi.

Mengatasi Masalah Akses Direktori Samba karena SELinux

 Mengatasi Masalah Akses Direktori Samba karena SELinux

🔍 Penyebab Masalah


    Direktori sudah memiliki permission 777 (/media/data1/opt/oracle/orapro).

    SELinux aktif dalam mode enforcing, yang dapat memblokir akses meskipun permission sudah benar.

✅ Langkah Solusi
1. Nonaktifkan SELinux Sementara (Testing)

Untuk memastikan apakah SELinux penyebab masalah:
bash

sudo setenforce 0  # Nonaktifkan SELinux sementara

    Coba akses lagi via smbclient:
    bash

    smbclient //localhost/orapro -U oracle
    mkdir x

    Jika berhasil, berarti SELinux memblokir akses.

2. Perbaiki Konteks SELinux untuk Direktori Samba

Jika SELinux penyebabnya, atur konteks yang benar:
bash

sudo chcon -t samba_share_t /media/data1/opt/oracle/orapro -R

    samba_share_t adalah konteks default untuk share Samba.

    -R untuk rekursif (termasuk subdirektori/file).

3. Cek Log SELinux (Jika Masih Gagal)

Periksa log untuk detail error:
bash

sudo sealert -a /var/log/audit/audit.log

    Cari pesan terkait samba atau avc: denied.

4. Aktifkan Kembali SELinux (Jika Diperlukan)

Setelah perbaikan, kembalikan SELinux ke mode enforcing:
bash

sudo setenforce 1

⚙️ Solusi Alternatif (Jika Masih Bermasalah)


    Tambahkan kebijakan SELinux khusus (jika diperlukan):
    bash

sudo ausearch -c 'smbd' --raw | audit2allow -M my_sambafix
sudo semodule -i my_sambafix.pp

Pastikan direktori Samba memiliki label yang benar:
bash

    sudo semanage fcontext -a -t samba_share_t "/media/data1/opt/oracle/orapro(/.*)?"
    sudo restorecon -Rv /media/data1/opt/oracle/orapro

📌 Best Practices

    Jangan nonaktifkan SELinux permanen (gunakan solusi konteks/kebijakan).

    Gunakan samba_share_t untuk direktori Samba.

    Monitor log SELinux (sealert, /var/log/audit/audit.log).

    Pastikan permission Linux (chmod/chown) sudah benar.

Mengaktifkan ARCHIVELOG Mode di Oracle Database 19c on Oracle Linux R8

 Mengaktifkan ARCHIVELOG Mode di Oracle Database
📌 Pengenalan

ARCHIVELOG mode adalah mode yang memungkinkan Oracle Database untuk mengarsipkan file online redo log sebelum digunakan kembali. Mode ini sangat penting untuk:

    Point-in-time recovery (pemulihan ke waktu tertentu).

    Backup database yang konsisten.

    Mencegah kehilangan data jika terjadi kegagalan.

Tanpa ARCHIVELOG mode, Anda hanya bisa melakukan pemulihan hingga backup terakhir (tidak bisa ke waktu tertentu).
🔍 Memeriksa Status ARCHIVELOG Mode

Sebelum mengaktifkan ARCHIVELOG mode, pastikan statusnya terlebih dahulu.

    Login ke SQL*Plus sebagai sysdba:
    sql

sqlplus / as sysdba

Jalankan perintah berikut:
sql

ARCHIVE LOG LIST;

    Contoh output jika ARCHIVELOG mode tidak aktif:
    text

Database log mode              No Archive Mode
Automatic archival             Disabled

Contoh output jika ARCHIVELOG mode aktif:
text

        Database log mode              Archive Mode
        Automatic archival             Enabled

✅ Langkah Mengaktifkan ARCHIVELOG Mode

⚠️ Persyaratan:

    Database harus di-restart.

    Database harus dalam mode MOUNT, tidak boleh OPEN.

📝 Langkah-langkah:

    Login ke SQL*Plus sebagai sysdba:
    sql

sqlplus / as sysdba

Matikan database:
sql

SHUTDOWN IMMEDIATE;

Startup database dalam mode MOUNT:
sql

STARTUP MOUNT;


Aktifkan ARCHIVELOG mode:
sql

ALTER DATABASE ARCHIVELOG;

Buka database:
sql

ALTER DATABASE OPEN;

(Opsional) Pastikan archiving otomatis aktif:
sql

    ALTER SYSTEM SET log_archive_start = TRUE;

        Catatan: Di versi Oracle terbaru, log_archive_start sudah tidak digunakan karena archiving otomatis aktif jika ARCHIVELOG mode diaktifkan.

🗂️ Menentukan Lokasi Penyimpanan Archive Log

Archive log disimpan di lokasi yang ditentukan oleh parameter log_archive_dest.

    Cek lokasi saat ini:
    sql

SHOW PARAMETER log_archive_dest;

atau
sql

SHOW PARAMETER log_archive_dest_1;

(Opsional) Ubah lokasi archive log:
sql

    ALTER SYSTEM SET log_archive_dest_1='LOCATION=/u01/app/oracle/oradata/archivelogs' SCOPE=SPFILE;

        Restart database jika menggunakan SCOPE=SPFILE.

🔁 Cara Menonaktifkan ARCHIVELOG Mode


Jika suatu saat diperlukan, ARCHIVELOG mode bisa dinonaktifkan.

    Matikan database:
    sql

SHUTDOWN IMMEDIATE;

Startup dalam mode MOUNT:
sql

STARTUP MOUNT;

Nonaktifkan ARCHIVELOG mode:
sql

ALTER DATABASE NOARCHIVELOG;

Buka database:
sql

    ALTER DATABASE OPEN;

✅ Best Practices


    Selalu aktifkan ARCHIVELOG mode di database produksi.

    Atur backup rutin (misal menggunakan RMAN) untuk mengelola archive log.

    Monitor ruang disk archive log agar tidak penuh.

    Hapus archive log yang sudah tidak diperlukan setelah backup.

🎯 Kesimpulan


Dengan mengaktifkan ARCHIVELOG mode, Anda dapat:

    Melakukan pemulihan ke waktu tertentu.

    Mencegah kehilangan data penting.

    Memastikan database lebih aman.

Enable Autologin for GDM on RHEL 8

 1. Edit the GDM custom.conf file:

sudo nano /etc/gdm/custom.conf

2. Uncomment and modify/add the following lines under the [daemon] section:

[daemon]
AutomaticLoginEnable=True
AutomaticLogin=your_username

Oracle Database 19c Service (AUTOSTART CDB/PDB) on Oracle LinuxR8


Buat file service
sudo vi /etc/systemd/system/oracledb_ORCLCDB.service

[Unit]
Description=Oracle Database service for ORCLCDB
After=network.target
Wants=network.target

[Service]
Type=forking
User=oracle
Group=oinstall
Environment=ORACLE_HOME=/opt/oracle/product/19c/dbhome_1
Environment=ORACLE_SID=ORCLCDB
Environment=PATH=/opt/oracle/product/19c/dbhome_1/bin:/usr/bin:/bin
ExecStart=/opt/oracle/product/19c/dbhome_1/bin/dbstart $ORACLE_HOME
ExecStop=/opt/oracle/product/19c/dbhome_1/bin/dbshut $ORACLE_HOME
TimeoutSec=600
Restart=on-failure
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target



Catatan penting:

dbstart/dbshut membaca /etc/oratab. Pastikan entri CDB:

ORCLCDB:/opt/oracle/product/19c/dbhome_1:Y (huruf terakhir Y agar auto-start).

Sesuaikan ORACLE_HOME/ORACLE_SID kalau berbeda.


Reload systemd
sudo systemctl daemon-reload


Enable saat boot
sudo systemctl enable oracledb_ORCLCDB.service

Start sekarang (opsional)

 
sudo systemctl start oracledb_ORCLCDB.service

Cek status
sudo systemctl status oracledb_ORCLCDB.service

Log jika perlu
journalctl -u oracledb_ORCLCDB.service -b












Oracle Listener Service (AUTOSTART LISTENER)


Buat file service
sudo vi /etc/systemd/system/oracle-listener.service


[Unit]
Description=Oracle Listener
After=network.target

[Service]
Type=forking
User=oracle
Group=oinstall
Environment=ORACLE_BASE=/opt/oracle
Environment=ORACLE_HOME=/opt/oracle/product/19c/dbhome_1
Environment=TNS_ADMIN=/opt/oracle/product/19c/dbhome_1/network/admin
Environment=LD_LIBRARY_PATH=/opt/oracle/product/19c/dbhome_1/lib
Environment=PATH=/opt/oracle/product/19c/dbhome_1/bin:/usr/bin:/bin
ExecStart=/opt/oracle/product/19c/dbhome_1/bin/lsnrctl start
ExecStop=/opt/oracle/product/19c/dbhome_1/bin/lsnrctl stop
RemainAfterExit=yes
Restart=on-failure

[Install]
WantedBy=multi-user.target



Reload systemd
sudo systemctl daemon-reload

Enable saat boot
sudo systemctl enable oracle-listener.service

Start sekarang

sudo systemctl start oracle-listener.service

Cek status

sudo systemctl status oracle-listener.service

Verifikasi listener

lsnrctl status


Uji Saat Reboot

Reboot
sudo reboot

Setelah login, cek:

sudo systemctl status oracledb_ORCLCDB.service
sudo systemctl status oracle-listener.service


Ringkasan


DB service: /etc/systemd/system/oracledb_ORCLCDB.service (pakai dbstart/dbshut).

Listener service: /etc/systemd/system/oracle-listener.service (pakai lsnrctl start/stop).

Pastikan /etc/oratab punya entri ...:Y.

Aktifkan auto-start dengan systemctl enable dan verifikasi dengan status / journalctl.



Langkah demi langkah instalasi Oracle Database 19c di Oracle Linux R8

# 1. User & Group
groupadd -g 54321 oinstall
groupadd -g 54322 dba
useradd -u 54321 -g oinstall -G dba oracle
passwd oracle

# 2. Install Preinstall & Oracle DB
yum install -y oracle-database-preinstall-19c
yum install -y oracle-database-ee-19c-1.0-1.x86_64.rpm

# 3. Set Password Default
export ORACLE_PASSWORD=xxxxx

# 4. Create & Start Database
/etc/init.d/oracledb_ORCLCDB-19c configure

# 5. Tambah Environment di .bashrc
echo 'export ORACLE_HOME=/opt/oracle/product/19c/dbhome_1' >> ~/.bashrc
echo 'export ORACLE_SID=ORCLCDB' >> ~/.bashrc
echo 'export PATH=$ORACLE_HOME/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

# 6. Ganti Password SYS & SYSTEM
su - oracle
/opt/oracle/product/19c/dbhome_1/bin/oraenv   # ORCLCDB
sqlplus / as sysdba
ALTER USER sys IDENTIFIED BY newpass;
ALTER USER system IDENTIFIED BY newpass;


Info Penting

  • ORACLE_HOME: /opt/oracle/product/19c/dbhome_1

  • ORACLE_BASE: /opt/oracle/

  • Listener: 1521

  • EM: https://localhost:5500/em


Mount Partisi NTFS di Oracle Linux R8

Berikut versi teks biasa tutorial instalasi NTFS-3G di Linux berbasis RHEL/CentOS/AlmaLinux/RockyLinux:

Aktifkan EPEL Repository

Jalankan perintah:
sudo dnf install -y epel-release

Install NTFS-3G

Setelah EPEL aktif, jalankan:
sudo dnf install -y ntfs-3g

Cek instalasi

Pastikan sudah terpasang dengan perintah:
ntfs-3g --version

Mount partisi NTFS

Misalnya partisi NTFS ada di /dev/sdb1 dan akan dipasang di /mnt/ntfs:

sudo mkdir -p /mnt/ntfs
sudo mount -t ntfs-3g /dev/sdb1 /mnt/ntfs


Unmount partisi

Setelah selesai digunakan:
sudo umount /mnt/ntfs

Panduan Instalasi Sertifikat Let's Encrypt (Produksi) untuk Apache (XAMPP/Linux) Langkah 1

 🔐 Panduan Instalasi Sertifikat Let's Encrypt (Produksi) untuk Apache (XAMPP/Linux)
Langkah 1: Install Certbot


sudo apt update
sudo apt install certbot python3-certbot-apache

Langkah 2: Dapatkan Sertifikat Let's Encrypt


sudo certbot certonly --manual --preferred-challenges dns -d sub.domain.com

Ikuti instruksi yang muncul. Anda akan diminta menambahkan DNS TXT record:

    Name:

_acme-challenge.sub.domain.com.

Type:

TXT

Value (contoh dari certbot):

    7F4rb3Oz1BrAemrhDDHJGcIlItYc9kXcJRnAVhebLog

🕒 Tunggu propagasi DNS, lalu verifikasi TXT record sudah aktif menggunakan Google Admin Toolbox

Jika berhasil, Anda akan melihat pesan:

Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/sub.domain.com/fullchain.pem
Key is saved at:         /etc/letsencrypt/live/sub.domain.com/privkey.pem

⚠️ Catatan

    Sertifikat manual tidak diperpanjang otomatis.

    Untuk perpanjangan, ulangi perintah certbot dan proses DNS challenge.

Langkah 3: Konfigurasi Apache (XAMPP)


Contoh konfigurasi VirtualHost SSL:

Edit file:

sudo nano /opt/lampp/etc/extra/httpd-ssl.conf

Tambahkan atau sesuaikan:

<VirtualHost *:443>
    ServerName sub.domain.com
    DocumentRoot "/opt/lampp/htdocs/subdomain"

    SSLEngine on
    SSLCertificateFile "/etc/letsencrypt/live/sub.domain.com/fullchain.pem"
    SSLCertificateKeyFile "/etc/letsencrypt/live/sub.domain.com/privkey.pem"

    <Directory "/opt/lampp/htdocs/subdomain">
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerName sub.domain.com
    Redirect permanent / https://sub.domain.com/
</VirtualHost>

Langkah 4: Aktifkan Modul SSL Apache


Edit file:

sudo nano /opt/lampp/etc/httpd.conf

Pastikan baris berikut tidak dikomentari (tidak diawali #):

LoadModule ssl_module modules/mod_ssl.so
Include etc/extra/httpd-ssl.conf

Langkah 5: Restart Apache


sudo /opt/lampp/lampp restart

Langkah 6: Uji Sertifikat


Buka browser dan akses:

https://sub.domain.com

Jika menggunakan sertifikat valid dari Let's Encrypt, tidak akan ada peringatan keamanan dari browser.

cloudflared tunnel on ubuntu

 Berikut tutorial pembuatan Cloudflare Tunnel step-by-step lengkap dengan gambar dari tangkapan layar Anda, untuk pemahaman yang praktis dan rapi:
1️⃣ Login ke Cloudflare Dashboard

    Akses: https://dash.cloudflare.com/

    Masuk menggunakan akun email Anda.

    Pilih akun yang akan digunakan untuk tunnel.

2️⃣ Masuk ke menu Zero Trust → Tunnels

    Klik Zero Trust di sidebar.

    Pilih Networks → Tunnels.

    Anda akan melihat daftar tunnel aktif dan tidak aktif.

3️⃣ Klik Create a Tunnel

    Klik tombol + Create a tunnel.

4️⃣ Pilih metode koneksi tunnel

    Pilih Cloudflared (Recommended).

    Klik Select Cloudflared.

5️⃣ Ikuti instruksi instalasi Cloudflared

Jika belum menginstall cloudflared:

# Tambah GPG key
sudo mkdir -p --mode=0755 /usr/share/keyrings
curl -fsSL https://pkg.cloudflare.com/cloudflare-main.gpg | sudo tee /usr/share/keyrings/cloudflare-main.gpg >/dev/null

# Tambah repository
echo 'deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared any main' | sudo tee /etc/apt/sources.list.d/cloudflared.list

# Update dan install
sudo apt-get update

sudo apt-get install cloudflared

6️⃣ Jalankan tunnel dengan token

Setelah cloudflared terinstall, Anda bisa:

    Jalankan otomatis saat boot:

sudo cloudflared service install <TOKEN_YANG_DISEDIAKAN>

    Atau jalankan manual:

cloudflared tunnel run --token <TOKEN_YANG_DISEDIAKAN>


Token didapat dari tampilan pembuatan tunnel.
7️⃣ Tunnel berhasil dibuat

Tunnel Anda akan muncul di daftar dengan status HEALTHY jika berjalan normal.

8️⃣ Konfigurasi Routes

Jika ingin mengarahkan domain ke server lokal Anda:

    Klik Configure pada tunnel.

    Tambahkan Public Hostname sesuai domain/subdomain dan arahkan ke port lokal server Anda (misal port 80/443).

    Simpan konfigurasi.

 

Gunakan systemctl status cloudflared untuk memeriksa status tunnel jika menggunakan service.

Livewire upload file error ketika production http ke https

Ringkasan ini tidak tersedia. Harap klik di sini untuk melihat postingan.

Livewire Error The Command PDF To text Upload file / Library ini adalah wrapper PHP untuk binary pdftotext dari Poppler, berfungsi untuk mengubah file PDF menjadi teks secara akurat dan cepat.

 


📌 Upload PDF dan Konversi ke Teks di Laravel Livewire

1️⃣ Install library


composer require spatie/pdf-to-text

Install pdftotext di server:

    Ubuntu/Debian:


sudo apt-get install poppler-utils

CentOS:


sudo yum install poppler-utils

macOS:


    brew install poppler

2️⃣ Buat Livewire Component


php artisan make:livewire UploadPdfText

3️⃣ Edit UploadPdfText.php

<?php

namespace App\Http\Livewire;

use Livewire\Component;
use Livewire\WithFileUploads;
use Spatie\PdfToText\Pdf;

class UploadPdfText extends Component
{
    use WithFileUploads;

    public $file;
    public $parsedText;

    public function parsePdf()
    {
        $this->validate([
            'file' => 'required|file|mimes:pdf|max:20480', // Max 20MB
        ]);

        $path = $this->file->getRealPath();
        $text = Pdf::getText($path);

        $this->parsedText = $text;
    }

    public function render()
    {
        return view('livewire.upload-pdf-text');
    }
}

4️⃣ Buat upload-pdf-text.blade.php


<div class="p-6 bg-white border rounded shadow">
    <h2 class="text-lg font-semibold mb-4">Upload PDF dan Konversi ke Teks</h2>

    <input type="file" wire:model="file" accept="application/pdf" class="mb-2">
    <div wire:loading wire:target="file">Mengupload...</div>

    <button wire:click="parsePdf"
        class="px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600">Proses PDF</button>

    @if ($parsedText)
        <div class="mt-4">
            <h3 class="font-semibold mb-2">Hasil Teks:</h3>
            <pre class="p-2 bg-gray-100 rounded max-h-[400px] overflow-auto text-sm">{{ $parsedText }}</pre>
        </div>
    @endif
</div>

5️⃣ Tambahkan ke Route atau Blade


Di halaman Blade:

@livewire('upload-pdf-text')

Atau route untuk testing:

Route::get('/upload-pdf', function () {
    return view('pdf-upload-page'); // berisi @livewire di atas
});

✅ Hasil


🔹 User upload file PDF.
🔹 Tekan tombol Proses PDF.
🔹 Teks dari PDF akan ditampilkan di layar, siap untuk di-copy atau disimpan ke DB.

JIKA TERJADI ERROR DAN BERMASALAH DENGAN /usr/bin/pdftotext

 Direkomendasikan: Gunakan Wrapper Script

Buat shell script kecil untuk membungkus pdftotext dengan LD_LIBRARY_PATH kosong, lalu arahkan Spatie ke script ini.
📁 Langkah-langkah:
1. Buat file /usr/local/bin/pdftotext-wrapper

Isi file dengan:

#!/bin/bash
LD_LIBRARY_PATH= /usr/bin/pdftotext "$@"

2. Jadikan script bisa dieksekusi:

chmod +x /usr/local/bin/pdftotext-wrapper

3. Ubah kode PHP:

use Spatie\PdfToText\Pdf;

$text = Pdf::getText('/path/to/file.pdf', '/usr/local/bin/pdftotext-wrapper');

🔚 Kesimpulan:

    LD_LIBRARY_PATH harus dikosongkan, jadi gunakan LD_LIBRARY_PATH=

    Tapi karena Pdf::getText() tidak mendukung parameter ketiga, kamu tidak bisa langsung menyetel env di situ

    Solusi paling bersih: Gunakan wrapper script yang menyetel env kosong, lalu arahkan Pdf::getText() ke script itu 






Resize an UNDO tablespace Oracle 10g

1.

sqlplus SYS AS SYSDBA

2.

SELECT file_name, tablespace_name, bytes/1024/1024 UNDO_SIZE_MB, SUM(bytes/1024/1024) OVER() TOTAL_UNDO_SIZE_MB FROM dba_data_files d WHERE EXISTS (SELECT 1 FROM v$parameter p WHERE LOWER (p.name)='undo_tablespace' AND p.value=d.tablespace_name);

3.
alter database datafile '/oracle/ora10g/ecms/syscom01.dbf' resize 4G;


Note: It is not recommended to grow any data files above 20 GB in size. If a tablespace needs to be grown over 20 GB a new datafile has to be added.



source  : https://www.ibm.com/docs/en/tnpm/1.4.4?topic=administration-resize-undo-tablespace


https://forums.oracle.com/ords/apexds/post/resize-datafile-5440

How to increase PROCESSES initialization parameter. ORA-00020 maximum number of processes exceeded..

 ORA-00020 maximum number of processes exceeded

Cause: All process state objects are in use.

Action: Increase the value of the PROCESSES initialization parameter.


ORA-00020 comes under "Oracle Database Server Messages". These messages are generated by the Oracle database server when running any Oracle program.



1.   Login as sysdba

   sqlplus / as sysdba

   

2. Check Current Setting of Parameters

   sql> show parameter sessions;

   sql> show parameter processes;

   sql> show parameter transactions;


3.   If you are planning to increase "PROCESSES" parameter you should also plan to increase "sessions and "transactions" parameters

   A basic formula for determining these parameter values is as follows:

   

      processes=x

      sessions=x*1.1+5

      transactions=sessions*1.1

      

4.   These paramters can't be modified in memory. You have to modify the spfile only (scope=spfile) and bounce the instance.

   sql> alter system set processes=500 scope=spfile;

   sql> alter system set sessions=555 scope=spfile;

   sql> alter system set transactions=610 scope=spfile;

   sql> shutdown abort
   sql> startup



#source : https://www.linkedin.com/pulse/how-increase-processes-initialization-parameter-ora-00020-jain

CIFS (Common Internet File System) how to mount file from network sharing folder Ubuntu

CIFS stands for Common Internet File System. It's a network file system protocol that allows computers to share files and printers over a network. It's widely used in Windows environments but can also be used on Linux and macOS systems.

 

 

Create a Mount Point:

 

Bash
sudo mkdir /mnt/vbox

 

Mount the Share: Use the following command to mount the share:
Bash
 

sudo mount -t cifs //server_ip_address/share_name /mnt/mount_point -o username=your_username,password=your_password

 

To ensure that files created within a CIFS mount are owned by root, you can use the uid and gid options when mounting the share:

sudo mount -t cifs //server_ip_address/share_name /mnt/mount_point -o username=your_username,password=your_password,uid=0,gid=0

 

uid 0 = user root

gid 0  = group root


To view the UID (user ID) and GID (group ID) of files and directories using the ls command on Ubuntu, you can use the -l option:
Bash

ls -l

Gunakan kode dengan hati-hati.

This will display a long listing of files and directories, including the following information for each:

    Permissions: The file permissions in the format rwxrwxrwx (read, write, execute permissions for owner, group, and others).
    Link count: The number of hard links to the file.
    Owner: The username of the file owner.
    Group: The group name of the file.
    File size: The size of the file in bytes.
    Modification date: The date and time the file was last modified.
    Filename: The name of the file or directory.

To see the numerical UID and GID instead of the usernames and group names, you can use the -n option:
Bash

ls -ln

Gunakan kode dengan hati-hati.

This will display the numerical UID and GID in the owner and group columns, respectively.

Example:

-rw-r--r-- 1 user_name group_name 1024 Nov  6 12:34 file.txt

In this example:

    -rw-r--r--: The file permissions
    1: The number of hard links
    user_name: The owner of the file
    group_name: The group of the file
    1024: The file size in bytes
    Nov 6 12:34: The modification date and time
    file.txt: The filename

If you need more detailed information about a specific file, you can use the stat command:
Bash

stat file.txt

Gunakan kode dengan hati-hati.

This will display a wealth of information about the file, including its inode number, block size, access time, modification time, change time, and more.


 

Laravel HTTPS routes

Ringkasan ini tidak tersedia. Harap klik di sini untuk melihat postingan.

Laravel TimeZone not working

I am using Lumen framework. How can I change Timezone to Europe/Paris CEST?

I added a variable in my .env file:

APP_TIMEZONE=Asia/Jakarta
 

here it's

 

If you want to manage your timezone from .env file, then you can add below code in your config.php file.

'timezone' => env('APP_TIMEZONE', 'UTC'),

and add the below line in your .env file.

APP_TIMEZONE='Asia/Jakarta'

Remove “api” Prefix from URL on Laravel

PHP Laravel Framework makes it easy for us to create a Restful API. We just set the routing in the Routes -> api.php section.

By default we will find that we will be given a url like this http://ourdomain.com/api/[end-point]

This is to distinguish between urls that can be accessed via the web or can only be accessed through api. We want to change it to http://ourdomain.com/[end-point] by removing the “api” prefix.

To change it we just go to the RouteServiceProvider.php file in the app/Providers folder

Then in the mapApiRoutes method function section, we can eliminate the prefix (‘api’)

 

public function boot(): void
{
RateLimiter::for('api', function (Request $request) {
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
});

$this->routes(function () {
Route::middleware('api')
// ->prefix('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));

Route::middleware('web')
->group(base_path('routes/web.php'));
});
}
 

 

#source : https://medium.com/@arthajonar/remove-api-prefix-from-url-on-laravel-35ed585f3a53

Add Public to asset path in Laravel

 I want to install laravel in shared hosting and I followed the steps here https://stackoverflow.com/a/28449523 but my asset path doesn't include the public directory

Instead of this

<link href='http://example.com/public/assets/css/style.css' type='text/css' media='all' />

I'm getting this

<link href='http://example.com/assets/css/style.css' type='text/css' media='all' />

How do I change the directory of the asset folder(add public to assets) without changing any core classes?


Add ASSET_URL=public in your .env file and run php artisan config:cache

Livewire 3 Customizing the asset URL / Livewire3 is not working without PHP artisan serve

 

You can try reference the livewire assests from AppServiceProvider.php

use Illuminate\Support\ServiceProvider;
 

use Livewire\Livewire;

use Illuminate\Support\Facades\Route;


 

class AppServiceProvider extends ServiceProvider
{
    public function boot(): void
    {
        Livewire::setScriptRoute(function ($handle) {
            return Route::get('/example-app/livewire/livewire.js', $handle);
        });

        Livewire::setUpdateRoute(function ($handle) {
            return Route::post('/example-app/livewire/update', $handle);
        });


    }
}


Livewire is not working without PHP artisan serve

 

First of all you should publish livewire configurational file with next command:

php artisan livewire:publish --config


Then in config folder you would be able to find file htdocs\YourProjectName\config\livewire.php where you would be able to edit the next string:

'asset_url'  => null,

to

'asset_url'  => 'http://localhost/YourProjectName/public',
 

And it should work after that. At least it worked in my case.

Docs: https://laravel-livewire.com/docs/2.x/installation

But in docs that string is called:

'asset_base_url' => '/assets'

instead of

'asset_url'  => 'http://localhost/YourProjectName/public',

But in the end it doesn't matter;)

 

https://stackoverflow.com/questions/65370458/livewire-is-not-working-without-php-artisan-serve

https://github.com/livewire/livewire/issues/84