Thursday, December 6, 2018

Perintah-perintah Dasar Pada Shell MongoDB Part-1


Setelah berbagi informasi tentang MongoDB dan Database NoSQL yang dapat diakses pada artikel disini. Sekarang saya akan memberikan daftar perintah-perintah dasar atau basic command pada shell MongoDB beserta fungsinya. 

untuk CREATE DATABASE baru atau masuk ke dalam database yang sudah ada
use <nama_database>

untuk menampilkan daftar database yang ada pada server MongoDB
show dbs

untuk menampilkan daftar collection yang ada pada database
show collections

untuk menampilkan nama user pada database
show users

untuk menampilkan manual untuk manipulasi database
db.help()

untuk menampilkan manual untuk manipulasi collection
db.nama_collection.help()

untuk keluar dari Mongo Shell
exit

untuk menghapus user tertentu pada database
db.removeUser(username)


untuk melakukan repair pada database yang sedang aktif sekarang
db.repairDatabase()

untuk menambah user baru pada database
db.addUser(nama_user,password)

untuk memberikan hak akses pada user
db.auth

untuk menyalin isi database ke database lain
db.copyDatabase(database_awal,database_target)

untuk membuat sebuah collection baru pada database
db.createCollection()

untuk menampilkan operasi atau proses terkini dari database
db.currentOp()

untuk menghapus database yang sedang digunakan sekarang
db.dropDatabase()

untuk mengambil seluruh nama collection pada database yang sedang aktif
db.getCollectionNames()

untuk menampilkan nama database yang sedang aktif
db.getName()

untuk menampilkan seluruh collection beserta atributnya pada database
db.printCollectionStats()

untuk menampilkan info dari replikasi database
db.printReplicationInfo()

untuk menampilkan status dari fitur sharding pada database
db.printShardingStatus()

Perintah-perintah di atas adalah perintah pada database section, untuk perintah pada bagian collection akan dibuat di part 2.

Monday, November 26, 2018

Berkenalan Dengan IPv6, IP Kekinian!!

ipv6 vs ipv4
IPv6 adalah IP generasi baru yang dikembangkan oleh Internet Engineering Task Force atau IETF. Alasan dikeluarkannya Protocol Internet terbaru ini adalah karena semakin menipisnya jumlah IPv4 yang saat ini digunakan. 


Gambar di atas menunjukan ketersediaan IPv4 menurut IANA (Internet Assigned Numbers Authority) yang didapat dari IPv4.potaroo.net. Berdasar tabel tersebut, IPv4 diprediksi habis pada tahun 2020-2021. Maka dari itu, pada 14 juli 2017 IPv6 ditetapkan sebagai standard internet baru. Secara fungsi, tidak ada perbedaan antara IPv6 dengan IPv4. Yang membedakan adalah pada sisi "fisik" dan "teknis". 

Beberapa perbedaan IPv6 dan IPv4:
  • IPv6 berupa kode Hexadesimal sedangkan IPv4 berupa kode Desimal
  • IPv6 terdiri dari 128 bit biner sedangkan IPv4 terdiri dari 32 bit biner
  • IPv6 menggunakan tanda titik dua ':' sebagai pemisah sedangkan IPv4 menggunakan tanda titik '.' sebagai pemisah
  • IPv6 mempunyai struktur header yang lebih sederhana dibanding IPv4
  • IPv6 tidak memerlukan broadcast
Penulisan IPv6
IPv6 terdiri dari 128 bit hexadecimal yang dibagi menjadi 8 hextet (16 bit). Setiap hextet akan dipisahkan oleh tanda ":" (titik dua) yang sebenarnya tidak berguna bagi IPv6 tetapi berguna bagi manusia. IPv6 memiliki anatomi 48 bit pertama sebagai global routing prefix, 16 bit kedua segbagai subnet ID, dan 64 bit terakhir sebagai interface ID.
Penulisa IPv6 dapat disingkat dengan ketentuan:

  • Angka 0 didepan bisa dihilangkan, misal
    • 0050 --> 50
  • Angka 0 dibelakang tidak boleh dihilangkan
    • 0050 --> 5 (X)
  • Kumpulan angka 0 dalam satu hextet (:0000:) dapat disingkat menjadi 
    • :0:
    • ::
  • Penggunaan :: hanya boleh dilakukan sekali
    • 2000::1234
    • 3000::4567::8910 (X)


Alamat Pada IPv6
  • Global unicast
    • 2000::/3
  • Multicast
    • FF00::/8
  • Link local address
    • FE80::/10
  • Unique local address
    • FC00::/7 to FDFF::/7
  • Loopback
    • ::1/128
Format Header


Apabila melihat gambar di atas tentu saja dapat dilihat bahwa IPv6 memiliki struktur header yang lebih sederhana dibanding IPv4. Alasan kenapa IPv6 lebih sederhana adalah karena pada proses komunikasi, IPv6 melewatkan proses header checksum yang ada di IPv4. Selain itu IPv6 juga memiliki ukuran yang tetap dan mempunyai ekstensi header yang berfungsi untuk memuat informasi internet layer yang bersifat  optional. 

Kelebihan IPv6
  • Routing lebih efisien 
  • Packet processing lebih efisien
  • Konfigurasi jaringan lebih sederhana
  • Keamanan lebih terjamin
  • Aliran data lebih terarah karena menggunakan multicast

Thursday, November 22, 2018

Pengenalan dan Installasi Samba Server pada CentOS

Samba adalah file server yang berfungsi untuk file sharing, printer sharing, dan beberapa source lain. Samba bersifat open source yang berarti gratis dan dapat dikembangkan oleh masyarakat umum. Samba juga mendukung interoperabilitas dengan Windows sehingga memungkinkan adanya interaksi antara keduanya. Untuk melakukan kerjanya Samba menggunakan protocol server message block atau smb yang merupakan salah satu protocol komunikasi data.

Installasi Samba pada CentOS adalah sebagai berikut:

Memastikan CentOS terkoneksi dengan Internet dengan cara sederhana yaitu PING ke 8.8.8.8 atau google

Apabila telah terkoneksi dengan internet, lakukan perintah untuk mendownload service samba dengan perintah yum install samba samba-client samba-common seperti di bawah ini:
Setelah proses download selesai, lakukan perintah agar samba dapat akftid secara otomatis saat server hidup dengan perintah chkconfig smb on dan chkconfig nmb on 
ubah konfigurasi SELinux menjadi disable dengan mengubah file konfigurasinya. SELinux merupakan fitur keamanan default yang dimiliki CentOS. perintah yang diketikan adalah vi /etc/selinux/config dan akan ada script seperti di bawah ini, lalu ubah menjadi disable seperti yang di highlight
mematikan firewall yang terdapat di CentOS dengan perintah service iptables stop
setelah ini, server sudah dapat digunakan. Untuk melakukan percobaan, kita akan membuat sebuah direktori baru yaitu /home/samba/public
dalam direktori tersebut  buat file teks berisi kalimat sederhana
Isi file teks tersebut adalah
setelah itu kita akan merubah konfigurasi samba dengan merubah file konfigurasinya menggunakan perintah seperti di bawah ini:
pada file konfigurasi tesebut sebenarnya terdapat banyak kalimat, tetapi untuk mempermudah, kali ini kita hapus semua kalimat di dalamnya dan memberi konfigurasi baru yaitu:
setelah itu simpan perubahan dan restart service samba dengan perintah service smb restart dan service nmb restart seperti di bawah

setelah itu dapat dicoba membuka direktori yang telah dibuat lewat windows dengan mengakses alamat ip server di windows explorer. Akan ada shared folder bernama publik berisikan file teks yang telah dibuat. 

Sekian artikel ini, semoga dapat membantu para pembaca sekalian. Mohon maaf apabila ada kekurangan. Jika ada pertanyaan silakan tanyakan di kolom komentar. Terima Kasih.


Wednesday, November 21, 2018

Pengenalan Database NoSQL dan MongoDB

MongoDB, NoSQL, Database

Basisdata adalah sekumpulan data atau informasi yang membentuk suatu file yang saling berhubungan sehingga dapat membentuk data atau informasi baru yang disimpan dalam sebuah hardware yaitu komputer yang dapat kita kelola menggunakan sebuah software untuk mengelolanya. Software untuk mengelola basisdata disebut DBMS atau database managament system.

Basisdata terbagi kedalam dua macam yaitu terstruktur dan tidak terstruktur. Basis data mode terstruktur atau relasional adalah basisdata yang informasinya diatur dalam bentuk tabel-tabel yang memiliki baris dan kolom dan mengacu pada format yang ditentukan. Apabila diilustrasikan, sama seperti Ms. Axcel. Setiap tabel saling berhubungan satu sama lain sehingga membentuk suatu informasi atau data baru.

Basisdata model tak-terstruktur tidak mengatur data dalam bentuk tabel tetapi dalam bentuk yang tidak beraturan. Bentuk-bentuk tersebut dapat seperti mindmap, gambar, dokumen. Data-data yang tersimpan tidak perlu mengikuti format tertentu.

Pengelolaan basisdata diatur dengan menggunakan DBMS atau Database Management System yang merupakan suatu jenis software yang dipergunakan untuk mengelola database. Salah satu DBMS yang digunakan untuk mengelola database tak-terstruktur adalah MongoDB.



MongoDB merupakan software open source yang dikembangkan oleh MongoDB Inc. pada tahun 2009. MongoDB menjadi salah satu DBMS terpopuler untuk mengelola database No-SQL. Software ini menggunakan struktur data JSON dalam pengelolaan datanya. Kita dapat meggunakan versi terminal maupun GUI.

Beberapa service yang ditawarkan pada MongoDB adalah fitur Agregasi. Agregasi adalah proses pengelompokan data-data pada database mengikuti parameter tertentu misalnya berdasarkan nama, umur, atau apapun bisa dijadikan parameter. Proses Agregasi berguna untuk menyederhanakan database.

Fitur lain yang ditawarkan adalah Replikasi. Replikasi merupakan proses dimana kita menduplikat database kita ke server lain sehingga menambah keamanan data. selain itu, replikasi juga mempermudah client untuk mengelola data karena dapat diakses dalam beberapa server berbeda.

Fitur terakhir yang akan dibahas pada artikel ini adalah Sharding. Sharding adalah prose untuk mendistribusikan data melalui satu atau lebih database. ini digunakan untuk mendukung pendistribusian data dengan set data yang besar sehingga lebih efisien.

Sekian artikel kali ini, semoga bermanfaat bagi para pembaca. untuk mendownload MongoDB bisa klik disini.

Tuesday, February 13, 2018

Uy Scuti, the Biggest Star in the Universe




Looking to the sky at night, watching billions of stars make us feel amazed and also make us think that how small we are. Are you guys ever thinking what is the biggest star in the universe? do you think that sun is the biggest star in the universe? then you're wrong! so what is the biggest star in the universe? the answer is Uy Scuti.

Uy Scuti is the biggest star in the universe that has been discovered. It's red, it's one of the most luminous stars of its kind, and leading candidate to be the biggest known stars since it discovered in 1860 by German astronomers. 
Before Uy Scuti discovered, the biggest star was Westerlund 1 BKS AS. Westerlund 1 BKS AS was beating the biggest star before, that is NML Cygni that was beating VY Canis Majoris. 

Uy Scuti has an estimated radius of 1,708 solar radii, if it is converted to mil it can be 1,054,378,000 – 1,321,450,000 and what if in kilometers? I can't imagine that! it's so big, right? crazy! with that size, Uy Scuti also has an amazing mass. The Astronomers actually have not been able to confirm the mass but if it compared with our sun, the mass of Uy Scuti is about 21 billion heavier than the sun. If Uy Scuti is compared to earth the diameter of Uy Scuti equals to 186,172 times the radius of the Earth and the volume is 6,500,000,000,000,000 times the volume of earth.


If Uy Scuti is placed in our solar system, it will swallow all the planets up to Jupiter or even Saturn. Not only that, but the UY Scuti’s gravity would gobble up the larger planet and distant planetoids of our solar system like an interstellar Pac-Man, and whatever remained unconsumed would take thousands of years to complete a single orbital rotation around the luminescent giant.

In general, the Earth and Uy Scuti are in the same galaxy that is Milky Way but Uy Scuti is in the different constellation with us and it's so far away. So, how far is it? the distance is about 2,9 kiloparsec or 9,500 light years. Uy Scuti is in the Avoidance-zone, the zone in the Milky way where cosmic dust appear that blocking the light so it's quite difficult to observe it.


Friday, February 9, 2018

Everything You Need to Know About Ozone (O3)



Ozone is one of the gasses in the atmosphere. It can be found in three layers of the atmosphere, that are stratosphere, troposphere, and at the ground level. Ozone is made up from three oxygen molecule (O3), its color is pale blue and it has a distinctively pungent smell. Ozone has a different function, depending on where it is located.

How it made?
Ozone is made naturally in the atmosphere. A sunlight split a two-molecule oxygen into one molecule, then these molecules are combining itself with another oxygen molecules and become three oxygen molecule that we call ozone. Other than that, one molecule of oxygen can combine itself with 2 molecules of Nitrogen and become a Nitrogen oxide, and when it blended with sunlight it becomes an Ozone.


Functions of Ozone
As mentioned above, an ozone has a different function, depending on where it is located. When an ozone are located in the stratosphere it protects us and other creatures from Ultraviolet or UV. When an ozone are located in the troposphere ozone become a bad gasses because it contributes to global warming. A tropospheric ozone are made from air pollutant so, its damage us. In the ground level, high concentration of ozone are toxic for people and plants. 

Ozone Depletion
It's so dangerous when an Ozone in the stratosphere are decreasing. It can make so many problems, and one of that is ozone hole. What's make ozone depleting? The most substance is CFCs or Chlorofluorocarbons. CFCs are a gasses that used in refrigerator, AC, and perfume. The CFCs gasses will rise to the top of the ozone and reacts with sunlight. The sunlight can divides the CFCs and make them release their Chlorine molecule. The Chlorine molecule it's able to react with ozone and become chlorine monoxide and oxygen. The chlorine monoxide also can react with another oxygen molecule, if they react it can releasing the chlorine molecule and destroy another ozone again.

Ozone Hole
The ozone hole is an area where an ozone are depleted to the worst level. It's so dangerous for a human being. Ozone hole makes UV radiation increase and if it happens will threaten human health. UV radiation can cause sunburn, allergic reaction, eye problem, weaken the immune system, and the worst is cancer.


Prevent Ozone Depletion
Simple ways that can we do to prevent ozone depletion are limit private vehicle driving, not using pesticides, use eco-friendly products, plant trees. There still more ways to do but those are simple ways that can we do every day.

Thank you for your visit to our blog! be sure you get back to read our other articles! Let's save the world for the better future!

Tuesday, February 6, 2018

Definition of Artificial Intelligence (A.I.)



In this century, we can easily to find a lot of sophisticated objects such as robots, drone, smartphone, computer, etc. Those kind of things are made with a technology named Artificial Intelligence (A.I.).
Some peoples say that A.I. can save the world even Google's CEO says that it is more important than a fire or water, but the others say that A.I. can be harmful for human being.

So, the question is What is Artificial Intelligence? What is Artificial Intelligence for? and Is Artificial Intelligence good or bad?

Artificial Intelligence can be said as a branch of computer science that aims to make an Intelligence as a computer program. The program will be inserted into a machine so that the machine can work like a human. Some examples of the abilities from A.I. are recognizing voices, answering a question, walking, or running.


A.I. usually used by innovators to make an innovation in technological advancement. As time goes by, the human need for technology continues to grow. Innovations for making human work easier keep popping up. There are where A.I. useful, saving time in problem-solving, improve productivity, simplify complex cases.

So is it good or not? The answer is, depending on the human because if we use it for a good one it would be good and if we use it for a bad one it also would be bad.

That's all from us! thank you for reading this articles also for visiting our blog and don't forget to read other articles and come back to this blog. You can share this article too!