Showing posts with label setup. Show all posts
Showing posts with label setup. Show all posts

Saturday, September 16, 2017

Ubuntu 14 04 Setup MariaDB Cluster 5 5 x

Ubuntu 14 04 Setup MariaDB Cluster 5 5 x


In this tutorial we are going to set up a MariaDB 5.5.38 cluster on Ubuntu 14.04 LTS servers. I found this to be much easier than setting up a MySQL cluster, and you can keep your InnoDB tables rather than having to switch over to NDBCLUSTER

. One really can think of MariaDB as a "drop in" replacement of the MySQL database system with no need to change your codebase or learn new skills. Its even being led by some of the original creators of MySQL.

I will be using the
editor
command to edit files, so it is useful if you set your favourite editor before starting this tutorial so that your CLI will automatically go to vim or nano based on what you want.

Cluster Limitations

MariaDB Clusters (and MySQL clusters) dont support table locking. MySQL does support it on the node you query, but thats it.

Preparation

For this tutorial, I am going to be setting up and joining three MariaDB nodes to form a cluster. To do this, I am going to clone an Ubuntu 14.04 64bit Server "Base" Virtualbox instance three times, ensuring to generate new MAC addresses each time, and assign different static IPs.

Why Three Nodes?

In order to avoid a split-brain condition, the minimum recommended number of nodes in a cluster is three. This also handles the failure of a node. However feel free to add more, just no fewer.

I will assign the hostnames

db1.programster.com
,
db2.programster.com
, and
db3.programster.com
appropriately.

I do not own the programster.com domain, hence this only works on my internal LAN on computers that are set to use my internal DNS server.

Steps

    Install the software on all three instances.

    Maria DB 5.5


    sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
    sudo add-apt-repository deb http://mirror.jmu.edu/pub/mariadb/repo/5.5/ubuntu precise main
    sudo apt-get update
    sudo apt-get install mariadb-galera-server galera -y

    # You should already have rsync, but this just ensures you do
    sudo apt-get install rsync -y
    When prompted, enter an administrative password

    Configure The First Node

    sudo editor /etc/mysql/conf.d/cluster.cnf
    Enter the following details (swapping out db1.programster.com with your own domains or IPs accordingly.

    [mysqld]
    binlog_format=ROW
    default-storage-engine=innodb
    innodb_autoinc_lock_mode=2
    query_cache_type=0
    query_cache_size=0
    bind-address=0.0.0.0

    # Galera Provider Configuration
    wsrep_provider=/usr/lib/galera/libgalera_smm.so
    #wsrep_provider_options="gcache.size=32G"

    # Galera Cluster Configuration
    wsrep_cluster_name="my_db_cluster"
    wsrep_cluster_address="gcomm://db1.programster.com,db2.programster.com,db3.programster.com"

    # Galera Synchronization Congifuration
    wsrep_sst_method=rsync
    #wsrep_sst_auth=user:pass

    # Galera Node Configuration
    wsrep_node_address="192.168.1.11"
    wsrep_node_name="db1.programster.com"

    Configure The Secondary Nodes

    Now copy that file (
    /etc/mysql/conf.d/cluster.cnf
    ) onto the other two nodes, changing the last two variables,
    wsrep_node_address
    , and
    wsrep_node_name
    accordingly.

    Stop All Services

    Stop all the services on all of the nodes:
    sudo service mysql stop
    sudo killall mysqld

    Start The Primary Node

    To start the cluster the first node needs to know that there are not any other nodes to connect to, so start it with the following command:
    sudo service mysql start --wsrep-new-cluster

    Add The Other Nodes

    Once a cluster node is already up, other nodes can now join the cluster.
    sudo service mysql start
    Your cluster should now be online and communicating.

    Extra Step - Copy The Debian Maintenance Configuration

    As we copied the data from the first node to the others, the credentials in
    /etc/mysql/debian.cnf
    don�t match. This means we will not be able to shutdown mysqld on either of the secondary nodes. To fix this, copy the
    /etc/mysql/debian.cnf
    file from the primary node into the secondary nodes.
    sudo editor /etc/mysql/debian.cnf

Test Its Working

    Log into one of the nodes.
    mysql -u root -p [password you entered at installation]
    Enter the command below and you should see the value 3 for 3 connected nodes.

    SHOW STATUS LIKE wsrep_cluster_size%;

References

  • Getting Started with MariaDB Galera Cluster
  • How To Configure a Galera Cluster with MariaDB on Ubuntu 12.04 Servers
  • MariaDB Downloads

download file now

Read more »

Sunday, September 10, 2017

Tutorial Setting Mikrotik RB dari Awal Sampai Terkoneksi Dengan Internet Basic Setup Mikrotik

Tutorial Setting Mikrotik RB dari Awal Sampai Terkoneksi Dengan Internet Basic Setup Mikrotik


Saya asumsikan anda sudah mengenal hardware mikrotik dimana nanti kita akan me-reset awal setting default konfigurasi agar mikrotik menjadi nol konfigurasi, langkah yang harus kita lakukan agar mikrotik Rb kita bisa tekoneksi dengan internet adalah sebagai berikut :
Planing Topologi :
Ether1 : Internet // 192.168.10.2/24 => Modem Ip : 192.168.10.1
Ether2 : LAN    // 192.168.2.1/24 => Client DHCP : 192.168.2.2-254
  • Masuk ke mikrotik RB dengan menu winbox , bisa dengan media Mac Address atau bisa dengan media IP Address Lan Mikrotik RB ( Jika via IP maka tancapkan Lan kita ke mikrotik RB ether-2 , IP defaultnya adalah 192.168.88.1 dan saya asumsikan anda sudah faham mengenai setting Lan di IP di Laptop/PC, karna jika masuk winbox via IP anda wajib setting LAN di laptop/pc anda dan wajib satu subnet dengan Rb Mikrotiknya.lihat gambar dibawah dan jangan lupa di klik Connect :
  • Setelah terkoneksi dengan Rb Mikrotik, lanjut dengan remove konfigurasinya agar kita bisa setting manual sesuai keinginan. lihat gambar dibawah !
  •  Langkah pertama yang harus kita lakukan adalah memberi identitas, password dan ip address
  • Berikan password login, ikuti langkahya dibawah ini : 

  • Untuk langkah selanjutnya, kita berikan comment terlebih dahulu disetiap Ethernet / Port agar memudahkan kita mengingat ID ether interface, ikuti langkah sbb : 

 Berikut beberapa ethernet yang sudah diberikan label/comment :
  •  Kemudian kita akan menghubungkan router ke Internet, sebelumnya pastikan dulu untuk ethernet yang terhubung ke Internet ( Modem ) disini adalah ether1, ikuti langkah berikut :
  • Selanjutnya kita akan memasukkan default gatway IP Internet ke menu route, Jika berhasil maka akan terdapa keterangan reachable, ikuti langkah berikut :
  • Kemudian buatlah IP Address local, disini topologi di ether2 dengan IP 192.168.2.1/24

  • Selanjutnya kita masuk NAT masquerade terlebih dahulu agar IP Private 192.168.2.0/24 di izinkan mengakses Internet menggunakan IP Publik, karena tidak akan mungkin sebuah IP Private di jaringan LAN bisa mengakses Internet tanpa mekanisme NAT, Ikuti langkah sbb :

    • Terakhir, kita membuat DHCP Server, yang berfungsi untuk memberikan IP otomatis kepada setiap client sehingga administrator tidak perlu memberikan IP secara manual, ikuti langkahnya dibawah ini :

    Selesai Untuk setting awal mikrotik agar terkoneksi dengan internet, dan share local ip dengan dhcp client

    Mode CLI

    /system identity
    set name="Mikroserver"

    /interface ethernet
    set [ find default-name=ether1 ] name=ether1-Internet
    set [ find default-name=ether2 ] name=ether2-LAN

    /ip address
    add address=192.168.10.2/24 comment="Internet" interface=ether1-Internet
        network=192.168.10.0
    add address=192.168.2.1/24 comment=Local interface=ether2-LAN network=
        192.168.2.0
      
    /ip dhcp-server
    add address-pool=dhcp-lan disabled=no interface=ether2-LAN lease-time=1h name=
        dhcp

    /ip dhcp-server network
    add address=192.168.2.0/24 comment="hotspot network" gateway=192.168.2.1
      
    /ip pool
    add name=pool-lan ranges=192.168.2.2-192.168.5.254

    /ip dns
    set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4

    /ip firewall nat
    add action=masquerade chain=srcnat

    /ip route
    add comment="Default Route" distance=1 gateway=192.168.10.1
    Copy - Paste di New Terminal

    Source/Reference :
    - http://mikrotik.co.id

    download file now

    Read more »

    Tuesday, September 5, 2017

    UFS NEW SETUP 2 3 0 0 SUCCESSFULLY INSTAL WITH FULL INSTRUCTION BY KHALID Gill

    UFS NEW SETUP 2 3 0 0 SUCCESSFULLY INSTAL WITH FULL INSTRUCTION BY KHALID Gill


    UFS NEW SETUP 2.3.0.0 SUCCESSFULLY INSTAL WITH FULL INSTRUCTION BY KHALID Gill












    FIRST FORGET ALL OLD SETUP
    THEN REMOVE OR UNINSTALL OLD SETUP FROM PC
    NOW DOWNLOAD BELOW SETUP


    NOW OPEN THIS SETUP UFS PANEL
    1-CLICK ON CHECK BOX
    2-CLICK ON UPDATE BOX
    3-AGAIN CHECK BOX
    4-NOW CLICK CHECK SERVER





    download file now

    Read more »