Set date in linux from command line

August 18th, 2011 | Posted by cahpct in Linux - (0 Comments)

Pergunakan perintah berikut:

date –set="STRING"

Untuk mengubah tanggal menjadi 18 agustus 2011 jam 16.31 :

date -s "18 AUG 2011 16:31:16"

Repository debian 6

August 9th, 2011 | Posted by cahpct in Linux - (0 Comments)

deb http://kambing.ui.edu/debian squeeze main non-free contrib
deb http://kambing.ui.edu/debian-security squeeze/updates main non-free contrib
 

Enable Gd Libary pada x-serve leopard

August 9th, 2011 | Posted by cahpct in Computer - (0 Comments)

Sedikit share pengalaman menggunakan server Mac OS X server 10.5.8. Pada server X server secara default GD tidak di ikut sertakan pada saat insntall. Nah mesti punya sedikit trik untuk mentuning agar GD librarynya terinstall berikut step by stepnya.

1. Matikan service php yang sudah terinstall

2. Download source dari sini download dan klik untuk install ikuti petunjuk yang sudah ada.

3. Selanjutnya silahkan buat file info.php dengan isi = <?php phpinfo(); ?>


 

Diluncurkan Selasa (26/7), Facebook memperkenalkan Facebook for Business, untuk mempermudah pengusaha kecil mempromosikan usahanya.

Ketik saja Facebook.com/business di browser Anda. Jika sudah masuk, pada halaman itu Anda akan melihat fitur-fitur yang sengaja disiapkan untuk membantu usaha kecil dan menengah. Mulai dari pengarahan cara membuat halaman bisnis yang baik, membuat iklan, dan cara-cara berinteraksi dengan pelanggan secara online.

“Facebook ingin usaha kecil punya hubungan jangka panjang dengan pelanggannya, dan supaya mereka dapat menjalani teknik marketing yang ampuh, yaitu penjualan dari mulut ke mulut,” ujar juru bicara Facebook seperti dikutip dari Gigaom.

Dengan adanya Facebook for Business, semoga saja jualan di Facebook jadi lebih tertib, dan pedagang tidak lagi asal tag akun orang di foto barang dagangannya.

Sumber

Set-Mailbox -Identity:testingj@prigad.com -password:(ConvertTo-SecureString kutukupret -AsPlainText –Force)

Memperkuat sinyal modem GSM /HSDPA

July 27th, 2011 | Posted by cahpct in Internet - (0 Comments)

Berbagi cerita ketika saya membantu client untuk setting modem GSM, pengalaman ini saya alami berkenaan dengan rumah client yang mempunyai tembok tebal yang efeknya sinyal hp tidak bisa ketangkap.

Modem yang dipergunakan merk huawei dengan kartu 3, pada saat pintu kamar dibuka terkadang masih dapat sinyal satu bar tetapi masih putus – putus, sebelumnya pernah mencoba dengan modem smart tetapi tidak dapat sinyal sama sekali. Akhirnya saya skip sementara waktu untuk mencoba mencari solusi. Beberapa hari kemudian saya mencoba menggunakan sendok yang di tempelkan ke modem trus dibengkokkan tetapi tetap tidak ada sinyal.

Nah terlintas gimana ya kalau saya coba pake kabel usb? di benak saya berfikir wah kalau kabel usb pasti sambung – menyambung sampai atap rumah perlu berapa kabel coba? tapi saya langsung jalan ke arena BiNus syahdan untuk mencoba mencari kabel usb dan ternyata di toko tersedia kabel usb yang panjangnya bervariasi, 1.5 meter 5 meter sampai 10 meter. Saya pilih yang 5 meter karena perkiraan kamar ke atap rumah paling memerlukan 3 atau 4 meter takutnya kalau kepanjangan malah mengurangi fungsional si modem.

Sesampainya di rumah client, langsung saya pasang di tangga atas rumah dan saya coba untuk pasang ke pc. Sinyal dapat full 5 bar dan langsung konek.
Akhirnya client bisa browshing dan sayapun mendapatkan pengalaman baru untuk masalah sinyal yang tidak bisa menembus tembok.

Google +

July 26th, 2011 | Posted by cahpct in Internet - (2 Comments)

Google plus adalah layanan sosial media dari google, yang saya rasakan sewaktu menggunakannya adalah kecepatannya yang membuat merasa nyaman. Di bandingkan Facebook google plus lebih ringan dan terlihat simple. Bagi anda yang ingin mendaftar saat ini google masih menggunakan metode invitasi dari teman atau orang yang sudah memiliki account.

 

Bagi bro dan sis yang belum memiliki silahkan berikan komentar tulisan ini dan cantumkan alamat emailnya untuk saya invite

Untuk mengecek setting zone bind apakah error atau tidak berikut commandnya untuk path sesuaikan dengan settingan anda:

named-checkzone binus.ac.id /var/cache/bind/slave/binus.ac.id.hosts

Beberapa hari ini saya mendapati mozilla firefox saya default search engine tidak mengarah ke google tetapi justru mengarah ke facemood, saya sudah melakukan uninstall addon tetapi masih saja bandel. Berikut cara menghilangkan facemood dan mengembalikan search engine ke google.

 

1. Masukkan keyword berikut ke dalam address page : about:config

 

2. Cari pada kotak filter : keyword.URL setelah itu klik kanan pada value field dan modify

3.  Selanjutnya copy paste link tersebut : http://www.google.com/search?hl=en&q=

What is crontab?

cron is a unix, solaris utility that allows tasks to be automatically run in the background at regular intervals by the cron daemon.
These tasks are often termed as cron jobs in unix , solaris.
Crontab (CRON TABle) is a file which contains the schedule of cron entries to be run and at specified times.

Crontab Restrictions

You can execute crontab if your name appears in the file /usr/lib/cron/cron.allow. If that file does not exist, you can use
crontab if your name does not appear in the file /usr/lib/cron/cron.deny.
If only cron.deny exists and is empty, all users can use crontab.
If neither file exists, only the root user can use crontab. The allow/deny files consist of one user name per line.

Crontab Location

Where is it stored?

It will be stored /var/spool/cron/ but we only root has permission for those directories

Crontab Commands

export EDITOR=vi ;to specify a editor to open crontab file.

crontab -e Edit your crontab file, or create one if it doesn’t already exist.
crontab -l Display your crontab file.
crontab -r Remove your crontab file.
crontab -v Display the last time you edited your crontab file. (This option is only available on a few systems.)

Crontab file

Crontab syntax :-
A crontab file has five fields for specifying day , date and time followed by the command to be run at that interval.
* * * * * command to be executed
- – – – -
‘ ‘ ‘ ‘ ‘
‘ ‘ ‘ ‘ +—– day of week (0 – 6) (Sunday=0)
‘ ‘ ‘ +——- month (1 – 12)
‘ ‘ +——— day of month (1 – 31)
‘ +———– hour (0 – 23)
+————- min (0 – 59)

* in the value field above means all legal values as in braces for that column.
The value column can have a * or a list of elements separated by commas. An element is either a number in the ranges shown above or two numbers in the range separated by a hyphen (meaning an inclusive range).

Note: The specification of days can be made in two fields: month day and weekday. If both are specified in an entry, they are cumulative meaning both of the entries will get executed .

How to Modify Crontab file?

*

crontab -e

This will open the crontab file and let you edit it. By default this file will be opened with the VI editor and you will need to press the “Insert” key on your keyboard to be able to write in that file.
*

30 13 * * * /home/your_username/run-me.sh >/dev/null 2>&1

The first character you see is “30” this means that crontab will run the script every time the clock hits the 30 minutes mark. Next “13” this means that crontab will run the script when the clock hits 13. The next three * tell crontab to run the script every day, of every month of every weekday. Combining these fields crontab will run the script every day at exactly 13:30. You may notice that we added the “>/dev/null 2>&1” string at the end of the command. The default cron job will always send and e-mail to the root account when ever a command is executed. Now you don’t want to be notified every day that your crontab job has been executed. If you don’t want to receive e-mails every day notifying you about your job’s execution place this “>/dev/null 2>&1” at the end of every instance of every crontab command.

When you are finished adding your commands to the crontab file you need to save and exit. If you are using VI as your editor you need to issue the following commands:

*

Press the Esc (Escape key) on your keyboard to enter the command mode of VI
*

After you pressed Escape then type the following characters :wq! and press Enter. Remember you have to type this characters (remove the quotes): “:wq!”.

linux_crontab_colorful.png

Crontab Example

#A line in crontab file like below removes the tmp files from /home/someuser/tmp each day at 6:30 PM.
30 18 * * * rm /home/someuser/tmp/*
#This runs every fifteen minutes
*/15 * * * * /notesbit/work/scripts/crons/denyhack1 > /dev/null 2>&1
*/20 * * * * /notesbit/work/scripts/crons/denyhack2 > /dev/null 2>&1
#This runs every twenty five minutes
*/25 * * * * /notesbit/work/scripts/crons/denyhack3 > /dev/null 2>&1
*/35 * * * * /notesbit/work/scripts/crons/denyhack4 > /dev/null 2>&1
# This runs every day at 2:14 PM
08 14 * * * /root/work/scripts/crons/stkinc NUAN > /dev/null 2>&1

Crontab Example 1: This crontab example runs updatedb command 35 minutes past every hour.

35 * * * * updatedb

Crontab Example 2: This crontab example runs /usr/local/bin/diskusage.sh every 5 minutes (e.g. 0, 5, 10, 15, …).

*/5 * * * * /usr/local/bin/diskusage.sh

Crontab Example 3: This crontab example runs /usr/local/bin/diskusage.sh at 1:25 AM, 1:50 AM every Tuesday and on 15th of every month.

25,50 1 15 * 2 /usr/local/bin/diskusage.sh

Crontab Example 4: This crontab example runs /usr/local/bin/diskusage.sh at 2:00 PM on 10th of March, June, September and December.

00 14 10 3,6,9,12 * /usr/local/bin/diskusage.sh

Crontab Example 5: This crontab example runs ‘/usr/local/bin/diskusage.sh user@linuxconfig.sh’ at 9.00 PM every Monday, Wednesday, Friday. Note: Using names for the week day and months is extension in some versions of crontab.

00 21 * * Mon,Wed,Fri /usr/local/bin/diskusage.sh user@linuxconfig.sh

Crontab Example 6: This crontab example runs /usr/local/bin/diskusage.sh every 5 minutes during the 5 working days (Monday – Friday), every week and month.

*/5 * * * 1-5 /usr/local/bin/diskusage.sh

Crontab Example 7: This crontab example runs /usr/local/bin/diskusage.sh every minute during the 4-th hour only in Sunday, every week and month. This is every minute from 0:00 till 0:59, then from 4:00 till 4:59, etc.

* */4 * * sun /usr/local/bin/diskusage.sh

3. System wide cron scheduler
As a Linux administrator you can also use predefined cron directories:

/etc/cron.d /etc/cron.daily /etc/cron.hourly /etc/cron.monthly /etc/cron.weekly

If root wishes to run backup.sh script once a week he will place backup.sh script into /etc/cron.weekly directory.
4. Cron Scheduler on user level
Every user can edit, view or remove his own crontab file. If the root user needs to change someone else’s crontab file he must add ‘-u’ option to specify the user name. To edit crontab file for user foobar we can use command:

# crontab -u foobar -e

Remove foobar’s crontab file:

# crontab -u foobar -r

To view foobar’s crontab content:

# crontab -u foobar -l

Crontab Environment

cron invokes the command from the user’s HOME directory with the shell, (/usr/bin/sh).
cron supplies a default environment for every shell, defining:
HOME=user’s-home-directory
LOGNAME=user’s-login-id
PATH=/usr/bin:/usr/sbin:.
SHELL=/usr/bin/sh

Users who desire to have their .profile executed must explicitly do so in the crontab entry or in a script called by the entry

Reference & source: http://www.linuxconfig.org

sources