Kamis, 18 Februari 2016

Seting IP Static di Ubuntu Server

ini saya copy dari site nya ubuntu  yah, soalnya sering lupa saya nya juga :D
sudo vi /etc/network/interfaces
auto eth0:1
iface eth0:1 inet static
  address 192.168.1.24
  netmask 255.255.255.0
  network 192.168.1.1
  broadcast 192.168.1.255
  gateway 192.168.1.1
For these new settings to take effect you need to restart networking services using the following command

sudo /etc/init.d/networking restart

source  : https://help.ubuntu.com/community/NetworkConfigurationCommandLine/Automatic

Senin, 15 Februari 2016

How To Upgrade ESXi 5.5 to update 1,2,3...

today im trying to upgrade my esxi server, from 5.5 to 5.5 update 1,2 and 3

steps :

download the update from :
https://www.vmware.com/patchmgr/findPatch.portal

after that  : copy downloaded files into datastore
note* if you try to make new folder in the datastore, better without any space or other simbols.

then.. we go to SSH an login as root
- do check before, so we can check later if our esx upgraded or not, using the build number.
how to check ?   -- > type vmware -v in ur console

\

now we try to find the upgrade files in our datastore .
after we find it.. do the installation with esxcli command.

esxcli software vib install -d /vmfs/volumes/52f25d31-555e3b54-4de6-40f2e9248bc2/UPDATE-ESXI-5.5/update-from-esxi5.5-5.5_update03.zip

the format is
 esxcli software vib install -d ( /vmvs/volumes/datastorename/zip file location )
and when done, you need to restart your server. In this case im trying to upgrade to update 1,2,3 so i dont do restart every upgrading. 

just install update 1,2 and 3.. then i do restart.. ( im not finding any error / effect ).

like this picture below.



now we check, if it upgraded or not by sync it with the build version from the web



                          Version                                                                    Release date  Build number


finally my esxi upgraded...
cheers...



Kamis, 11 Februari 2016

CRONTAB.... scheduler nya LINUX

hallo , happy nu year...
ini post pertama nih di tahun 2016....

postingan tetep yg ga gtu kualitas sih... tapi karena yg saya post adalah part of my experiences... so i dont really care  :P

fokus !

CRONTAB

jika di windows ada SCHEDULER.. di linux ada juga. dan nama nya ya itu CRONTAB.
bedanya... windows pake GUI, crontab CLI ( Command line Interface ).
ini yang bikin gw dulu puyeng banget klo mau bikin scheduler untuk linux.. dmn server gw rata2 linux.. dan gw masih gagal paham how to command in crontab,
tapi mari kita belajar sama - sama.

contoh crontab command :

prox:~ # crontab --help
crontab: invalid option -- '-'
crontab: usage error: unrecognized option
Usage:
 crontab [options] file
 crontab [options]
 crontab -n [hostname]
Options:
 -u  define user
 -e         edit user's crontab
 -l         list user's crontab
 -r         delete user's crontab
 -i         prompt before deleting
 -n  set host in cluster to run users' crontabs
 -c         get host in cluster to run users' crontabs
 -s         selinux context
 -x  enable debugging

opsinya cuma dikit koq.

format untuk croning ( bahasa saya ) adalah :

prox:~ # crontab *  *  *  *  *  < script kita >


.---------------- menit (0 - 59)
 |  .------------- jam (0 - 23)
 |  |  .---------- hari dalam bulan (1 - 31)
 |  |  |  .------- bulan (1 - 12) OR jan,feb,mar,apr ...
 |  |  |  |  .---- hari dalam minggu (0 - 6) (Sunday=0 or 7)  OR sun,mon,tue,wed,thu,fri,sat
 |  |  |  |  |
 *  *  *  *  *  < script kita >




 contoh kasus :
1. saya mau run copy file pada pukul 3AM

crontab * 3 * * * * cp /Desktop/data1 /Document/data1

2. saya mau run copy file jam 3 lewat 5 menit.

crontab 5 3 * * * * cp /Desktop/data1 /Document/data1

3. saya mau run copy file setiap 1 jam.

crontab * */3 * * * * cp /Desktop/data1 /Document/data1
bisa juga
crontab * 0/3 * * * * cp /Desktop/data1 /Document/data1

dari 2 command di atas, jika salah 1 error tinggal gunakan yang lain saja, barusan saya buat cron d opensuse, untuk setiap 1 jam harus menggunakan * bukan 0.

terakhir, klo gamau pusing ada koq web untuk generate crontab. ref saya adalah :

http://crontab-generator.org/

http://crontab.guru/

dah gtu aja koq.. mudah2an berguna untuk kita semua...
sama - sama belajar ya...


thank you.