Socialabel

Sunday, November 21, 2010

Layanan Web Server https pada CentOS

!Buat sebuah direktori temporeri untuk melakukan setting, ex :
Konsole
#mkdir /tmp/ssl_key
#cd /tmp/ssl_key

!Kemudian install openssl
Konsole
#yum install openssl mod_ssl openssl

!Generate private key
Konsole
#openssl genrsa -out zipruz.key 1024

!Generate CSR
Konsole
#openssl req -new -key zipruz.key -out zipruz.csr   

!Generate Self Signed Key
Konsole
#openssl x509 -req -days 1000 -in zipruz.csr -signkey zipruz.key -out zipruz.crt

!Pindahkan file2 sertifikat dan key ke folder lain
Konsole
#cp zipruz.crt /etc/pki/tls/certs/
#cp zipruz.key /etc/pki/tls/private/
#cp zipruz.csr /etc/pki/tls/private/


!arahkan file apache ssl.conf ke file yang telah di generate tadi
Konsole
#vi /etc/httpd/conf.d/ssl.conf
SSLCertificateKeyFile /etc/pki/tls/private/ca.key
SSLCertificateKeyFile /etc/pki/tls/private/ca.key

!Edit file vhost pada webserver apache
Konsole
<VirtualHost *:443>
ServerAdmin admin@zipruz.web.id
SSLCertificateFile "/etc/pki/tls/certs/ca.crt"
SSLCertificateKeyFile "/etc/pki/tls/private/ca.key"
DocumentRoot "/var/www/html/contoh"
ServerName zipruz.web.id
</VirtualHost> 

!Restart engine apache
Konsole
#service httpd restart  

!tambahkan rule untuk port https pada firewall iptables
Konsole
#iptables -A INPUT -p tcp –dport 443 -j ACCEPT
#service iptables save
#iptables -L -v

Saturday, October 9, 2010

Download OpenCV

OpenCV is released under a BSD license and hence it’s free for both academic and commercial use. It has C++, C, Python and Java interfaces and supports Windows, Linux, Mac OS, iOS and Android. OpenCV was designed for computational efficiency and with a strong focus on real-time applications. Written in optimized C/C++, the library can take advantage of multi-core processing. Adopted all around the world, OpenCV has more than 47 thousand people of user community and estimated number of downloads exceeding 6 million. Usage ranges from interactive art, to mines inspection, stitching maps on the web or through advanced robotics.

Download OpenCV

Download Qt-creator

Qt is a cross-platform application and UI framework for developers using C++ or QML, a CSS & JavaScript like language. Qt Creator is the supporting Qt IDE.

Qt, Qt Quick and the supporting tools are developed as an open source project governed by an inclusive meritocratic model. Qt can be used under open source (LGPL v2.1) or commercial terms.

Download Qt-Project

Saturday, September 11, 2010

[x] Auto Kill Ssh Double Remote Linux bash

Private Content
baris berikut untuk arsip pribadi, --



#!/bin/bash
clear
ps aux | grep priv | cut -d”:” -f4 | cut -d “[" -f1 | cut -d" " -f2 | sort > a.txt

#echo "" > proses.txt
#for user in $(cat a.txt); do
# echo "Ada" $user
#done

nama=$(cat a.txt);
proses=$(cat proses.txt | sort -u);
tanya=("?");
total=0;
nol=0;

#echo "Ini Belum di Array"
for (( i = 0 ; i < ${#nama[@]} ; i++ ))
do

#echo ${nama[0]};
nama2=( $(echo ${nama[0]};) )
done

#echo “”
#echo “Ini sudah di Array”
echo “Ini total User ” ${#nama2[@]}

#for (( i = 0 ; i < $[${#nama2[@]}-1]; i++ ))
#do

#echo ${nama2[$i]}
#echo ${nama2[$i+1]}
#done
#if ["${#nama2[@]” > 0 ]; then
#else

echo “Ini Program Cek Samo On line”
for (( i = 0 ; i < $[${#nama2[@]}-1]; i++ ))
do
C1=${nama2[$i]}
C2=${nama2[$i+1]}

if [ "$C1" = "$C2" ]; then
echo “Ada Yang Sama Yaitu ” $C1
echo $(date) ” duplikasi user ” $C1 >> log.us

for (( i = 1 ; i < 7; i++ ))
do
ps ax | grep sshd | grep priv | grep $C1 | cut -d” ” -f$i >> tmp_proses.txt

done

total=$[$total+1];

fi
done

if [ $total = $nol ]; then
echo “” > proses.txt
else
cat tmp_proses.txt | sort -u >> proses.txt

for (( x = 0 ; x < ${#proses[@]} ; x++ ))
do
proses2=( $(echo ${proses[0]};) )

done

for (( x = 0 ; x < ${#proses2[@]}; x++ ))
do
if [ ${proses2[$x]} = $tanya ]; then
echo ${proses2[$x]} “Ini Bukan ID Proses”
else
echo “Proses Dengan ID ” ${proses2[$x]} ” Telah Terbunuh”
kill ${proses2[$x]}
fi
done

echo “” > tmp_proses.txt

fi

echo “”
echo “Total Yang Harus Dibunuh ” $total

#if [ $total = $nol ]; then
# echo “” > proses.txt

#fi
#sleep 2
#echo “” > proses.txt

Wednesday, May 26, 2010

Cronjob/Crontab Perdetik Linux

Untuk menjalankan sebuah baris perintah pada linux berdasarkan penjadwalan waktu, user dapat menggunakan crontab, namun crontab (default) tidak memiliki pengaturan berdasarkan detik untuk melaksanakan eksekusi perintah, baris crontab dibawah ini dapat digunakan untuk mengeksekusi berdasarkan detik.

#crontab -e
* * * * * /kill/kill.sh
* * * * * sleep 10; /kill/kill.sh
* * * * * sleep 20; /kill/kill.sh
* * * * * sleep 30; /kill/kill.sh
* * * * * sleep 40; /kill/kill.sh
* * * * * sleep 50; /kill/kill.sh

sleep 10,20,30,40,50 --> akan membuat/mengeksekusi skrip kill.sh secara periodik setiap 10 detik

Sunday, May 2, 2010

Perdana Foto Angkatan SK 2010

Yup, akhirnya berhasil juga foto angkatan Mahasiswa Sistem Komputer (XISCO a.k.a HIMASISKO  1st) setelah 4 tahun 9 bulan berjalan, (wow selama ini belum pernah foto angkatan) 


Berikut ini cuplikannya hasil dari laporan reporter yang ada di lapangan,