Wednesday, October 14, 2026

Mengganti Kernel RHCK 5.14.0-687.56.1.el9_8.x86_64 menjadi kernel UEK (Unbreakable Enterprise Kernel) versi 6.12 Oracle Linux 9

1. Aktifkan repositori UEK 8

    dnf install -y oraclelinux-release-el9

    dnf config-manager --set-enabled ol9_UEKR8

    dnf clean all

    dnf makecache


2. Periksa versi kernel terbaru yang tersedia

    dnf list --showduplicates kernel-uek

    Cari versi paling baru pada hasilnya. Target yang diharapkan:

    kernel-uek.x86_64  6.12.0-207.111.5.1.el9uek

    Jika versi tersebut tersedia di repositori server Anda, lanjutkan.


3. Instal kernel UEK terbaru

    dnf install -y kernel-uek

    Perintah ini memasang paket kernel UEK terbaru yang dipilih DNF berdasarkan repositori aktif, 

    tanpa perlu menghapus kernel RHCK yang sudah ada.

    Setelah selesai, periksa daftar kernel:

    grubby --info=ALL | grep -E '^(index|kernel)='


4. Jadikan UEK sebagai kernel default

    Periksa dahulu apakah file kernel target tersedia:

    ls -l /boot/vmlinuz-6.12.0-207.111.5.1.el9uek.x86_64

    Jika file tersebut ada, jadikan sebagai default:

    grubby --set-default /boot/vmlinuz-6.12.0-207.111.5.1.el9uek.x86_64

    grubby --default-kernel

    Pastikan hasil perintah kedua menunjukkan:

    /boot/vmlinuz-6.12.0-207.111.5.1.el9uek.x86_64


5. Reboot dan verifikasi

    Lakukan saat jadwal pemeliharaan karena server akan mati sementara:

    reboot

    Setelah server hidup kembali:

    uname -r

    Hasil yang diharapkan:

    6.12.0-207.111.5.1.el9uek.x86_64

Thursday, October 1, 2026

Update file dari server 1 ke server 2 Oracle Linux 9 rsync dijalankan di crontab

Auto backup / sinkron secara otomatis :

  • file belum ada → copy
  • file ada tetapi berubah → update
  • file sama → tidak dikirim ulang
  • folder baru → copy
  • file yang tidak berubah → dilewati

Server 1 ip 192.168.1.8

Server 2 ip 192.168.1.5

Crontab dijalankan di server 192.168.1.5

1. Install rsync di 192.168.1.5

dnf install -y rsync openssh-clients

2. Tes koneksi dari 192.168.1.5 ke 192.168.1.8

ssh admin@192.168.1.8

Password: 

narasumber01

Kalau berhasil masuk, keluar:

exit

3. Buat script sinkronisasi di 192.168.1.5:

mkdir -p /root/scripts

vi /root/scripts/sync_hrd_files.sh

  • isi :

#!/bin/bash

SOURCE="admin@192.168.1.8:/DISK4/web/hrd.cardinal.id/filesimages/"

DEST="/home/public_html/hrd.cardinal.id/filesimages/"

LOG="/var/log/sync_hrd_files.log"

mkdir -p "$DEST"

echo "===== $(date '+%Y-%m-%d %H:%M:%S') =====" >> "$LOG"

sshpass -p 'narasumber01' rsync -av \

    "$SOURCE" "$DEST" >> "$LOG" 2>&1

4. Install sshpass

dnf install -y sshpass

  • Beri permission:

chmod 700 /root/scripts/sync_hrd_files.sh

  • Tes manual:

/root/scripts/sync_hrd_files.sh

  • Lihat hasilnya:

tail -50 /var/log/sync_hrd_files.log

5. Crontab setiap 15 menit

crontab -e

  • Tambahkan:

*/15 * * * * /root/scripts/sync_hrd_files.sh

Scripts akan dijalankan setiap 15 menit.

Wednesday, September 30, 2026

Crontab Monitoring XAMPP/LAMPP Untuk Oracle Linux 9

aturan : "Cek status terlebih dahulu.Jika XAMPP/LAMPP mati atau error, baru dijalankan ulang."


  • Buat script monitoring 

vi /usr/local/bin/check_lampp.sh

  • isi:

#!/bin/bash

LAMPP="/opt/lampp/lampp"

LOG="/var/log/lampp-monitor.log"


export PATH_ORACLE="/opt/lampp/lib/instantclient-11.2.0.3.0"

export LD_LIBRARY_PATH="$PATH_ORACLE"

export TNS_ADMIN="$PATH_ORACLE"

export ORACLE_HOME="$PATH_ORACLE"


DATE=$(date '+%Y-%m-%d %H:%M:%S')


# Cek apakah LAMPP sedang berjalan

if "$LAMPP" status 2>&1 | grep -qiE "running|already running"; then

    echo "$DATE - LAMPP OK / RUNNING" >> "$LOG"

    exit 0

fi


# Jika tidak running, coba restart

echo "$DATE - LAMPP STOP/ERROR - melakukan restart..." >> "$LOG"


"$LAMPP" stop >> "$LOG" 2>&1

sleep 3


"$LAMPP" start >> "$LOG" 2>&1


sleep 5


# Cek kembali setelah restart

if "$LAMPP" status 2>&1 | grep -qiE "running|already running"; then

    echo "$DATE - LAMPP berhasil START kembali" >> "$LOG"

else

    echo "$DATE - WARNING: LAMPP gagal START!" >> "$LOG"

fi


  • Simpan kemudian jalankan :

chmod +x /usr/local/bin/check_lampp.sh

  • Test manual

/usr/local/bin/check_lampp.sh

  • kemudian lihat :

cat /var/log/lampp-monitor.log

  • cek juga :

/opt/lampp/lampp status

  • Buat crontab setiap 5 menit
  • edit crontab root :

crontab -e

  • tambahkan :

*/5 * * * * /usr/local/bin/check_lampp.sh 

  • Jadi setiap 5 menit akan menjalankan scrip
  • Jalankan ini untuk melihat hasil :

cat /var/log/lampp-monitor.log

  • Hasilnya seperti ini :

2026-09-29 11:19:59 - LAMPP OK / RUNNING

2026-09-29 11:25:01 - LAMPP OK / RUNNING

2026-09-29 11:30:01 - LAMPP OK / RUNNING

2026-09-29 11:35:01 - LAMPP OK / RUNNING

2026-09-29 11:40:01 - LAMPP OK / RUNNING

2026-09-29 11:45:01 - LAMPP OK / RUNNING

2026-09-29 11:50:01 - LAMPP OK / RUNNING

2026-09-29 11:55:02 - LAMPP OK / RUNNING

2026-09-29 12:00:01 - LAMPP OK / RUNNING

2026-09-29 12:20:01 - LAMPP OK / RUNNING

2026-09-29 12:25:01 - LAMPP OK / RUNNING

2026-09-29 12:30:01 - LAMPP OK / RUNNING

2026-09-29 12:35:01 - LAMPP OK / RUNNING

2026-09-29 12:40:01 - LAMPP OK / RUNNING

2026-09-29 12:45:01 - LAMPP OK / RUNNING

2026-09-29 12:50:01 - LAMPP OK / RUNNING

2026-09-29 12:55:01 - LAMPP OK / RUNNING

2026-09-29 13:00:01 - LAMPP OK / RUNNING


Monday, May 18, 2026

COMMAND UNTUK KERNEL LINUX

  •  melihat log crash linux

            dmesg -T | tail -100

  • menampilkan default kernel saat booting

            sudo grubby --default-kernel

  • menampilkan kernel yg dipakai sekarang

            uname -r

  • menampilkan boot loader kernel

            sudo grubby --info=ALL | grep -E "index=|kernel="

  • melihat daftar kernel yg terinstall

            rpm -q kernel-core

  • menghapus kernel

            sudo dnf remove kernel-core-5.14.0-611.26.1.el9_7.x86_64

  • upgrade kernel online

            sudo dnf makecache

            sudo dnf upgrade kernel

  • upgrade kernel online beserta OS nya

            sudo dnf makecache

            sudo dnf upgrade

Thursday, January 29, 2026

INSTALL RHEL 9 MENGGUNAKAN COMMAND TEXT

 INSTALL RHEL 9 MENGGUNAKAN COMMAND TEXT

booting flasdisk

menu bootloader tekan e

di barisan belakang quiet tambahkan inst.text

tekan F10


( selanjutnya ikutin aja petunjuk yg ada dilayar ... )

COMMAND -2 RHEL PENTING

 MELIHAT PROSESSOR RHEL


lscpu

Atau

sudo dmidecode -t processor

Atau

grep "model name" /proc/cpuinfo


MELIHAT MEMORY RHEL

free -h: Menampilkan informasi penggunaan memori (total, terpakai, bebas, dll.) dalam format yang mudah dibaca manusia (misalnya GB atau MB).

free -m: Menampilkan penggunaan memori dalam satuan megabyte (MB).

free -k: Menampilkan penggunaan memori dalam satuan kilobyte (KB). 

MELIHAT PROSESS RHEL

top: Menampilkan statistik sistem secara real-time, termasuk penggunaan CPU, RAM, dan daftar proses yang sedang berjalan.

Untuk mengurutkan berdasarkan penggunaan memori: Setelah top berjalan, tekan Shift + M untuk mengurutkan proses berdasarkan penggunaan memori. 


INSTALL RHEL 9 MENGGUNAKAN COMMAND TEXT

booting flasdisk

menu bootloader tekan e

di barisan belakang quiet tambahkan inst.text

tekan F10


( selanjutnya ikutin aja petunjuk yg ada dilayar ... )


ZONA WAKTU

ls -l /etc/localtime                       ## MELIHAT ZONA WAKTU SAAT INI

timedatectl list-timezones           ## MEMUNCULKAN DAFTAR ZONA WAKTU YG ADA

sudo timedatectl set-timezone Asia/Jakarta   ## MERUBAH ZONA WAKTU


MERUBAH JAM

date -s 09:00:00

MERUBAH TANGGAL

date 111210302024  ## -mengubah tanggal dan jam server ke tgl 12 Nov 2024, jam 10:30

UPDATE JAM LINUX

hwclock --systohc   ## - mengupdate jam di linux ke bios


MANAGEMEN DISK LINUX

MENAMPILKAN BESAR FOLDER DAN FILE

du -mh |sort -h         ## - melihat folder mana yang paling besar datanya di linux

du -sh

du sh /var ## - melihat total size isi folder /var

du -sh /var/* ## - mana yang paling besar datanya di /var

du -sh /var/log/* ## - melihat isi folder mana yang paling besar datanya di /var/log


FORMAT HARDISK

mkfs.xfs /dev/sdb            ## - memformat hardisk yg terdetek sdb dilinux


MOUNTING DISK

mount /dev/sdb /DISK2   ## - mounting hardisk sdb ke folder DISK2

UUID

blkid      ## - melihat UUID

FSTAB BERDASARKAN UUID

UUID=10162f05-6ec5-4844-a777-e499059d9984 /                 xfs     defaults    0 0

UUID=dfc8e078-ea23-4560-a555-a04da936c0b4 /boot           xfs     defaults    0 0

UUID=C676-F4B0          /boot/efi               vfat    umask=0077,shortname=winnt 0 2

UUID=a7dd0b28-5131-4b3c-b60a-bca83567915a /home        xfs     defaults     0 0

UUID=34270c4a-474a-4d2d-8fac-76b7ed4cfed4 /opt             xfs     defaults     0 0

UUID=11e706fe-7163-4bc4-9d36-2d8824175cb1 /var            xfs     defaults     0 0

UUID=a6c1fef4-f428-44a4-936d-6a088ce5c653 none             swap    defaults   0 0

UUID=9f97b81c-2f71-4fef-9be2-20503549a63b /NVME2      xfs     defaults     0 0


MEMBATASI ISI FILE LOG DI /var BIAR TIDAK PENUH

systemctl status systemd-journald   ## - melihat status aktif gaknya

vi /etc/systemd/journald.conf    ## - edit file conf

--------- ISI / REMARK

SystemMaxUse=20G

SystemKeepFree=10G

SystemMaxFileSize=50M

RuntimeMaxUse=50G

#### 

systemctl restart systemd-journald   ## - simpan dan restart service 


RUN LEVEL LINUX

systemctl get-default  ## mengecek run level yg aktif

systemctl list-units --type=target   ## melihat run level yg bisa diaktifkan

systemctl set-default multi-user.target   ## merubah run level sesuai daftar yg bisa diaktifkan

systemctl get-default   ## melihat posisi run level saat ini


NON AKTIFKAN FIREWALL LINUX RHEL

setenforce Permissive

systemctl stop firewalld

systemctl disable firewalld


PAKET PAKET PENTING YANG WAJIB DI INSTALL DI LINUX RHEL

yum install binutils -y

yum install compat-libstdc++-33 -y

yum install compat-libstdc++-33.i686 -y

yum install gcc -y

yum install gcc-c++ -y

yum install glibc -y

yum install glibc.i686 -y

yum install glibc-devel -y

yum install glibc-devel.i686 -y

yum install glibc -y

yum install ksh -y

yum install libgcc -y

yum install libgcc.i686 -y

yum install libstdc++ -y

yum install libstdc++.i686 -y

yum install libstdc++-devel -y

yum install libstdc++-devel.i686 -y

yum install libaio -y

yum install libaio.i686 -y

yum install libaio-devel -y

yum install libaio-devel.i686 -y

yum install libXext -y

yum install libXext.i686 -y

yum install libXtst -y

yum install libXtst.i686 -y

yum install libX11 -y

yum install libX11.i686 -y

yum install libXau -y

yum install libXau.i686 -y

yum install libxcb -y

yum install libxcb.i686 -y

yum install libXi -y

yum install libXi.i686 -y

yum install make -y

yum install sysstat -y

yum install unixODBC -y

yum install unixODBC-devel -y

yum install zlib-devel -y

yum install zlib-devel.i686 -y


MERUBAH BOOT GRUB LOADER ( Biasanya terjadi setelah update OS )

MERUBAH BOOT GRUB LOADER

Biasanya terjadi setelah update OS,


 CARA AMAN :

MELIHAT KERNEL YANG SEDANG BERJALAN / SETELAH REBOOT

uname -r


Cek default aktif:

sudo grubby --default-kernel

/boot/vmlinuz-6.12.0-107.59.3.3.el9uek.x86_64


MELIHAT DAFTAR KERNEL

sudo grubby --info=ALL | grep -E "index=|kernel="


Contoh Output daftar kernel


index=0

kernel="/boot/vmlinuz-6.12.0-107.59.3.3.el9uek.x86_64"

args="ro crashkernel=1G-64G:448M,64G-:512M resume=UUID=97b834c2-62b8-4896-9a85-e2c869e41ddf rhgb quiet"

index=1

kernel="/boot/vmlinuz-6.12.0-105.51.5.el9uek.x86_64"

args="ro crashkernel=1G-64G:448M,64G-:512M resume=UUID=97b834c2-62b8-4896-9a85-e2c869e41ddf rhgb quiet $tuned_params"

index=2

kernel="/boot/vmlinuz-6.12.0-1.23.3.2.el9uek.x86_64"

args="ro crashkernel=1G-64G:448M,64G-:512M resume=UUID=97b834c2-62b8-4896-9a85-e2c869e41ddf rhgb quiet numa=off transparent_hugepage=never $tuned_params"

index=3

kernel="/boot/vmlinuz-5.14.0-611.26.1.el9_7.x86_64"

args="ro crashkernel=1G-64G:448M,64G-:512M resume=UUID=97b834c2-62b8-4896-9a85-e2c869e41ddf rhgb quiet $tuned_params"

index=4

kernel="/boot/vmlinuz-5.14.0-570.62.1.0.1.el9_6.x86_64"

args="ro crashkernel=1G-64G:448M,64G-:512M resume=UUID=97b834c2-62b8-4896-9a85-e2c869e41ddf rhgb quiet $tuned_params"

index=5

kernel="/boot/vmlinuz-5.14.0-570.12.1.0.1.el9_6.x86_64"

args="ro crashkernel=1G-64G:448M,64G-:512M resume=UUID=97b834c2-62b8-4896-9a85-e2c869e41ddf rhgb quiet numa=off transparent_hugepage=never $tuned_params"

index=6

kernel="/boot/vmlinuz-0-rescue-5bf4dc711f4e4b7bae8848890c281122"

args="ro crashkernel=1G-64G:448M,64G-:512M resume=UUID=97b834c2-62b8-4896-9a85-e2c869e41ddf rhgb quiet numa=off transparent_hugepage=never"


MERUBAH DEFAULT KE 4

sudo grubby --set-default-index=4

The default is /boot/loader/entries/5bf4dc711f4e4b7bae8848890c281122-5.14.0-611.26.1.el9_7.x86_64.conf with index 4 and kernel /boot/vmlinuz-5.14.0-570.62.1.0.1.el9_6.x86_64


CEK DEFAULT KERNEL YG AKTIF

sudo grubby --default-kernel

/boot/vmlinuz-5.14.0-570.62.1.0.1.el9_6.x86_64


Tuesday, August 19, 2025

Icon Power Shutdown Tidak Muncul di operating Windows

klik + run 

ketik  --> regedit 

computer\HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\POLICIES\EXPLORER


KLIK KANAN NEW DWORD32

NEW VALUE GANTI DENGAN NoClose

value data 0

ok


cmd run as administrator

ketik :

taskkill /im explorer.exe /f

enter

ketik :

explorer.exe

enter



Friday, May 30, 2025

Cara merubah run level linux RHL/CENTOS inittab

# mengecek run level yg aktif

             systemctl get-default

 

# melihat run level yg bisa diaktifkan

             systemctl list-units --type=target

 

# merubah run level sesuai daftar yg bisa diaktifkan

             systemctl set-default multi-user.target

 

# melihat posisi run level saat ini

             systemctl get-default

Tuesday, May 27, 2025

Setting VPN Server menggunakan PPTP Server Mikrotik

Login ke Mikrotik menggunakan WinBox, 

Persiapan ip address untuk client vpn

masuk ke menu IP->Address

klik + 

address : 172.16.19.2/24

network : 172.16.19.0

interface bridge


klik menu PPP,

Klik tombol “PPTP Server” pada window PPP

Check list “Enabled“, kemudian klik OK

( Apabila tidak ada menu PPTP Server kemungkinan vpn mikrotiknya sudah enable )


Klik tombol “Secrets“, pada window PPP

Masukkan user login dan password yang nanti digunakan saat dialup

Klik tombol “Ok”

Local address dan Remote Address diisi sesuaikan dengan planing awal 

misal 

Local address  : 172.16.19.2

Remote address : 172.16.19.200


Selesai configurasi server vpn mikrotiknya menggunakan PPTP Server Mikrotik


--------------------------------------------------

Konfigurasi vpn windows/client.


Klik Start, tombol pencarian ketik saja “vpn”,

Klik “Set up a virtual private network (VPN) connection“

Pada internet address masukkan IP public/ miktoriknya, kemudian isi deskripsinya, klik Next

Masukkan login user id dan password yang diisi pada poin ke 5 diatas, klik “Connect“

Perhatikan pada status koneksi di kanan bawah, jika sudah Connected, maka selesai, cek ping ke ip 172.16.19.2

Untuk masuk ke jaringan internal dibelakang mikrotik pastikan routingnya sudah benar.


---------------------------

Sudah dicoba menggunakan MikroTik RB3011UiAS dan berhasil.

Monday, May 26, 2025

Membuat Pool VPN IPsec menggunakan MikroTik

membuat pool dhcp dikasih nama pool-vpn-ipsec ( 172.16.25.50-172.16.25.200 ) 
masuk ke menu ip -> ipsec -> mode configs 
klik + (new) 
name dirubah -> vpn-ipsec-ikev 
address pool dirubah ke -> pool-vpn-ipsec 
address prefix length dirubah -> 32 
system dns -> di unchek karena kita akan menggunakan dns handpone 
klik -> apply kemudian -> ok 

masuk ke tab -> proposals 
name dirubah -> ipsec-kev2 
auth algorithms -> ceklist -> sha1 & sha256 ( selain ini unchek ) 
encr algorithms -> ceklist -> aes-256 cbc ( selain ini unchek ) 
PFS Group -> none 
klik -> apply kemudian -> ok 

masuk ke menu -> Groups 
klik + (new) 
name dirubah -> ipsec-ikev2 
klik -> apply kemudian -> ok 

masuk ke menu -> profiles 
name dirubah -> ipsec-ikev 
Hash Algorithms -> sha256 PRF 
Algorithms -> auto 
Encryption Algorithms -> ceklis -> aes-256 ( selain ini unchek ) 
DH Group -> ceklist -> modp1024 & modp2048 ( selain ini unchek ) 
Proposal Check -> obey 
lifetome -> 1d 00:00:00 
lifebytes -> blank 
NAT -> cheklis 
DPD interval : 120 
DPD Maximum Failures -> 5 
klik -> apply kemudian -> ok 

masuk ke menu -> Policies 
klik + (new) 
tab -> general 
Template -> cheklis 
Group -> ipsec-ikev2 
tab -> Action 
action -> encrypt 
ipsec protocols -> esp 
proposal -> ipsec-ikev2 
klik -> apply kemudian -> ok 

masuk ke menu -> Peers 
klik + (new) 
name -> vpn-ikev2 
address -> :/0 
port -> blank 
local Address -> blank 
profile -> ipsec-ikev 
Exchange Mode -> IKE2 
Passive -> ceklis 
Send INITIAL_CONTACT -> ceklis 
klik -> apply kemudian -> ok 

masuk ke menu -> Identities 
klik + (new) 
peer -> vpn-ikev2 
auth method -> pre shared key 
secret -> prabagi@2025!! 
Police Template Group -> ipsec-ikev2 
notrack chain -> kosong 
My ID Type -> auto 
Remote ID type -> auto 
Match By -> remote id 
mode configuration -> vpn-ipsec-ikev 
Generate Policy -> port strict 
klik -> apply kemudian -> ok
---------------------> 

konfigurasi vpn smartpone 
menu vpn -> tambah jenis -> IKEv2/IPsec-PSK 
alamat server -> 202.xxx.xxx.51 --> sesuaikan ip public server vpn 
pengenal ipsec -> ipsec 
kunci pra-bagi IPsec -> isikan password (prabagi@2025!!) 

 ---------------------> Sudah dicoba menggunakan MikroTik RB3011UiAS dan berhasil.

Monday, June 27, 2022

CARA MENGAKTIFKAN RC.LOCAL DI RHEL


  • Cek status rc.local apakah sudah aktif atau belum

# systemctl status rc-local

â rc-local.service - /etc/rc.d/rc.local Compatibility

   Loaded: loaded (/usr/lib/systemd/system/rc-local.service; static; vendor preset: disabled)

   Active: inactive (dead)

( apabila muncul pesan diatas berarti rc.local belum aktif )


  • Jalankan perintah ini 

# chmod +x /etc/rc.d/rc.local

# systemctl daemon-reload

# systemctl enable rc-local

# systemctl start rc-local


  • Cek kembali status rc.local nya

# systemctl status rc-local

â rc-local.service - /etc/rc.d/rc.local Compatibility

   Loaded: loaded (/usr/lib/systemd/system/rc-local.service; static; vendor preset: disabled)

   Active: active (exited) since Mon 2022-06-27 15:02:04 WIB; 9s ago

  Process: 21348 ExecStart=/etc/rc.d/rc.local start (code=exited, status=0/SUCCESS)

( apabila muncul seperti diatas, berarti rc.local sudah aktif )


*) Petunjuk diatas sudah saya coba di rhl 7.3 dan jalan.


Thursday, October 24, 2019

"su: cannot set groups: Operation not permitted" tidak bisa "su root" dan "login incorrect" untuk login root

Kebetulan beberapa waktu lalu saya melakukan chmod 777 ke semua direktori server linux saya, Kemudian setelah itu jalanin reboot, dan server tidak bisa login root maupun su - root.

Pesan-pesan error yang muncul saat akan menggunakan login root :

  • login incorrect
  • su: cannot set groups: operation not permitted
  • connection refused

Untuk kasus ini pertama-2 siapkan cd osnya, kebetulan saya menggunakan rhel 5,7.
booting cd linux, kemudian pilih Rescue mode dan ketik linux rescue enter.
ini otomatis mount system /mnt/sysimage

1. Jalankan perintah :
# chroot /mnt/sysimage

2. Berikan akses dengan perintah :

# chown -R root /bin /sbin /lib /usr /sys /boot /etc /dev
# chmod 700 -R /bin /sbin /lib /usr /sys /boot /etc /dev
# chmod 755 /bin/bash
# chmod 666 /dev/null
# chmod 666 /etc/ssh/ssh_host_dsa_key
# chmod 666 /etc/ssh/ssh_host_rsa_key

3. Setelah perintah diatas dijalankan, silahkan di keluarkan cd booting dan reboot server linuxnya,

Silahkan dicoba login menggunakan root, yang saya lakukan diatas saya berhasil dan normal kembali.


Catatan :
Konfigurasi diatas sudah saya coba menggunakan RHEL 5.7

Wednesday, October 17, 2018

Cara dial VPN menggunakan terminal ( PPTP VPN client connection ) RHEL 7 Linux

Pertama-tama kita harus tahu informasi server vpn yang akan kita remote ( biasanya butuh ip dan username ). Berikut contoh informasi koneksi server VPN yg akan kita remote :

Nama koneksi                          : linuxconfig ( bisa ganti nama yg lain )
VPN koneksi type                   : PPTP
Server VPN IP atau domain  : 123.123.1.1
CHAP Username                    : admin
CHAP User password             : 00000000


Cara Konfigurasi Awal :

Install PPTP client:
# yum install pptp

Jalankan PPTP module PPTP VPN koneksi:
# modprobe nf_conntrack_pptp

Sekarang kita perlu menambahkan CHAP credentials as provided di dalam /etc/ppp/chap-secrets file:
# echo 'admin PPTP 00000000 *' >> /etc/ppp/chap-secrets

Kemudian membuat file linuxconfig didalam direktori /etc/ppp/peers/
# vi /etc/ppp/peers/linuxconfig

isi sesuai informasi awal yg kita punya di awal :

pty "pptp 123.123.1.1 --nolaunchpppd"
name admin
remotename PPTP
require-mppe-128
file /etc/ppp/options.pptp
ipparam linuxconfig

Kemudian simpan.

kemudian coba konek VPN PPTP jalankan perintah dibawah :
# pppd call linuxconfig

Check status koneksi dan pesan eror di /var/log/messages :
# tail /var/log/messages

Jan  7 17:55:44 localhost pppd[18960]: CHAP authentication succeeded
Jan  7 17:55:44 localhost pptp[18961]: anon log[decaps_gre:pptp_gre.c:427]: buffering packet 7 (expecting 6, lost or reordered)
Jan  7 17:55:44 localhost pppd[18960]: MPPE 128-bit stateless compression enabled
Jan  7 17:55:46 localhost pppd[18960]: local  IP address 192.168.100.2
Jan  7 17:55:46 localhost pppd[18960]: remote IP address 192.168.100.0


Melihat status koneksi :

# ifconfig

Apabila lancar akan muncul di ppp0

3: ppp0:  mtu 1396 qdisc pfifo_fast state UNKNOWN qlen 3
    link/ppp 
    inet 192.168.100.2 peer 192.168.100.0/32 scope global ppp0
       valid_lft forever preferred_lft forever


Cara Disconnect VPN PPTP Menggunakan kill command:

# pkill pppd

Di pesan lognya akan muncul :

Jan  7 18:00:21 localhost systemd: Started Network Manager Script Dispatcher Service.
Jan  7 18:00:21 localhost nm-dispatcher: Dispatching action 'down' for ppp0
Jan  7 18:00:21 localhost pppd[18960]: Exit


Troubleshooting

Jika ada masalah bisa dilihat di pesan /var/log/messages log:
Misal ada pesan eror berikut :

pppd[32087]: LCP: timeout sending Config-Requests

Kemungkinan belum dijalankan module nf_conntrack_pptp. Bisa dijalankan manual menggunakan linux command:
# modprobe nf_conntrack_pptp

Membuat supaya automatis VPN

# vi dialvpn

isi didalamnya :

modprobe nf_conntrack_pptp
echo 'admin PPTP 00000000 *' >> /etc/ppp/chap-secrets
pppd call linuxconfig

kemudian simpan, jangan lupa untuk menambahkan permission x pada file dialvpn agar bisa di jalankan. # chmod 777 dialvpn. Kemudian tambahkan pada /etc/rc.local :
/root/dialvpn
Sekarang pada saat server linux nyala akan otomatis konek ke vpn


Catatan :
Konfigurasi diatas sudah saya coba menggunakan RHL7.3 menggunakan ip PUBLIC dan Alhamdlulillah berhasil. Pada saat install / setting pastikan linuxnya terkoneksi ke internet.

Tuesday, September 12, 2017

Cara Mengkonfigurasi SAMBA di RHEL 7

  • Pertama-tama kita harus login root
$su - root

  • Kemudian buat folder /FOLDERSHARE.
Nantinya, hanya user-user anggota dari grup sharing sajalah yang bisa mengakses folder tersebut.
  • Kemudian buat terlebih dahulu grup sharing :

groupadd sharing

  • Buat user linux dan folder berikut aksesnya:

adduser anto 
passwd anto
usermod -aG sharing anto
mkdir /FOLDERSHARE 
chown root.sharing /FOLDERSHARE 
chmod 2775 /FOLDERSHARE
yum install samba samba-client     ( pastikan server sudah terkoneksi ke internet )

  • Mengaktifkan samba setiap server menyala :

systemctl enable smb.service 
systemctl enable nmb.service 

  • Mengaktifkan samba secara permanen pada firewalld.

firewall-cmd --permanent --add-service=samba 
firewall-cmd --permanent --add-service=samba-client 
systemctl restart firewalld.service 

  • Konfigurasi Samba

  • Edit konfigurasi samba /etc/samba/smb.conf.

vim /etc/samba/smb.conf 

  • Kemudian pada baris paling bawah file tersebut, tambahkan script berikut :

 [Data Share] 
 path = /FOLDERSHARE
 browseable = yes 
 writeable = yes 
 create mask = 2775 
 force create mode = 2775 
 directory mask = 2775 
 force create mode = 2775 
 valid users = @sharing 

  • Simpan dan tutup file tersebut.

  • Selanjutnya kita perlu membuat password samba untuk mengakses file share kita.

smbpasswd -a anto

  • Khusus untuk direktori selain /home, Caranya dengan mengetikkan perintah berikut :

chcon -t samba_share_t /FOLDERSHARE

  • Apabila folder sharingnya di dalam folder /home, cukup dengan perintah berikut :

setsebool -P samba_enable_home_dirs on
setsebool -P samba_export_all_rw on 
systemctl restart smb.service 
systemctl restart nmb.service 

Buka Windows explorer, lalu ketikkan : \\ipserver Contoh : \\192.168.1.1
Kalau dari linux atau MAC smb://ipserver Contoh : smb://192.168.1.1

Saya mencoba menggunakan RHEL 7.3 dan berhasil



Cara konfigure Cockpit Di RHEL 7



  • login menggunakan root, kemudian jalanin perintah dibawah ini, pastikan server Anda terkoneksi ke internet :

subscription-manager repos --enable=rhel-7-server-extras-rpms
subscription-manager repos --enable=rhel-7-server-optional-rpms
yum install cockpit cockpit-dashboard
firewall-cmd --add-port=9090/tcp
firewall-cmd --permanent --add-port=9090/tcp
systemctl enable cockpit.socket
systemctl start cockpit.socket

  • masukkan login dan password

  • Perintah diatas saya coba di RHEL 7.3 dan berhasil lancar.

Monday, May 2, 2016

Cara Reset Manual Indikator Tinta Epson " It is nearly time to reset the ink levels "


Apabila printer Epson muncul pesan " It is nearly time to reset the ink levels "

Silahkan dicoba langkah-langkah ini :

Tekan tombol resume atau kertas (tombol disamping tombol power),

Tekan pertama tahan tombol resume sekitar 5 detik lalu lepas,
Tekan kedua tahan tombol resume sekitar 3 detik lalu lepas,
Tekan ketiga tahan tombol resume sekitar 1 detik lalu lepas,


Kemudian head printer akan bergerak, tunggu ampai berhenti dan setelah itu akan hilang lampu warna merah pada tombol resumenya dan printer siap digunakan kembali.


Kebetulan saya menggunakan printer epson L110,

Sepertinya bisa di coba di L120 dan L210

Thursday, February 11, 2016

Install windows muncul pesan eror " windows cannot be installed to this disk. the selected disk is of the gpt partition style "

Kebetulan saya menemui kasus diatas saat menginstall laptop temen, sudah saya utak-atik setting bios tetep saja pada saat install muncul pesan "windows cannot be installed to this disk. the selected disk is of the gpt partition style". 
Tapi akhirnya berhasil install, tulisan ini sebagai catatan untuk mengingat apabila kejadian yang sama berulang.

( SANGAT DISARANKAN DATA DI HARDISK DIBACKUP DULU )

Langkah-langkah :


  1. Masukkan CD Bootable / Flasdisk bootable windows, kemudian setelah boot pada menu install pilih recovery kemudian masuk ke command promp. (  Atau bisa tekan tombol SHIFT+F10 )
  2. Diskpart
  3. List disk ( daftar disk yang terpasang )
  4. Select disk 0 ( asumsi disk 0 yang akan kita install )
  5. Clean
  6. Convert mbr
  7. Create Partition Primarry Size=102400
  8. Format FS=NTFS LABEL="SYSTEM"
  9. ACTIVE
  10. Exit

Jalankan install ulang seperti biasa, semoga berhasil.


Saturday, January 30, 2016

Blokir Situs Berbasis Contain Menggunakan IPTABLES Linux

Bagi admin di kantor yang dipusingkan oleh user pengguna internet karena susah mengkontrol sehingga menghancurkan bandwith internet sampai lemooot habis, biasanya kita membagi bandwith dan kontrol akses internet menggunakan proxy, yang dilinux bisa menggunakan squid, tapi bisa untuk user yang nyeleneh dan tahu triknya masih bisa bikin admin kecolongan.

Nah langsung saja saya coba kasih trik yang mudah-2an berguna, saya sudah mencoba menggunakan tips ini di 2 jaringan berbeda, satu menggunakan pc router linux slackware 14, dan satu lagi menggunakan pc router linux RHEL5 update 7. 

Konfigurasi Link Internet / infrastruktur :

Modem Indihome --- > (eth0) --> PC ROUTER RHEL5/Slackware14 --> (eth1 ) ---> PC USER

Bikin file blokir

vi blokir

masukkan scrip dibawah ini :

### IP USER YANG DIBOLEHKAN AKSES FULL ( BOS, ADMIN DAN SEKDIR )

iptables -A FORWARD -s 192.168.1.71/32 -d 0/0 -j ACCEPT   ### BOS
iptables -A FORWARD -s 192.168.1.230/32 -d 0/0 -j ACCEPT ### SEKDIR
iptables -A FORWARD -s 192.168.1.50/32 -d 0/0 -j ACCEPT   ### NETWORK ADMIN


### SELAIN BOS, SEKDIR DAN ADMIN TIDAK BOLEH AKSES SITUS TERTENTU DAN MENDOWNLOAD FILE TERTENTU ( SUKA SUKA IT NYA )

iptables -A FORWARD -s 0/0 -o eth0 -m string --algo kmp --string tube -j DROP
iptables -A FORWARD -s 0/0 -o eth0 -m string --algo kmp --string xvideos -j DROP
iptables -A FORWARD -s 0/0 -o eth0 -m string --algo kmp --string xnxx -j DROP
iptables -A FORWARD -s 0/0 -o eth0 -m string --algo kmp --string facebook -j DROP
iptables -A FORWARD -s 0/0 -o eth0 -m string --algo kmp --string twitter -j DROP
iptables -A FORWARD -s 0/0 -o eth0 -m string --algo kmp --string googlevideo.com -j DROP
iptables -A FORWARD -s 0/0 -o eth0 -m string --algo kmp --string downloads.ziddu.com -j DROP
iptables -A FORWARD -s 0/0 -o eth0 -m string --algo kmp --string internetdownloadmanager.com -j DROP
iptables -A FORWARD -s 0/0 -o eth0 -m string --algo kmp --string instagram -j DROP
iptables -A FORWARD -s 0/0 -o eth0 -m string --algo kmp --string play.google -j DROP
iptables -A FORWARD -s 0/0 -o eth0 -m string --algo kmp --string plus.google -j DROP

### FILE SERVER YANG TIDAK BOLEH DI AKSES

iptables -A FORWARD -s 0/0 -o eth0 -m string --algo kmp --string torrent -j DROP
iptables -A FORWARD -s 0/0 -o eth0 -m string --algo kmp --string rapidshare -j DROP
iptables -A FORWARD -s 0/0 -o eth0 -m string --algo kmp --string hotfile -j DROP
iptables -A FORWARD -s 0/0 -o eth0 -m string --algo kmp --string depositfiles -j DROP
iptables -A FORWARD -s 0/0 -o eth0 -m string --algo kmp --string mediafire -j DROP
iptables -A FORWARD -s 0/0 -o eth0 -m string --algo kmp --string 4shared -j DROP
iptables -A FORWARD -s 0/0 -o eth0 -m string --algo kmp --string downloads.ziddu.com -j DROP


### FILE YANG TIDAK BOLEH DI DOWNLOAD

iptables -A FORWARD -s 0/0 -o eth0 -m string --algo kmp --string '.mov' -j DROP
iptables -A FORWARD -s 0/0 -o eth0 -m string --algo kmp --string '.wmv' -j DROP
iptables -A FORWARD -s 0/0 -o eth0 -m string --algo kmp --string '.asf' -j DROP
iptables -A FORWARD -s 0/0 -o eth0 -m string --algo kmp --string '.exe' -j DROP
iptables -A FORWARD -s 0/0 -o eth0 -m string --algo kmp --string '.mp4' -j DROP
iptables -A FORWARD -s 0/0 -o eth0 -m string --algo kmp --string '.flv' -j DROP
iptables -A FORWARD -s 0/0 -o eth0 -m string --algo kmp --string '.iso' -j DROP
iptables -A FORWARD -s 0/0 -o eth0 -m string --algo kmp --string '.mpeg' -j DROP
iptables -A FORWARD -s 0/0 -o eth0 -m string --algo kmp --string '.mpg' -j DROP
iptables -A FORWARD -s 0/0 -o eth0 -m string --algo kmp --string '.3gp' -j DROP
iptables -A FORWARD -s 0/0 -o eth0 -m string --algo kmp --string '.avi' -j DROP
iptables -A FORWARD -s 0/0 -o eth0 -m string --algo kmp --string '.mkv' -j DROP
iptables -A FORWARD -s 0/0 -o eth0 -m string --algo kmp --string '.apk' -j DROP


Simpan scrip diatas menjadi file blokir 
kemudian beri akses full execute file blokir

chmod 777 blokir

jalankan scrip blokir

./blokir

Semoga bermanfaat

Thursday, January 28, 2016

Install Oracle 12 di Linux RHL7 / RedHat 7

Kebetulan saya menggunakan Server Hp Proliant ML350 Generasi 9 dan diinstall menggunakan RHL7 64bit.

Yang saya ketik dibawah ini adalah history dari server setelah berhasil install.

Pertama pastikan server linux kita terhubung langsung ke internet, karena untuk install oracle RHL7 packet pendukungnya tidak terdapat di cd. Kemudian kita harus login sebagai root langsung dari xwindows atau bisa menggunakan su - root.

Paket-paket pendukung kebetulan saya tidak mempunyai account di RedHat.com, tapi jangan kuatir ternyata oracle menyediakan server public yg bisa membantu kita mendapatkan paket secara langsung.


  • ketik perintah ini sebelum nya:


cd /etc/yum.repos.d/


  • kemudian kita download file repo public-yum:


wget http://public-yum.oracle.com/public-yum-ol7.repo
wget http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol7 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle


  • Setelah berhasil download restart server linux kita.


reboot


  • Setelah Server nyala login kembali sebagai root, kemudian seperti biasa setiap install oracle di redhat kita harus chek file hosts :


vi /etc/hosts

Pastikan isi file host nya:

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.1 ml350g.localdomain ml350g


  • Kemudian siapkan cd oracle 12 linux  atau bisa Download Oracle 12linux ada 2 files


-linuxamd64_12102_database_1of2.zip
-linuxamd64_12102_database_2of2.zip


  • Kemudian extract:


unzip linuxamd64_12102_database_1of2.zip 
unzip linuxamd64_12102_database_2of2.zip 


  • Setelah itu edit file sysctl.conf :


vi /etc/sysctl.conf

## > isi paling bawah
-----------------------------------------------
### oracle install
fs.file-max = 6815744

kernel.sem = 250 32000 100 128

kernel.shmmni = 4096

kernel.shmall = 1073741824

kernel.shmmax = 4398046511104

net.core.rmem_default = 262144

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048576

fs.aio-max-nr = 1048576

net.ipv4.ip_local_port_range = 9000 65500
------------------------------------------------


  • Simpan kemudian jalankan perintah ini:


/sbin/sysctl -p


  • edit file limits.conf


vi /etc/security/limits.conf

isi di paling bawah:

## oracle setting
oracle   soft   nofile    1024
oracle   hard   nofile    65536
oracle   soft   nproc    2047
oracle   hard   nproc    16384
oracle   soft   stack    10240
oracle   hard   stack    32768


  • Kemudian install paket-paket oraclenya menggunakan perintah yum, pastikan server terhubung langsung ke internet :


yum install binutils -y
yum install compat-libstdc++-33 -y
yum install compat-libstdc++-33.i686 -y
yum install gcc -y
yum install gcc-c++ -y
yum install glibc -y
yum install glibc.i686 -y
yum install glibc-devel -y
yum install glibc-devel.i686 -y
yum install glibc -y
yum install ksh -y
yum install libgcc -y
yum install libgcc.i686 -y
yum install libstdc++ -y
yum install libstdc++.i686 -y
yum install libstdc++-devel -y
yum install libstdc++-devel.i686 -y
yum install libaio -y
yum install libaio.i686 -y
yum install libaio-devel -y
yum install libaio-devel.i686 -y
yum install libXext -y
yum install libXext.i686 -y
yum install libXtst -y
yum install libXtst.i686 -y
yum install libX11 -y
yum install libX11.i686 -y
yum install libXau -y
yum install libXau.i686 -y
yum install libxcb -y
yum install libxcb.i686 -y
yum install libXi -y
yum install libXi.i686 -y
yum install make -y
yum install sysstat -y
yum install unixODBC -y
yum install unixODBC-devel -y
yum install zlib-devel -y
yum install zlib-devel.i686 -y


  • Setelah paket selesai terinstall lanjutkan membuat user dan grup install oracle :


groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
useradd -u 54321 -g oinstall -G dba,oper oracle
passwd oracle


  • Kemudian edit file config atau pastikan firewall non aktif :


vi /etc/selinux/config

SELINUX=permissive


  • Atau jalankan langsung perintah :


setenforce Permissive
systemctl stop firewalld
systemctl disable firewalld


  • Selanjutnya kita siapkan lokasi penyimpanan database nya:


mkdir -p /home/u01/app/oracle/product/12.1.0.2/db_1
chown -R oracle:oinstall /home/u01
chmod -R 775 /home/u01


  • Kemudian ketik :


xhost +


  • Kemudian edit .bash_profilenya:


vi /home/oracle/.bash_profile

isi:

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs
# Oracle Settings

export TMP=/tmp
export TMPDIR=$TMP

export ORACLE_HOSTNAME=ml350g.localdomain
export ORACLE_UNQNAME=DATAORA
export ORACLE_BASE=/home/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0.2/db_1
export ORACLE_SID=DATAORA

export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

if [ $USER = "oracle" ]; then
  if [ $SHELL = "/bin/ksh" ]; then
    ulimit -p 16384
    ulimit -n 65536
  else
    ulimit -u 16384 -n 65536
  fi
fi

PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH


  • Simpan filenya kemudian login sebagai oracle :


su - oracle


  • Selanjutnya kita mulai install oracle database R12 dengan file yg di extrak tadi berada di folder /home/oracle kemudian ketik :


$DISPLAY=:0.0; export DISPLAY
$cd database/
$./runInstaller


  • Install oracle database, container jangan ada cheklist kemudian lanjut saja install.



  • Setelah berhasil install oraclenya edit file oratab untuk memastikan oracle up pada saat server nyala:


vi /etc/oratab

DATAORA:/home/u01/app/oracle/product/12.1.0.2/db_1:Y


  • Simpan kemudian restart servernya, selamat mencoba dan semoga berhasil .



  • Jangan lupa mengaktifkan tnsclient nya ya :


su - oracle


lsnrctl start
emctl start dbconsole
isqlplusctl start


TAMBAHAN :

membuat script startup_oracle

vi startup_oracle

lsnrctl start
sqlplus "/ as sysdba" << EOF
startup
quit
EOF
emctl start dbconsole
isqlplusctl start


  • simpan, kemudian beri akses execute file startup_oracle


chmod 777 startup_oracle

coba di jalankan dengan menggunakan login sebagai oracle

su - oracle
./startup_oracle

==> Perintah yang saya tulis diatas sesuai dengan yang saya praktekkan dengan menggunakan server HP PROLIANT ML350 Gen 9 menggunakan OS RHL7 64bit, Semoga bermanfaat.