Articles Comments

{ Berbagi, Menulis, Dan Mengajar } Ilmu… » Archive

Bukti Pembelian AKI g-force 09 Agustus 2012

Filed under: 7. Operating System

MYSQL + TRIGGER + PHP

Command execution with a MySQL UDF Modern database management systems are powerful applications: they provide several instruments to interact with the underlying operating system. On MySQL it is possible to create a User-Defined Function to execute commands on the underlying operating system. Marco Ivaldi demonstrated that some years ago. His raptor_udf2.c works well, but it has two limitations: It is not MySQL 5.0+ compliant because it does not follow the new guidelines to create a proper UDF. It calls C function system() to execute the command and returns always integer 0. These limitations make the UDF almost useless on recent MySQL server installations if the database administrator wants to get the exit status of the command as UDF output or the command standard output itself. I recently came across an open repository of MySQL User-Defined Functions … Read entire article »

Filed under: 7. Operating System

GOSEPA FIREWALL + CCTV + SMSGATEWAY

firewall.gosepa   #———– Ini Untuk forward ke SERVER XEON dengan IP 192.168.1.10 ——-# #$IPTABLES -t nat -A PREROUTING -p tcp -d $EXTIP –dport 80 -j DNAT –to $ServerProduksi:80 $IPTABLES -t nat -A PREROUTING -p tcp -i $EXTIF –dport 80 -j DNAT –to $ServerProduksi:80 $IPTABLES -A INPUT -m state –state ESTABLISHED,RELATED -j ACCEPT $IPTABLES -A FORWARD -i $INTIF -o $EXTIF -m state –state NEW,ESTABLISHED,RELATED -j ACCEPT $IPTABLES -A FORWARD -p tcp –destination-port 80 -j ACCEPT $IPTABLES -A OUTPUT -m state –state NEW,RELATED,ESTABLISHED   — #———– Ini Untuk forward ke SERVER XEON dengan IP 192.168.1.10 ——-# #$IPTABLES -t nat -A PREROUTING -p tcp -d $EXTIP –dport 80 -j DNAT –to $ServerProduksi:80 $IPTABLES -t nat -A PREROUTING -p tcp -i $EXTIF –dport 8001 -j DNAT –to $SERVER:80 $IPTABLES -A INPUT -m state –state ESTABLISHED,RELATED -j ACCEPT $IPTABLES -A FORWARD -i $INTIF -o $EXTIF -m state –state NEW,ESTABLISHED,RELATED -j … Read entire article »

Filed under: 7. Operating System

Remix Enak

http://zonemix.eu/ http://tunein.com/radio/Indonesia-r100356/ … Read entire article »

Filed under: 7. Operating System

Eclipse Editor Referense

Eclipse_referensi … Read entire article »

Filed under: 7. Operating System

Gammu / SMS PTPN-XI / ARIF / APIK

Filed under: 7. Operating System

SERVER CHECK PHP By ARIP

<? /* Fungsi untuk mengecek beberapa kondisi server. Jika ada yang tidak beres, akan mengirim sms ke admin. arif@ptpn-11.com 25/04/2012 */ $host = ‘localhost'; $user = ‘gammu'; $pass = ‘gammu132′; $db_name = ‘gammu'; $link = mysql_connect($host, $user, $pass); mysql_select_db($db_name, $link); $admin = array( “arif” => ‘081332218352’, “nofry” => ‘08563532669’, ); $spaceHD = getSpaceHD(); if ($spaceHD) kirimSMS($spaceHD); function kirimSMS($text){ $valuesnya = ”; global $admin; foreach ($admin as $i => $value) $valuesnya .= “(‘$value’, ‘$text’, ‘Gammu’),”; $values = rtrim($valuesnya, ‘,’); $query = “INSERT INTO outbox(DestinationNumber, TextDecoded, CreatorID) VALUES $values”; $hasil = mysql_query($query); } function getSpaceHD(){ $output = shell_exec(‘df -h’); $result = str_replace(array(“\r\n”, “\r”, “\n”), ” “,$output); $datapisah = explode(” “,$result); $hasil = ”; foreach ($datapisah as $i => $value) { if (substr($value, -1) == ‘%’) { if (substr($value, 0, -1) > 80) { $hasil .= $value.’ ‘; $hasil .= $datapisah[$i+1].’\n'; } } } if ($hasil <> ”) { $ket = “Hard Disk server penuh, harap segera dipindah. \n”.$hasil.'{SMS Server NXI}'; return $ket; } else return false; } function getMemHD(){ $output = shell_exec(‘df -h’); $result = str_replace(array(“\r\n”, “\r”, “\n”), ” “,$output); $datapisah = explode(” “,$result); $hasil = … Read entire article »

Filed under: 7. Operating System

Script Bekap DataBase

root@Main-Ras-Server:~# crontab -l # m h  dom mon dow   command */5 * * * * /usr/sbin/ntpdate id.pool.ntp.org  > /dev/null #*/1 * * * * /etc/init.d/mysql restart 00 00 * * * /bin/sh /home/bekap_data/dbbackup.sh > /dev/null @hourly /usr/bin/php /home/arif/noc.php > /dev/null root@Main-Ras-Server:~# cat  /home/bekap_data/dbbackup.sh #!/bin/bash tgl=`date “+%d%m%Y”`; mkdir /home/bekap_data/db/$tgl sqldir=/home/bekap_data/db/$tgl; dbhost=localhost user=root pass=’rahasiakita’ database=” information_schema forumDB kvaweb mysql pajak ptpn11_map ptpn11wp ptpn11wp_old ptpn2010 revitalisasi2 t89607_eproc t89607_ptpn t89607_sipgut webptpn11 aruskas forumDB hutangpiutang” for db in $database; do v_name=$db”_”$tgl.sql; mysqldump -u$user -h$dbhost -p$pass $db –skip-lock-tables –force > $sqldir/$v_name; done exit 0 — End Script … Read entire article »

Filed under: 7. Operating System

Radio Online Indonesia

http://radioindonesia.info/ … Read entire article »

Filed under: 7. Operating System

Contoh Programming C di LINUX

\\192.168.1.1\dms\Ebook … Read entire article »

Filed under: 7. Operating System