Sunday, December 18, 2022

New RAM+SSD and Reinstall server HP DL380 Gen9

 1.tarik keluar 3/4 badan, buka tutup atas(tanpa alat),plastik, pasang RAM, tutup semua, pasang SSD

2.pasang monitor+keyboard+mouse di server

3.boot - tekan F10 - HP Smart Storage Administrator [ENTER]

4.[Configure] -> select All SSD, check UnASSIGNED Drives

5.RAID Level = Raid 1, biarkan default,[CREATE LOGICAL DRIVE] -> [FINISH]

6. [x] right top to [REBOOT]

7. boot - tekan F9 -> pilih boot dari FlashDisk (USB)

Wednesday, December 7, 2022

host=Debian11 ip-host=15 network=bridge virtual=ip12

#login root, remove DVD

nano /etc/apt/sources.list

menjadi=

deb http://mirror.0x.sg/debian/ bullseye main

deb-src http://mirror.0x.sg/debian/ bullseye main


deb http://security.debian.org/debian-security bullseye-security main

deb-src http://security.debian.org/debian-security bullseye-security main


# bullseye-updates, to get updates before a point release is made;

# see https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports

deb http://mirror.0x.sg/debian/ bullseye-updates main

deb-src http://mirror.0x.sg/debian/ bullseye-updates main


---end of sources.list

#allow root ssh

nano /etc/ssh/sshd_config


#allow root login

nano /etc/gdm3/daemon.conf

[security]

AllowRoot=true


nano /etc/pam.d/gdm-password

#auth required pam_succeed_if.so user != root quiet_success


#instal kvm

apt install qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils virtinst libvirt-daemon

apt install virt-manager -y


virsh net-list --all


#jadikan autostart

virsh net-autostart default


#bridge util

apt install bridge-utils uml-utilities -y


modprobe vhost_net


#tambahkan vhost_net

nano /etc/modules

vhost_net


#cek

lsmod | grep vhost


#lihat nama network

ip a

#set bridge dg ip HOST, bukan ip TAMU

nano /etc/network/interfaces

#tambahin (bila nama networknya eno1)

auto br0

iface br0 inet static

  address 10.12.13.105/16

  gateway 10.12.0.3

  dns-nameservers 10.12.0.7

  bridge_ports eno1

#reboot

#baru buka virt-manager utk define TAMU dg BRIDGE br0
#set ip masing2 TAMU di TAMU 

Sunday, October 2, 2022

install myvestacp

 1.install minimal debian 11

2.ubah password root

3.ikuti=

apt install -y mc curl

curl -O http://c.myvestacp.com/vst-install-debian.sh

bash vst-install-debian.sh --apache yes --nginx yes --phpfpm no --vsftpd no --proftpd yes --named yes --mysql yes --mysql8 no --postgresql no --exim yes --dovecot yes --clamav yes --spamassassin yes --iptables yes --fail2ban yes --quota no --force no --interactive yes --port [isi-nomor-besar] --lang en

apt install postgresql postgresql-contrib

apt install openjdk-17-jdk -y

apt install lxde-core -y firefox-esr


Wednesday, September 21, 2022

Backup Restore Postgresql

** backup **

[enter password utk postgres -- bila perlu]

root#passwd postgres

[enter password]

root#su postgres

postgres# pg_dump -W -F t idempiere > /tmp/idempiere.tar

exit


** restore **

root#su postgres

postgres#psql  --masuk psql

postgres# drop database idempiere

postgres# create database idempiere

postgres# exit ---dari psql

postgres# pg_restore --dbname=idempiere < /tmp/idempiere.tar

exit

** selesai **

Wednesday, April 14, 2021

Check VPS / Test VPS

cek ini juga: http://note88.blogspot.com/2013/08/cara-test-vps.html  

 

https://github.com/masonr/yet-another-bench-script

SSD LAPTOP LOKAL ASLI

Basic System Information:
---------------------------------
Processor  : Intel Core Processor (Skylake, IBRS)
CPU cores  : 2 @ 2711.998 MHz
AES-NI     : ✔ Enabled
VM-x/AMD-V : ✔ Enabled
RAM        : 1.9 GiB
Swap       : 4.0 GiB
Disk       : 191.9 GiB

fio Disk Speed Tests (Mixed R/W 50/50):
---------------------------------
Block Size | 4k            (IOPS) | 64k           (IOPS)
  ------   | ---            ----  | ----           ----
Read       | 182.77 MB/s  (45.6k) | 1.35 GB/s    (21.1k)
Write      | 183.25 MB/s  (45.8k) | 1.35 GB/s    (21.2k)
Total      | 366.02 MB/s  (91.5k) | 2.70 GB/s    (42.3k)
           |                      |                     
Block Size | 512k          (IOPS) | 1m            (IOPS)
  ------   | ---            ----  | ----           ----
Read       | 1.14 GB/s     (2.2k) | 1.38 GB/s     (1.3k)
Write      | 1.21 GB/s     (2.3k) | 1.47 GB/s     (1.4k)
Total      | 2.36 GB/s     (4.6k) | 2.86 GB/s     (2.7k)
 

 

 

 

VPS SSD CACHE ....... rack (L.A)

Wed Apr 14 13:59:03 WIB 2021

Basic System Information:
---------------------------------
Processor  : Intel(R) Xeon(R) CPU E5-2690 0 @ 2.90GHz
CPU cores  : 3 @ 2899.996 MHz
AES-NI     : ✔ Enabled
VM-x/AMD-V : ❌ Disabled
RAM        : 2.3 GiB
Swap       : 2.5 GiB
Disk       : 38.3 GiB

fio Disk Speed Tests (Mixed R/W 50/50):
---------------------------------
Block Size | 4k            (IOPS) | 64k           (IOPS)
  ------   | ---            ----  | ----           ----
Read       | 3.24 MB/s      (810) | 46.30 MB/s     (723)
Write      | 3.26 MB/s      (816) | 46.49 MB/s     (726)
Total      | 6.50 MB/s     (1.6k) | 92.80 MB/s    (1.4k)
           |                      |                     
Block Size | 512k          (IOPS) | 1m            (IOPS)
  ------   | ---            ----  | ----           ----
Read       | 115.94 MB/s    (226) | 121.60 MB/s    (118)
Write      | 122.10 MB/s    (238) | 129.70 MB/s    (126)
Total      | 238.04 MB/s    (464) | 251.30 MB/s    (244)

iperf3 Network Speed Tests (IPv4):
---------------------------------
Provider        | Location (Link)           | Send Speed      | Recv Speed     
                |                           |                 |                
Clouvider       | London, UK (10G)          | 528 Mbits/sec   | 151 Mbits/sec  
Online.net      | Paris, FR (10G)           | 205 Mbits/sec   | busy           
WorldStream     | The Netherlands (10G)     | 483 Mbits/sec   | 95.9 Mbits/sec
Biznet          | Jakarta, Indonesia (1G)   | 502 Mbits/sec   | 81.6 Mbits/sec
Clouvider       | NYC, NY, US (10G)         | 563 Mbits/sec   | 221 Mbits/sec  
Velocity Online | Tallahassee, FL, US (10G) | 614 Mbits/sec   | 234 Mbits/sec  
Clouvider       | Los Angeles, CA, US (10G) | 681 Mbits/sec   | 603 Mbits/sec 

Iveloz Telecom  | Sao Paulo, BR (2G)        | 95.2 Mbits/sec  | 71.1 Mbits/sec


VPS .....SING uson --- paroki (PARAHHHHHHHHHHHHH)

Mon Apr 19 14:35:26 +08 2021                                                                                                          
                                                                                                                                      
Basic System Information:                                                                                                             
---------------------------------                                                                                                     
Processor  : QEMU Virtual CPU version 2.5+                                                                                            
CPU cores  : 2 @ 2397.222 MHz                                                                                                         
AES-NI     : ❌ Disabled                                                                                                              
VM-x/AMD-V : ❌ Disabled                                                                                                              
RAM        : 1.9 GiB                                                                                                                  
Swap       : 1024.0 MiB                                                                                                               
Disk       : 19.6 GiB                                                                                                                 
                                                                                                                                      
fio Disk Speed Tests (Mixed R/W 50/50):
---------------------------------                                                                                                     
Block Size | 4k            (IOPS) | 64k           (IOPS)                                                                              
  ------   | ---            ----  | ----           ----                                                                               
Read       | 3.72 MB/s      (930) | 3.43 MB/s       (53)
Write      | 3.75 MB/s      (939) | 3.65 MB/s       (57)
Total      | 7.47 MB/s     (1.8k) | 7.09 MB/s      (110)
           |                      |                     
Block Size | 512k          (IOPS) | 1m            (IOPS)
  ------   | ---            ----  | ----           ----
Read       | 9.14 MB/s       (17) | 7.00 MB/s        (6)
Write      | 10.11 MB/s      (19) | 7.67 MB/s        (7)
Total      | 19.26 MB/s      (36) | 14.67 MB/s      (13)

iperf3 Network Speed Tests (IPv4):
---------------------------------
Provider        | Location (Link)           | Send Speed      | Recv Speed     
                |                           |                 |                
Clouvider       | London, UK (10G)          | 72.2 Mbits/sec  | 105 Mbits/sec  
Online.net      | Paris, FR (10G)           | 44.7 Mbits/sec  | 83.7 Mbits/sec
WorldStream     | The Netherlands (10G)     | 71.6 Mbits/sec  | 142 Mbits/sec  
Biznet          | Jakarta, Indonesia (1G)   | 373 Mbits/sec   | 213 Mbits/sec  
Clouvider       | NYC, NY, US (10G)         | 122 Mbits/sec   | 204 Mbits/sec  
Velocity Online | Tallahassee, FL, US (10G) | 97.1 Mbits/sec  | 171 Mbits/sec  
Clouvider       | Los Angeles, CA, US (10G) | 131 Mbits/sec   | 198 Mbits/sec  
Iveloz Telecom  | Sao Paulo, BR (2G)        | busy            | busy       

Geekbench 5 Benchmark Test:
---------------------------------
Test            | Value                         
                |                               
Single Core     | 522                           
Multi Core      | 1005                          
Full Test       | https://browser.geekbench.com/v5/cpu/7491446



Thursday, April 8, 2021

hapus openlite speed cache

 Hapus SEMUA CACHE dan REBOOT:

rm /usr/local/lsws/cachedata -rf && reboot now


iptables - proteksi

--utk catat log yg drop

/sbin/iptables -N LOGDROP
/sbin/iptables -A LOGDROP -j LOG
/sbin/iptables -A LOGDROP -j DROP
 
 
iptables -I INPUT -p tcp --dport 80 -i eth0 -m state --state NEW -m recent --set
iptables -I INPUT -p tcp --dport 80 -i eth0 -m state --state NEW -m recent --update --seconds 60 --hitcount 10 -j LOGDROP

--lihat log
cat /var/log/kern.log

--permanent
iptables-save > /etc/iptables.up.rules
editor /etc/network/if-pre-up.d/iptables
--tulis ini disana:
#!/bin/sh
 /sbin/iptables-restore < /etc/iptables.up.rules
 
--chmod x
chmod +x /etc/network/if-pre-up.d/iptables 


Tuesday, December 15, 2020

Merubah directory dalam script

 # tambahan  

OLDPWD=$(pwd)

cd /opt/[direktory]

function atexit() { cd "$OLDPWD"; }

trap atexit EXIT # go back to where we came from, however we exit

# end of tambahan  


Wednesday, December 9, 2020

All Oracle Constraint

 select  c1.owner, c1.table_name, c1.constraint_name, c2.owner, c2.table_name, c2.column_name

from dba_constraints c1

JOIN dba_cons_columns c2

ON c1.R_CONSTRAINT_NAME=C2.CONSTRAINT_NAME and c1.r_owner=c2.owner

where C1.constraint_type = 'R' and c2.table_name='C_BPARTNER'

order by c1.owner, c1.table_name, c1.constraint_name, c2.position


Monday, November 30, 2020

idem81 on centos 8

 perlu :

1.disable firewalld

2.set di .bash_profile

##tambahan

ORACLE_SID=XE

export ORACLE_SID

export ORAENV_ASK=NO

. oraenv



3.install fontconfig

yum install fontconfig

4.buat service idem


Thursday, November 26, 2020

Install Oracle 18c XE on Centos 8

 1.install centos 8 minimal

2.install wget, mc

yum install -y gcc-c++ make

yum install -y ksh

yum install -y sysstat

yum install -y xorg-x11-utils

yum install java-11-openjdk-devel

yum install -y libnsl

rpm -ivh libaio-devel-0.3.110-12.el8.x86_64.rpm

rpm -ivh compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm

rpm -ivh compat-libcap1-1.10-7.el7.x86_64.rpm

Then install the Oracle files.

rpm -ivh oracle-database-preinstall-18c-1.0-1.el7.x86_64

rpm -ivh oracle-database-xe-18c-1.0-1.x86_64.rpm


cari rpm di rpmfiles

Tuesday, November 10, 2020

Edit file di dalam image docker (inside docker image)

 #add di eof

cat >>/opt/oracle/product/18c/dbhomeXE/network/admin/tnsnames.ora<<EOF
>ketik sembarang

>EOF


#kalau dilihat, cat [namafile]

ketik sembarang 

#ada dibawah


#utk search and replace

gunakan sed

Install docker dan docker-compose

#update
  • sudo apt update

#install a few prerequisite

  • sudo apt install apt-transport-https ca-certificates curl software-properties-common

  • curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

#Add the Docker repository to APT sources:

  • sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"

#update

  • sudo apt update

#cek

  • apt-cache policy docker-ce

You’ll see output like this, although the version number for Docker may be different:

Output of apt-cache policy docker-ce
docker-ce:
  Installed: (none)
  Candidate: 18.03.1~ce~3-0~ubuntu
  Version table:
     18.03.1~ce~3-0~ubuntu 500
        500 https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages

Notice that docker-ce is not installed, but the candidate for installation is from the Docker repository for Ubuntu 18.04 (bionic).

#Finally, install Docker:

  • sudo apt install docker-ce

Docker should now be installed, the daemon started, and the process enabled to start on boot. Check that it’s running:

  • sudo systemctl status docker 

 

 

 

 

-----------install docker-compose

 

#cek version:

https://github.com/docker/compose/releases

 

#ubah sesuai versi

  • sudo curl -L https://github.com/docker/compose/releases/download/[versi]/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose

#set

  • sudo chmod +x /usr/local/bin/docker-compose

#verify

  • docker-compose --version

Output
docker-compose version [versi], build [xxxxx]

 

Monday, November 9, 2020

Docker save and load backup (bukan export import)

#utk cek running/tidak

docker ps 

#utk lihat image

docker images

#utk save

docker save [nama image] > [namafile.tar]

#utk load backup

docker load < [namafile.tar]

#utk masuk ke image

docker exec -it [namaimage] bash

#utk keluar

exit


#utk run oracle:

docker run --name myxedb \
    -d \
    -p 51521:1521 \
    -p 55500:5500 \
    -e ORACLE_PWD=mysecurepassword \
    -e ORACLE_CHARACTERSET=AL32UTF8 \
    oracle/database:18.4.0-xe
 

#utk stop oracle

docker stop myxedb
 
 

#utk remove

docker rm [namaimage]

#utk remove image

docker rmi [namaimage]
 

Thursday, July 9, 2020

iptables block range ip

# cat /etc/iptables/rules.v4
----------------------------------------------
# Generated by xtables-save v1.8.2 on Thu Jul  9 02:55:34 2020
*filter
:INPUT ACCEPT [755:72126]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [1164:142504]
-A INPUT -f -j DROP
-A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG NONE -j DROP
-A INPUT -p tcp -m tcp ! --tcp-flags FIN,SYN,RST,ACK SYN -m state --state NEW -j DROP
-A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG FIN,SYN,RST,PSH,ACK,URG -j DROP
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m tcp --dport 39000 -j ACCEPT
-A INPUT -s 185.0.0.0/8 -j DROP
-A INPUT -s 46.0.0.0/8 -j DROP
COMMIT
# Completed on Thu Jul  9 02:55:34 2020

Monday, May 11, 2020

install debian 10 buster

install from CD
kosongi semua software, kecuali server ssh, minimal terakhir
mirror pilih mirror.0x.sg


root@localhost:/etc/apt# cat sources.list
#

# deb cdrom:[Debian GNU/Linux 10.2.0 _Buster_ - Official amd64 NETINST 20191116-09:56]/ buster main

#deb cdrom:[Debian GNU/Linux 10.2.0 _Buster_ - Official amd64 NETINST 20191116-09:56]/ buster main


deb http://mirror.0x.sg/debian/ buster main
deb-src http://mirror.0x.sg/debian/ buster main

deb http://security.debian.org/debian-security buster/updates main contrib
deb-src http://security.debian.org/debian-security buster/updates main contrib

# buster-updates, previously known as 'volatile'
deb http://mirror.0x.sg/debian/ buster-updates main contrib
deb-src http://mirror.0x.sg/debian/ buster-updates main contrib

apt-get update -y
[apt-get install postgres, openjdk, mc, ntp, net-utils]
apt-get install nginx, php, php-fpm

install swoole:
apt-get install php-dev






Saturday, May 9, 2020

custom

latihan mencoba custom

Sunday, April 12, 2020

split manual

pertama=
dd if=debian-10.3.0-amd64-DVD-1.iso of=debian-10.3.0-amd64-DVD-1.iso.001 bs=1024 count=409600


kedua pakai skip=
dd if=debian-10.3.0-amd64-DVD-1.iso of=debian-10.3.0-amd64-DVD-1.iso.002 bs=1024 count=409600 skip=409600

ketiga pakai skip*2=
dd if=debian-10.3.0-amd64-DVD-1.iso of=debian-10.3.0-amd64-DVD-1.iso.003 bs=1024 count=409600 skip=819200


gabungkan=
dd if=part1 of=new_file bs=1024 count=3145728
dd if=part2 of=new_file bs=1024 count=3145728 seek=3145728
dd if=part3 of=new_file bs=1024 count=3145728 seek=6291456
 

Monday, December 30, 2019

idempiere Callout Factory and Callout

public class MyCalloutFactory implements IColumnCalloutFactory{

@Override
public IColumnCallout[] getColumnCallouts(String tableName, String columnName) {
// TODO Auto-generated method stub

List list = new ArrayList();

System.out.println("Kolom:"+tableName+"."+columnName);

if(tableName.equalsIgnoreCase("C_ORDER") && columnName.equalsIgnoreCase("DESCRIPTION"))
list.add(new MyCallout());

if(tableName.equalsIgnoreCase("C_ORDER") && columnName.equalsIgnoreCase("AD_ORG_ID"))
list.add(new MyCallout());

return list!=null ? list.toArray(new IColumnCallout[0]) : new IColumnCallout[0];
}


}

Setiap masuk window, maka fungsi diatas dipanggil sebanyak kolom, untuk assign.


public class MyCallout implements IColumnCallout{
CLogger log = CLogger.getCLogger(MyCallout.class);
@Override
public String start(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
// TODO Auto-generated method stub
log.warning("* dari sini *");
log.warning("ColumnName: "+mField.getColumnName());
if (value != null)
log.warning("NewValue: "+value.toString());
if (oldValue != null)
log.warning("Oldvalue: "+oldValue.toString());
mTab.setValue("DocumentNo", "Test");
return null;
}
}
Ini dipanggil HANYA oleh kolom yang di-assign