Sekedar Documentasi untuk Pelupa

Install FreeBSD 9 ZFS Mudah

0 komentar

Install Freebsd dengan filesytem ZFS, file system yang tangguh untuk listrik yang sering down.

Pertama Dowload 
untuk i386 disini
untuk amd disini  


login dengan user root dan password mfsroot 


gpart show
=>       34  312581741  ad6  GPT  (149G)

         34        128    1  freebsd-boot  (64K)
        162    4194304    2  freebsd-swap  (2.0G)
    4194466  308387309    3  freebsd-zfs  (147G)
(sesuaikan)

gpart delete -i 1 ad6
gpart delete -i 2 ad6
gpart delete -i 3 ad6
(sesuaikan)
mount_cd9660 /dev/cd0 /cdrom
untuk instalasi zfs
*intel
zfsinstall -d /dev/ad6 -t /cdrom/8.2-RELEASE-i386.tar.xz -s 2G -V 28
*amd
zfsinstall -d /dev/ad6 -t /cdrom/8.2-RELEASE-amd64.tar.xz -s 2G -V 28
chroot /mnt
passwd root
More

Limit Ekstensi dengan Layer 7 Mikrotik

7 komentar
Merasa jengkel dengan user yg mendownload file secara besar dan menggunakan Download Manager pasti susah di atasi.

berikut cara limit ekstensi yang paling sering di download.
saya menggunakan mikroitk versi 4 running d RB 750G.

Pertama tandai ekstensi

/ip firewall layer7-protocol
add comment="" name=High regexp="^.*get.+\\.(exe|rar|iso|zip|7zip|0[0-9][1-9]|flv|mkv|avi|mp4|3gp|rmvb|mp3|img|dat|mov).*\$"
add comment="" name=Mid regexp="^.*get.+\\.(zip|rar|7z).*\$"
add comment="" name=End regexp="^.*get.+\\.(pdf|doc|docx|xlsx|xls|rtf|ppt|ppt).*\$"
add comment="" name=Video regexp="http/(0\\.9|1\\.0|1\\.1)[\\x09-\\x0d ][1-5][0-9][0-9][\\x09-\\x0d -~]*(content-type: video)"

Menggunakan Regular Expersion silahkan googling untuk penjelasanya.
High = File yg biasa berukuran besar dan paling sering didownload
Mid = File bertype zip rar 7z berukuran hanya sampai 10 MB jika lebih akan dilimit
End = File yg tidak ingin di limit
Video = Stream Video

Kedua tandai mangle

/ip firewall mangle
add action=mark-packet chain=forward comment="High Eks" disabled=no dst-address-list=!Bypass layer7-protocol=High new-packet-mark=High-Ext passthrough=no protocol=tcp
add action=mark-packet chain=forward comment="Mid Eks" connection-bytes=10485760-4294967295 disabled=no layer7-protocol=Mid new-packet-mark=Mid-Ext passthrough=no protocol=tcp
add action=mark-packet chain=forward comment="Low Eks" disabled=no layer7-protocol=End new-packet-mark=End-Ext passthrough=no protocol=tcp
add action=mark-packet chain=forward comment=Video disabled=no layer7-protocol=Video new-packet-mark=Video passthrough=no protocol=tcp src-address-list=!Bypass

Ketiga Buat PCQ dan Simple untuk limit/jepit ekstensi

/queue type add kind=pcq name=PCQ_Limit_Video pcq-classifier=dst-address pcq-limit=50 pcq-rate=64000 pcq-total-limit=2000

/queue simple
add burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s comment="" direction=both disabled=no dst-address=0.0.0.0/0 interface=all limit-at=0/0 max-limit=64k/64k name=High packet-marks=High-Ext parent=none priority=8 queue=default-small/default-small total-queue=default-small
add burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s comment="" direction=both disabled=no dst-address=0.0.0.0/0 interface=all limit-at=0/0 max-limit=128k/128k name=Mid packet-marks=Mid-Ext parent=none priority=5 queue=default-small/default-small total-queue=default-small
add burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s comment="" direction=both disabled=no dst-address=0.0.0.0/0 interface=all limit-at=0/0 max-limit=1M/1M name=End packet-marks=End-Ext parent=none priority=2 queue=default-small/default-small total-queue=default-small
add burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s comment="" direction=both disabled=no dst-address=0.0.0.0/0 interface=all limit-at=0/0 max-limit=64k/64k name=Video packet-marks=Video parent=none priority=8 queue=default-small/PCQ_Limit_Video total-queue=default-small
Untuk jatah limit / jepit sesuaikan dengan keinginan anda.

untuk script download disini
More

Mount LVM with Ubuntu

0 komentar
Install lvm2:
sudo apt-get install lvm2
Load module yang perlukan :
sudo modprobe dm-mod
scan LVM sistem dan melihat hasil volume group
sudo vgscan
Activate the volume:
sudo vgchange -ay VolGroup00
Find the logical volume that has your Fedora root filesystem (mine proved to be LogVol00):
sudo lvs
Create a mount point for that volume:
sudo mkdir /mnt/fcroot
Mount it:
sudo mount /dev/VolGroup00/LogVol00 /mnt/fcroot -o ro,user

Copied my files.
More

Tuning MySQL with Huge MySQL version me

0 komentar

Jika sebuah server mempunyai melakukan load database dalam jumlah besar dan padat maka konfigurasi berikut dapat d pakai :


[client]
port        = 3306
socket        = /var/run/mysqld/mysqld.sock


[mysqld_safe]
socket        = /var/run/mysqld/mysqld.sock
nice        = 0
nice = -5
open_files_limit = 8192

[mysqld]

user        = mysql
pid-file    = /var/run/mysqld/mysqld.pid
socket        = /var/run/mysqld/mysqld.sock
port        = 3306
basedir        = /usr
datadir        = /var/lib/mysql
tmpdir        = /tmp
language    = /usr/share/mysql/english
skip-external-locking

#bind-address        = 127.0.0.1

# * Fine Tuning | by ariecc

back_log = 75
skip-innodb
myisam_sort_buffer_size = 64M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
skip-name-resolve
key_buffer        = 384M
max_allowed_packet    = 16M
thread_stack        = 128K
thread_cache_size    = 8
myisam-recover        = BACKUP
max_connections        = 500
table_cache            = 1800
thread_cache_size = 384
wait_timeout = 7200
connect_timeout = 10
tmp_table_size = 64M
max_heap_table_size = 64M
max_allowed_packet = 64M
max_connect_errors = 1000
read_rnd_buffer_size = 524288
bulk_insert_buffer_size = 8M

#thread_concurrency     = 10

# * Query Cache Configuration
query_cache_limit       = 4M
query_cache_size        = 128M
query_cache_type = 1
query_prealloc_size = 65536
query_alloc_block_size = 131072
default-storage-engine = MyISAM

# * Logging and Replication
#log        = /var/log/mysql/mysql.log

# Error logging goes to syslog. This is a Debian improvement :)
# Here you can see queries with especially long duration
#log_slow_queries    = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes


server-id        = 1
log_bin            = /var/log/mysql/mysql-bin.log
expire_logs_days    = 10
max_binlog_size         = 1000M
#binlog_do_db        = include_database_name
binlog_ignore_db    = mysql,information_schema

# * BerkeleyDB
# Using BerkeleyDB is now discouraged as its support will cease in 5.1.12.
skip-bdb

# * InnoDB
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
# You might want to disable InnoDB to shrink the mysqld process by circa 100MB.
#skip-innodb

# * Security Features

# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/

# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".

# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem



[mysqldump]
quick
#quote-names
max_allowed_packet    = 16M

[mysql]
#no-auto-rehash

[isamchk]
key_buffer        = 16M
sort_buffer = 64M
read_buffer = 16M
write_buffer = 16M

# * NDB Cluster
# [MYSQL_CLUSTER]
# ndb-connectstring=127.0.0.1


!includedir /etc/mysql/conf.d/

More

Optimalisasi Browsing dengan Mikrotik

0 komentar

Bagi warnet pasti berharap pelanggan bakal betah akan tetapi kadang tergantung dengan Downloader yang menghabiskan bandwith.

Di sini akan di beri tips sederhana agar pelanggan yg sedang browsing saja bakal betah yaitu menggunakan Simple Queue yg sudah ada menggunakan metode Burt Limit dan Burst Threshold.


Configurasi sebagai berikut :

Max-limit=256k
Burst-limit=1M
Burst-Thres=192k
Burst-Time=12



Akan dapat 1M slama belum 192k slama 12 detik jika sudah mencapai 192k slama 12 detik maka akan dapat jatah 256k.



Configurasi di Mikrotik :
/queue simple add burst-limit=1M/1M burst-threshold=192k/192k burst-time=12s/12s max-limit=256k/256k name=Clien-XXX priority=4 target-addresses=192.168.0.XXX


Apabila ingin menggunakan script buat create queue :
:for e from 2 to 60 do={
/queue simple add burst-limit=1M/1M burst-threshold=192k/192k burst-time=12s/12s max-limit=256k/256k name="Clien-$e" priority=4 target-addresses="192.168.0.$e"
}
More

Reset Password MySQL | Lupa Password MySQL

0 komentar

Bagi yang sering utak atik MySQL tiba-tiba lupa password, bisa direset degan cara berikut :
Step-step sebagai berikut :

Hentikan Service MySQL Server.
sudo /etc/init.d/mysql stop

Start mysqld configuration.
sudo mysqld --skip-grant-tables

Login ke MySQL sebagai root.
mysql -u root mysql
Ganti GANTIPASSWD dengan password baru yang diinginkan!
UPDATE user SET Password=PASSWORD('GANTIPASSWD') WHERE User='root'; FLUSH PRIVILEGES; exit;

Password sudah selesai di Reset. Thanks :D
More

Send Email + Attachment Via console Linux (Ubuntu TESTED)

1 komentar
Setelah utak atik dan searching d google akhirnya bisa juga kirim email via konsole / terminal.
Step-step sebagai berikut :
install terlebih dahulu
apt-get install sendemail
apt-get install libio-socket-ssl-perl libnet-ssleay-perl perl

Cara mengirimnya sebagai berikut :

sendEmail -f alamat_pengirim@maildomain -t alamat_tujuan@maildomain -u SUBJECT  -s smtp.domain:port -o tls=auto -xu username_mail -xp password_emai -m "ISI_PESAN_EMAIL" -a /../..(DESTINATION_FOLDER_ATTACHT)

contoh
sendEmail -f user1@gmail.com -t user2@gmail.com -u BackUp -s smtp.gmail.com:587 -o tls=auto -xu user1 -xp 1234 -m "Please See the Attached" -a /home/ariecc/BackUp.sql

Segitu aja dulu. Thanks :D

More