web analytics
Evan && Or && Id

Author Archive

HTML Code for Date

by on May.31, 2011, under Belajar IT

<Script type=”text/javaScript”>

// Get today’s current date.
var now = new Date();

// Array list of days.
var days = new Array(‘Sunday’,'Monday’,'Tuesday’,'Wednesday’,'Thursday’,'Friday’,'Saturday’);

// Array list of months.
var months = new Array(‘January’,'February’,'March’,'April’,'May’,'June’,'July’,'August’,'September’,'October’,'November’,'December’);

// Calculate the number of the current day in the week.
var date = ((now.getDate()<10) ? “0″ : “”)+ now.getDate();

// Calculate four digit year.
function fourdigits(number)   {
return (number < 1000) ? number + 1900 : number;
}

// Join it all together
today =  days[now.getDay()] + “, ” +
months[now.getMonth()] + ” ” +
date + “, ” +
(fourdigits(now.getYear())) ;

// Print out the data.
document.write(today);

//  End –>
</script>

Share on Facebook
Leave a Comment more...

CHMOD

by on May.31, 2011, under Belajar IT, Note

chmod = change file modes

Permissions Owner Group Others
chmod 777 rwx rwx rwx
chmod 666 rw- rw- rw-
chmod 555 r-x r-x r-x
chmod 444 r– r– r–
chmod 333 -wx -wx -wx
chmod 222 -w- -w- -w-
chmod 111 –x –x –x
chmod 000

After chmoding a file you can use ls -l to view the permissions.

Using the above chart you can combine permissions.

chmod 644 = rw-r–r–

chmod 731 = rwx-wx–x

Owner = user that created the file

Group = users in the same group as owner

Others = the rest of the users on the system

Share on Facebook
Leave a Comment more...

HOWTO: Backup files with tar

by on Feb.09, 2011, under Belajar IT, Copas, Note

Posted by Jason on Sunday July 01, @12:37PM
from the It’s-Sticky-Fun-Fun-Fun dept.
TAR is the Unix Tape ARchive utility. It can be used to either store data on a streaming tape device like a DAT drive, or store files in what is commonly called a tarball file- somewhat like a pkzip file, only compression is optional.
Source

[The basics]

In these examples, I will use the following file structure: a top level directory called DIR1 containing the files picture.jpg, document.doc and database.db.

DIR1/

DIR1/picture.jpg
DIR1/document.doc
DIR1/database.db

[Creating a tarball]

If we were in the directory DIR1 and wanted to backup all the files to a tarball called backup.tar, we could issue this command:

$ tar cvf backup.tar .

./
picture.jpg
doucment.doc
database.db
tar: backup.tar is the archive; not dumped

Note:
c=create (an archive)
v=verbose (just because)
f=filename (the name of our tarball)
.=current directory (what’s going to be backed up)

Also worth mentioning is that by default tar is recursive- meaning it will back up all files and subdirectories recursively unless you otherwise specify with the n flag (non-recursive)

[Displaying the Contents of a Tarball]

The current directory will now contain a file called backup.tar. To display the contents of the tarball file, we could issue this command:

$ tar tvf backup.tar

drwxr-xr-x root/gci 0 Jun 29 10:10 ./
-rw-r–r– root/gci 1 Jun 29 10:10 picture.jpg
-rw-r–r– root/gci 1 Jun 29 10:10 document.doc
-rw-r–r– root/gci 1 Jun 29 10:10 databse.db

Note:
t=table of contents (list)
v=verbose (display all info)
f=filename (backup.tar)

[Extracting Data from a Tarball]

To extract the entire contents of the tarball to the current directory, we can type:

$ tar xvf backup.tar

./
picture.jpg
doucment.doc
database.db

Note:
x=extract
v=verbose
f=filename (backup.tar)

To extract only the picture.jpg file from the archive, type the following command:

$ tar xvf backup.tar picture.jpg

Alternatively, you can use wild cards in either the creation or extraction of a tarball. To extract all jpg files from our archive, we can use a command like this:

$ tar xvf backup.tar *.jpg

[Using Compression]

If you would also like to add compression to your tarballs, you can combine the gzip utility with tar on the command line by adding the z switch to the command. Usually when this is done, we change the suffix of our tarball filename from .tar to either .tgz or .tar.gz. This will let whoever sees the file know that it is a gzipped tarball.

$ tar zcvf tarball.tgz .

Note:
z=gzip compression
c=create
v=verbose
f=filename (backup.tgz)
.=current directory (what to backup)

[Permissions with tar]

If you would like to preserve the permissions of the files you backup, use the p option with the tar command. This will save the uid, gid as well as the specific permission attributes of the files (read, write, execute etc.)

$ tar pzcvf tarball.tgz .

You should also use the p option with the tar extraction command:

$ tar pxvf tarball.tgz .

[Using tar with a Tape Drive]

I use tar in conjunction with my Seagate DAT drive. If you issue any of the previous commands in this HOW-TO without the f option and a tarball filename, you will find that tar will default to writing the files to the device /dev/rsa0 (raw sequential access device 0). Basically this is your first SCSI tape drive. If you have more than one tape drive you would like to use, you can issue the f option and the device name (rsa0, rsa1 etc.) of your specific tape drive instead of a filename.

Examples:
Backing up the current directory to Tape:

$ tar cv . <- default tape drive (rsa0)

$ tar cvf /dev/rsa1 . <- second tape drive (rsa1)

Restore files from Tape:

$ tar xv .
$ tar xvf /dev/rsa1

So, there are the basics of tar. If you would like more information on the tar command, try the man pages.

man tar

Share on Facebook
Leave a Comment more...

FreeBSD configurasi dasar

by on Feb.02, 2011, under Belajar IT, Ngoprek

=======
CVSUP :
=======

# cd /usr/ports/net/cvsup-without-gui
# make all install clean
# mkdir -p /usr/local/etc/cvsup/sup
# vi /usr/local/etc/cvsup/sup/supfile :

*default host=cvsup.FreeBSD.org
*default base=/usr/local/etc/cvsup
*default prefix=/usr
*default release=cvs tag=RELENG_7_1
*default delete use-rel-suffix
*default compress
src-all
ports-all tag=.
doc-all tag=.

# vi /usr/local/etc/cvsup/sup/refuse :

doc/de
doc/de_*
doc/es
doc/es_*
doc/fr
doc/fr_*
doc/it
doc/it_*
doc/ja
doc/ja_*
doc/nl
doc/nl_*
doc/ru
doc/ru_*
doc/sr
doc/sr_*
doc/zh
doc/zh_*
ports/chinese
ports/french
ports/german
ports/hebrew
ports/japanese
ports/korean
ports/russian
ports/ukrainian
ports/vietnamese

# cd /usr/ports/ports-mgmt/portupgrade
# make all install clean
# vi /usr/local/bin/cvsrun :

—isi file cvsrun—

#! /bin/sh
# cvsrun – Weekly CVSup Run

echo “Subject: `hostname` weekly cvsup run”
/usr/local/bin/cvsup -g -L 2 /usr/local/etc/cvsup/sup/supfile
echo “”
if [ $# -eq 1 ] ; then
if [ $1 = "-i" ] ; then
/usr/local/sbin/portsdb -Uu 2>&1
echo
fi
fi
echo “”
echo “Monggo di lanjut kang…”

—isi file cvsrun—

# chmod 0700 /usr/local/bin/cvsrun
# /usr/local/bin/cvsrun -i

————
isi kernel :
————
tambahin/edit ini nih di kernel, trus compile…

options SCHED_ULE
device vlan
options DEVICE_POLLING
options HZ=2000
options P1003_1B_SEMAPHORES
options SEMMNI=100
options SEMMNS=4096
options SEMMNU=512
options SEMMSL=4096
options SEMOPM=512
options MSGMNB=32768
options MSGMNI=82
options MSGSEG=4098
options MSGSSZ=128
options MSGTQL=2048
options SHMSEG=128
options SHMMNI=4096
options SHMMAX=2147483648
options SHMALL=2097152
options SHMMAXPGS=65536
options IPSTEALTH
options FDESCFS
options MAXDSIZ=”(1024UL*1024*1024)”
options MAXSSIZ=”(128UL*1024*1024)”
options DFLDSIZ=”(1024UL*1024*1024)”
options BLKDEV_IOSIZE=8192
options INCLUDE_CONFIG_FILE

options TCP_SIGNATURE
options IPSEC
maxusers 384
device crypto
device cryptodev
options SMP
device cpufreq

——————————————-

compile pake yg ini, jgn yg standar…

cd /usr/src
make buildkernel KERNCONF=
make installkernel KERNCONF=
reboot

——————————————-

——————
isi sysctl.conf :
——————

net.link.ether.inet.log_arp_wrong_iface=0
net.link.ether.inet.log_arp_movements=0
net.inet.ip.fastforwarding=1
#
kern.coredump=0 # no coredumps
vm.swap_enabled=0 # no swap space
net.inet.ip.redirect=0 # don’t send redirects
net.inet.icmp.drop_redirect=1 # don’t accept redirects
net.inet.tcp.delayed_ack=0 # no delayed ACKs
###
# TAMBAHAN 29Juni2007
###
kern.ipc.maxsockbuf=16777216
kern.ipc.somaxconn=8192
net.inet.tcp.recvbuf_max=16777216
net.inet.tcp.sendbuf_max=16777216
net.inet.tcp.sendspace=262144
net.inet.tcp.recvspace=262144
net.inet.tcp.inflight.enable=0
#
# TAMBAHAN 06Jan2008
#
net.inet.tcp.blackhole=2
net.inet.udp.blackhole=1
net.inet.ip.random_id=1
net.inet.udp.maxdgram=57344
kern.polling.burst_max=1000
kern.polling.each_burst=120
kern.polling.idle_poll=0 # nilai 1 respon lbh baek tp makan cpu-system
kern.polling.user_frac=5
kern.polling.reg_frac=50
net.inet.tcp.tso=0
#
# 28 Mei 2008, R
#
net.inet.tcp.syncookies=0

————————————-

tambahan buat rc.conf :
———————–

inetd_enable=”NO”
background_fsck=”YES”
syslogd_enable=”YES”
syslogd_program=”/usr/sbin/syslogd”
syslogd_flags=”-ss”
tcp_drop_synfin=”YES”
icmp_drop_redirect=”YES”
icmp_log_redirect=”NO”
clear_tmp_enable=”YES”
tcp_extensions=”YES”
tcp_keepalive=”YES”
icmp_bmcastecho=”NO”
icmp_bandlim=”YES”

Share on Facebook
Leave a Comment more...

Lokasi Kediaman BhoMerT

by on Jan.07, 2011, under Note, Sosial

Langsung aja… kalo mau tau kediaman saya bisa langsung klik link ini
Detail lokasi :
Jl. Mampang Prapatan XI Rt.008 Rw.04 No.38
Jakarta Selatan
- Deket dengan SMK 28 Oktober
- Samping Pull Bajaj
- Deket Kelurahan Tegal Parang
- Deket Puskesmas
- Masuk gang kecil tanya aja kediaman evan atau tanya aja Pangkalan bajai
- Nah kalo mau jelasnya liat aja google map di bawah ini, klik aja map-nya trus pantengin aja lewat mana buat ke situ

Nah untuk penampakannya silakan di liat ( yang ada tanda A ):

View Larger Map

Share on Facebook
Leave a Comment more...

Mount Image ISO di Windows 7 / Vista

by on Dec.29, 2010, under Belajar IT, Copas, Note

Kadang kita bingung untuk mounting / membaca backup dari CD / DVD baik yg berupa *.ISO, *.BIN, *.CCD, *.DVD dll..
Nah ini adalah salah satu tools untuk membuat virtual CD/DVD keluaran slysoft dengan nama Virtual Clone Drive Silakan klik Download untuk mengambil-nya dan lakukan instalasi sesuai petunjuk-nya
SetUp
Setelah terinstall pilih jumlah Drive yang dibutuhkan… dan untuk mounting-nya bisa di lihat di gambar berikut :
Mounting

Demikian sedikit informasi yang sekiranya bisa menjadi salah satu alternatif untuk memudahkan membaca file dalam bentuk Image. Smoga membantu

Source :
www.howtogeek.com
www.slysoft.com

Share on Facebook
Leave a Comment more...

Membuat HotSpot Server + Radius Server

by on Dec.05, 2010, under Belajar IT, Ngoprek

Lanjut lagi… mumpung lom tepar ke pulau kapuk…., sekarang kita coba install Chillispot, yang nantinya akan berguna untuk server HotSpot

push# cd /usr/ports/ && make search name=ChilliSpot

Port: chillispot-1.0_5
Path: /usr/ports/net-mgmt/chillispot
Info: Wireless LAN Access Point Controller
Maint: venture37@geeklan.co.uk
B-deps:
R-deps:
WWW: http://www.chillispot.info

push# cd /usr/ports/net-mgmt/chillispot
push# make all install clean
Pilih semua Option-Nya ya… :
[X] RAW Latest Release Of Apache & mySQL
[X] MATURE Stable Releases of Apache with mod_ssl & MySQL
[X] FREE freeRADIUS
[X] OPENR openradius

Setelah terinstall lakukan langkah² berikut:
Copy atau rename /usr/local/openssl/openssl.cnf.sample ke /usr/local/openssl/openssl.cnf
push# cp /usr/local/openssl/openssl.cnf.sample /usr/local/openssl/openssl.cnf

Share on Facebook
Leave a Comment more...

PhpMyAdmin di FreeBSD

by on Dec.05, 2010, under Belajar IT, Ngoprek

Ok… lanjut lagi ngoprek-nya.. sekarang kita coba install PhpMyAdmin lewat port…

push# cd /usr/ports/ && make search name=phpmyadmin
Port: phpMyAdmin-3.3.8.1
Path: /usr/ports/databases/phpmyadmin
Info: A set of PHP-scripts to manage MySQL over the web
Maint: m.seaman@infracaninophile.co.uk
B-deps: mysql-client-5.1.53
R-deps: freetype2-2.4.3 jpeg-8_3 kbproto-1.0.4 libICE-1.0.6,1 libSM-1.1.1_3,1 libX11-1.3.3_1,1 libXau-1.0.5 libXaw-1.0.7,1 libXdmcp-1.0.3 libXext-1.1.1,1 libXmu-1.0.5,1 libXp-1.0.0,1 libXpm-3.5.7 libXt-1.0.7 libiconv-1.13.1_1 libltdl-2.2.10 libmcrypt-2.5.8 libpthread-stubs-0.3_3 libxcb-1.7 libxml2-2.7.8_1 mysql-client-5.1.53 oniguruma-4.7.1 pcre-8.10 pdflib-7.0.4 pecl-pdflib-2.1.8 php5-5.3.3_2 php5-bz2-5.3.3_2 php5-ctype-5.3.3_2 php5-filter-5.3.3_2 php5-gd-5.3.3_2 php5-mbstring-5.3.3_2 php5-mcrypt-5.3.3_2 php5-mysql-5.3.3_2 php5-openssl-5.3.3_2 php5-session-5.3.3_2 php5-zip-5.3.3_2 php5-zlib-5.3.3_2 pkg-config-0.25_1 png-1.4.3 printproto-1.0.4 t1lib-5.1.2_1,1 xextproto-7.1.1 xproto-7.0.16
WWW: http://www.phpmyadmin.net/

push# cd /usr/ports/databases/phpmyadmin
push# make all install clean

phpMyAdmin-suphp-3.3.8.1 has been installed into:

/usr/local/www/phpMyAdmin

Please edit config.inc.php to suit your needs.

To make phpMyAdmin available through your web site, I suggest
that you add something like the following to httpd.conf:

Alias /phpmyadmin/ “/usr/local/www/phpMyAdmin/”

<Directory “/usr/local/www/phpMyAdmin/”>
Options none
AllowOverride Limit

Order Deny,Allow
Deny from all
Allow from 127.0.0.1 .example.com
</Directory>

Edit httpd.conf sesuai petunjuk di atas ( sesuaikan perijinan di buka dari mana aja, kalo mau di akses dari umum set ke Allow from all ) :
push# vi /usr/local/etc/apache22/httpd.conf
Restart apache-nya :
push# apachectl restart

Then…. buka browser dan ketikkan http://xxx.xxx.xxx.xxx/phpmyadmin/

Done…!!!

Share on Facebook
Leave a Comment more...

Install PHP di FreeBSD

by on Dec.04, 2010, under Belajar IT, Ngoprek

Langsung lagi…. buat menuhin catetan ye….

push#cd /usr/ports/lang/php52
push# make config
pilih option :
[X] CLI Build CLI version
[X] CGI Build CGI version
[X] APACHE Build Apache module
[X] SUHOSIN Enable Suhosin protection system (not for jails)
[X] MAILHEAD Enable mail header patch
[X] FASTCGI Enable fastcgi support (CGI only)
[X] PATHINFO Enable path-info-check support (CGI only)

setelah itu langsung lakukan perintah ini :
push# make all install clean
Setelah kelar edit file httpd.conf dan masukkan 2 baris di bawah :
push# vi /usr/local/etc/apache22/httpd.conf
#### TAMBAHAN UNTUK PHP ####
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
#### END ####
dan tambahkan pula index.php pada httpd.conf

DirectoryIndex index.html index.php

lalu save, kelar dah untuk masalah di apache-nya, sekarang lanjut lagi…
Sekarang edit file php.ini di sini kita bisa mengatur setingan php-nya nah by default lakukan dengan cara ganti nama file-nya aja dan ini udah ada dari file bawaan pas instalasinya :

push# mv php.ini-dist php.ini
setelah itu kita restart apache-nya :
push# /usr/local/sbin/apachectl restart

Setelah itu semua sekarang kita coba test php-nya dengan cara :
push# echo ‘<?php phpinfo();?>’ >> /usr/local/www/apache22/data/test.php

setelah itu coba kita test langusng lewat browser :

http://ip-server-nya/test.php

kalo berhasil akan tampil seperti ini :
System FreeBSD push.idconnect.co.id 7.3-RELEASE-p4 FreeBSD 7.3-RELEASE-p4 #0: Thu Dec 2 00:47:25 UTC 2010 root@push.idconnect.co.id:/usr/obj/usr/src/sys/BhoMerT i386
Build Date Dec 4 2010 03:52:00
Configure Command ‘./configure’ ‘–with-layout=GNU’ ‘–with-config-file-scan-dir=/usr/local/etc/php’ ‘–disable-all’ ‘–enable-libxml’ ‘–with-libxml-dir=/usr/local’ ‘–enable-reflection’ ‘–program-prefix=’ ‘–enable-fastcgi’ ‘–with-apxs2=/usr/local/sbin/apxs’ ‘–with-regex=php’ ‘–with-zend-vm=CALL’ ‘–disable-ipv6′ ‘–prefix=/usr/local’ ‘–mandir=/usr/local/man’ ‘–infodir=/usr/local/info/’ ‘–build=i386-portbld-freebsd7.3′

Done…!!! kelar masalah apache, php dan mysql…

Share on Facebook
Leave a Comment more...

Install MySQL di FreeBSD

by on Dec.04, 2010, under Belajar IT, Ngoprek

Langsung aja… kita install lewat port aja ya…

push# cd /usr/ports/ && make search name=mysql-server

Port:   mysql-server-5.1.53
Path:   /usr/ports/databases/mysql51-server
Info:   Multithreaded SQL database (server)
Maint:  ale@FreeBSD.org
B-deps: mysql-client-5.1.53
R-deps: mysql-client-5.1.53
WWW:    http://www.mysql.com/

push# cd /usr/ports/databases/mysql51-server
push# make all install clean

setelah terinstall create database :

push# /usr/local/bin/mysql_install_db
Installing MySQL system tables…
OK
Filling help tables…
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/local/bin/mysqladmin -u root password ‘new-password’
/usr/local/bin/mysqladmin -u root -h push.idconnect.co.id password ‘new-password’

Alternatively you can run:
/usr/local/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr/local ; /usr/local/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /usr/local/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/local/bin/mysqlbug script!

Nah.. setelah itu ganti kepemilikan dan group-nya ke mysql :
push# chown -R mysql /var/db/mysql/
push# chgrp -R mysql /var/db/mysql/

Jalankan daemon mysql-nya:
push# cd /usr/local ; /usr/local/bin/mysqld_safe &
[1] 4443
push# 101204 03:30:43 mysqld_safe Logging to ‘/var/db/mysql/push.idconnect.co.id.err’.
101204 03:30:43 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql

cek status-nya menggunakan perintah #ps -aux
mysql 4486 0.0 1.1 45804 22028 p0 I 3:30AM 0:00.13 /usr/local/libexec/mysqld –basedir=/usr/local –datadir=/var/db/mysql –user=mysql –log-error=/var/db/mysql/push.idconnect.co

Setelah itu set password-nya :
push# /usr/local/bin/mysqladmin -u root password inipassword
push# /usr/local/bin/mysqladmin -u root -h push.idconnect.co.id password inipassword

Agar mysql otomatis jalan pas server reboot gunakan perintah ini :
push# echo ‘mysql_enable=”YES”‘ >> /etc/rc.conf

Done…!!!

Share on Facebook
Leave a Comment more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!