cron

Sometimes it can be useful to continuously monitor it, in that case:

tail -f /var/log/syslog | grep CRON
Advertisements

Install GO di Yosemite

goBuat yang baru coba golang kayak gw, untuk install pertama, emang rada ribet di pengaturan pathnya.
Kalo installnya dari package file, gw kasih tips and tricknya.

secara umum, dokumentasi golang bisa dibaca di websitenya, sangat lengkap ada disini https://golang.org .
oke langsung aja ya kita install

1. Download package nya buat mac os, bisa diliat didapat disini https://golang.org/dl/
2. Setelah install golang, default path yang diinstall akan terletak disini path nya /usr/local/go

Apakah setelah itu beres? dan bisa bermain golang dengan aman sentosa? , sayang sekali jawabannya tidak sodara – sodara. Kalian harus setting path go, supaya command go nya terbaca oleh si mac osx nya.
> sudo nano ~/.bash_profile
Kemudian setelah itu setting variable path seperti ini

export PATH=$PATH:/usr/local/go/bin
export GOPATH=$HOME/Go
export PATH=$PATH:$GOPATH/bin
export GOROOT=/usr/local/go
export PATH=$PATH:$GOROOT/bin

Terakhir jalankan perintah ini

source ~/.bash_profile

voila, go siap dioprek 😀

after install go, what the next?

This has been the most annoying thing to deal with. In hopes of saving your time.

IF go was installed as root user. The root user of your system’s bash_profile text file ~/.bash_profile needs to have $GOROOT assigned to the go install directory and $GOPATH needs to be assigned to go /src directory.


  ...$# sudo su
  ...$# vi ~/.bash_profile

    ***Story continues in vi editor***

    GOROOT=$GOROOT:/usr/local/go
    GOPATH=$GOPATH:/usr/local/go/src
    ...
    [your regular PATH stuff here]
    ...

be sure the path to go binary is in your path on .bash_profile

PATH=$PATH:$HOME/bin:/usr/local/bin:/usr/local/go/bin

This PATH can be as long a string it needs to be..to add new items just separate by colon :

exit vi editor and saving bash profile (:wq stands for write and quit)

  [esc] 
  [shift] + [:] 
  :wq

You have to log out of terminal and log back in for profile to initiate again..or you can just kick start it by using export.

...$# export GOPATH=/usr/local/go/src

You can verify go env:

...$# go env

Yay!

GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/usr/local/go/src"
GORACE=""
GOROOT="/usr/local/go"

Now you can sudo and go will be able to download and create directories inside go/src and you can get down to what you were trying to get done.

example

# sudo go get github.com/..

Now you will run into another problem..you might not have git installed..that’s another adventure..:

Ceritanya lagi dokumentasiin git

How to generate ssh key on ubuntu

 

  1. First step we have to create the key pair  on our machine , here is the command

> ssh-keygen -t rsa -C “muhamadabi.wardani@inmagine.com

 

  1.  After thats command, you can just press Enter to continue process

> Enter file in which to save the key (/Users/abiewardani/.ssh/id_rsa): (just press enter)

 

  1. You have to type a passphrase :

 

> Enter passphrase (empty for no passphrase): [Type a passphrase]
> Enter same passphrase again: [Type passphrase again then enter]

 

  1. After you type  a passphrase , you’ll given the fingerprint, or id of your SSH key. the enter key generation process should be like this

  Continue reading

Reset mysql password on linux

Simply change or reset your MySQL root password by doing the following:

  1. Stop the MySQL server

    sudo service mysql stop

  2. Start mysqld

    sudo mysqld --skip-grant-tables &

  3. Login to MySQL as root

    mysql -u root mysql

  4. Change MYSECRET with your new root password

    UPDATE user SET Password=PASSWORD('MYSECRET') WHERE User='root'; FLUSH PRIVILEGES; exit;

  5. Kill mysqld

    sudo pkill mysqld

  6. Start mysql

    sudo service mysql start

  7. Login to phpmyadmin as root with your new password

boot2docker always asking up password

Setelah cukup lama tidak ngoprek docker, dan mencoba merasakan kenangan lama itu. Kemaren sempet gw uninstall dockernya.

pas coba gw install lagi, muncul masalah. si docker selalu minta password.

kayak gini

bash-3.2$ /usr/local/bin/boot2docker up

Waiting for VM and Docker daemon to start…

………docker@localhost’s password:

docker@localhost’s password:

docker@localhost’s password:

.docker@localhost’s password:

docker@localhost’s password:

solusinya gampang , cuma begini

bash-3.2$ boot2docker delete

bash-3.2$ boot2docker init