<?xml version="1.0" encoding="UTF-8" standalone="no"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:gd="http://schemas.google.com/g/2005" xmlns:georss="http://www.georss.org/georss" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-1026424054105678970</atom:id><lastBuildDate>Mon, 26 Oct 2026 09:10:12 +0000</lastBuildDate><category>BlockChain</category><category>Cryptocurrency</category><category>HyperLedger</category><category>Centos</category><category>SSH</category><category>linux</category><category>AWS S3</category><category>Amazon S3</category><category>Apache</category><category>Bandwidth</category><category>Centos Update</category><category>DOS</category><category>Fabric</category><category>Firewall</category><category>Firewalld</category><category>MikroTik</category><category>Network</category><category>OpenSSL</category><category>RAM</category><category>S3 Bucket</category><category>SFTP</category><category>SSL</category><category>Swap</category><category>Technology</category><category>batch</category><category>brute force</category><category>httpd</category><category>https</category><category>windows</category><title>Do Something Different...</title><description></description><link>http://page.farhad.pw/</link><managingEditor>noreply@blogger.com (Farhad)</managingEditor><generator>Blogger</generator><openSearch:totalResults>48</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><language>en-us</language><itunes:explicit>no</itunes:explicit><itunes:subtitle/><itunes:owner><itunes:email>noreply@blogger.com</itunes:email></itunes:owner><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1026424054105678970.post-8901992123689979403</guid><pubDate>Sun, 19 Jul 2026 09:21:35 +0000</pubDate><atom:updated>2026-07-19T15:30:34.153+06:00</atom:updated><title>Deploying a strongSwan IKEv2 VPN Server for Native Android 12+ Connectivity</title><description>&lt;p&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxhiP_Y51GAOhcCqcxC6aTDp6pIVU0uqAo9VM6xEcKonCQkKEkXDm_F34p3HAzIY6ELFpSUsGF2RVranlgRft0s04InP9WP7ASs97JQXe3eu5474c5WOVmt4CiBgtGTRVkss6C1itoSFRUuERs4FnZXtPjkJRZOOPiIVd5H1I_TR8McWwpcqoGMWAAdxc/s1024/stronswan-ikev2-android.jpg"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxhiP_Y51GAOhcCqcxC6aTDp6pIVU0uqAo9VM6xEcKonCQkKEkXDm_F34p3HAzIY6ELFpSUsGF2RVranlgRft0s04InP9WP7ASs97JQXe3eu5474c5WOVmt4CiBgtGTRVkss6C1itoSFRUuERs4FnZXtPjkJRZOOPiIVd5H1I_TR8McWwpcqoGMWAAdxc/w640-h350/stronswan-ikev2-android.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;div class="strongswan-tutorial-wrapper"&gt;
    &lt;style&gt;
        .strongswan-tutorial-wrapper { line-height: 1.6; color: #333; width: 100%; }
        .strongswan-tutorial-wrapper h1 { color: #2c3e50; border-bottom: 2px solid #3498db; padding-bottom: 10px; margin-top: 0; }
        .strongswan-tutorial-wrapper h2 { color: #2980b9; margin-top: 2rem; }
        .strongswan-tutorial-wrapper .step { background: #fff; padding: 1.5rem; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); margin-bottom: 1.5rem; border: 1px solid #e1e8ed; }
        .strongswan-tutorial-wrapper code { background: #2d3436; color: #dfe6e9; padding: 2px 6px; border-radius: 4px; font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; font-size: 0.9em; }
        .strongswan-tutorial-wrapper pre { background: #2d3436; color: #dfe6e9; padding: 1rem; border-radius: 8px; overflow-x: auto; font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; font-size: 0.9em; margin: 1rem 0; }
        .strongswan-tutorial-wrapper .note { background: #fff3cd; border-left: 5px solid #ffc107; padding: 1rem; margin: 1rem 0; border-radius: 4px; color: #856404; }
        .strongswan-tutorial-wrapper .ip-placeholder { color: #ff7675; font-weight: bold; }
    &lt;/style&gt;

    &lt;h1&gt;How to Build an IKEv2 VPN Server for Android (Ubuntu 22.04)&lt;/h1&gt;
    &lt;p&gt;This guide walks you through setting up a &lt;strong&gt;strongSwan&lt;/strong&gt; VPN server that is natively compatible with Android's built-in IKEv2/IPSec MSCHAPv2 client.&lt;/p&gt;

    &lt;div class="step"&gt;
        &lt;h2&gt;Step 1: Install Dependencies&lt;/h2&gt;
        &lt;p&gt;Update your system and install strongSwan along with the EAP plugins required for Android authentication.&lt;/p&gt;
        &lt;pre&gt;sudo apt update &amp;&amp; sudo apt upgrade -y
sudo apt install strongswan strongswan-pki libcharon-extra-plugins libcharon-extauth-plugins libstrongswan-extra-plugins -y&lt;/pre&gt;
    &lt;/div&gt;

    &lt;div class="step"&gt;
        &lt;h2&gt;Step 2: Generate PKI Certificates&lt;/h2&gt;
        &lt;p&gt;The server needs a Certificate Authority (CA) and a Server Certificate to prove its identity to your phone.&lt;/p&gt;
        &lt;pre&gt;# 1. Create CA Key and Certificate
ipsec pki --gen --type rsa --size 4096 --outform pem &gt; ~/ca-key.pem
ipsec pki --self --ca --lifetime 3650 --in ~/ca-key.pem --type rsa --dn "CN=VPN CA" --outform pem &gt; ~/ca-cert.pem

# 2. Create Server Key and Certificate
# REPLACE YOUR_SERVER_IP with your actual server IP
ipsec pki --gen --type rsa --size 4096 --outform pem &gt; ~/server-key.pem
ipsec pki --pub --in ~/server-key.pem --type rsa | ipsec pki --issue --lifetime 3650 --cacert ~/ca-cert.pem --cakey ~/ca-key.pem --dn "CN=YOUR_SERVER_IP" --san YOUR_SERVER_IP --flag serverAuth --outform pem &gt; ~/server-cert.pem

# 3. Move to system directories
sudo cp ~/ca-cert.pem /etc/ipsec.d/cacerts/
sudo cp ~/server-cert.pem /etc/ipsec.d/certs/
sudo cp ~/server-key.pem /etc/ipsec.d/private/&lt;/pre&gt;
    &lt;/div&gt;

    &lt;div class="step"&gt;
        &lt;h2&gt;Step 3: Configure strongSwan (ipsec.conf)&lt;/h2&gt;
        &lt;p&gt;Edit &lt;code&gt;/etc/ipsec.conf&lt;/code&gt; and replace its content with the following (update the IP address!):&lt;/p&gt;
        &lt;pre&gt;config setup
    charondebug="ike 2, knl 2, cfg 2"
    uniqueids=yes

conn ikev2-vpn
    auto=add
    compress=no
    type=tunnel
    keyexchange=ikev2
    fragmentation=yes
    forceencaps=yes
    dpdaction=clear
    dpddelay=300s
    rekey=no
    left=%any
    leftid=&lt;span class="ip-placeholder"&gt;YOUR_SERVER_IP&lt;/span&gt;
    leftcert=server-cert.pem
    leftsendcert=always
    leftsubnet=0.0.0.0/0
    right=%any
    rightid=%any
    rightauth=eap-mschapv2
    rightsourceip=10.10.10.0/24
    rightdns=8.8.8.8, 8.8.4.4
    eap_identity=%identity&lt;/pre&gt;
    &lt;/div&gt;

    &lt;div class="step"&gt;
        &lt;h2&gt;Step 4: Set Credentials (ipsec.secrets)&lt;/h2&gt;
        &lt;p&gt;Define your server key and user login in &lt;code&gt;/etc/ipsec.secrets&lt;/code&gt;:&lt;/p&gt;
        &lt;pre&gt;: RSA "server-key.pem"
your_username : EAP "your_password"&lt;/pre&gt;
    &lt;/div&gt;

    &lt;div class="step"&gt;
        &lt;h2&gt;Step 5: Networking &amp; Firewall&lt;/h2&gt;
        &lt;p&gt;Enable IP forwarding and set up NAT so the VPN has internet access.&lt;/p&gt;
        &lt;pre&gt;# Enable Forwarding
echo "net.ipv4.ip_forward = 1" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

# Open Ports
sudo ufw allow 500/udp
sudo ufw allow 4500/udp&lt;/pre&gt;
        &lt;p&gt;Add the NAT rule to the top of &lt;code&gt;/etc/ufw/before.rules&lt;/code&gt; (above *filter):&lt;/p&gt;
        &lt;pre&gt;*nat
:POSTROUTING ACCEPT [0:0]
-A POSTROUTING -s 10.10.10.0/24 -o eth0 -j MASQUERADE
COMMIT&lt;/pre&gt;
    &lt;/div&gt;

    &lt;div class="note"&gt;
        &lt;strong&gt;Final Note:&lt;/strong&gt; Remember to transfer &lt;code&gt;ca-cert.pem&lt;/code&gt; to your phone and install it as a "CA Certificate" in settings before connecting!
    &lt;/div&gt;
&lt;/div&gt;</description><link>http://page.farhad.pw/2026/07/deploying-strongswan-ikev2-vpn-server.html</link><author>noreply@blogger.com (Farhad)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxhiP_Y51GAOhcCqcxC6aTDp6pIVU0uqAo9VM6xEcKonCQkKEkXDm_F34p3HAzIY6ELFpSUsGF2RVranlgRft0s04InP9WP7ASs97JQXe3eu5474c5WOVmt4CiBgtGTRVkss6C1itoSFRUuERs4FnZXtPjkJRZOOPiIVd5H1I_TR8McWwpcqoGMWAAdxc/s72-w640-h350-c/stronswan-ikev2-android.jpg" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1026424054105678970.post-6055066086590614485</guid><pubDate>Mon, 17 Mar 2025 08:29:00 +0000</pubDate><atom:updated>2026-07-19T15:46:58.308+06:00</atom:updated><title>Setting Up MariaDB MaxScale Binlog Proxy for backup/failover</title><description>&lt;p&gt;&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQwRMOn-OaegmoGpaVCKwV9C-rMpLrIqviGlfatgEDOoNVIIjKwzhhlrWG57KCAIA1tovqIrI1mNxe6XS0u0xlexHHbQYzndiZTimg1wEONVyKsi1Xw6vpLvf86VSm8uno58OcDGknJgO9ZTGuhJEanBL79x5zVf6BcuHMWSs7qQKaadAXERrShewZwdo/s657/complete_setup.jpg" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="657" data-original-width="635" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQwRMOn-OaegmoGpaVCKwV9C-rMpLrIqviGlfatgEDOoNVIIjKwzhhlrWG57KCAIA1tovqIrI1mNxe6XS0u0xlexHHbQYzndiZTimg1wEONVyKsi1Xw6vpLvf86VSm8uno58OcDGknJgO9ZTGuhJEanBL79x5zVf6BcuHMWSs7qQKaadAXERrShewZwdo/s320/complete_setup.jpg" width="309" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&amp;nbsp;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;div class="maxscale-tutorial-wrapper"&gt;
    &lt;style&gt;
        .maxscale-tutorial-wrapper { line-height: 1.6; color: #333; width: 100%; }
        .maxscale-tutorial-wrapper h1 { color: #2c3e50; border-bottom: 2px solid #3498db; padding-bottom: 10px; margin-top: 0; }
        .maxscale-tutorial-wrapper h2 { color: #2980b9; margin-top: 2rem; }
        .maxscale-tutorial-wrapper .step { background: #fff; padding: 1.5rem; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); margin-bottom: 1.5rem; border: 1px solid #e1e8ed; }
        .maxscale-tutorial-wrapper code { background: #2d3436; color: #dfe6e9; padding: 2px 6px; border-radius: 4px; font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; font-size: 0.9em; }
        .maxscale-tutorial-wrapper pre { background: #2d3436; color: #dfe6e9; padding: 1rem; border-radius: 8px; overflow-x: auto; font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; font-size: 0.9em; margin: 1rem 0; }
        .maxscale-tutorial-wrapper .note { background: #d4edda; border-left: 5px solid #28a745; padding: 1rem; margin: 1rem 0; border-radius: 4px; color: #155724; }
        .maxscale-tutorial-wrapper .config-value { color: #ffeaa7; }
        .maxscale-tutorial-wrapper .config-comment { color: #74b9ff; }
    &lt;/style&gt;

    &lt;h1&gt;Setting Up MariaDB MaxScale Binlog Proxy&lt;/h1&gt;
    &lt;p&gt;MariaDB MaxScale Binlog Server acts as an intermediate master replication proxy. By storing binary logs and serving them to replicas, it enables scalable replication architectures, reduces primary database load, and accelerates disaster recovery.&lt;/p&gt;

    &lt;div class="step"&gt;
        &lt;h2&gt;Step 1: Install MariaDB MaxScale&lt;/h2&gt;
        &lt;p&gt;Install MaxScale using the package manager appropriate for your Linux distribution, then verify the installation.&lt;/p&gt;
        
        &lt;p&gt;&lt;strong&gt;On Ubuntu/Debian:&lt;/strong&gt;&lt;/p&gt;
        &lt;pre&gt;sudo apt-get update
sudo apt-get install maxscale&lt;/pre&gt;

        &lt;p&gt;&lt;strong&gt;On RHEL/CentOS:&lt;/strong&gt;&lt;/p&gt;
        &lt;pre&gt;sudo yum install maxscale&lt;/pre&gt;

        &lt;p&gt;&lt;strong&gt;Verify the installation:&lt;/strong&gt;&lt;/p&gt;
        &lt;pre&gt;maxscale --version&lt;/pre&gt;
    &lt;/div&gt;

    &lt;div class="step"&gt;
        &lt;h2&gt;Step 2: Configure MaxScale as a Binlog Proxy&lt;/h2&gt;
        &lt;p&gt;Open MaxScale's core configuration file to establish the routing properties and specify your database backend configuration.&lt;/p&gt;
        &lt;pre&gt;sudo nano /etc/maxscale.cnf&lt;/pre&gt;
        
        &lt;p&gt;Add the following configurations for the monitor block and the binlog router service:&lt;/p&gt;
        &lt;pre&gt;[maxscale]
threads=4

[Replication-Monitor]
type=monitor
module=mariadbmon
servers=primary-db,replica-db1,replica-db2
user=maxscale
password=maxpass
monitor_interval=10000
auto_failover=true

[Binlog-Server]
type=service
router=binlogrouter
servers=primary-db
user=maxscale
password=maxpass
filestem=binlog
binlogdir=/var/lib/maxscale/binlogs
gtid_strict_mode=on&lt;/pre&gt;
        &lt;p&gt;Key parameters defined above:&lt;/p&gt;
        &lt;ul&gt;
            &lt;li&gt;&lt;code&gt;router=binlogrouter&lt;/code&gt;: Directs MaxScale to act explicitly as a binlog proxy proxying system.&lt;/li&gt;
            &lt;li&gt;&lt;code&gt;binlogdir&lt;/code&gt;: The dedicated storage directory where MaxScale caches binary logs locally.&lt;/li&gt;
        &lt;/ul&gt;
    &lt;/div&gt;

    &lt;div class="step"&gt;
        &lt;h2&gt;Step 3: Set Up Users on the Primary Database&lt;/h2&gt;
        &lt;p&gt;Access the primary database instance to provision administrative credentials and replication authority to MaxScale.&lt;/p&gt;
        &lt;pre&gt;mysql -u root -p&lt;/pre&gt;
        
        &lt;p&gt;Execute the following queries to create the proxy user account and apply capabilities:&lt;/p&gt;
        &lt;pre&gt;CREATE USER 'maxscale'@'%' IDENTIFIED BY 'maxpass';
GRANT REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'maxscale'@'%';
FLUSH PRIVILEGES;&lt;/pre&gt;
    &lt;/div&gt;

    &lt;div class="step"&gt;
        &lt;h2&gt;Step 4: Start and Enable MaxScale&lt;/h2&gt;
        &lt;p&gt;Register MaxScale with the system init daemon to start automatically upon booting, then initiate the runtime service process.&lt;/p&gt;
        &lt;pre&gt;sudo systemctl enable maxscale
sudo systemctl start maxscale
sudo systemctl status maxscale&lt;/pre&gt;
    &lt;/div&gt;

    &lt;div class="step"&gt;
        &lt;h2&gt;Step 5: Configure Replica Servers to Use MaxScale&lt;/h2&gt;
        &lt;p&gt;Log into each of your target replica database nodes. Point their data-fetching routes directly to your MaxScale proxy instance instead of targeting the primary database node infrastructure directly.&lt;/p&gt;
        &lt;pre&gt;CHANGE MASTER TO
    MASTER_HOST='maxscale-server-ip',
    MASTER_PORT=3306,
    MASTER_USER='maxscale',
    MASTER_PASSWORD='maxpass',
    MASTER_LOG_FILE='binlog.000001',
    MASTER_LOG_POS=4;

START SLAVE;&lt;/pre&gt;
        
        &lt;p&gt;Verify that your data stream pipeline status reflects normal active operation:&lt;/p&gt;
        &lt;pre&gt;SHOW SLAVE STATUS\G;&lt;/pre&gt;
    &lt;/div&gt;

    &lt;div class="note"&gt;
        &lt;strong&gt;Conclusion:&lt;/strong&gt; Implementing the MariaDB MaxScale Binlog Proxy architecture successfully insulates your primary production database against high-volume read replica scaling loads, provides a robust localized binlog caching layer for fast disaster recovery, and automates high-availability database cluster failovers.
    &lt;/div&gt;
&lt;/div&gt;</description><link>http://page.farhad.pw/2025/03/setting-up-mariadb-maxscale-binlog.html</link><author>noreply@blogger.com (Farhad)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQwRMOn-OaegmoGpaVCKwV9C-rMpLrIqviGlfatgEDOoNVIIjKwzhhlrWG57KCAIA1tovqIrI1mNxe6XS0u0xlexHHbQYzndiZTimg1wEONVyKsi1Xw6vpLvf86VSm8uno58OcDGknJgO9ZTGuhJEanBL79x5zVf6BcuHMWSs7qQKaadAXERrShewZwdo/s72-c/complete_setup.jpg" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1026424054105678970.post-3829837645460261445</guid><pubDate>Fri, 15 Dec 2023 16:29:00 +0000</pubDate><atom:updated>2023-12-17T10:58:46.820+06:00</atom:updated><title>Deploying a laravel app using nginx alias </title><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3P8RdRbpD-fY1gNZQP5m7vvniaWZ-IHaJRLpgvdKV97xD58Nx4Tk_aqrByxgn8IAauumaZIcCBG6URDnX2dAzhhyxBn-XfpVMZjtBKHdYgM2eAonOQ_y-gNFjrhRHc_i5yHR6GA_dIRK3_eUsf-AwxrCwVBpZSHAP3rFmAS9fa9NGnWSV1eEzbYyI2fI/s363/1626875346009.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="252" data-original-width="363" height="222" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3P8RdRbpD-fY1gNZQP5m7vvniaWZ-IHaJRLpgvdKV97xD58Nx4Tk_aqrByxgn8IAauumaZIcCBG6URDnX2dAzhhyxBn-XfpVMZjtBKHdYgM2eAonOQ_y-gNFjrhRHc_i5yHR6GA_dIRK3_eUsf-AwxrCwVBpZSHAP3rFmAS9fa9NGnWSV1eEzbYyI2fI/s320/1626875346009.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;pre&gt;        
        &lt;code style="background-color: #eeeeee; border: 1px solid rgb(153, 153, 153); display: block; overflow: auto; padding: 20px;"&gt;   
    server {
    listen 80;
    server_name subdomian.example.com;
    root /var/www/mainapp/;

    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Content-Type-Options "nosniff";

    index index.html index.htm index.php;

    charset utf-8;
    error_log  /var/log/nginx/error.log  warn;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location = /favicon.ico { access_log off; log_not_found off; }
    location = /robots.txt  { access_log off; log_not_found off; }

    error_page 404 /index.php;

    location ~ \.php$ {
        fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
        include fastcgi_params;
    }


        location  /laravelapp {
        alias  /var/www/mainapp/laravelapp/public;
        index   index.php index.html index.html;
        try_files  $uri $uri/  @nested;

        location ~ \.php$ {
            fastcgi_pass   unix:/var/run/php/php8.1-fpm.sock;
            fastcgi_index   index.php;
            fastcgi_param  SCRIPT_FILENAME  $request_filename;
            include        fastcgi_params;
         }
     }


     location @nested {
        rewrite /laravelapp/(.*)$ /laravelapp/index.php?/$1 last;
     }

     location ~ /\.(?!well-known).* {
        deny all;
     }

} &lt;code&gt;&lt;/code&gt;
        &lt;/code&gt;
&lt;/pre&gt;</description><link>http://page.farhad.pw/2023/12/deploying-laravel-app-using-nginx-alias.html</link><author>noreply@blogger.com (Farhad)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3P8RdRbpD-fY1gNZQP5m7vvniaWZ-IHaJRLpgvdKV97xD58Nx4Tk_aqrByxgn8IAauumaZIcCBG6URDnX2dAzhhyxBn-XfpVMZjtBKHdYgM2eAonOQ_y-gNFjrhRHc_i5yHR6GA_dIRK3_eUsf-AwxrCwVBpZSHAP3rFmAS9fa9NGnWSV1eEzbYyI2fI/s72-c/1626875346009.png" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1026424054105678970.post-3759118490641601469</guid><pubDate>Thu, 14 Sep 2023 11:56:00 +0000</pubDate><atom:updated>2023-09-14T17:56:18.266+06:00</atom:updated><title>Get wifi password easily from a windows PC</title><description>&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiz0vI1kCyF_iZY2DydFGUccevQepAgvjsf36fg2jJ4mC-g5hzeHUEmbMGNiIwcHaTJSyQ-CNCLGPeUyXZZQ26oVfvP0Z8YGffXdUJZ91W111Hxiu59DO7h4z_4AkfxKAG3uMnkIAt8JygwnpZzG30hZUP4Np3eGyPEKUqLZhtd56aDfNTrDL00ADUkPbw/s1920/wifi-password-guest-room-printable_366959.jpg" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="972" data-original-width="1920" height="307" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiz0vI1kCyF_iZY2DydFGUccevQepAgvjsf36fg2jJ4mC-g5hzeHUEmbMGNiIwcHaTJSyQ-CNCLGPeUyXZZQ26oVfvP0Z8YGffXdUJZ91W111Hxiu59DO7h4z_4AkfxKAG3uMnkIAt8JygwnpZzG30hZUP4Np3eGyPEKUqLZhtd56aDfNTrDL00ADUkPbw/w606-h307/wifi-password-guest-room-printable_366959.jpg" width="606" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;How to get saved wifi password from a windows machines easily.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Vulnerability: A hacker can easily use this trick if he can access a windows machine, get all the saved wifi password, implant a backdoor into the machine and try to access other devices connected to that wifi. So, keep secure your windows PC by using latest antivirus, firewall.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Let's get started.....&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Open cmd and type "netsh wlan show profile"&lt;/p&gt;&lt;p&gt;It will show all the saved wifi profile in your PC.&lt;/p&gt;&lt;p&gt;Now select a profile to get it's password.&lt;/p&gt;&lt;p&gt;netsh wlan show profile name="Finix" key=clear&lt;/p&gt;&lt;p&gt;It will show detail of the SSID with a value "Key Content" under "Security Settings" that is the wifi password.&lt;/p&gt;&lt;p&gt;Have fun.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;iframe allowfullscreen="" class="BLOG_video_class" height="380" src="https://www.youtube.com/embed/OLtyYN2qzCs" width="628" youtube-src-id="OLtyYN2qzCs"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;</description><link>http://page.farhad.pw/2023/09/get-wifi-password-easily-from-windows-pc.html</link><author>noreply@blogger.com (Farhad)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiz0vI1kCyF_iZY2DydFGUccevQepAgvjsf36fg2jJ4mC-g5hzeHUEmbMGNiIwcHaTJSyQ-CNCLGPeUyXZZQ26oVfvP0Z8YGffXdUJZ91W111Hxiu59DO7h4z_4AkfxKAG3uMnkIAt8JygwnpZzG30hZUP4Np3eGyPEKUqLZhtd56aDfNTrDL00ADUkPbw/s72-w606-h307-c/wifi-password-guest-room-printable_366959.jpg" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1026424054105678970.post-8056275910466356645</guid><pubDate>Wed, 22 Feb 2023 04:33:00 +0000</pubDate><atom:updated>2023-02-22T10:33:05.286+06:00</atom:updated><title>Setup a Multi-Protocol VPN Server Using SoftEther on Centos7</title><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgzw-azeRk0x7qi1R4s-SRFpyy4eCVddqy-wLZkkTIGyt68ljBkTPXoXryypnRxjGwPnC-SR8aGzvJWcK9DBHg7wQnlP1xE6gt_1NdQgSRzq9_ZRZDDRK2U1VOu9GBLDtRVAtu8yc_2nNL_SWorhr72v1_kYsylVUomevvZhj8Ekq7G1pUyFZHafek/s830/softether-vpn-logo.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="300" data-original-width="830" height="116" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgzw-azeRk0x7qi1R4s-SRFpyy4eCVddqy-wLZkkTIGyt68ljBkTPXoXryypnRxjGwPnC-SR8aGzvJWcK9DBHg7wQnlP1xE6gt_1NdQgSRzq9_ZRZDDRK2U1VOu9GBLDtRVAtu8yc_2nNL_SWorhr72v1_kYsylVUomevvZhj8Ekq7G1pUyFZHafek/s320/softether-vpn-logo.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3 id="introduction" style="box-sizing: border-box; color: #4d5b7c; font-family: Epilogue, sans-serif; margin: 0px 0px 1em;"&gt;Introduction&lt;/h3&gt;&lt;hr style="box-sizing: content-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; height: 0px; overflow: visible;" /&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;This article explains how to install and configure a multi-protocol VPN server using the SoftEther package. We enable and configure OpenVPN and L2TP over IPSec and SSTP VPN Servers on Linux.&lt;/p&gt;&lt;h2 id="what-is-softether" style="box-sizing: border-box; color: #4d5b7c; font-family: Epilogue, sans-serif; margin: 1em 0px;"&gt;What is SoftEther&lt;/h2&gt;&lt;hr style="box-sizing: content-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; height: 0px; overflow: visible;" /&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;SoftEther VPN is one of the world’s most powerful and easy-to-use multi-protocol VPN software, made by the good folks at the University of Tsukuba, Japan. It runs on Windows, Linux, Mac, FreeBSD and Solaris and is freeware and open-source. You can use SoftEther for any personal or commercial use free of charge.&lt;/p&gt;&lt;h2 id="step-1-create-a-virtual-server" style="box-sizing: border-box; color: #4d5b7c; font-family: Epilogue, sans-serif; margin: 1em 0px;"&gt;Step 1: Create a Virtual Server&lt;/h2&gt;&lt;hr style="box-sizing: content-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; height: 0px; overflow: visible;" /&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;First, you need to create a DigitalOcean Droplet. As mentioned in SoftEther’s website, SoftEther will work on almost every Linux distro with kernel v2.4 or above,; however it’s recommended to choose one of these distributions: CentOS, Fedora, or Red Hat Enterprise Linux.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Personally I have tried it on Ubuntu, CentOS and Fedora, both 32 and 64 bit editions, and it has worked perfectly.&lt;/p&gt;&lt;h2 id="step-2-update-your-server-software" style="box-sizing: border-box; color: #4d5b7c; font-family: Epilogue, sans-serif; margin: 1em 0px;"&gt;Step 2: Update your Server Software&lt;/h2&gt;&lt;hr style="box-sizing: content-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; height: 0px; overflow: visible;" /&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Using the command below, update and upgrade your server software packages to the latest version:&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;Debian / Ubuntu:&lt;/span&gt;&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;apt-get update &amp;amp;&amp;amp; apt-get upgrade
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;CentOS / Fedora:&lt;/span&gt;&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;yum upgrade
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="step-3-download-softether" style="box-sizing: border-box; color: #4d5b7c; font-family: Epilogue, sans-serif; margin: 1em 0px;"&gt;Step 3: Download SoftEther&lt;/h2&gt;&lt;hr style="box-sizing: content-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; height: 0px; overflow: visible;" /&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;You can download the latest SoftEther server package for Linux from their website:&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;&lt;a href="http://www.softether-download.com/en.aspx?product=softether" style="border-bottom: 1px solid rgb(0, 105, 255); box-sizing: border-box; color: #0069ff; text-decoration-line: none; transition: color 0.25s ease 0s, border-bottom-color 0.25s ease 0s;"&gt;Download SoftEther&lt;/a&gt;&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Unfortunately, there is no way of getting the latest version through package managers (or even using a single url) at the moment. Therefore you have to browse their website using a desktop browser to download the package. There are a couple of ways of dealing with this: First, browse their website on your own computer and then depending on your server configuration (OS, x86/x64, etc.) find the link to the appropriate package then use&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;wget&lt;/span&gt;&amp;nbsp;to download the package to your server. Alternatively, you can use a terminal based web browser such as&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;lynx&lt;/span&gt;&amp;nbsp;to browse the SoftEther website and download the right package.&lt;/p&gt;&lt;h3 id="here-s-how-to-do-it-using-lynx" style="box-sizing: border-box; color: #4d5b7c; font-family: Epilogue, sans-serif; margin: 1em 0px;"&gt;Here’s how to do it using lynx:&lt;/h3&gt;&lt;hr style="box-sizing: content-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; height: 0px; overflow: visible;" /&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;First install lynx on your server:&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;Debian / Ubuntu:&lt;/span&gt;&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;apt-get install lynx -y
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;CentOS / Fedora:&lt;/span&gt;&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;yum install lynx -y
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Now using the command below browse the SoftEther download webpage:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;lynx http://www.softether-download.com/files/softether/
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;&lt;img alt="Browsing SoftEther Files List Using Lynx" src="https://assets.digitalocean.com/articles/vpn_softether/img1.png" style="border-radius: 16px; border: 2px solid rgb(227, 232, 244); box-sizing: border-box; display: block; margin: 1rem auto; max-width: 100%;" /&gt;&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;This page contains all versions of the SoftEther available. Choose which version you want (in this tutorial we use v2.00-9387-rtm-2013.09.16) and then press Enter to go to the link. Now choose&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;Linux&lt;/span&gt;&amp;nbsp;and in the next page choose&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;SoftEther VPN Server&lt;/span&gt;. Depending on your server hardware architecture, choose a package; the&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;32bit - Intel x86&lt;/span&gt;&amp;nbsp;and&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;64bit - Intel x64 or AMD64&lt;/span&gt;&amp;nbsp;work for DigitalOcean 32bit or 64bit droplets. Finally download the tar file from the next page by pressing the “D” key on the link, and choose “Save to disk” when asked by Lynx. After the file is saved, we can press “Q” to quit Lynx and move on with the installation.&lt;/p&gt;&lt;h2 id="step-4-install-and-configure-softether" style="box-sizing: border-box; color: #4d5b7c; font-family: Epilogue, sans-serif; margin: 1em 0px;"&gt;Step 4: Install and Configure SoftEther&lt;/h2&gt;&lt;hr style="box-sizing: content-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; height: 0px; overflow: visible;" /&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Now we have to extract the package we received from the SoftEther download page and compile it. The package used in this tutorial is named&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;softether-vpnserver-v2.00-9387-rtm-2013.09.16-linux-x86-32bit.tar.gz&lt;/span&gt;&amp;nbsp;so we will extract it using the command below:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt; tar xzvf softether-vpnserver-v2.00-9387-rtm-2013.09.16-linux-x86-32bit.tar.gz
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;After extracting it, a directory named&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;vpnserver&lt;/span&gt;&amp;nbsp;will be created in the working folder. In order to compile SoftEther, the following tools and packages must be installed on your server:&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;make&lt;/span&gt;,&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;gccbinutils (gcc)&lt;/span&gt;,&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;libc (glibc)&lt;/span&gt;,&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;zlib&lt;/span&gt;,&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;openssl&lt;/span&gt;,&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;readline&lt;/span&gt;, and&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;ncurses&lt;/span&gt;&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Make sure these are installed. You can install all the packages necessary to build SoftEther using the command below:&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;Debian / Ubuntu:&lt;/span&gt;&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;apt-get install build-essential -y
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;CentOS / Fedora:&lt;/span&gt;&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;yum groupinstall "Development Tools"
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;Note:&lt;/span&gt;&amp;nbsp;On Fedora, I have found that the&amp;nbsp;&lt;em style="box-sizing: border-box;"&gt;gcc&lt;/em&gt;&amp;nbsp;package doesn’t get installed using the command above so you have to install it manually using&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;yum install gcc&lt;/span&gt;.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Now that we have all the necessary packages installed, we can compile SoftEther using the following command:&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;First “cd” into&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;vpnserver&lt;/span&gt;&amp;nbsp;directory:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;cd vpnserver
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;And now run “make” to compile SoftEther into an executable file:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;make
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;&lt;img alt="SoftEther License Agreement" src="https://assets.digitalocean.com/tutorial_images/Uh2Gsh1.png" style="border-radius: 16px; border: 2px solid rgb(227, 232, 244); box-sizing: border-box; display: block; margin: 1rem auto; max-width: 100%;" /&gt;&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;SoftEther will ask you to read and agree with its License Agreement. Select&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;1&lt;/span&gt;&amp;nbsp;to read the agreement, again to confirm read, and finally to agree to the License Agreement.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;SoftEther is now compiled and made into executable files (vpnserver and vpncmd). If the process fails, check if you have all of the requirement packages installed.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Now that SoftEther is compiled we can move the&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;vpnserver&lt;/span&gt;&amp;nbsp;directory to someplace else, here we move it to&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;usr/local&lt;/span&gt;:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;cd ..
mv vpnserver /usr/local
cd /usr/local/vpnserver/
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;And then change the files permission in order to protect them:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;chmod 600 *
chmod 700 vpnserver
chmod 700 vpncmd
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;If you like SoftEther to start as a service on startup create a file named&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;vpnserver&lt;/span&gt;&amp;nbsp;in&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;/etc/init.d&lt;/span&gt;&amp;nbsp;directory and change it to the following:&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;First create and open the file using&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;vi&lt;/code&gt;&amp;nbsp;or&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;nano&lt;/code&gt;:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;vi /etc/init.d/vpnserver
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;And paste the following into the file:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;#!/bin/sh
# chkconfig: 2345 99 01
# description: SoftEther VPN Server
DAEMON=/usr/local/vpnserver/vpnserver
LOCK=/var/lock/subsys/vpnserver
test -x $DAEMON || exit 0
case "$1" in
start)
$DAEMON start
touch $LOCK
;;
stop)
$DAEMON stop
rm $LOCK
;;
restart)
$DAEMON stop
sleep 3
$DAEMON start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Finally save and close the file by pressing&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;esc&lt;/span&gt;&amp;nbsp;and typing&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;:wq&lt;/span&gt;&amp;nbsp;to close vim.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;We have to make a directory at&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;/var/lock/subsys&lt;/span&gt;&amp;nbsp;if one does not exist:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;mkdir /var/lock/subsys
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Now change the permission for the startup script and start&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;vpnserver&lt;/span&gt;&amp;nbsp;using command below:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;chmod 755 /etc/init.d/vpnserver &amp;amp;&amp;amp; /etc/init.d/vpnserver start
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Use the command below make it to run at startup:&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;Debian / Ubuntu:&lt;/span&gt;&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;update-rc.d vpnserver defaults
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;CentOS / Fedora:&lt;/span&gt;&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;chkconfig --add vpnserver 
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;SoftEther VPN Server is now installed and configured to run at startup. Finally, we have to check if the VPN server is working:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;cd /usr/local/vpnserver
./vpncmd
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Now press&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;3&lt;/span&gt;&amp;nbsp;to choose&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;Use of VPN Tools&lt;/span&gt;&amp;nbsp;and then type:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;check
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;If all of the checks pass, then your server is ready to be a SoftEther VPN server and you can move on to the next step. Type “exit” to exit&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;VPN Tools&lt;/span&gt;.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;There are two ways to configure SoftEther VPN server: you can use the Windows based server manager to manage and configure any number of SoftEther VPN servers from remotely; or use the built-in&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;vpncmd&lt;/span&gt;&amp;nbsp;tool to configure your servers.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;You can download SoftEther Server Manager for Windows using their website and do the configuration using the GUI that it provides, which is a preferable way if you are a Windows user.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Here we use&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;vpncmd&lt;/span&gt;&amp;nbsp;to configure our VPN server.&lt;/p&gt;&lt;h2 id="step-5-change-admin-password" style="box-sizing: border-box; color: #4d5b7c; font-family: Epilogue, sans-serif; margin: 1em 0px;"&gt;Step 5: Change Admin Password&lt;/h2&gt;&lt;hr style="box-sizing: content-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; height: 0px; overflow: visible;" /&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Now that you have SoftEther VPN server installed, you have to assign an administrator password in order to use with SoftEther. You can do this using&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;vpncmd&lt;/span&gt;&amp;nbsp;which is SoftEther’s command line based administration tool:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;./vpncmd
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Press&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;1&lt;/span&gt;&amp;nbsp;to select “Management of VPN Server or VPN Bridge”, then press Enter without typing anything to connect to the localhost server, and again press Enter without inputting anything to connect to server by server admin mode.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Then use command below to change admin password:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;ServerPasswordSet
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="step-6-create-a-virtual-hub" style="box-sizing: border-box; color: #4d5b7c; font-family: Epilogue, sans-serif; margin: 1em 0px;"&gt;Step 6: Create A Virtual Hub&lt;/h2&gt;&lt;hr style="box-sizing: content-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; height: 0px; overflow: visible;" /&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;To use SoftEther we must first create a Virtual Hub. Here as an example we create a hub named&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;VPN&lt;/span&gt;, in order to do that enter command below in the&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;vpncmd&lt;/span&gt;&amp;nbsp;tool:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;HubCreate VPN
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Next you will be asked to enter an administrator password for the hub. This password will be used whenever you are not logged in as&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;server admin&lt;/span&gt;&amp;nbsp;mode, and you want to manage that specific hub.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Now select the Virtual Hub you created using this command:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;Hub VPN
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="step-7-enable-securenat" style="box-sizing: border-box; color: #4d5b7c; font-family: Epilogue, sans-serif; margin: 1em 0px;"&gt;Step 7: Enable SecureNAT&lt;/h2&gt;&lt;hr style="box-sizing: content-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; height: 0px; overflow: visible;" /&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;There are two ways of connecting your hubs to the server network: using a Local Bridge connection or using the SecureNAT function.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;You can use each one separately, but using these two together will cause problems.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Here we use SecureNAT, which is very easy to setup and works pretty well in most situations. You could also use Local Bridge, but then you have to install and configure a DHCP Server too.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;SecureNAT is a combination of Virtual NAT and DHCP Server function. You can enable SecureNAT using the command below:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;SecureNatEnable
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="step-8-create-and-manage-users" style="box-sizing: border-box; color: #4d5b7c; font-family: Epilogue, sans-serif; margin: 1em 0px;"&gt;Step 8: Create and Manage Users&lt;/h2&gt;&lt;hr style="box-sizing: content-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; height: 0px; overflow: visible;" /&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Now we have to create users for our Virtual Hub to use the VPN. We can create users for our Virtual Hub using the command&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;UserCreate&lt;/span&gt;&amp;nbsp;and view the list of current users by&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;UserList&lt;/span&gt;. Users can be added to groups and can even have different types of authentication modes (including: Password, Certificate, RADIUS, NTLM, etc.).&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;By using command&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;UserCreate&lt;/span&gt;&amp;nbsp;we create a user named “test”:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;UserCreate test
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;The default type of authentication is Password but we can change it to a different type using commands below:&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;UserNTLMSet&lt;/code&gt;&amp;nbsp;for NT Domain Authentication&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;UserPasswordSet&lt;/code&gt;&amp;nbsp;for Password Authentication&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;UserAnonymousSet&lt;/code&gt;&amp;nbsp;for Anonymous Authentication&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;UserRadiusSet&lt;/code&gt;&amp;nbsp;for RADIUS Authentication&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;UserCertSet&lt;/code&gt;&amp;nbsp;for Individual Certificate Authentication&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;UserSignedSet&lt;/code&gt;&amp;nbsp;for Signed Certificate Authentication&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;In this tutorial we use Password as the user authentication mode for our&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;test&lt;/span&gt;&amp;nbsp;user, so using this command set a password for user&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;test&lt;/span&gt;:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;UserPasswordSet test
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="step-9-setup-l2tp-ipsec" style="box-sizing: border-box; color: #4d5b7c; font-family: Epilogue, sans-serif; margin: 1em 0px;"&gt;Step 9: Setup L2TP/IPSec&lt;/h2&gt;&lt;hr style="box-sizing: content-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; height: 0px; overflow: visible;" /&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;To enable L2TP/IPsec VPN server you can use the command below:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;IPsecEnable
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;After entering this command, you will be asked to configure the L2TP server functions:&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;Enable L2TP over IPsec Server Function&lt;/span&gt;: Choose&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;yes&lt;/span&gt;&amp;nbsp;to enable L2TP VPN over IPSec with pre-shared key encryption. Now you can make VPN connections to this server using iPhone, Android, Windows, and Mac OS X devices.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;Enable Raw L2TP Server Function&lt;/span&gt;: This will enable L2TP VPN for clients with no IPSec encryption.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;Enable EtherIP / L2TPv3 over IPsec Server Function&lt;/span&gt;: Routers which are compatible with EtherIP / L2TPv3 over IPsec can connect to this server by enabling this function.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;Pre Shared Key for IPsec&lt;/span&gt;: Enter a pre-shared key to use with L2TP VPN.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;Default Virtual HUB in a case of omitting the HUB on the Username&lt;/span&gt;: Users must specify the Virtual Hub they are trying to connect to by using&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;Username&lt;a href="https://www.digitalocean.com/community/users/targethubname" style="border-bottom: 1px solid rgb(0, 105, 255); box-sizing: border-box; color: #0069ff; text-decoration-line: none; transition: color 0.25s ease 0s, border-bottom-color 0.25s ease 0s;"&gt;@TargetHubName&lt;/a&gt;&lt;/span&gt;&amp;nbsp;as their username when connecting. This option specifies which Virtual Hub to be used if the user does not provide such information. In our case enter&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;VPN&lt;/span&gt;.&lt;/p&gt;&lt;h2 id="step-10-setup-sstp-openvpn" style="box-sizing: border-box; color: #4d5b7c; font-family: Epilogue, sans-serif; margin: 1em 0px;"&gt;Step 10: Setup SSTP/OpenVPN&lt;/h2&gt;&lt;hr style="box-sizing: content-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; height: 0px; overflow: visible;" /&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;The SoftEther can clone the functions of Microsoft SSTP VPN Server and OpenVPN Server. But before we enable these we have to generate a self-signed SSL certificate for our server. You can use openssl or SoftEther’s own command to generate a SSL certificate.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Here we use SoftEther’s&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;ServerCertRegenerate&lt;/span&gt;&amp;nbsp;command to generate and register a self-signed SSL certificate for our server. The argument passed to command is CN (Common Name), and must be set to your host name (FQDN) or IP address:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;ServerCertRegenerate [CN]
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;Note 1:&lt;/span&gt;&amp;nbsp;SoftEther also comes with a built-in&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;Dynamic DNS&lt;/span&gt;&amp;nbsp;function, which can assign a unique and permanent hostname for your server. You can use the hostname assigned by this function for creating a SSL Certificate and connecting to your server.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;Note 2:&lt;/span&gt;&amp;nbsp;If you already have a SSL certificate or you have created one using&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;openssl&lt;/span&gt;, it can be added to the server using the command&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;ServerCertSet&lt;/code&gt;.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Now that we have created the certificate, we have to download the certificate to our clients and add them as trusted. Using the command below, we save the server certificate into a file named&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;cert.cer&lt;/span&gt;:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;ServerCertGet ~/cert.cer
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Now you can download the certificate to your client using FileZilla or any other SFTP Client.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;To make the certificate trusted in Windows, you have to install it in the&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;Trusted Root Certification Authorities&lt;/span&gt;&amp;nbsp;store. Here’s an article explaining how (read the&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;To install a certificate chain&lt;/span&gt;&amp;nbsp;part):&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;&lt;a href="http://technet.microsoft.com/en-us/library/dd441378(office.13).aspx" style="border-bottom: 1px solid rgb(0, 105, 255); box-sizing: border-box; color: #0069ff; text-decoration-line: none; transition: color 0.25s ease 0s, border-bottom-color 0.25s ease 0s;"&gt;Installing a Certificate Chain&lt;/a&gt;&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Now that we have created and registered a SSL Certificate for our server, we can enable SSTP function with this command:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;SstpEnable yes
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;And to enable OpenVPN:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;OpenVpnEnable yes /PORTS:1194
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;Note:&lt;/span&gt;&amp;nbsp;OpenVPN’s default port is 1194, but you can change it to any port you want by changing the&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;/PORTS:1194&lt;/span&gt;&amp;nbsp;part of the command above to your desired port or ports (yes it supports multiple ports).&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;After you enabled OpenVPN, you can download a sample configuration file for OpenVPN client. Here we create a sample OpenVPN configuration file and save it to&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;my_openvpn_config.zip&lt;/span&gt;:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;OpenVpnMakeConfig ~/my_openvpn_config.zip
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Then you can download it using any SFTP client such as FileZilla and apply it to your OpenVPN clients.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;SoftEther also provides a dedicated VPN Client software for both Windows and Linux. It supports a SoftEther specific protocol called&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;Ethernet over HTTPS&lt;/span&gt;&amp;nbsp;or&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;SSL-VPN&lt;/span&gt;&amp;nbsp;which is very powerful. It uses HTTPS protocol and port 443 in order to establish a VPN tunnel, and because this port is well-known, almost all firewalls, proxy servers and NATs can pass the packet. In order to use SSL-VPN protocol, you must download and install SoftEther VPN Client, which can be obtained from their website.&lt;/p&gt;&lt;h2 id="step-11-connecting-to-softether-vpn-server-client-configuration" style="box-sizing: border-box; color: #4d5b7c; font-family: Epilogue, sans-serif; margin: 1em 0px;"&gt;Step 11: Connecting to SoftEther VPN Server (Client Configuration)&lt;/h2&gt;&lt;hr style="box-sizing: content-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; height: 0px; overflow: visible;" /&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Since SoftEther is a multi-protocol VPN server, there are many ways to connect to it as a client. You can choose any protocol to establish a secure connection to your server, including L2TP, SSTP, OpenVPN and an exclusive to SoftEther protocol named SSL-VPN.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Depending on the client operating system and configurations, you could use any of the mentioned protocols. However, I prefer to use SSL-VPN since it’s both secure and fast, and also as mentioned before since it uses a common and well-known port (443 or https-port), it can penetrate most of the firewalls.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Here we use SoftEther’s own VPN client software to connect to our server:&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;First download the SoftEther VPN Client for Linux from SoftEther’s website. We can download it using a&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;lynx&lt;/span&gt;&amp;nbsp;browser. Enter this command to open SoftEther’s download page:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;lynx http://www.softether-download.com/files/softether/
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Then just as you did when downloading the Server software, select the latest version (Here we used&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;v2.00-9387-rtm-2013.09.16&lt;/span&gt;). Now choose&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;Linux&lt;/span&gt;&amp;nbsp;and in the next page choose&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;SoftEther VPN Client&lt;/span&gt;. Now depending on your system’s hardware architecture, choose a package (The&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;32bit - Intel x86&lt;/span&gt;&amp;nbsp;and&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;64bit - Intel x64 or AMD64&lt;/span&gt;&amp;nbsp;works for DigitalOcean 32bit or 64bit droplets). Finally download the tar file from the next page by pressing the “D” key on the link, and choose&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;Save to disk&lt;/span&gt;&amp;nbsp;when asked by Lynx. After the file is saved, press “Q” to quit Lynx.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Extract the tar file you just downloaded using this command:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;tar xzvf softether-vpnclient-v2.00-9387-rtm-2013.09.16-linux-x86-32bit.tar.gz
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;Note:&lt;/span&gt;&amp;nbsp;Change&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;softether-vpnclient-v2.00-9387-rtm-2013.09.16-linux-x86-32bit.tar.gz&lt;/code&gt;&amp;nbsp;to your downloaded file’s name.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Now just as we did with the server, we have to compile and make vpnclient an executable file by running these commands (make sure you have the development tools mentioned in&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;Step 4&lt;/span&gt;&amp;nbsp;installed on client):&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;cd vpnclient
make
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Enter&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;1&lt;/span&gt;&amp;nbsp;three times when asked to read and accept the License Agreement, and then move the files to another directory and change permissions:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;cd ..
mv vpnclient /usr/local
cd /usr/local/vpnclient/
chmod 600 *
chmod 700 vpnclient
chmod 700 vpncmd
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Then start the VPN client service using this command:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;./vpnclient start
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;To configure our client, we’re going to use&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;vpncmd&lt;/code&gt;. While you’re in the&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;vpnclient&lt;/span&gt;&amp;nbsp;directory enter this command to run&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;vpncmd&lt;/code&gt;&amp;nbsp;tool:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;./vpncmd
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Choose&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;2&lt;/span&gt;&amp;nbsp;to enter&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;Management of VPN Client&lt;/span&gt;&amp;nbsp;mode, and then press enter to connect to and manage the local VPN client you just installed.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;SoftEther uses Virtual Adapters to establish a connection to our VPN server, using this command create a Virtual Adapter named&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;myadapter&lt;/span&gt;:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;NicCreate myadapter
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Now using this command, create a new VPN connection named&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;myconnection&lt;/span&gt;:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;AccountCreate myconnection
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Then enter your SoftEther VPN server’s IP and Port number. The port number could be any port that you have set as listening on your server. By default, SoftEther listens on these four ports: 443, 992, 1194, 5555. Here as an example where we use port 443:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;Destination VPN Server Host Name and Port Number: [VPN Server IP Address]:443
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;Note:&lt;/span&gt;&amp;nbsp;Instead of an IP Address, you could also enter you server’s fully qualified domain name (FQDN).&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Now enter the name of the Virtual Hub you’re trying to connect to on your server. In our case it is named&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;VPN&lt;/span&gt;:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;Destination Virtual Hub Name: VPN
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Then enter the username of a user you created in your server. We created a user called&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;test&lt;/span&gt;:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;Connecting User Name: test
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;And finally enter the name of the Virtual Hub you just created:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;Used Virtual Network Adapter Name: myadapter
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Now our VPN connection has been created and it’s ready to be connected. One last step is to change the Authentication mode to&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;Password&lt;/span&gt;&amp;nbsp;since that’s how we configured our user’s authentication mode in the server:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;AccountPasswordSet myconnection
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;When asked for, enter&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;standard&lt;/span&gt;&amp;nbsp;as password authentication method:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;Specify standard or radius: standard
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Finally we can connect our connection-- use this command to do that:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;AccountConnect myconnection
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;You can see the connection status using this command:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px center; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;AccountStatusGet myconnection
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;Note:&lt;/span&gt;&amp;nbsp;In order to make your connection to the server more secure and prevent man-in-the-middle attacks, it’s best to use a SSL certificate to identify your server. This can be done easily using SoftEther. To do that, first you must download the cert file to your client as explained in&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;Step 10&lt;/span&gt;&amp;nbsp;and then using&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;CertAdd&lt;/span&gt;&amp;nbsp;add it to your client’s trusted certificates. Then, using command&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;AccountServerCertEnable&lt;/code&gt;&amp;nbsp;enable certificate verification for your VPN connection.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="box-sizing: border-box; font-family: Inter, sans-serif; line-height: 1.5; margin: 1em 0px;"&gt;&lt;span style="color: #999999; font-size: xx-small;"&gt;Post Credit:&amp;nbsp;https://www.digitalocean.com/community/tutorials/how-to-setup-a-multi-protocol-vpn-server-using-softether&lt;/span&gt;&lt;/p&gt;</description><link>http://page.farhad.pw/2023/02/setup-multi-protocol-vpn-server-using.html</link><author>noreply@blogger.com (Farhad)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgzw-azeRk0x7qi1R4s-SRFpyy4eCVddqy-wLZkkTIGyt68ljBkTPXoXryypnRxjGwPnC-SR8aGzvJWcK9DBHg7wQnlP1xE6gt_1NdQgSRzq9_ZRZDDRK2U1VOu9GBLDtRVAtu8yc_2nNL_SWorhr72v1_kYsylVUomevvZhj8Ekq7G1pUyFZHafek/s72-c/softether-vpn-logo.jpg" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1026424054105678970.post-6057363989264436233</guid><pubDate>Thu, 22 Dec 2022 10:21:00 +0000</pubDate><atom:updated>2022-12-26T11:55:50.872+06:00</atom:updated><title>Configure Galera Cluster with Mariadb 10.3 on Centos7 with HAproxy load balancer</title><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsepkmmFuCgEnK_82WCK_Oqid3il65qYxSzAqI7eSt_HggrmyZHPJT7LxXv4fN2eDO5hWAkq-n5wq738zBixMqnXtfzfmePxwwGZVM0ZdGAPBKdYCTLRvzetsiaHSXAjeWtspyfRNwwR2QcmPE_2UH6BZpjFwCymBCetpgg9jHc1qfZcdTkk_GY_0M/s1024/mariadb-galera-cluster-1024x545%20(1).png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="545" data-original-width="1024" height="341" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsepkmmFuCgEnK_82WCK_Oqid3il65qYxSzAqI7eSt_HggrmyZHPJT7LxXv4fN2eDO5hWAkq-n5wq738zBixMqnXtfzfmePxwwGZVM0ZdGAPBKdYCTLRvzetsiaHSXAjeWtspyfRNwwR2QcmPE_2UH6BZpjFwCymBCetpgg9jHc1qfZcdTkk_GY_0M/w643-h341/mariadb-galera-cluster-1024x545%20(1).png" width="643" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3 id="introduction" style="box-sizing: border-box; color: #4d5b7c; font-family: Epilogue, sans-serif; margin: 1em 0px;"&gt;Introduction&lt;/h3&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Clustering adds high availability to your database by distributing changes to different servers. In the event that one of the instances fails, others are quickly available to continue serving.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Clusters come in two general configurations,&amp;nbsp;&lt;em style="box-sizing: border-box;"&gt;active-passive&lt;/em&gt;&amp;nbsp;and&amp;nbsp;&lt;em style="box-sizing: border-box;"&gt;active-active&lt;/em&gt;. In active-passive clusters, all writes are done on a single active server and then copied to one or more passive servers that are poised to take over only in the event of an active server failure. Some active-passive clusters also allow&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;SELECT&lt;/code&gt;&amp;nbsp;operations on passive nodes. In an active-active cluster, every node is read-write and a change made to one is replicated to all.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;&lt;a href="https://mariadb.org/" style="border-bottom: 1px solid rgb(0, 105, 255); box-sizing: border-box; color: #0069ff; text-decoration-line: none; transition: color 0.25s ease 0s, border-bottom-color 0.25s ease 0s;"&gt;MariaDB&lt;/a&gt;&amp;nbsp;is an open source relational database system that is fully compatible with the popular MySQL RDBMS system. You can read the official documentation for MariaDB at this&amp;nbsp;&lt;a href="https://mariadb.com/kb/en/library/documentation/" style="border-bottom: 1px solid rgb(0, 105, 255); box-sizing: border-box; color: #0069ff; text-decoration-line: none; transition: color 0.25s ease 0s, border-bottom-color 0.25s ease 0s;"&gt;page&lt;/a&gt;.&amp;nbsp;&lt;a href="http://galeracluster.com/" style="border-bottom: 1px solid rgb(0, 105, 255); box-sizing: border-box; color: #0069ff; text-decoration-line: none; transition: color 0.25s ease 0s, border-bottom-color 0.25s ease 0s;"&gt;Galera&lt;/a&gt;&amp;nbsp;is a database clustering solution that enables you to set up multi-master clusters using synchronous replication. Galera automatically handles keeping the data on different nodes in sync while allowing you to send read and write queries to any of the nodes in the cluster. You can learn more about Galera at the official&amp;nbsp;&lt;a href="http://galeracluster.com/library/documentation/" style="border-bottom: 1px solid rgb(0, 105, 255); box-sizing: border-box; color: #0069ff; text-decoration-line: none; transition: color 0.25s ease 0s, border-bottom-color 0.25s ease 0s;"&gt;documentation page&lt;/a&gt;.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;In this guide, you will configure an active-active MariaDB Galera cluster. For demonstration purposes, you will configure and test three CentOS 7 Droplets that will act as nodes in the cluster. This is the smallest configurable cluster.&lt;/p&gt;&lt;h2 id="prerequisites" style="box-sizing: border-box; color: #4d5b7c; font-family: Epilogue, sans-serif; margin: 1em 0px;"&gt;Prerequisites&lt;/h2&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;To follow along, you will need a&amp;nbsp;&lt;a href="https://cloud.digitalocean.com/registrations/new" style="border-bottom: 1px solid rgb(0, 105, 255); box-sizing: border-box; color: #0069ff; text-decoration-line: none; transition: color 0.25s ease 0s, border-bottom-color 0.25s ease 0s;"&gt;DigitalOcean account&lt;/a&gt;, in addition to the following:&lt;/p&gt;&lt;ul style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; list-style-image: initial; list-style-position: initial; margin: 0px 0px 1.7em; padding: 0px 0px 0px 2.5em;"&gt;&lt;li style="box-sizing: border-box;"&gt;Three CentOS 7 Droplets with private networking enabled, each with a non-root user with&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;sudo&lt;/code&gt;&amp;nbsp;privileges and a firewall enabled.&lt;ul style="box-sizing: border-box; list-style: disc; margin: 0px 0px 1.7em; padding: 0px 0px 0px 2.5em;"&gt;&lt;li style="box-sizing: border-box;"&gt;For setting up private networking on the three Droplets, follow our&amp;nbsp;&lt;a href="https://www.digitalocean.com/docs/networking/private-networking/quickstart/" style="border-bottom: 1px solid rgb(0, 105, 255); box-sizing: border-box; color: #0069ff; text-decoration-line: none; transition: color 0.25s ease 0s, border-bottom-color 0.25s ease 0s;"&gt;Private Networking Quickstart&lt;/a&gt;&amp;nbsp;guide.&lt;/li&gt;&lt;li style="box-sizing: border-box;"&gt;For assistance setting up a non-root user with&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;sudo&lt;/code&gt;&amp;nbsp;privileges, follow our&amp;nbsp;&lt;a href="https://www.digitalocean.com/community/tutorials/initial-server-setup-with-centos-7" style="border-bottom: 1px solid rgb(0, 105, 255); box-sizing: border-box; color: #0069ff; text-decoration-line: none; transition: color 0.25s ease 0s, border-bottom-color 0.25s ease 0s;"&gt;Initial Server Setup with CentOS 7&lt;/a&gt;&amp;nbsp;tutorial. To set up a firewall, check out the&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;Configuring a Basic Firewall&lt;/span&gt;&amp;nbsp;step of&amp;nbsp;&lt;a href="https://www.digitalocean.com/community/tutorials/additional-recommended-steps-for-new-centos-7-servers#configuring-a-basic-firewall" style="border-bottom: 1px solid rgb(0, 105, 255); box-sizing: border-box; color: #0069ff; text-decoration-line: none; transition: color 0.25s ease 0s, border-bottom-color 0.25s ease 0s;"&gt;Additional Recommended Steps for New CentOS 7 Servers&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;While the steps in this tutorial have been written for and tested against DigitalOcean Droplets, many of them should also be applicable to non-DigitalOcean servers with private networking enabled.&lt;/p&gt;&lt;h2 id="step-1-adding-the-mariadb-repositories-to-all-servers" style="box-sizing: border-box; color: #4d5b7c; font-family: Epilogue, sans-serif; margin: 1em 0px;"&gt;Step 1 — Adding the MariaDB Repositories to All Servers&lt;/h2&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;In this step, you will add the relevant MariaDB package repositories to each of your three servers so that you will be able to install the right version of MariaDB used in this tutorial. Once the repositories are updated on all three servers, you will be ready to install MariaDB.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;One thing to note about MariaDB is that it originated as a drop-in replacement for MySQL, so in many configuration files and startup scripts, you’ll see&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;mysql&lt;/code&gt;&amp;nbsp;rather than&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;mariadb&lt;/code&gt;. In many cases, these are interchangeable. For consistency’s sake, we will use&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;mariadb&lt;/code&gt;&amp;nbsp;in this guide where either could work.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;In this tutorial, you will use&amp;nbsp;&lt;a href="https://mariadb.com/kb/en/library/mariadb-1040-release-notes/" style="border-bottom: 1px solid rgb(0, 105, 255); box-sizing: border-box; color: #0069ff; text-decoration-line: none; transition: color 0.25s ease 0s, border-bottom-color 0.25s ease 0s;"&gt;MariaDB version 10.4&lt;/a&gt;. Since this version isn’t included in the default CentOS repositories, you’ll start by adding the external CentOS repository maintained by the MariaDB project to all three of your servers.&lt;/p&gt;&lt;div class="callout note" style="background-color: #d4efee; border-radius: 16px; box-sizing: border-box; color: #005955; font-family: Inter, sans-serif; font-size: 15px; line-height: 1.5em; margin: 0px 0px 1.5em; padding: 1em 1.25em; position: relative; z-index: 0;"&gt;&lt;p style="box-sizing: border-box; line-height: 1.5; margin: 0px;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;Note:&lt;/span&gt;&amp;nbsp;MariaDB is a well-respected provider, but not all external repositories are reliable. Be sure to install only from trusted sources.&lt;/p&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;First, you’ll add the MariaDB repository key by creating a repository file with a text editor. This tutorial will use&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;vi&lt;/code&gt;:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed command language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;&lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;sudo&lt;/span&gt; &lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;vi&lt;/span&gt; /etc/yum.repos.d/mariadb.repo
&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Next, add the following contents to the file by pressing&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;i&lt;/code&gt;&amp;nbsp;to enter insert mode, then adding the following:&lt;/p&gt;&lt;div class="code-label" style="background-color: #d6dcea; border-radius: 16px 16px 0px 0px; box-sizing: border-box; color: #24335a; font-family: Inter, sans-serif; font-size: 14px; margin: 1em 0px 0px; padding: 0.5em 1em; position: relative; text-align: center; z-index: 2;" title="/etc/yum.repos.d/mariadb.repo"&gt;/etc/yum.repos.d/mariadb.repo&lt;/div&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 0px 0px 16px 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px 50%; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/&lt;mark style="background: rgba(65, 255, 244, 0.35); border-radius: 8px; box-sizing: border-box; display: inline; line-height: calc(1.4em + 1px); padding: 0px 2px;"&gt;10.3&lt;/mark&gt;/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Press the&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;esc&lt;/code&gt;&amp;nbsp;key to return to normal mode, then type&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;:wq&lt;/code&gt;&amp;nbsp;to save and exit the file. If you would like to learn more about the text editor&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;vi&lt;/code&gt;&amp;nbsp;and its predecessor&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;vim&lt;/code&gt;, take a look at our tutorial on&amp;nbsp;&lt;a href="https://www.digitalocean.com/community/tutorials/installing-and-using-the-vim-text-editor-on-a-cloud-server#modal-editing" style="border-bottom: 1px solid rgb(0, 105, 255); box-sizing: border-box; color: #0069ff; text-decoration-line: none; transition: color 0.25s ease 0s, border-bottom-color 0.25s ease 0s;"&gt;Installing and Using the Vim Text Editor on a Cloud Server&lt;/a&gt;.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Once you have created the repository file, enable it with the following command:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed command language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;&lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;sudo&lt;/span&gt; yum makecache --disablerepo&lt;span class="token operator" style="background: none; border-radius: 0px; box-sizing: border-box; color: #eff2fb; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;=&lt;/span&gt;&lt;span class="token string" style="background: none; border-radius: 0px; box-sizing: border-box; color: #29e3ab; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;'*'&lt;/span&gt; --enablerepo&lt;span class="token operator" style="background: none; border-radius: 0px; box-sizing: border-box; color: #eff2fb; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;=&lt;/span&gt;&lt;span class="token string" style="background: none; border-radius: 0px; box-sizing: border-box; color: #29e3ab; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;'mariadb'&lt;/span&gt;
&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;The&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;makecache&lt;/code&gt;&amp;nbsp;command caches the repository metadata so that the package manager can install MariaDB, with&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;--disablerepo&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;--enablerepo&lt;/code&gt;&amp;nbsp;targeting the command to the&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;mariadb&lt;/code&gt;&amp;nbsp;repo file that you just created.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;You will receive the following output:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px 50%; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;&lt;div class="secondary-code-label" style="box-sizing: border-box; color: #00c6ff; margin: 0px 0px 4px;" title="Output"&gt;Output&lt;/div&gt;Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
mariadb                                                                                                                                                                              | 2.9 kB  00:00:00
(1/3): mariadb/primary_db                                                                                                                                                            |  43 kB  00:00:00
(2/3): mariadb/other_db                                                                                                                                                              | 8.3 kB  00:00:00
(3/3): mariadb/filelists_db                                                                                                                                                          | 238 kB  00:00:00
Metadata Cache Created
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Once you have enabled the repository on your first server, repeat for your second and third servers.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Now that you have successfully added the package repository on all three of your servers, you’re ready to install MariaDB in the next section.&lt;/p&gt;&lt;h2 id="step-2-installing-mariadb-on-all-servers" style="box-sizing: border-box; color: #4d5b7c; font-family: Epilogue, sans-serif; margin: 1em 0px;"&gt;Step 2 — Installing MariaDB on All Servers&lt;/h2&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;In this step, you will install the actual MariaDB packages on your three servers.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Beginning with version&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;10.1&lt;/code&gt;, the MariaDB Server and MariaDB Galera Server packages are combined, so installing&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;MariaDB-server&lt;/code&gt;&amp;nbsp;will automatically install Galera and several dependencies:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed command language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;&lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;sudo&lt;/span&gt; yum &lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;install&lt;/span&gt; MariaDB-server MariaDB-client
&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;You will be asked to confirm whether you would like to proceed with the installation. Enter&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;yes&lt;/code&gt;&amp;nbsp;to continue with the installation. You will then be prompted to accept the GPG key that authenticates the MariaDB package. Enter&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;yes&lt;/code&gt;&amp;nbsp;again.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;When the installation is complete, start the&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;mariadb&lt;/code&gt;&amp;nbsp;service by running:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed command language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;&lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;sudo&lt;/span&gt; systemctl start mariadb
&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Enable the&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;mariadb&lt;/code&gt;&amp;nbsp;service to be automatically started on boot by executing:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed command language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;&lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;sudo&lt;/span&gt; systemctl &lt;span class="token builtin class-name" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;enable&lt;/span&gt; mariadb
&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;From MariaDB version&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;10.4&lt;/code&gt;&amp;nbsp;onwards, the&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;root&lt;/span&gt;&amp;nbsp;MariaDB user does not have a password by default. To set a password for the&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;root&lt;/span&gt;&amp;nbsp;user, start by logging into MariaDB:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed command language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;&lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;sudo&lt;/span&gt; mysql -uroot
&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Once you’re inside the MariaDB shell, change the password by executing the following statement, replacing&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;&lt;mark style="background: rgba(242, 201, 76, 0.35); border-radius: 8px; box-sizing: border-box; display: inline; line-height: calc(1.4em + 1px); padding: 0px 2px;"&gt;your_password&lt;/mark&gt;&lt;/code&gt;&amp;nbsp;with your desired password:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed custom_prefix language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="MariaDB[(none)]&amp;gt;" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;&lt;span class="token builtin class-name" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;set&lt;/span&gt; password &lt;span class="token operator" style="background: none; border-radius: 0px; box-sizing: border-box; color: #eff2fb; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;=&lt;/span&gt; password&lt;span class="token punctuation" style="background: none; border-radius: 0px; box-sizing: border-box; color: #eff2fb; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;(&lt;/span&gt;&lt;span class="token string" style="background: none; border-radius: 0px; box-sizing: border-box; color: #29e3ab; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;"&lt;mark style="background: rgba(65, 255, 244, 0.35); border-radius: 8px; box-sizing: border-box; display: inline; line-height: calc(1.4em + 1px); padding: 0px 2px;"&gt;your_password&lt;/mark&gt;"&lt;/span&gt;&lt;span class="token punctuation" style="background: none; border-radius: 0px; box-sizing: border-box; color: #eff2fb; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;)&lt;/span&gt;&lt;span class="token punctuation" style="background: none; border-radius: 0px; box-sizing: border-box; color: #eff2fb; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;;&lt;/span&gt;
&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;You will see the following output indicating that the password was set correctly:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px 50%; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;&lt;div class="secondary-code-label" style="box-sizing: border-box; color: #00c6ff; margin: 0px 0px 4px;" title="Output"&gt;Output&lt;/div&gt;Query OK, 0 rows affected (0.001 sec)
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Exit the MariaDB shell by running the following command:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed custom_prefix language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="MariaDB[(none)]&amp;gt;" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;quit&lt;span class="token punctuation" style="background: none; border-radius: 0px; box-sizing: border-box; color: #eff2fb; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;;&lt;/span&gt;
&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;If you would like to learn more about SQL or need a quick refresher, check out our&amp;nbsp;&lt;a href="https://www.digitalocean.com/community/tutorials/a-basic-mysql-tutorial" style="border-bottom: 1px solid rgb(0, 105, 255); box-sizing: border-box; color: #0069ff; text-decoration-line: none; transition: color 0.25s ease 0s, border-bottom-color 0.25s ease 0s;"&gt;MySQL tutorial&lt;/a&gt;.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;You now have all of the pieces necessary to begin configuring the cluster, but since you’ll be relying on&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;rsync&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;policycoreutils-python&lt;/code&gt;&amp;nbsp;in later steps to sync the servers and to control Security-Enhanced Linux (SELinux), make sure they’re installed before moving on:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed command language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;&lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;sudo&lt;/span&gt; yum &lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;install&lt;/span&gt; &lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;rsync&lt;/span&gt; policycoreutils-python
&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;This will confirm that the newest versions of&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;rsync&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;policycoreutils-python&lt;/code&gt;&amp;nbsp;is already available or will prompt you to upgrade or install it.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Once you have completed these steps, repeat them for your other two servers.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Now that you have installed MariaDB successfully on each of the three servers, you can proceed to the configuration step in the next section.&lt;/p&gt;&lt;h2 id="step-3-configuring-the-first-node" style="box-sizing: border-box; color: #4d5b7c; font-family: Epilogue, sans-serif; margin: 1em 0px;"&gt;Step 3 — Configuring the First Node&lt;/h2&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;In this step you will configure your first Galera node. Each node in the cluster needs to have a nearly identical configuration. Because of this, you will do all of the configuration on your first machine, and then copy it to the other nodes.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;By default, MariaDB is configured to check the&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;/etc/mysql/conf.d&lt;/code&gt;&amp;nbsp;directory to get additional configuration settings from files ending in&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;.cnf&lt;/code&gt;. Create a file in this directory with all of your cluster-specific directives:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed custom_prefix language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="galera-node01$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;&lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;sudo&lt;/span&gt; &lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;vi&lt;/span&gt; /etc/my.cnf.d/galera.cnf
&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Add the following configuration into the file. The configuration specifies different cluster options, details about the current server and the other servers in the cluster, and replication-related settings. Note that the IP addresses in the configuration are the private addresses of your respective servers; replace the highlighted lines with the appropriate IP addresses:&lt;/p&gt;&lt;div class="code-label" style="background-color: #d6dcea; border-radius: 16px 16px 0px 0px; box-sizing: border-box; color: #24335a; font-family: Inter, sans-serif; font-size: 14px; margin: 1em 0px 0px; padding: 0.5em 1em; position: relative; text-align: center; z-index: 2;" title="/etc/my.cnf.d/galera.cnf"&gt;/etc/my.cnf.d/galera.cnf&lt;/div&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 0px 0px 16px 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px 50%; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;[mysqld]
binlog_format=ROW
default-storage-engine=innodb
innodb_autoinc_lock_mode=2
bind-address=0.0.0.0

# Galera Provider Configuration
wsrep_on=ON
wsrep_provider=/usr/lib64/galera/libgalera_smm.so

# Galera Cluster Configuration
wsrep_cluster_name="test_cluster"
wsrep_cluster_address="gcomm://&lt;mark style="background: rgba(65, 255, 244, 0.35); border-radius: 8px; box-sizing: border-box; display: inline; line-height: calc(1.4em + 1px); padding: 0px 2px;"&gt;First_Node_IP&lt;/mark&gt;,&lt;mark style="background: rgba(65, 255, 244, 0.35); border-radius: 8px; box-sizing: border-box; display: inline; line-height: calc(1.4em + 1px); padding: 0px 2px;"&gt;Second_Node_IP&lt;/mark&gt;,&lt;mark style="background: rgba(65, 255, 244, 0.35); border-radius: 8px; box-sizing: border-box; display: inline; line-height: calc(1.4em + 1px); padding: 0px 2px;"&gt;Third_Node_IP&lt;/mark&gt;"

# Galera Synchronization Configuration
wsrep_sst_method=rsync

# Galera Node Configuration
wsrep_node_address="&lt;mark style="background: rgba(65, 255, 244, 0.35); border-radius: 8px; box-sizing: border-box; display: inline; line-height: calc(1.4em + 1px); padding: 0px 2px;"&gt;This_Node_IP&lt;/mark&gt;"
wsrep_node_name="&lt;mark style="background: rgba(65, 255, 244, 0.35); border-radius: 8px; box-sizing: border-box; display: inline; line-height: calc(1.4em + 1px); padding: 0px 2px;"&gt;This_Node_Name&lt;/mark&gt;"
&lt;/code&gt;&lt;/pre&gt;&lt;ul style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; list-style-image: initial; list-style-position: initial; margin: 0px 0px 1.7em; padding: 0px 0px 0px 2.5em;"&gt;&lt;li style="box-sizing: border-box;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;The first section&lt;/span&gt;&amp;nbsp;modifies or re-asserts MariaDB/MySQL settings that will allow the cluster to function correctly. For example, Galera won’t work with MyISAM or similar non-transactional storage engines, and&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;mysqld&lt;/code&gt;&amp;nbsp;must not be bound to the IP address for&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;localhost&lt;/code&gt;.&lt;/li&gt;&lt;li style="box-sizing: border-box;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;The “Galera Provider Configuration” section&lt;/span&gt;&amp;nbsp;configures the MariaDB components that provide a WriteSet replication API. This means Galera in your case, since Galera is a&amp;nbsp;&lt;em style="box-sizing: border-box;"&gt;wsrep&lt;/em&gt;&amp;nbsp;(WriteSet Replication) provider. You specify the general parameters to configure the initial replication environment. This doesn’t require any customization, but you can learn more about&amp;nbsp;&lt;a href="http://www.codership.com/wiki/doku.php?id=galera_parameters" style="border-bottom: 1px solid rgb(0, 105, 255); box-sizing: border-box; color: #0069ff; text-decoration-line: none; transition: color 0.25s ease 0s, border-bottom-color 0.25s ease 0s;"&gt;Galera configuration options here&lt;/a&gt;.&lt;/li&gt;&lt;li style="box-sizing: border-box;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;The “Galera Cluster Configuration” section&lt;/span&gt;&amp;nbsp;defines the cluster, identifying the cluster members by IP address or resolvable domain name and creating a name for the cluster to ensure that members join the correct group. You can change the&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;wsrep_cluster_name&lt;/code&gt;&amp;nbsp;to something more meaningful than&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;test_cluster&lt;/code&gt;&amp;nbsp;or leave it as-is, but you must update&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;wsrep_cluster_address&lt;/code&gt;&amp;nbsp;with the private IP addresses of your three servers.&lt;/li&gt;&lt;li style="box-sizing: border-box;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;The “Galera Synchronization Configuration” section&lt;/span&gt;&amp;nbsp;defines how the cluster will communicate and synchronize data between members. This is used only for the state transfer that happens when a node comes online. For your initial setup, you are using&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;rsync&lt;/code&gt;, because it’s commonly available and does what you’ll need for now.&lt;/li&gt;&lt;li style="box-sizing: border-box;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;The “Galera Node Configuration” section&lt;/span&gt;&amp;nbsp;clarifies the IP address and the name of the current server. This is helpful when trying to diagnose problems in logs and for referencing each server in multiple ways. The&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;wsrep_node_address&lt;/code&gt;&amp;nbsp;must match the address of the machine you’re on, but you can choose any name you want in order to help you identify the node in log files.&lt;/li&gt;&lt;/ul&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;When you are satisfied with your cluster configuration file, copy the contents into your clipboard and save and close the file.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Now that you have configured your first node successfully, you can move on to configuring the remaining nodes in the next section.&lt;/p&gt;&lt;h2 id="step-4-configuring-the-remaining-nodes" style="box-sizing: border-box; color: #4d5b7c; font-family: Epilogue, sans-serif; margin: 1em 0px;"&gt;Step 4 — Configuring the Remaining Nodes&lt;/h2&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;In this step, you will configure the remaining two nodes. On your second node, open the configuration file:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed custom_prefix environment-second language-bash" style="background: rgba(200, 223, 255, 0.5); border-radius: 16px; box-sizing: border-box; color: #002c9b; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="galera-node-02$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;&lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #e0276a; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;sudo&lt;/span&gt; &lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #e0276a; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;vi&lt;/span&gt; /etc/mysql/my.cnf.d/galera.cnf
&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Paste in the configuration you copied from the first node, then update the&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;Galera Node Configuration&lt;/code&gt;&amp;nbsp;to use the IP address or resolvable domain name for the specific node you’re setting up. Finally, update its name, which you can set to whatever helps you identify the node in your log files:&lt;/p&gt;&lt;div class="code-label" style="background-color: #d6dcea; border-radius: 16px 16px 0px 0px; box-sizing: border-box; color: #24335a; font-family: Inter, sans-serif; font-size: 14px; margin: 1em 0px 0px; padding: 0.5em 1em; position: relative; text-align: center; z-index: 2;" title="/etc/mysql/my.cnf.d/galera.cnf"&gt;/etc/mysql/my.cnf.d/galera.cnf&lt;/div&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 0px 0px 16px 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px 50%; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;. . .
# Galera Node Configuration
wsrep_node_address="&lt;mark style="background: rgba(65, 255, 244, 0.35); border-radius: 8px; box-sizing: border-box; display: inline; line-height: calc(1.4em + 1px); padding: 0px 2px;"&gt;This_Node_IP&lt;/mark&gt;"
wsrep_node_name="&lt;mark style="background: rgba(65, 255, 244, 0.35); border-radius: 8px; box-sizing: border-box; display: inline; line-height: calc(1.4em + 1px); padding: 0px 2px;"&gt;This_Node_Name&lt;/mark&gt;"
. . .
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Save and exit the file.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Once you have completed these steps, repeat them on the third node.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;With Galera configured on all of your nodes, you’re almost ready to bring up the cluster. But before you do, make sure that the appropriate ports are open in your firewall and that a SELinux policy has been created for Galera.&lt;/p&gt;&lt;h2 id="step-5-opening-the-firewall-on-every-server" style="box-sizing: border-box; color: #4d5b7c; font-family: Epilogue, sans-serif; margin: 1em 0px;"&gt;Step 5 — Opening the Firewall on Every Server&lt;/h2&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;In this step, you will configure your firewall so that the ports required for inter-node communication are open.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;On every server, check the status of the firewall you set up in the Prerequisites section by running:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed command language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;&lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;sudo&lt;/span&gt; firewall-cmd --list-all
&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;In this case, only SSH, DHCP, HTTP, and HTTPS traffic is allowed through:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px 50%; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;&lt;div class="secondary-code-label" style="box-sizing: border-box; color: #00c6ff; margin: 0px 0px 4px;" title="Output"&gt;Output&lt;/div&gt;public
  target: default
  icmp-block-inversion: no
  interfaces:
  sources:
  services: &lt;mark style="background: rgba(65, 255, 244, 0.35); border-radius: 8px; box-sizing: border-box; display: inline; line-height: calc(1.4em + 1px); padding: 0px 2px;"&gt;ssh dhcpv6-client http https&lt;/mark&gt;
  ports:
  protocols:
  masquerade: no
  forward-ports:
  source-ports:
  icmp-blocks:
  rich rules:
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;If you tried to start the cluster now, it would fail because the firewall would block the connections between the nodes. To solve this problem, add rules to allow MariaDB and Galera traffic through.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Galera can make use of four ports:&lt;/p&gt;&lt;ul style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; list-style-image: initial; list-style-position: initial; margin: 0px 0px 1.7em; padding: 0px 0px 0px 2.5em;"&gt;&lt;li style="box-sizing: border-box;"&gt;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;3306&lt;/code&gt;&amp;nbsp;For MariaDB client connections and State Snapshot Transfer that use the&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;mysqldump&lt;/code&gt;&amp;nbsp;method.&lt;/li&gt;&lt;li style="box-sizing: border-box;"&gt;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;4567&lt;/code&gt;&amp;nbsp;For Galera Cluster replication traffic. Multicast replication uses both UDP transport and TCP on this port.&lt;/li&gt;&lt;li style="box-sizing: border-box;"&gt;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;4568&lt;/code&gt;&amp;nbsp;For&amp;nbsp;&lt;em style="box-sizing: border-box;"&gt;Incremental State Transfers&lt;/em&gt;, or IST, the process by which a missing state is received by other nodes in the cluster.&lt;/li&gt;&lt;li style="box-sizing: border-box;"&gt;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;4444&lt;/code&gt;&amp;nbsp;For all other&amp;nbsp;&lt;em style="box-sizing: border-box;"&gt;State Snapshot Transfers&lt;/em&gt;, or SST, the mechanism by which a joiner node gets its state and data from a donor node.&lt;/li&gt;&lt;/ul&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;In this example, you’ll open all four ports while you do your setup. Once you’ve confirmed that replication is working, you’d want to close any ports you’re not actually using and restrict traffic to just servers in the cluster.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Open the ports with the following commands:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed command language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;&lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;sudo&lt;/span&gt; firewall-cmd --permanent --zone&lt;span class="token operator" style="background: none; border-radius: 0px; box-sizing: border-box; color: #eff2fb; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;=&lt;/span&gt;public --add-port&lt;span class="token operator" style="background: none; border-radius: 0px; box-sizing: border-box; color: #eff2fb; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;=&lt;/span&gt;&lt;span class="token number" style="background: none; border-radius: 0px; box-sizing: border-box; color: #00c6ff; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;3306&lt;/span&gt;/tcp
&lt;/li&gt;&lt;li data-prefix="$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;&lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;sudo&lt;/span&gt; firewall-cmd --permanent --zone&lt;span class="token operator" style="background: none; border-radius: 0px; box-sizing: border-box; color: #eff2fb; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;=&lt;/span&gt;public --add-port&lt;span class="token operator" style="background: none; border-radius: 0px; box-sizing: border-box; color: #eff2fb; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;=&lt;/span&gt;&lt;span class="token number" style="background: none; border-radius: 0px; box-sizing: border-box; color: #00c6ff; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;4567&lt;/span&gt;/tcp
&lt;/li&gt;&lt;li data-prefix="$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;&lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;sudo&lt;/span&gt; firewall-cmd --permanent --zone&lt;span class="token operator" style="background: none; border-radius: 0px; box-sizing: border-box; color: #eff2fb; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;=&lt;/span&gt;public --add-port&lt;span class="token operator" style="background: none; border-radius: 0px; box-sizing: border-box; color: #eff2fb; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;=&lt;/span&gt;&lt;span class="token number" style="background: none; border-radius: 0px; box-sizing: border-box; color: #00c6ff; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;4568&lt;/span&gt;/tcp
&lt;/li&gt;&lt;li data-prefix="$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;&lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;sudo&lt;/span&gt; firewall-cmd --permanent --zone&lt;span class="token operator" style="background: none; border-radius: 0px; box-sizing: border-box; color: #eff2fb; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;=&lt;/span&gt;public --add-port&lt;span class="token operator" style="background: none; border-radius: 0px; box-sizing: border-box; color: #eff2fb; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;=&lt;/span&gt;&lt;span class="token number" style="background: none; border-radius: 0px; box-sizing: border-box; color: #00c6ff; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;4444&lt;/span&gt;/tcp
&lt;/li&gt;&lt;li data-prefix="$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;&lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;sudo&lt;/span&gt; firewall-cmd --permanent --zone&lt;span class="token operator" style="background: none; border-radius: 0px; box-sizing: border-box; color: #eff2fb; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;=&lt;/span&gt;public --add-port&lt;span class="token operator" style="background: none; border-radius: 0px; box-sizing: border-box; color: #eff2fb; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;=&lt;/span&gt;&lt;span class="token number" style="background: none; border-radius: 0px; box-sizing: border-box; color: #00c6ff; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;4567&lt;/span&gt;/udp
&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Using&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;--zone=public&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;--add-port=&lt;/code&gt;&amp;nbsp;here,&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;firewall-cmd&lt;/code&gt;&amp;nbsp;is opening up these ports to public traffic.&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;--permanent&lt;/code&gt;&amp;nbsp;ensures that these rules persist.&lt;/p&gt;&lt;div class="callout note" style="background-color: #d4efee; border-radius: 16px; box-sizing: border-box; color: #005955; font-family: Inter, sans-serif; font-size: 15px; line-height: 1.5em; margin: 0px 0px 1.5em; padding: 1em 1.25em; position: relative; z-index: 0;"&gt;&lt;p style="box-sizing: border-box; line-height: 1.5; margin: 0px;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;Note:&lt;/span&gt;&amp;nbsp;Depending on what else is running on your servers you might want to restrict access right away. To learn more about how to use FirewallD, see our tutorial&amp;nbsp;&lt;a href="https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-using-firewalld-on-centos-7" style="background-color: transparent; border-bottom: 1px solid rgb(0, 105, 255); box-sizing: border-box; color: #0069ff; text-decoration-line: none; transition: color 0.25s ease 0s, border-bottom-color 0.25s ease 0s;"&gt;How To Set Up a Firewall Using FirewallD on CentOS 7&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Now, add each server to the&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;public&lt;/code&gt;&amp;nbsp;zone by executing the following commands, replacing the highlighted text with the respective private IP addresses of your nodes:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed command language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;&lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;sudo&lt;/span&gt; firewall-cmd --permanent --zone&lt;span class="token operator" style="background: none; border-radius: 0px; box-sizing: border-box; color: #eff2fb; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;=&lt;/span&gt;public --add-source&lt;span class="token operator" style="background: none; border-radius: 0px; box-sizing: border-box; color: #eff2fb; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;=&lt;/span&gt;&lt;mark style="background: rgba(65, 255, 244, 0.35); border-radius: 8px; box-sizing: border-box; display: inline; line-height: calc(1.4em + 1px); padding: 0px 2px;"&gt;galera-node-1-ip&lt;/mark&gt;/32
&lt;/li&gt;&lt;li data-prefix="$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;&lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;sudo&lt;/span&gt; firewall-cmd --permanent --zone&lt;span class="token operator" style="background: none; border-radius: 0px; box-sizing: border-box; color: #eff2fb; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;=&lt;/span&gt;public --add-source&lt;span class="token operator" style="background: none; border-radius: 0px; box-sizing: border-box; color: #eff2fb; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;=&lt;/span&gt;&lt;mark style="background: rgba(65, 255, 244, 0.35); border-radius: 8px; box-sizing: border-box; display: inline; line-height: calc(1.4em + 1px); padding: 0px 2px;"&gt;galera-node-2-ip&lt;/mark&gt;/32
&lt;/li&gt;&lt;li data-prefix="$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;&lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;sudo&lt;/span&gt; firewall-cmd --permanent --zone&lt;span class="token operator" style="background: none; border-radius: 0px; box-sizing: border-box; color: #eff2fb; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;=&lt;/span&gt;public --add-source&lt;span class="token operator" style="background: none; border-radius: 0px; box-sizing: border-box; color: #eff2fb; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;=&lt;/span&gt;&lt;mark style="background: rgba(65, 255, 244, 0.35); border-radius: 8px; box-sizing: border-box; display: inline; line-height: calc(1.4em + 1px); padding: 0px 2px;"&gt;galera-node-3-ip&lt;/mark&gt;/32
&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Reload the firewall to apply the changes:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed command language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;&lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;sudo&lt;/span&gt; firewall-cmd --reload
&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;After you have configured your firewall on the first node, create the same firewall settings on the second and third node.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Now that you have configured the firewalls successfully, you’re ready to create a SELinux policy in the next step.&lt;/p&gt;&lt;h2 id="step-6-creating-a-selinux-policy" style="box-sizing: border-box; color: #4d5b7c; font-family: Epilogue, sans-serif; margin: 1em 0px;"&gt;Step 6 — Creating a SELinux Policy&lt;/h2&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;In this section, you will create a SELinux policy that will allow all the nodes in the cluster to be able to communicate with each other and perform cluster operations.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;&lt;a href="https://en.wikipedia.org/wiki/Security-Enhanced_Linux" style="border-bottom: 1px solid rgb(0, 105, 255); box-sizing: border-box; color: #0069ff; text-decoration-line: none; transition: color 0.25s ease 0s, border-bottom-color 0.25s ease 0s;"&gt;SELinux&lt;/a&gt;&amp;nbsp;is a Linux kernel module that improves the security of operating systems with its support for access control and mandatory access control policies. It is enabled by default on CentOS 7 and restricts the MariaDB daemon from performing many activities.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;In order to create the policy, you will perform various activities on the cluster with the SELinux mode set to permissive for MySQL. You will then create a policy from the logged events and finally set the SELinux mode to enforcing once the policy is installed successfully.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;First, allow access to the relevant ports by running the following commands on all three servers:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed command language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;&lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;sudo&lt;/span&gt; semanage port -a -t mysqld_port_t -p tcp &lt;span class="token number" style="background: none; border-radius: 0px; box-sizing: border-box; color: #00c6ff; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;4567&lt;/span&gt;
&lt;/li&gt;&lt;li data-prefix="$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;&lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;sudo&lt;/span&gt; semanage port -a -t mysqld_port_t -p udp &lt;span class="token number" style="background: none; border-radius: 0px; box-sizing: border-box; color: #00c6ff; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;4567&lt;/span&gt;
&lt;/li&gt;&lt;li data-prefix="$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;&lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;sudo&lt;/span&gt; semanage port -a -t mysqld_port_t -p tcp &lt;span class="token number" style="background: none; border-radius: 0px; box-sizing: border-box; color: #00c6ff; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;4568&lt;/span&gt;
&lt;/li&gt;&lt;li data-prefix="$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;&lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;sudo&lt;/span&gt; semanage port -a -t mysqld_port_t -p tcp &lt;span class="token number" style="background: none; border-radius: 0px; box-sizing: border-box; color: #00c6ff; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;4444&lt;/span&gt;
&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="callout note" style="background-color: #d4efee; border-radius: 16px; box-sizing: border-box; color: #005955; font-family: Inter, sans-serif; font-size: 15px; line-height: 1.5em; margin: 0px 0px 1.5em; padding: 1em 1.25em; position: relative; z-index: 0;"&gt;&lt;p style="box-sizing: border-box; line-height: 1.5; margin: 0px;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;Note:&lt;/span&gt;&amp;nbsp;You may receive a&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;ValueError&lt;/code&gt;&amp;nbsp;when allowing access to some of these ports. This means that the SELinux status of that port has already been set, which in this case will not affect the process of this tutorial.&lt;/p&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;In these commands, you are using the SELinux management tool&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;semanage&lt;/code&gt;&amp;nbsp;with the&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;-a&lt;/code&gt;&amp;nbsp;flag to add specified ports and to ignore the database server.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Next, run the following command on all three servers, which sets the MySQL SELinux domain to permissive mode temporarily.&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed command language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;&lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;sudo&lt;/span&gt; semanage permissive -a mysqld_t
&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;This command can take a minute to complete and will not display any output.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Next, stop the database server on all the nodes so that you will be able to bootstrap the database cluster with shared SELinux policies. To do this, run the following command on all three nodes:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed command language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;&lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;sudo&lt;/span&gt; systemctl stop mariadb
&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Now, bootstrap the cluster to generate inter-node communication events that will be added to the SELinux policy. On the first node, bootstrap the cluster by executing:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed custom_prefix language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="galera-node-01$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;&lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;sudo&lt;/span&gt; galera_new_cluster
&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Create a database and table for the specific purpose of logging SST events by running the following on the first node:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed custom_prefix language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="galera-node-01$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;mysql -u root -p -e &lt;span class="token string" style="background: none; border-radius: 0px; box-sizing: border-box; color: #29e3ab; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;'CREATE DATABASE selinux;
&lt;/span&gt;&lt;/li&gt;&lt;span class="token string" style="background: none; border-radius: 0px; box-sizing: border-box; color: #29e3ab; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;&lt;li data-prefix="galera-node-01$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;CREATE TABLE selinux.selinux_policy (id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id));
&lt;/li&gt;&lt;/span&gt;&lt;li data-prefix="galera-node-01$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;&lt;span class="token string" style="background: none; border-radius: 0px; box-sizing: border-box; color: #29e3ab; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;INSERT INTO selinux.selinux_policy VALUES ();'&lt;/span&gt;
&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Now start the server on the second node:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed custom_prefix language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="galera-node-01$" style="box-sizing: border-box; margin: 0px; padding: 0px;"&gt;&lt;span style="font-family: monospace, monospace;"&gt;&lt;span style="font-size: 14px;"&gt;&lt;span style="color: #ff4084;"&gt;sudo &lt;/span&gt;&lt;span style="color: white;"&gt;systemctl start mariadb&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgba(0, 0, 0, 0); font-family: monospace, monospace;"&gt;&lt;span style="font-size: 14px;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Then do the same on the third node:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed custom_prefix language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="galera-node-01$" style="box-sizing: border-box; margin: 0px; padding: 0px;"&gt;&lt;span style="font-family: monospace, monospace;"&gt;&lt;span style="font-size: 14px;"&gt;&lt;span style="color: #ff4084;"&gt;sudo &lt;/span&gt;&lt;span style="color: white;"&gt;systemctl start mariadb&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgba(0, 0, 0, 0); font-family: monospace, monospace;"&gt;&lt;span style="font-size: 14px;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;You will not see any output for the previous commands. To generate IST events, execute the following on all three servers:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed command language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;mysql -u root -p -e &lt;span class="token string" style="background: none; border-radius: 0px; box-sizing: border-box; color: #29e3ab; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;'INSERT INTO selinux.selinux_policy VALUES ();'&lt;/span&gt;
&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Now create and enable the SELinux policy by executing the following commands on all three servers:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed command language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;&lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;sudo&lt;/span&gt; &lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;grep&lt;/span&gt; mysql /var/log/audit/audit.log &lt;span class="token operator" style="background: none; border-radius: 0px; box-sizing: border-box; color: #eff2fb; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;|&lt;/span&gt; &lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;sudo&lt;/span&gt; audit2allow -M Galera
&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;This first command searches for generated events in the&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;audit.log&lt;/code&gt;&amp;nbsp;file and pipes them to a module named&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;Galera.pp&lt;/code&gt;&amp;nbsp;generated by the&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;audit2allow&lt;/code&gt;&amp;nbsp;tool. This will result in the following output:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px 50%; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;&lt;div class="secondary-code-label" style="box-sizing: border-box; color: #00c6ff; margin: 0px 0px 4px;" title="Output"&gt;Output&lt;/div&gt;******************** IMPORTANT ***********************
To make this policy package active, execute:

semodule -i Galera.pp

&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Next, follow the instructions in the output and use the following command to install the generated module:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed command language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;&lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;sudo&lt;/span&gt; semodule -i Galera.pp
&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Now that the policy is active, disable permissive mode for the MariaDB server:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed command language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;&lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;sudo&lt;/span&gt; semanage permissive -d mysqld_t
&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Now that you have successfully created a SELinux policy and enabled it, you are ready to start the cluster in the next section.&lt;/p&gt;&lt;h2 id="step-7-starting-the-cluster" style="box-sizing: border-box; color: #4d5b7c; font-family: Epilogue, sans-serif; margin: 1em 0px;"&gt;Step 7 — Starting the Cluster&lt;/h2&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;In this step, you will start your MariaDB cluster. To begin, you need to stop the running MariaDB service so that you can bring your cluster online.&lt;/p&gt;&lt;h3 id="stop-mariadb-on-all-three-servers" style="box-sizing: border-box; color: #4d5b7c; font-family: Epilogue, sans-serif; margin: 1em 0px;"&gt;Stop MariaDB on All Three Servers&lt;/h3&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;When stopping the MariaDB service, it is important to execute this action on your servers in a specific order. This shutdown sequence ensures that the first node will be able to safely bootstrap the cluster when it starts up.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;First, run the following command on the third node:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed custom_prefix language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="galera-node-01$" style="box-sizing: border-box; margin: 0px; padding: 0px;"&gt;&lt;span style="font-family: monospace, monospace;"&gt;&lt;span style="font-size: 14px;"&gt;&lt;span style="color: #ff4084;"&gt;sudo &lt;/span&gt;&lt;span style="color: white;"&gt;systemctl stop mariadb&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgba(0, 0, 0, 0); font-family: monospace, monospace;"&gt;&lt;span style="font-size: 14px;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Next, stop the service on the second node:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed custom_prefix language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="galera-node-01$" style="box-sizing: border-box; margin: 0px; padding: 0px;"&gt;&lt;span style="font-family: monospace, monospace;"&gt;&lt;span style="font-size: 14px;"&gt;&lt;span style="color: #ff4084;"&gt;sudo &lt;/span&gt;&lt;span style="color: white;"&gt;systemctl stop mariadb&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgba(0, 0, 0, 0); font-family: monospace, monospace;"&gt;&lt;span style="font-size: 14px;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Finally, stop the service on the first node:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed custom_prefix language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="galera-node-01$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;&lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;sudo&lt;/span&gt; systemctl stop mariadb
&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;systemctl&lt;/code&gt;&amp;nbsp;doesn’t display the outcome of all service management commands, so to be sure you succeeded, use the following command on each of your servers:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed command language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;&lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;sudo&lt;/span&gt; systemctl status mariadb
&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;The last line will look something like the following:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px 50%; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;&lt;div class="secondary-code-label" style="box-sizing: border-box; color: #00c6ff; margin: 0px 0px 4px;" title="Output"&gt;Output&lt;/div&gt;. . . 
Apr 26 03:34:23 galera-node-01 systemd[1]: Stopped MariaDB 10.4.4 database server.
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Once you’ve shut down&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;mariadb&lt;/code&gt;&amp;nbsp;on all of the servers, you’re ready to proceed.&lt;/p&gt;&lt;h3 id="bring-up-the-first-node" style="box-sizing: border-box; color: #4d5b7c; font-family: Epilogue, sans-serif; margin: 1em 0px;"&gt;Bring Up the First Node&lt;/h3&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;To bring up the first node, you’ll need to use a special startup script. The way you’ve configured your cluster, each node that comes online tries to connect to at least one other node specified in its&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;galera.cnf&lt;/code&gt;&amp;nbsp;file to get its initial state. Without using the&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;galera_new_cluster&lt;/code&gt;&amp;nbsp;script that allows systemd to pass the&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;--wsrep-new-cluster&lt;/code&gt;&amp;nbsp;parameter, a normal&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;systemctl start mariadb&lt;/code&gt;&amp;nbsp;would fail because there are no nodes running for the first node to connect with.&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed custom_prefix language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="galera-node-01$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;&lt;span class="token function" style="background: none; border-radius: 0px; box-sizing: border-box; color: #ff4084; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;sudo&lt;/span&gt; galera_new_cluster
&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;This command will not display any output on successful execution. When this script succeeds, the node is registered as part of the cluster, and you can see it with the following command:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed custom_prefix language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="galera-node-01$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;mysql -u root -p -e &lt;span class="token string" style="background: none; border-radius: 0px; box-sizing: border-box; color: #29e3ab; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;"SHOW STATUS LIKE 'wsrep_cluster_size'"&lt;/span&gt;
&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;You will see the following output indicating that there is one node in the cluster:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px 50%; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;&lt;div class="secondary-code-label" style="box-sizing: border-box; color: #00c6ff; margin: 0px 0px 4px;" title="Output"&gt;Output&lt;/div&gt;+--------------------+-------+
| Variable_name      | Value |
+--------------------+-------+
| wsrep_cluster_size | 1     |
+--------------------+-------+
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;On the remaining nodes, you can start&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;mariadb&lt;/code&gt;&amp;nbsp;normally. They will search for any member of the cluster list that is online, so when they find one, they will join the cluster.&lt;/p&gt;&lt;h3 id="bring-up-the-second-node" style="box-sizing: border-box; color: #4d5b7c; font-family: Epilogue, sans-serif; margin: 1em 0px;"&gt;Bring Up the Second Node&lt;/h3&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Now you can bring up the second node. Start&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;mariadb&lt;/code&gt;:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed custom_prefix language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="galera-node-01$" style="box-sizing: border-box; margin: 0px; padding: 0px;"&gt;&lt;span style="font-family: monospace, monospace;"&gt;&lt;span style="font-size: 14px;"&gt;&lt;span style="color: #ff4084;"&gt;sudo &lt;/span&gt;&lt;span style="color: white;"&gt;systemctl start mariadb&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgba(0, 0, 0, 0); font-family: monospace, monospace;"&gt;&lt;span style="font-size: 14px;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;No output will be displayed on successful execution. You will see your cluster size increase as each node comes online:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed custom_prefix language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="galera-node-01$" style="box-sizing: border-box; margin: 0px; padding: 0px;"&gt;&lt;span style="font-family: monospace, monospace;"&gt;&lt;span style="font-size: 14px;"&gt;&lt;span style="color: white;"&gt;mysql -u root -p -e&lt;/span&gt;&lt;span style="color: #ff4084;"&gt; &lt;/span&gt;&lt;span style="color: #29e3ab;"&gt;"SHOW STATUS LIKE 'wsrep_cluster_size'"&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgba(0, 0, 0, 0);"&gt;&lt;span style="font-size: 14px;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;You will see the following output indicating that the second node has joined the cluster and that there are two nodes in total.&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed custom_prefix language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="galera-node-01$" style="box-sizing: border-box; margin: 0px; padding: 0px;"&gt;&lt;span style="font-family: monospace, monospace;"&gt;&lt;span style="color: white;"&gt;&lt;span style="font-size: 14px;"&gt;Output
+--------------------+-------+
| Variable_name      | Value |
+--------------------+-------+
| wsrep_cluster_size | 2     |
+--------------------+-------+&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgba(0, 0, 0, 0);"&gt;&lt;span style="font-size: 14px;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;h3 id="bring-up-the-third-node" style="box-sizing: border-box; color: #4d5b7c; font-family: Epilogue, sans-serif; margin: 1em 0px;"&gt;Bring Up the Third Node&lt;/h3&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;It’s now time to bring up the third node. Start&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;mariadb&lt;/code&gt;:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed custom_prefix language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="galera-node-01$" style="box-sizing: border-box; margin: 0px; padding: 0px;"&gt;&lt;span style="font-family: monospace, monospace;"&gt;&lt;span style="font-size: 14px;"&gt;&lt;span style="color: #ff4084;"&gt;sudo &lt;/span&gt;&lt;span style="color: white;"&gt;systemctl start mariadb&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgba(0, 0, 0, 0); font-family: monospace, monospace;"&gt;&lt;span style="font-size: 14px;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Run the following command to find the cluster size:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed custom_prefix language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="galera-node-01$" style="box-sizing: border-box; margin: 0px; padding: 0px;"&gt;&lt;span style="font-family: monospace, monospace;"&gt;&lt;span style="font-size: 14px;"&gt;&lt;span style="color: white;"&gt;mysql -u root -p -e&lt;/span&gt;&lt;span style="color: #ff4084;"&gt; &lt;/span&gt;&lt;span style="color: #29e3ab;"&gt;"SHOW STATUS LIKE 'wsrep_cluster_size'"&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgba(0, 0, 0, 0);"&gt;&lt;span style="font-size: 14px;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;You will see the following output, which indicates that the third node has joined the cluster and that the total number of nodes in the cluster is three.&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed custom_prefix language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="galera-node-01$" style="box-sizing: border-box; margin: 0px; padding: 0px;"&gt;&lt;span style="font-family: monospace, monospace;"&gt;&lt;span style="color: white;"&gt;&lt;span style="font-size: 14px;"&gt;Output
+--------------------+-------+
| Variable_name      | Value |
+--------------------+-------+
| wsrep_cluster_size | 3     |
+--------------------+-------+&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgba(0, 0, 0, 0);"&gt;&lt;span style="font-size: 14px;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;At this point, the entire cluster is online and communicating successfully. Next, you can ensure the working setup by testing replication in the next section.&lt;/p&gt;&lt;h2 id="step-8-testing-replication" style="box-sizing: border-box; color: #4d5b7c; font-family: Epilogue, sans-serif; margin: 1em 0px;"&gt;Step 8 — Testing Replication&lt;/h2&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;You’ve gone through the steps up to this point so that your cluster can perform replication from any node to any other node, known as active-active replication. Follow the following steps to test and see if the replication is working as expected.&lt;/p&gt;&lt;h3 id="write-to-the-first-node" style="box-sizing: border-box; color: #4d5b7c; font-family: Epilogue, sans-serif; margin: 1em 0px;"&gt;Write to the First Node&lt;/h3&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;You’ll start by making database changes on your first node. The following commands will create a database called&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;playground&lt;/code&gt;&amp;nbsp;and a table inside of this database called&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;equipment&lt;/code&gt;.&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed custom_prefix language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="galera-node-01$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;mysql -u root -p -e &lt;span class="token string" style="background: none; border-radius: 0px; box-sizing: border-box; color: #29e3ab; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;'CREATE DATABASE playground;
&lt;/span&gt;&lt;/li&gt;&lt;span class="token string" style="background: none; border-radius: 0px; box-sizing: border-box; color: #29e3ab; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;&lt;li data-prefix="galera-node-01$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;CREATE TABLE playground.equipment ( id INT NOT NULL AUTO_INCREMENT, type VARCHAR(50), quant INT, color VARCHAR(25), PRIMARY KEY(id));
&lt;/li&gt;&lt;/span&gt;&lt;li data-prefix="galera-node-01$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;&lt;span class="token string" style="background: none; border-radius: 0px; box-sizing: border-box; color: #29e3ab; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;INSERT INTO playground.equipment (type, quant, color) VALUES ("slide", 2, "blue");'&lt;/span&gt;
&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;In the previous command, the&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;CREATE DATABASE&lt;/code&gt;&amp;nbsp;statement creates a database named&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;playground&lt;/code&gt;. The&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;CREATE&lt;/code&gt;&amp;nbsp;statement creates a table named&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;equipment&lt;/code&gt;&amp;nbsp;inside the&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;playground&lt;/code&gt;&amp;nbsp;database having an auto-incrementing identifier column called&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;id&lt;/code&gt;&amp;nbsp;and other columns. The&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;type&lt;/code&gt;&amp;nbsp;column,&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;quant&lt;/code&gt;&amp;nbsp;column, and&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;color&lt;/code&gt;&amp;nbsp;column are defined to store the type, quantity, and color of the equipment respectively. The&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;INSERT&lt;/code&gt;&amp;nbsp;statement inserts an entry of type&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;slide&lt;/code&gt;, quantity&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;2&lt;/code&gt;, and color&amp;nbsp;&lt;code style="background-color: #e3e8f4; border-radius: 8px; box-sizing: border-box; color: #24335a; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; padding: 3px;"&gt;blue&lt;/code&gt;.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;You now have one value in your table.&lt;/p&gt;&lt;h3 id="read-and-write-on-the-second-node" style="box-sizing: border-box; color: #4d5b7c; font-family: Epilogue, sans-serif; margin: 1em 0px;"&gt;Read and Write on the Second Node&lt;/h3&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Next, look at the second node to verify that replication is working:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed custom_prefix language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="galera-node-01$" style="box-sizing: border-box; margin: 0px; padding: 0px;"&gt;&lt;span style="font-family: monospace, monospace;"&gt;&lt;span style="font-size: 14px;"&gt;&lt;span style="color: white;"&gt;mysql -u root -p -e&lt;/span&gt;&lt;span style="color: #ff4084;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #29e3ab; font-family: monospace, monospace;"&gt;&lt;span style="font-size: 14px;"&gt;'SELECT * FROM playground.equipment;'&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;If replication is working, the data you entered on the first node will be visible here on the second:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed custom_prefix language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="galera-node-01$" style="box-sizing: border-box; font-size: 14px; margin: 0px; padding: 0px;"&gt;&lt;span style="color: white; font-family: monospace, monospace;"&gt;Output
+----+-------+-------+-------+
| id | type  | quant | color |
+----+-------+-------+-------+
|  1 | slide |     2 | blue  |
+----+-------+-------+-------+&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;From this same node, you can write data to the cluster:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed custom_prefix language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="galera-node-01$" style="box-sizing: border-box; margin: 0px; padding: 0px;"&gt;&lt;span style="font-family: monospace, monospace;"&gt;&lt;span style="font-size: 14px;"&gt;&lt;span style="color: white;"&gt;mysql -u root -p -e&lt;/span&gt;&lt;span style="color: #ff4084;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #29e3ab; font-family: monospace, monospace;"&gt;&lt;span style="font-size: 14px;"&gt;'INSERT INTO playground.equipment (type, quant, color) VALUES ("swing", 10, "yellow");'&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;h3 id="read-and-write-on-the-third-node" style="box-sizing: border-box; color: #4d5b7c; font-family: Epilogue, sans-serif; margin: 1em 0px;"&gt;Read and Write on the Third Node&lt;/h3&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;From the third node, you can read all of this data by querying the table again:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed custom_prefix language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="galera-node-01$" style="box-sizing: border-box; margin: 0px; padding: 0px;"&gt;&lt;span style="font-family: monospace, monospace;"&gt;&lt;span style="font-size: 14px;"&gt;&lt;span style="color: white;"&gt;mysql -u root -p -e&lt;/span&gt;&lt;span style="color: #ff4084;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #29e3ab; font-family: monospace, monospace;"&gt;&lt;span style="font-size: 14px;"&gt;'SELECT * FROM playground.equipment;'&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;You will see the following output showing the two rows:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed custom_prefix language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="galera-node-01$" style="box-sizing: border-box; font-size: 14px; margin: 0px; padding: 0px;"&gt;&lt;span style="color: white; font-family: monospace, monospace;"&gt;Output
   +----+-------+-------+--------+
   | id | type  | quant | color  |
   +----+-------+-------+--------+
   |  1 | slide |     2 | blue   |
   |  2 | swing |    10 | yellow |
   +----+-------+-------+--------+&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Again, you can add another value from this node:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed custom_prefix language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="galera-node-01$" style="box-sizing: border-box; margin: 0px; padding: 0px;"&gt;&lt;span style="font-family: monospace, monospace;"&gt;&lt;span style="font-size: 14px;"&gt;&lt;span style="color: white;"&gt;mysql -u root -p -e&lt;/span&gt;&lt;span style="color: #ff4084;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #29e3ab; font-family: monospace, monospace;"&gt;&lt;span style="font-size: 14px;"&gt;'INSERT INTO playground.equipment (type, quant, color) VALUES ("seesaw", 3, "green");'&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;h3 id="read-on-the-first-node" style="box-sizing: border-box; color: #4d5b7c; font-family: Epilogue, sans-serif; margin: 1em 0px;"&gt;Read on the First Node&lt;/h3&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Back on the first node, you can verify that your data is available everywhere:&lt;/p&gt;&lt;div class="code-toolbar" style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; margin: 1em 0px; position: relative;"&gt;&lt;pre class="prefixed custom_prefix language-bash" style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; text-shadow: none;"&gt;&lt;ol style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"&gt;&lt;li data-prefix="galera-node-01$" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: pre;"&gt;mysql -u root -p -e &lt;span class="token string" style="background: none; border-radius: 0px; box-sizing: border-box; color: #29e3ab; display: inline; margin: 0px; padding: 0px; text-shadow: none;"&gt;'SELECT * FROM playground.equipment;'&lt;/span&gt;
&lt;/li&gt;&lt;/ol&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="toolbar" style="box-sizing: border-box; position: absolute; right: 0.2em; top: 0.3em;"&gt;&lt;div class="toolbar-item" style="box-sizing: border-box; display: inline-block;"&gt;&lt;button style="appearance: button; background: rgb(255, 255, 255); border-color: initial; border-radius: 8px; border-style: initial; border-width: 0px; color: #24335a; cursor: pointer; font-family: inherit; font-size: 0.9em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 24px; margin: 0.5em; overflow: visible; padding: 0.1em 8px; transition: color 0.25s ease 0s, background 0.25s ease 0s; user-select: none; width: auto;"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;You will see the following output, which indicates that the rows are available on the first node.&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 14px; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; white-space: normal;"&gt;&lt;code style="background: 0px 50%; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; line-height: 1.4em; padding: 0px; white-space: pre;"&gt;&lt;div class="secondary-code-label" style="box-sizing: border-box; color: #00c6ff; margin: 0px 0px 4px;" title="Output"&gt;Output&lt;/div&gt;   +----+--------+-------+--------+
   | id | type   | quant | color  |
   +----+--------+-------+--------+
   |  1 | slide  |     2 | blue   |
   |  2 | swing  |    10 | yellow |
   |  3 | seesaw |     3 | green  |
   +----+--------+-------+--------+
&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;You’ve verified successfully that you can write to all of the nodes and that replication is being performed properly.&lt;/p&gt;&lt;h2 id="conclusion" style="box-sizing: border-box; color: #4d5b7c; font-family: Epilogue, sans-serif; margin: 1em 0px;"&gt;Conclusion&lt;/h2&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;At this point, you have a working three-node Galera test cluster configured. If you plan on using a Galera cluster in a production situation, it’s recommended that you begin with no fewer than five nodes.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px;"&gt;Before production use, you may want to take a look at some of the&amp;nbsp;&lt;a href="http://galeracluster.com/documentation-webpages/sst.html" style="border-bottom: 1px solid rgb(0, 105, 255); box-sizing: border-box; color: #0069ff; text-decoration-line: none; transition: color 0.25s ease 0s, border-bottom-color 0.25s ease 0s;"&gt;other state snapshot transfer (SST) agents&lt;/a&gt;&amp;nbsp;like&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;XtraBackup&lt;/span&gt;, which allows you to set up new nodes very quickly and without large interruptions to your active nodes. This does not affect the actual replication, but is a concern when nodes are being initialized.&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px 0px;"&gt;If you would like to continue learning about SQL databases, take a look at our&amp;nbsp;&lt;a href="https://www.digitalocean.com/community/tutorials/how-to-manage-sql-database-cheat-sheet" style="border-bottom: 1px solid rgb(0, 105, 255); box-sizing: border-box; color: #0069ff; text-decoration-line: none; transition: color 0.25s ease 0s, border-bottom-color 0.25s ease 0s;"&gt;How To Manage an SQL Database&lt;/a&gt;&amp;nbsp;article.&lt;/p&gt;&lt;p style="box-sizing: border-box; line-height: 1.5; margin: 1em 0px 0px;"&gt;&lt;span style="color: #cccccc; font-family: courier; font-size: xx-small;"&gt;&lt;b style="background-color: #3d85c6;"&gt;Post/Tutorial Credit:&amp;nbsp;https://www.digitalocean.com/community/tutorials/how-to-configure-a-galera-cluster-with-mariadb-on-centos-7-servers&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px 0px;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="box-sizing: border-box; line-height: 1.5; margin: 1em 0px 0px;"&gt;&lt;span face="Inter, sans-serif" style="color: #4d5b7c;"&gt;&lt;b&gt;Change&lt;/b&gt;&lt;/span&gt;&lt;b style="color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px;"&gt;&amp;nbsp;mariadb/mysql Data Directory:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px 0px;"&gt;We are going to change default mariadb data directory /var/lib/mysql to /data/mysql&lt;/p&gt;&lt;p style="box-sizing: border-box; line-height: 1.5; margin: 1em 0px 0px;"&gt;&lt;span face="Inter, sans-serif" style="color: #4d5b7c;"&gt;First stop mariadb service:&lt;/span&gt;&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: 0px 50%; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px;"&gt;&lt;div class="secondary-code-label" style="box-sizing: border-box; font-size: 14px; margin: 0px 0px 4px;" title="Output"&gt;&lt;span style="color: white; font-family: monospace, monospace;"&gt;systemctl stop mariadb&lt;/span&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; line-height: 1.5; margin: 1em 0px 0px;"&gt;&lt;span face="Inter, sans-serif" style="color: #4d5b7c;"&gt;Copy mysql directory to new path:&lt;/span&gt;&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: 0px 50%; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px;"&gt;&lt;div class="secondary-code-label" style="box-sizing: border-box; font-size: 14px; margin: 0px 0px 4px;" title="Output"&gt;&lt;span style="color: white; font-family: monospace, monospace;"&gt;rsync -av /var/lib/mysql /data/&lt;/span&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; line-height: 1.5; margin: 1em 0px 0px;"&gt;&lt;span face="Inter, sans-serif" style="color: #4d5b7c;"&gt;Edit galera config file to add new data path:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: 0px 50%; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px;"&gt;&lt;div class="secondary-code-label" style="box-sizing: border-box; font-size: 14px; margin: 0px 0px 4px;" title="Output"&gt;&lt;span style="color: white; font-family: monospace, monospace;"&gt;nano /etc/my.cnf.d/galera.cnf&lt;/span&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: 0px 50%; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px;"&gt;&lt;div class="secondary-code-label" style="box-sizing: border-box; margin: 0px 0px 4px;" title="Output"&gt;&lt;span style="background-color: initial; color: white; font-family: monospace, monospace; font-size: 14px;"&gt;[mysqld]&lt;/span&gt;&lt;/div&gt;&lt;div class="secondary-code-label" style="box-sizing: border-box; font-size: 14px; margin: 0px 0px 4px;" title="Output"&gt;&lt;span style="color: white; font-family: monospace, monospace;"&gt;
datadir = /data/mysql


socket  = /data/mysql/mysql.sock

.........

[client]

port=3306


socket=/data/mysql/mysql.sock&lt;/span&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; line-height: 1.5; margin: 1em 0px 0px;"&gt;&lt;span face="Inter, sans-serif" style="color: #4d5b7c;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px 0px;"&gt;Adjust selinux policy for new directory:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: 0px 50%; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px;"&gt;&lt;div class="secondary-code-label" style="box-sizing: border-box; font-size: 14px; margin: 0px 0px 4px;" title="Output"&gt;&lt;span style="color: white; font-family: monospace, monospace;"&gt;semanage fcontext -a -t mysqld_db_t "/data/mysql(/.*)?"
restorecon -Rv /data/mysql&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; line-height: 1.5; margin: 1em 0px 0px;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="box-sizing: border-box; line-height: 1.5; margin: 1em 0px 0px;"&gt;&lt;span face="Inter, sans-serif" style="color: #4d5b7c;"&gt;Start mariadb server:&lt;/span&gt;&lt;/p&gt;&lt;p style="box-sizing: border-box; line-height: 1.5; margin: 1em 0px 0px;"&gt;&lt;span face="Inter, sans-serif" style="color: #4d5b7c;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: 0px 50%; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px;"&gt;&lt;div class="secondary-code-label" style="box-sizing: border-box; font-size: 14px; margin: 0px 0px 4px;" title="Output"&gt;&lt;span style="color: white; font-family: monospace, monospace;"&gt;systemctl start mariadb&lt;/span&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style="box-sizing: border-box; line-height: 1.5; margin: 1em 0px 0px;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="box-sizing: border-box; line-height: 1.5; margin: 1em 0px 0px;"&gt;&lt;span face="Inter, sans-serif" style="color: #4d5b7c;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px 0px;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.5; margin: 1em 0px 0px;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="box-sizing: border-box; color: #4d5b7c; font-family: Inter, sans-serif; line-height: 1.5; margin: 1em 0px 0px;"&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;Configure HAproxy Loadbalancer for the cluster&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;h2 id="step-install-and-configure-haproxy" style="background-color: white; border-bottom: 1px solid rgb(195, 202, 213); color: #314d7c; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 21px; margin: 0px 0px 10px; padding: 25px 0px 5px;"&gt;Step 2 - Install and Configure HAProxy&lt;/h2&gt;&lt;p style="background-color: white; color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 1em;"&gt;Login to the HAProxy server:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: 0px 50%; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px;"&gt;&lt;div class="secondary-code-label" style="box-sizing: border-box; color: #00c6ff; font-family: monospace, monospace; font-size: 14px; margin: 0px 0px 4px; white-space: pre;" title="Output"&gt;&lt;span style="background-color: initial; color: white;"&gt;ssh haproxy1@192.168.1.135&lt;/span&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style="background-color: white; color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 1em;"&gt;Become root user and add the MariaDB server IP and hostname to the "/etc/hosts" file:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: 0px 50%; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px;"&gt;&lt;div class="secondary-code-label" style="box-sizing: border-box; font-size: 14px; margin: 0px 0px 4px;" title="Output"&gt;&lt;span style="color: white; font-family: monospace, monospace;"&gt;sudo su
vi /etc/hosts&lt;/span&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style="background-color: white; color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 1em;"&gt;HAProxy is available in the CentOS base repository, run this yum command to install it:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: 0px 50%; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px;"&gt;&lt;div class="secondary-code-label" style="box-sizing: border-box; font-size: 14px; margin: 0px 0px 4px;" title="Output"&gt;&lt;span style="color: white; font-family: monospace, monospace;"&gt;yum -y install haproxy&lt;/span&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style="background-color: white; color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 1em;"&gt;Then configure the log for HAProxy by editing the&amp;nbsp;rsyslog configuration file:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: 0px 50%; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px;"&gt;&lt;div class="secondary-code-label" style="box-sizing: border-box; font-size: 14px; margin: 0px 0px 4px;" title="Output"&gt;&lt;span style="color: white; font-family: monospace, monospace;"&gt;vi /etc/rsyslog.conf&lt;/span&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style="background-color: white; color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 1em;"&gt;Uncomment the&amp;nbsp;udp port:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: 0px 50%; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px;"&gt;&lt;div class="secondary-code-label" style="box-sizing: border-box; font-size: 14px; margin: 0px 0px 4px;" title="Output"&gt;&lt;span style="color: white; font-family: monospace, monospace;"&gt;# Provides UDP syslog reception
$ModLoad imudp
$UDPServerRun 51&lt;/span&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style="background-color: white; color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 1em;"&gt;Save the file and exit the editor.&lt;span class="ezoic-adpicker-ad" id="ezoic-pub-ad-placeholder-116"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: white; color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 1em;"&gt;Add the HAProxy configuration in rsyslog.d directory:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: 0px 50%; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px;"&gt;&lt;div class="secondary-code-label" style="box-sizing: border-box; font-size: 14px; margin: 0px 0px 4px;" title="Output"&gt;&lt;span style="color: white; font-family: monospace, monospace;"&gt;vi /etc/rsyslog.d/haproxy.conf&lt;/span&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style="background-color: white; color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 1em;"&gt;Paste configuration below:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: 0px 50%; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px;"&gt;&lt;div class="secondary-code-label" style="box-sizing: border-box; font-size: 14px; margin: 0px 0px 4px;" title="Output"&gt;&lt;span style="color: white; font-family: monospace, monospace;"&gt;local2.=info     /var/log/haproxy-access.log
local2.notice    /var/log/haproxy-info.log&lt;/span&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style="background-color: white; color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 1em;"&gt;Save the file and restart rsyslog:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: 0px 50%; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px;"&gt;&lt;div class="secondary-code-label" style="box-sizing: border-box; font-size: 14px; margin: 0px 0px 4px;" title="Output"&gt;&lt;span style="color: white; font-family: monospace, monospace;"&gt;systemctl restart rsyslog&lt;/span&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style="background-color: white; color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 1em;"&gt;Next, create a new HAProxy configuration file.&lt;span class="ezoic-adpicker-ad" id="ezoic-pub-ad-placeholder-117"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: white; color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 1em;"&gt;Go to the /etc/haproxy directory and backup the dafult haproxy configuration file.&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: 0px 50%; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px;"&gt;&lt;div class="secondary-code-label" style="box-sizing: border-box; font-size: 14px; margin: 0px 0px 4px;" title="Output"&gt;&lt;span style="color: white; font-family: monospace, monospace;"&gt;cd /etc/haproxy/
mv haproxy.cfg haproxy.cfg.orig&lt;/span&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style="background-color: white; color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 1em;"&gt;Create new haproxy configuration file:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: 0px 50%; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px;"&gt;&lt;div class="secondary-code-label" style="box-sizing: border-box; font-size: 14px; margin: 0px 0px 4px;" title="Output"&gt;&lt;span style="color: white; font-family: monospace, monospace;"&gt;vi /etc/haproxy/haproxy.cfg&lt;/span&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style="background-color: white; color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 1em;"&gt;And paste the HAProxy configuration below:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: 0px 50%; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px;"&gt;&lt;div class="secondary-code-label" style="box-sizing: border-box; font-size: 14px; margin: 0px 0px 4px;" title="Output"&gt;&lt;span style="color: white; font-family: monospace, monospace;"&gt;global
        log 127.0.0.1   local2
        maxconn 1024
        user haproxy
        group haproxy
        daemon
        stats socket /var/run/haproxy.sock mode 600 level admin         # Make sock file for haproxy
 
defaults
        log     global
        mode    http
        option  tcplog
        option  dontlognull
        retries 3
        option  redispatch
        maxconn 1024
        timeout connect 5000ms
        timeout client 50000ms
        timeout server 50000ms
 
listen mariadb_cluster 0.0.0.0:3030
## MariaDB balance leastconn - the cluster listening on port 3030.
        mode tcp&lt;/span&gt;&lt;/div&gt;&lt;div class="secondary-code-label" style="box-sizing: border-box; margin: 0px 0px 4px;" title="Output"&gt;&lt;span style="color: white; font-family: monospace, monospace;"&gt;&lt;span style="font-size: 14px;"&gt;        balance roundrobin
        option tcpka
        #balance leastconn
        #option httpchk&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="secondary-code-label" style="box-sizing: border-box; font-size: 14px; margin: 0px 0px 4px;" title="Output"&gt;&lt;span style="color: white; font-family: monospace, monospace;"&gt;        server mariadb1 192.168.1.132:3306 check weight 1
        server mariadb2 192.168.1.133:3306 check &lt;/span&gt;&lt;span style="color: white; font-family: monospace, monospace;"&gt;weight 1&lt;/span&gt;&lt;span style="color: white; font-family: monospace, monospace;"&gt;
        server mariadb3 192.168.1.134:3306 check &lt;/span&gt;&lt;span style="color: white; font-family: monospace, monospace;"&gt;weight 1&lt;/span&gt;&lt;span style="color: white; font-family: monospace, monospace;"&gt;
listen stats 0.0.0.0:8080
## HAProxy stats web gui running on port 8080 - username and password: admin:admin.
        mode http
        stats enable
        stats uri /
        stats realm HAProxy\ Statistics
        stats auth admin:admin
        stats admin if TRUE&lt;/span&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style="background-color: white; color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 1em;"&gt;Port&amp;nbsp;&lt;span style="font-style: inherit; font-weight: inherit;"&gt;3030&lt;/span&gt;&amp;nbsp;is the load balanced MariaDB port, we can access the databases on all MariaDB servers with load balancer IP and that port.&lt;/p&gt;&lt;p style="background-color: white; color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 1em;"&gt;Port&amp;nbsp;&lt;span style="font-style: inherit; font-weight: inherit;"&gt;9000&lt;/span&gt;&amp;nbsp;is the port for the web-gui, it allows monitoring of HAProxy from the browser.&lt;/p&gt;&lt;p style="background-color: white; color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 1em;"&gt;Now start firewalld, open ports 9000 and 3030, and then reload it:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: 0px 50%; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px;"&gt;&lt;div class="secondary-code-label" style="box-sizing: border-box; font-size: 14px; margin: 0px 0px 4px;" title="Output"&gt;&lt;span style="color: white; font-family: monospace, monospace;"&gt;systemctl start firewalld
firewall-cmd --permanent --add-port=9000/tcp
firewall-cmd --permanent --add-port=3030/tcp
firewall-cmd --reload&lt;/span&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style="background-color: white; color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 1em;"&gt;Start HAProxy with the systemctl command:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: 0px 50%; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px;"&gt;&lt;div class="secondary-code-label" style="box-sizing: border-box; font-size: 14px; margin: 0px 0px 4px;" title="Output"&gt;&lt;span style="color: white; font-family: monospace, monospace;"&gt;systemctl start haproxy&lt;/span&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style="background-color: white; color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 1em;"&gt;&lt;/p&gt;&lt;h2 id="step-testing-haproxy-and-mariadb" style="background-color: white; border-bottom: 1px solid rgb(195, 202, 213); color: #314d7c; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 21px; margin: 0px 0px 10px; padding: 25px 0px 5px;"&gt;Step 3 - Testing HAProxy and MariaDB&lt;/h2&gt;&lt;h3 id="a-replication-testing" style="background-color: white; border-bottom: 1px solid rgb(195, 202, 213); color: #314d7c; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px 0px 10px; padding: 15px 0px 5px;"&gt;A. Replication testing&lt;/h3&gt;&lt;p style="background-color: white; color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 1em;"&gt;Login to the MariaDB server, access the MySQL shell and create a new database from mariadb1, then from&amp;nbsp;mariadb2, and finally from mariadb3.&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: 0px 50%; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px;"&gt;&lt;div class="secondary-code-label" style="box-sizing: border-box; font-size: 14px; margin: 0px 0px 4px;" title="Output"&gt;&lt;span style="color: white; font-family: monospace, monospace;"&gt;mysql -u root -p
create database this_mariadb1;  # Run this on mariadb1 server
create database this_mariadb2;  # Run this on mariadb2 server
create database this_mariadb3;  # Run this on mariadb3 server&lt;/span&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style="background-color: white; color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 1em;"&gt;Check the databases:&lt;/p&gt;&lt;p style="background-color: white; color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 1em;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="background-color: white; color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 1em;"&gt;&lt;/p&gt;&lt;h3 id="b-access-the-mariadb-server-trough-haproxy" style="background-color: white; border-bottom: 1px solid rgb(195, 202, 213); color: #314d7c; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px 0px 10px; padding: 15px 0px 5px;"&gt;B. Access the MariaDB Server trough HAProxy&lt;/h3&gt;&lt;p style="background-color: white; color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 1em;"&gt;Now we access the MariaDB server cluster and databases trough the HAProxy IP on port 3030.&lt;/p&gt;&lt;p style="background-color: white; color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 1em;"&gt;Before doing this test, enable remote access to the MariaDB server by creating a new user root with host "%".&lt;/p&gt;&lt;p style="background-color: white; color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 1em;"&gt;Log into the MariaDB shell and create a new user "root" with password "aqwe123":&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: 0px 50%; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px;"&gt;&lt;div class="secondary-code-label" style="box-sizing: border-box; font-size: 14px; margin: 0px 0px 4px;" title="Output"&gt;&lt;span style="color: white; font-family: monospace, monospace;"&gt;mysql -u root -p
GRANT ALL PRIVILEGES ON *.* TO root@'%' IDENTIFIED BY "aqwe123";&lt;/span&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style="background-color: white; color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 1em;"&gt;Next, access the 'mysql.user' database table trough the HAProxy server:&lt;/p&gt;&lt;pre style="background: rgb(8, 27, 75); border-radius: 16px; box-sizing: border-box; line-height: 1.4em; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em;"&gt;&lt;code style="background: 0px 50%; border-radius: 0px; box-sizing: border-box; line-height: 1.4em; padding: 0px;"&gt;&lt;div class="secondary-code-label" style="box-sizing: border-box; font-size: 14px; margin: 0px 0px 4px;" title="Output"&gt;&lt;span style="color: white; font-family: monospace, monospace;"&gt;mysql -u root -p -h 192.168.1.135 -P 3030 -e "select Host, User, Password from mysql.user"&lt;/span&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style="background-color: white; color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 1em;"&gt;You can see the users of the database server by accessing the load balancer IP on port 3030. You can access the databases on the MySQL nodes by accessing the HAProxy IP on port 3030.&lt;/p&gt;&lt;p style="background-color: white; color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 1em;"&gt;Another test of the server: the leastconn algorithm:&lt;/p&gt;&lt;p style="background-color: white; color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 1em;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="background-color: white; color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 1em;"&gt;&lt;/p&gt;&lt;h3 id="c-login-to-the-haproxy-webgui" style="background-color: white; border-bottom: 1px solid rgb(195, 202, 213); color: #314d7c; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px 0px 10px; padding: 15px 0px 5px;"&gt;C. Login to the HAProxy Web-Gui&lt;/h3&gt;&lt;p style="background-color: white; color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 1em;"&gt;You can access the HAProxy monitoring server on port 9000, with username and password "howtoforge" to show the HAProxy web UI:&lt;/p&gt;&lt;p style="background-color: white; color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 1em;"&gt;&lt;span style="font-style: inherit; font-weight: inherit;"&gt;http://192.168.1.135:9000/stats&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: white; color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 1em;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="background-color: white; color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px; padding: 1em;"&gt;HAProxy has been installed successfully and you can see the MariaDB servers are monitored.&lt;/p&gt;&lt;p style="box-sizing: border-box; line-height: 1.5; margin: 1em 0px 0px;"&gt;&lt;span style="background-color: #3d85c6;"&gt;&lt;b style="color: #cccccc; font-family: courier; font-size: x-small;"&gt;Post/Tutorial Credit:&amp;nbsp;&lt;/b&gt;&lt;span style="color: #cccccc; font-family: courier; font-size: xx-small;"&gt;&lt;b&gt;https://www.howtoforge.com/tutorial/how-to-setup-haproxy-as-load-balancer-for-mariadb-on-centos-7/&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</description><link>http://page.farhad.pw/2022/12/configure-galera-cluster-with-mariadb.html</link><author>noreply@blogger.com (Farhad)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsepkmmFuCgEnK_82WCK_Oqid3il65qYxSzAqI7eSt_HggrmyZHPJT7LxXv4fN2eDO5hWAkq-n5wq738zBixMqnXtfzfmePxwwGZVM0ZdGAPBKdYCTLRvzetsiaHSXAjeWtspyfRNwwR2QcmPE_2UH6BZpjFwCymBCetpgg9jHc1qfZcdTkk_GY_0M/s72-w643-h341-c/mariadb-galera-cluster-1024x545%20(1).png" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1026424054105678970.post-6551244550495476803</guid><pubDate>Mon, 07 Nov 2022 07:51:00 +0000</pubDate><atom:updated>2023-06-22T14:52:02.625+06:00</atom:updated><title>Setup Keycloak Server on Debian 11</title><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj17UZttkMMHNfcVba6nAwN_yCK5qe5Pnbu6K2Lm92Wh2fy2GEvhCrfQUWQwP1CZTne7gBb4pc8zb9YC6jqtY5MZw51Sb4p7bXDOQyip_PlNjSKbgvDHFRcsT0xghkKK86_vYo5k5tN3ylqHYmuRg5dcJTmZeZw4I-nQlcNhIxiHF2KHV0rxuFWMb9b/s960/Keycloak-overview-screenshot.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="494" data-original-width="960" height="285" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj17UZttkMMHNfcVba6nAwN_yCK5qe5Pnbu6K2Lm92Wh2fy2GEvhCrfQUWQwP1CZTne7gBb4pc8zb9YC6jqtY5MZw51Sb4p7bXDOQyip_PlNjSKbgvDHFRcsT0xghkKK86_vYo5k5tN3ylqHYmuRg5dcJTmZeZw4I-nQlcNhIxiHF2KHV0rxuFWMb9b/w553-h285/Keycloak-overview-screenshot.png" width="553" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre class="kd ke kf kg fy lu bs lv lw dz lx" style="background: rgb(242, 242, 242); border-radius: 0px; border: none; box-sizing: inherit; margin-bottom: 0px; margin-top: 56px; overflow-x: auto; padding: 20px;"&gt;&lt;span class="gh ly ks ig lx b dm lz ma l mb mc" data-selectable-paragraph="" id="9066" style="box-sizing: inherit; display: block; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; min-width: fit-content;"&gt;&lt;span style="color: #292929; font-family: Menlo, Monaco, Courier New, Courier, monospace;"&gt;&lt;span style="font-size: 16px; letter-spacing: -0.352px; white-space: pre-wrap;"&gt;apt-get -y update &amp;amp;&amp;amp; apt-get -y upgrade

apt-get -y install default-jdk		

yum -y update &amp;amp;&amp;amp; yum -y install java-11-openjdk-devel
&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #292929; font-family: Menlo, Monaco, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; letter-spacing: -0.022em; white-space: pre-wrap;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre class="kd ke kf kg fy lu bs lv lw dz lx" style="background: rgb(242, 242, 242); border-radius: 0px; border: none; box-sizing: inherit; color: rgba(0, 0, 0, 0.8); font-family: Menlo, Monaco, &amp;quot;Courier New&amp;quot;, Courier, monospace; margin-bottom: 0px; margin-top: 56px; overflow-x: auto; padding: 20px;"&gt;&lt;span class="gh ly ks ig lx b dm lz ma l mb mc" data-selectable-paragraph="" id="9066" style="box-sizing: inherit; color: #292929; display: block; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; min-width: fit-content; white-space: pre-wrap;"&gt;&lt;p style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; white-space: normal;"&gt;cd /opt&lt;/p&gt;&lt;p style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; white-space: normal;"&gt;wget https://github.com/keycloak/keycloak/releases/download/16.0.0/keycloak-16.0.0.tar.gz&lt;/p&gt;&lt;p style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; white-space: normal;"&gt;tar -xvzf keycloak-16.0.0.tar.gz&lt;/p&gt;&lt;p style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; white-space: normal;"&gt;mv keycloak-16.0.0.tar.gz keycloak&lt;/p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre class="kd ke kf kg fy lu bs lv lw dz lx" style="background: rgb(242, 242, 242); border-radius: 0px; border: none; box-sizing: inherit; margin-bottom: 0px; margin-top: 56px; overflow-x: auto; padding: 20px;"&gt;&lt;span class="gh ly ks ig lx b dm lz ma l mb mc" data-selectable-paragraph="" id="9066" style="box-sizing: inherit; display: block; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; min-width: fit-content;"&gt;&lt;span style="color: #292929; font-family: Menlo, Monaco, Courier New, Courier, monospace;"&gt;&lt;span style="font-size: 16px; letter-spacing: -0.352px; white-space: pre-wrap;"&gt;groupadd keycloak

useradd -r -g keycloak -d /opt/keycloak -s /sbin/nologin keycloak

chown -R keycloak: keycloak

chmod o+x /opt/keycloak/bin/

mkdir /etc/keycloak&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="kd ke kf kg fy lu bs lv lw dz lx" style="background: rgb(242, 242, 242); border-radius: 0px; border: none; box-sizing: inherit; margin-bottom: 0px; margin-top: 56px; overflow-x: auto; padding: 20px;"&gt;&lt;span class="gh ly ks ig lx b dm lz ma l mb mc" data-selectable-paragraph="" id="9066" style="box-sizing: inherit; display: block; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; min-width: fit-content;"&gt;&lt;span style="color: #292929; font-family: Menlo, Monaco, Courier New, Courier, monospace;"&gt;&lt;span style="font-size: 16px; letter-spacing: -0.352px; white-space: pre-wrap;"&gt;cd /etc/keycloak&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="gh ly ks ig lx b dm lz ma l mb mc" data-selectable-paragraph="" id="9066" style="box-sizing: inherit; display: block; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; min-width: fit-content;"&gt;&lt;span style="color: #292929; font-family: Menlo, Monaco, Courier New, Courier, monospace;"&gt;&lt;span style="font-size: 16px; letter-spacing: -0.352px; white-space: pre-wrap;"&gt;
cp /opt/keycloak/docs/contrib/scripts/systemd/wildfly.conf /etc/keycloak/keycloak.conf

cp /opt/keycloak/docs/contrib/scripts/systemd/launch.sh /opt/keycloak/bin/

chown keycloak: /opt/keycloak/bin/launch.sh&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="kd ke kf kg fy lu bs lv lw dz lx" style="background: rgb(242, 242, 242); border-radius: 0px; border: none; box-sizing: inherit; margin-bottom: 0px; margin-top: 56px; overflow-x: auto; padding: 20px;"&gt;&lt;span class="gh ly ks ig lx b dm lz ma l mb mc" data-selectable-paragraph="" id="9066" style="box-sizing: inherit; display: block; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; min-width: fit-content;"&gt;&lt;span style="color: #292929; font-family: Menlo, Monaco, Courier New, Courier, monospace;"&gt;&lt;span style="font-size: 16px; letter-spacing: -0.352px; white-space: pre-wrap;"&gt;vim /opt/keycloak/bin/launch.sh

WILDFLY_HOME="/opt/keycloak"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre class="kd ke kf kg fy lu bs lv lw dz lx" style="background: rgb(242, 242, 242); border-radius: 0px; border: none; box-sizing: inherit; margin-bottom: 0px; margin-top: 56px; overflow-x: auto; padding: 20px;"&gt;&lt;span class="gh ly ks ig lx b dm lz ma l mb mc" data-selectable-paragraph="" id="9066" style="box-sizing: inherit; display: block; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; min-width: fit-content;"&gt;&lt;span style="color: #292929; font-family: Menlo, Monaco, Courier New, Courier, monospace;"&gt;&lt;span style="font-size: 16px; letter-spacing: -0.352px; white-space: pre-wrap;"&gt;cp /opt/keycloak/docs/contrib/scripts/systemd/wildfly.service /etc/systemd/system/keycloak.service

vim /etc/systemd/system/keycloak.service&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="kd ke kf kg fy lu bs lv lw dz lx" style="background: rgb(242, 242, 242); border-radius: 0px; border: none; box-sizing: inherit; margin-bottom: 0px; margin-top: 56px; overflow-x: auto; padding: 20px;"&gt;&lt;span class="gh ly ks ig lx b dm lz ma l mb mc" data-selectable-paragraph="" id="9066" style="box-sizing: inherit; display: block; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; min-width: fit-content;"&gt;&lt;span style="color: #292929; font-family: Menlo, Monaco, Courier New, Courier, monospace;"&gt;&lt;span style="font-size: 16px; letter-spacing: -0.352px; white-space: pre-wrap;"&gt;[Unit]

Description=Keycloak Application Server

After=network.target



[Service]

Type=idle

User=keycloak

Group=keycloak

ExecStart=/opt/keycloak/bin/standalone.sh -b 0.0.0.0

TimeoutStartSec=600

TimeoutStopSec=600



[Install]

WantedBy=multi-user.target&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="kd ke kf kg fy lu bs lv lw dz lx" style="background: rgb(242, 242, 242); border-radius: 0px; border: none; box-sizing: inherit; margin-bottom: 0px; margin-top: 56px; overflow-x: auto; padding: 20px;"&gt;&lt;span class="gh ly ks ig lx b dm lz ma l mb mc" data-selectable-paragraph="" id="9066" style="box-sizing: inherit; display: block; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; min-width: fit-content;"&gt;&lt;span style="color: #292929; font-family: Menlo, Monaco, Courier New, Courier, monospace;"&gt;&lt;span style="font-size: 16px; letter-spacing: -0.352px; white-space: pre-wrap;"&gt;systemctl daemon-reload &amp;amp;&amp;amp; systemctl enable keycloak &amp;amp;&amp;amp; systemctl restart keycloak &amp;amp;&amp;amp; systemctl status keycloak&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="gh ly ks ig lx b dm lz ma l mb mc" data-selectable-paragraph="" id="9066" style="box-sizing: inherit; display: block; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; min-width: fit-content;"&gt;&lt;span style="color: #292929; font-family: Menlo, Monaco, Courier New, Courier, monospace;"&gt;&lt;span style="font-size: 16px; letter-spacing: -0.352px; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="gh ly ks ig lx b dm lz ma l mb mc" data-selectable-paragraph="" id="9066" style="box-sizing: inherit; display: block; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; min-width: fit-content;"&gt;&lt;span style="color: #292929; font-family: Menlo, Monaco, Courier New, Courier, monospace;"&gt;&lt;span style="font-size: 16px; letter-spacing: -0.352px; white-space: pre-wrap;"&gt;##if service will not run use below command&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="gh ly ks ig lx b dm lz ma l mb mc" data-selectable-paragraph="" id="9066" style="box-sizing: inherit; display: block; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; min-width: fit-content;"&gt;&lt;span style="color: #292929; font-family: Menlo, Monaco, Courier New, Courier, monospace;"&gt;&lt;span style="font-size: 16px; letter-spacing: -0.352px; white-space: pre-wrap;"&gt;chmod o+x /opt/keycloak/bin/standalone.sh

/opt/keycloak/bin/add-user-keycloak.sh -u admin -p YOURPASS -r master

systemctl restart keycloak

tail -f /opt/keycloak/standalone/log/server.log

http://&amp;lt;instance-public-ip-domain.com&amp;gt;:8080/auth/admin/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="kd ke kf kg fy lu bs lv lw dz lx" style="background: rgb(242, 242, 242); border-radius: 0px; border: none; box-sizing: inherit; margin-bottom: 0px; margin-top: 56px; overflow-x: auto; padding: 20px;"&gt;&lt;span class="gh ly ks ig lx b dm lz ma l mb mc" data-selectable-paragraph="" id="9066" style="box-sizing: inherit; display: block; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; min-width: fit-content;"&gt;&lt;span style="color: #292929; font-family: Menlo, Monaco, Courier New, Courier, monospace;"&gt;&lt;span style="font-size: 16px; letter-spacing: -0.352px; white-space: pre-wrap;"&gt;########### Disable SSL ############



/opt/keycloak/bin/kcadm.sh config credentials --server http://localhost:8080/auth --realm master --user admin

/opt/keycloak/bin/kcadm.sh update realms/master -s sslRequired=NONE&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre class="kd ke kf kg fy lu bs lv lw dz lx" style="background: rgb(242, 242, 242); border-radius: 0px; border: none; box-sizing: inherit; color: rgba(0, 0, 0, 0.8); font-family: Menlo, Monaco, &amp;quot;Courier New&amp;quot;, Courier, monospace; margin-bottom: 0px; margin-top: 56px; overflow-x: auto; padding: 20px;"&gt;&lt;span class="gh ly ks ig lx b dm lz ma l mb mc" data-selectable-paragraph="" id="9066" style="box-sizing: inherit; color: #292929; display: block; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; min-width: fit-content; white-space: pre-wrap;"&gt;&lt;p style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; white-space: normal;"&gt;upstream mywebapp1 {&lt;/p&gt;&lt;p style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; white-space: normal;"&gt;server 127.0.0.1:8080;&lt;/p&gt;&lt;p style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; white-space: normal;"&gt;}&lt;/p&gt;&lt;p style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; white-space: normal;"&gt;server {&lt;/p&gt;&lt;p style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; white-space: normal;"&gt;&amp;nbsp; &amp;nbsp; listen 80;&lt;/p&gt;&lt;p style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; white-space: normal;"&gt;&amp;nbsp; &amp;nbsp; listen 443 ssl http2;&lt;/p&gt;&lt;p style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; white-space: normal;"&gt;&amp;nbsp; &amp;nbsp; server_name *.bd;&lt;/p&gt;&lt;p style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; white-space: normal;"&gt;&amp;nbsp; &amp;nbsp; ssl_certificate /cert/2019/nothi.pem;&lt;/p&gt;&lt;p style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; white-space: normal;"&gt;&amp;nbsp; &amp;nbsp; ssl_certificate_key /cert/2019/nothi.key;&lt;/p&gt;&lt;p style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; white-space: normal;"&gt;&amp;nbsp; &amp;nbsp; ssl_session_cache shared:SSL:120m;&lt;/p&gt;&lt;p style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; white-space: normal;"&gt;&amp;nbsp; &amp;nbsp; ssl_session_timeout 60m;&lt;/p&gt;&lt;p style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; white-space: normal;"&gt;&amp;nbsp; &amp;nbsp; ssl_prefer_server_ciphers on;&lt;/p&gt;&lt;p style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; white-space: normal;"&gt;&amp;nbsp; &amp;nbsp; ssl_protocols TLSv1 TLSv1.1 TLSv1.2;&lt;/p&gt;&lt;p style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; white-space: normal;"&gt;&amp;nbsp; &amp;nbsp; ssl_ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS;&lt;/p&gt;&lt;p style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; white-space: normal;"&gt;&amp;nbsp; &amp;nbsp; add_header Strict-Transport-Security "max-age=31536000";&lt;/p&gt;&lt;p style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; white-space: normal;"&gt;&amp;nbsp; &amp;nbsp; location / {&lt;/p&gt;&lt;p style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; white-space: normal;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; proxy_pass http://mywebapp1;&lt;/p&gt;&lt;p style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; white-space: normal;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; proxy_set_header Host $host;&lt;/p&gt;&lt;p style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; white-space: normal;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; proxy_set_header X-Real-IP $remote_addr;&lt;/p&gt;&lt;p style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; white-space: normal;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&lt;/p&gt;&lt;p style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; white-space: normal;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; proxy_set_header X-Forwarded-Proto $scheme;&lt;/p&gt;&lt;p style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; white-space: normal;"&gt;&amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; white-space: normal;"&gt;}&lt;/p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description><link>http://page.farhad.pw/2022/11/setup-keycloak-server-on-debian-11.html</link><author>noreply@blogger.com (Farhad)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj17UZttkMMHNfcVba6nAwN_yCK5qe5Pnbu6K2Lm92Wh2fy2GEvhCrfQUWQwP1CZTne7gBb4pc8zb9YC6jqtY5MZw51Sb4p7bXDOQyip_PlNjSKbgvDHFRcsT0xghkKK86_vYo5k5tN3ylqHYmuRg5dcJTmZeZw4I-nQlcNhIxiHF2KHV0rxuFWMb9b/s72-w553-h285-c/Keycloak-overview-screenshot.png" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1026424054105678970.post-7915425631132490261</guid><pubDate>Mon, 22 Aug 2022 07:46:00 +0000</pubDate><atom:updated>2022-08-22T13:48:02.434+06:00</atom:updated><title>Using Fail2Ban to prevent/limit bot attack to wordpress wp-login.php [Centos7]</title><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKQvNVtstVvSgabyVe6FHrHcE1f_I1cjAwTa6rmCqtoBacmSVA1-nCrSZnc8061ey6E5UxK-GLl3RjzwGjfkf1hGAfMhW5I-rl4zxJa0XWeysBBbZyt2US67DXBILnghr5yEklnrYRC-Z-_oShbO8ERgLLXiAoeGO9Cnig1jWtzDnXOTOY5B-vhhKI/s802/fail2banthumbnail.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="402" data-original-width="802" height="332" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKQvNVtstVvSgabyVe6FHrHcE1f_I1cjAwTa6rmCqtoBacmSVA1-nCrSZnc8061ey6E5UxK-GLl3RjzwGjfkf1hGAfMhW5I-rl4zxJa0XWeysBBbZyt2US67DXBILnghr5yEklnrYRC-Z-_oShbO8ERgLLXiAoeGO9Cnig1jWtzDnXOTOY5B-vhhKI/w664-h332/fail2banthumbnail.png" width="664" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="background-color: white; color: #222222; font-family: &amp;quot;Open Sans&amp;quot;, Tahoma, Arial; font-size: 16px;"&gt;This article demonstrates how to use Fail2Ban to block IP addresses attempting to compromise a WordPress instance via the login process. In this walk-through, we’re using CentOS 7 and FirewallD. Just be aware that if you’re using a caching service like CloudFlare, you can’t use this method because you’ll block the cache and not the source of the traffic.&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: white; box-sizing: inherit; color: #222222; font-family: &amp;quot;Open Sans&amp;quot;, Tahoma, Arial; font-size: 16px; margin-bottom: 1.5em; word-break: break-word;"&gt;Install Fail2Ban:&lt;/p&gt;&lt;pre style="background: rgb(255, 255, 255); border: 1px solid rgb(221, 221, 221); box-sizing: inherit; color: #222222; font-family: &amp;quot;Courier 10 Pitch&amp;quot;, Courier, monospace; font-size: 0.9375rem; line-height: 1.6; margin-bottom: 1.6em; max-width: 100%; overflow: auto; padding: 1.6em;"&gt;yum install fail2ban fail2ban-firewalld
&lt;/pre&gt;&lt;p style="background-color: white; box-sizing: inherit; color: #222222; font-family: &amp;quot;Open Sans&amp;quot;, Tahoma, Arial; font-size: 16px; margin-bottom: 1.5em; word-break: break-word;"&gt;Edit the “/etc/fail2ban/jail.conf” file. Add the following chunk to the bottom of that file. Notice the log file to be monitored. You can either specify it exactly or use a wild-card:&lt;/p&gt;&lt;pre style="background: rgb(255, 255, 255); border: 1px solid rgb(221, 221, 221); box-sizing: inherit; color: #222222; font-family: &amp;quot;Courier 10 Pitch&amp;quot;, Courier, monospace; font-size: 0.9375rem; line-height: 1.6; margin-bottom: 1.6em; max-width: 100%; overflow: auto; padding: 1.6em;"&gt;[apache-wordpress-login]
enabled = true
action = iptables-multiport[name=wordpress, port="http,https", protocol=tcp]
port = http,https
filter = apache-wordpress-login
logpath = /var/log/httpd/*_log
bantime = 36000
findtime = 600
maxretry = 1
&lt;/pre&gt;&lt;p style="background-color: white; box-sizing: inherit; color: #222222; font-family: &amp;quot;Open Sans&amp;quot;, Tahoma, Arial; font-size: 16px; margin-bottom: 1.5em; word-break: break-word;"&gt;And modify the “ignoreip” line to include the IP that you’re coming from (so you don’t get kicked out):&lt;/p&gt;&lt;pre style="background: rgb(255, 255, 255); border: 1px solid rgb(221, 221, 221); box-sizing: inherit; color: #222222; font-family: &amp;quot;Courier 10 Pitch&amp;quot;, Courier, monospace; font-size: 0.9375rem; line-height: 1.6; margin-bottom: 1.6em; max-width: 100%; overflow: auto; padding: 1.6em;"&gt;ignoreip = 127.0.0.1/8 ::1 my.ip.address
&lt;/pre&gt;&lt;p style="background-color: white; box-sizing: inherit; color: #222222; font-family: &amp;quot;Open Sans&amp;quot;, Tahoma, Arial; font-size: 16px; margin-bottom: 1.5em; word-break: break-word;"&gt;And set the following to ensure FirewallD is assumed:&lt;/p&gt;&lt;pre style="background: rgb(255, 255, 255); border: 1px solid rgb(221, 221, 221); box-sizing: inherit; color: #222222; font-family: &amp;quot;Courier 10 Pitch&amp;quot;, Courier, monospace; font-size: 0.9375rem; line-height: 1.6; margin-bottom: 1.6em; max-width: 100%; overflow: auto; padding: 1.6em;"&gt;#banaction = iptables-multiport
banaction = firewallcmd-ipset
&lt;/pre&gt;&lt;p style="background-color: white; box-sizing: inherit; color: #222222; font-family: &amp;quot;Open Sans&amp;quot;, Tahoma, Arial; font-size: 16px; margin-bottom: 1.5em; word-break: break-word;"&gt;Create the file “/etc/fail2ban/filter.d/apache-wordpress-login.conf” and enter the following content:&lt;/p&gt;&lt;pre style="background: rgb(255, 255, 255); border: 1px solid rgb(221, 221, 221); box-sizing: inherit; line-height: 1.6; margin-bottom: 1.6em; max-width: 100%; overflow: auto; padding: 1.6em;"&gt;&lt;span style="color: #222222; font-family: Courier 10 Pitch, Courier, monospace;"&gt;&lt;span style="font-size: 0.9375rem;"&gt;[Definition]
mode = normal
&lt;/span&gt;&lt;/span&gt;&lt;host style="box-sizing: inherit;"&gt;&lt;span style="color: #222222; font-family: Courier 10 Pitch, Courier, monospace;"&gt;&lt;span style="font-size: 15px;"&gt;failregex = ^&amp;lt;HOST&amp;gt; -.*"POST.*wp-login.php&lt;/span&gt;&lt;span style="font-size: 0.9375rem;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/host&gt;&lt;/pre&gt;&lt;pre style="background: rgb(255, 255, 255); border: 1px solid rgb(221, 221, 221); box-sizing: inherit; line-height: 1.6; margin-bottom: 1.6em; max-width: 100%; overflow: auto; padding: 1.6em;"&gt;&lt;host style="box-sizing: inherit;"&gt;&lt;span style="color: #222222;"&gt;&lt;span style="font-size: 15px;"&gt;#Note: If you want to add more filter you can use like below:
[Definition]
mode = normal
failregex = ^&amp;lt;HOST&amp;gt; -.*"POST.*wp-login.php
            ^&amp;lt;HOST&amp;gt; -.*"POST.*xmlrpc.php
&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;......................&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/host&gt;&lt;/pre&gt;&lt;p style="background-color: white; box-sizing: inherit; color: #222222; font-family: &amp;quot;Open Sans&amp;quot;, Tahoma, Arial; font-size: 16px; margin-bottom: 1.5em; word-break: break-word;"&gt;Enable and Start Fail2Ban:&lt;/p&gt;&lt;pre style="background: rgb(255, 255, 255); border: 1px solid rgb(221, 221, 221); box-sizing: inherit; color: #222222; font-family: &amp;quot;Courier 10 Pitch&amp;quot;, Courier, monospace; font-size: 0.9375rem; line-height: 1.6; margin-bottom: 1.6em; max-width: 100%; overflow: auto; padding: 1.6em;"&gt;systemctl enable fail2ban
systemctl start fail2ban
&lt;/pre&gt;&lt;p style="background-color: white; box-sizing: inherit; color: #222222; font-family: &amp;quot;Open Sans&amp;quot;, Tahoma, Arial; font-size: 16px; margin-bottom: 1.5em; word-break: break-word;"&gt;Check the status of Fail2Ban blocking hosts:&lt;/p&gt;&lt;pre style="background: rgb(255, 255, 255); border: 1px solid rgb(221, 221, 221); box-sizing: inherit; color: #222222; font-family: &amp;quot;Courier 10 Pitch&amp;quot;, Courier, monospace; font-size: 0.9375rem; line-height: 1.6; margin-bottom: 1.6em; max-width: 100%; overflow: auto; padding: 1.6em;"&gt;fail2ban-client status apache-wordpress-login
firewall-cmd --list-all
iptables -L -n
tail -f /var/log/fail2ban.log&lt;/pre&gt;&lt;p style="background-color: white; box-sizing: inherit; color: #222222; font-family: &amp;quot;Open Sans&amp;quot;, Tahoma, Arial; font-size: 16px; margin-bottom: 1.5em; word-break: break-word;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="background-color: white; box-sizing: inherit; color: #222222; font-family: &amp;quot;Open Sans&amp;quot;, Tahoma, Arial; font-size: 16px; margin-bottom: 1.5em; word-break: break-word;"&gt;Post Credit:&amp;nbsp;https://www.agix.com.au/using-fail2ban-to-protect-wordpress-logins-centos/&lt;/p&gt;</description><link>http://page.farhad.pw/2022/08/using-fail2ban-to-preventlimit-bot.html</link><author>noreply@blogger.com (Farhad)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKQvNVtstVvSgabyVe6FHrHcE1f_I1cjAwTa6rmCqtoBacmSVA1-nCrSZnc8061ey6E5UxK-GLl3RjzwGjfkf1hGAfMhW5I-rl4zxJa0XWeysBBbZyt2US67DXBILnghr5yEklnrYRC-Z-_oShbO8ERgLLXiAoeGO9Cnig1jWtzDnXOTOY5B-vhhKI/s72-w664-h332-c/fail2banthumbnail.png" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1026424054105678970.post-3149267125559862495</guid><pubDate>Wed, 13 Oct 2021 15:23:00 +0000</pubDate><atom:updated>2021-10-13T21:48:28.957+06:00</atom:updated><title>Daily mysql databse backup with datetime stamp with cronjob</title><description>&lt;h2 style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-style: dashed; border-image: initial; border-left-color: initial; border-left-style: initial; border-right-color: initial; border-right-style: initial; border-top-color: initial; border-top-style: initial; border-width: 0px 0px 1px; box-sizing: border-box; color: #336699; font-family: Rajdhani; font-size: 25px; line-height: 50px; margin: 0px 0px 10px; outline: 0px; overflow-wrap: break-word; padding: 0px; vertical-align: baseline;"&gt;Creating MySQL Backup Script&lt;/h2&gt;&lt;p style="background-color: white; border: 0px; box-sizing: border-box; color: #4a4a4a; font-family: Ubuntu; font-size: 17px; margin: 0px 0px 30px; outline: 0px; overflow-wrap: break-word; padding: 0px; vertical-align: baseline;"&gt;First we need to create a script with below content called “&lt;span style="border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;daily-mysql-backup.sh&lt;/span&gt;” and save it on your system. Please change the below value as per your requirements. for root user &lt;b&gt;"--no-tablespaces"&lt;/b&gt; is not required, for remote host we need to add extra parameter -h192.168.5.10 after -p parameter.&lt;/p&gt;&lt;div class="div" style="background: rgb(44, 62, 80); border-radius: 4px; border: 0px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 16px; line-height: 1.5em; margin-bottom: 1.5em; margin-top: 0px; max-width: 100%; outline: 0px; overflow: auto; padding: 1.5em; vertical-align: baseline;"&gt;#!/bin/bash&lt;br /&gt;
USER="dbuser"&lt;br /&gt;
PASS="dbpass"&lt;br /&gt;
mysqldump -u$USER -p$PASS database_name --no-tablespaces | gzip -c &amp;gt; /home/jafar/db_backups/database_name_$(date "+%b_%d_%Y_%H_%M_%S").sql.gz&lt;/div&gt;

&lt;h2 style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-style: dashed; border-image: initial; border-left-color: initial; border-left-style: initial; border-right-color: initial; border-right-style: initial; border-top-color: initial; border-top-style: initial; border-width: 0px 0px 1px; box-sizing: border-box; color: #336699; font-family: Rajdhani; font-size: 25px; line-height: 50px; margin: 0px 0px 10px; outline: 0px; overflow-wrap: break-word; padding: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/h2&gt;&lt;p style="background-color: white; border: 0px; box-sizing: border-box; color: #4a4a4a; font-family: Ubuntu; font-size: 17px; margin: 0px 0px 30px; outline: 0px; overflow-wrap: break-word; padding: 0px; vertical-align: baseline;"&gt;Now we need to set the cronjob for the daily backup, we will run the backup at 2AM every night.&amp;nbsp; Use the below command and add the corn job to the file and save the crontab reload or restart the cron service with last command&lt;/p&gt;&lt;div class="div" style="background: rgb(44, 62, 80); border-radius: 4px; border: 0px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 16px; line-height: 1.5em; margin-bottom: 1.5em; margin-top: 0px; max-width: 100%; outline: 0px; overflow: auto; padding: 1.5em; vertical-align: baseline;"&gt;crontab -e&lt;/div&gt;&lt;div class="div" style="background: rgb(44, 62, 80); border-radius: 4px; border: 0px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 16px; line-height: 1.5em; margin-bottom: 1.5em; margin-top: 0px; max-width: 100%; outline: 0px; overflow: auto; padding: 1.5em; vertical-align: baseline;"&gt;00 02 * * * /bash_scripts/daily-mysql-backup.sh&lt;/div&gt;&lt;div class="div" style="background: rgb(44, 62, 80); border-radius: 4px; border: 0px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 16px; line-height: 1.5em; margin-bottom: 1.5em; margin-top: 0px; max-width: 100%; outline: 0px; overflow: auto; padding: 1.5em; vertical-align: baseline;"&gt;systemctl reload cron ##for ubuntu based system&lt;/div&gt;&lt;div class="div" style="background: rgb(44, 62, 80); border-radius: 4px; border: 0px; box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 16px; line-height: 1.5em; margin-bottom: 1.5em; margin-top: 0px; max-width: 100%; outline: 0px; overflow: auto; padding: 1.5em; vertical-align: baseline;"&gt;systemctl reload crond ##for redhat based system&lt;/div&gt;</description><link>http://page.farhad.pw/2021/10/daily-mysql-databse-backup-with.html</link><author>noreply@blogger.com (Farhad)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1026424054105678970.post-5081602289391728482</guid><pubDate>Thu, 02 Apr 2020 10:39:00 +0000</pubDate><atom:updated>2020-04-02T16:39:16.824+06:00</atom:updated><title>Specific NodeJs version install with NVM</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgESbRLfLUqFjU9tbXBQU0PUcNTnYx_mQZ3fr40LWc684OShnERrGn8AUwNOyPplrHPeVL5kd-VbobXn2gEHbjp1IN1ouGSxoiHIQEY9IB7mrtj2jpHTjFoAsCwV05-23qD94M2UYCn5HQ/s1600/install-node-js-on-debian.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="350" data-original-width="700" height="160" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgESbRLfLUqFjU9tbXBQU0PUcNTnYx_mQZ3fr40LWc684OShnERrGn8AUwNOyPplrHPeVL5kd-VbobXn2gEHbjp1IN1ouGSxoiHIQEY9IB7mrtj2jpHTjFoAsCwV05-23qD94M2UYCn5HQ/s320/install-node-js-on-debian.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #010d28; font-family: &amp;quot;Noto Sans&amp;quot;; font-size: 16px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #010d28; font-family: &amp;quot;Noto Sans&amp;quot;; font-size: 16px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;
Node.js is an opensource cross-platform JavaScript run-time environment for server-side execution of JavaScript code. It’s built on Chrome’s JavaScript engine so it can be used to build different types of server-side application. npm is the very popular and default package manager for Node.js with large number of packages. In this tutorial, we will learn how to install Node.js and npm on Debian 9.&lt;/div&gt;
&lt;h2 style="background-color: white; border-bottom-color: rgb(221, 223, 228); border-bottom-style: dashed; border-image: initial; border-left-color: initial; border-left-style: initial; border-right-color: initial; border-right-style: initial; border-top-color: initial; border-top-style: initial; border-width: 0px 0px 1px; color: #f48702; font-family: &amp;quot;Open Sans&amp;quot;; font-size: 24px; line-height: 1.4; margin: 0px 0px 15px; opacity: 1; outline: 0px; padding: 0px 0px 4px; transition: opacity 0.24s ease-in-out 0s; vertical-align: baseline; visibility: visible;"&gt;
Install Node.js and npm on Debian&lt;/h2&gt;
&lt;div style="background-color: white; border: 0px; color: #010d28; font-family: &amp;quot;Noto Sans&amp;quot;; font-size: 16px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;
There are multiple ways to install Node.js and npm on your Debian 9 systems. You can follow any of following to install:&lt;/div&gt;
&lt;h2 style="background-color: white; border-bottom-color: rgb(221, 223, 228); border-bottom-style: dashed; border-image: initial; border-left-color: initial; border-left-style: initial; border-right-color: initial; border-right-style: initial; border-top-color: initial; border-top-style: initial; border-width: 0px 0px 1px; color: #f48702; font-family: &amp;quot;Open Sans&amp;quot;; font-size: 24px; line-height: 1.4; margin: 0px 0px 15px; opacity: 1; outline: 0px; padding: 0px 0px 4px; transition: opacity 0.24s ease-in-out 0s; vertical-align: baseline; visibility: visible;"&gt;
Install Node.js from NodeSource Repository&lt;/h2&gt;
&lt;div style="background-color: white; border: 0px; color: #010d28; font-family: &amp;quot;Noto Sans&amp;quot;; font-size: 16px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;
NodeSource provides a repository containing latest version of Node.js and npm. It’s very simple to install Node.js and npm from NodeSource.&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #010d28; font-family: &amp;quot;Noto Sans&amp;quot;; font-size: 16px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;
At first, you need to add NodeSource repository on your system using following&amp;nbsp;&lt;a href="https://tecnstuff.net/curl-command-in-linux-with-examples/" style="border-bottom: 1px solid; color: #067cd0; outline: none; text-decoration-line: none; transition: all 0.25s linear 0s;"&gt;curl&lt;/a&gt;&amp;nbsp;command:&lt;/div&gt;
&lt;pre class="wp-block-preformatted" style="background-color: whitesmoke; border-radius: 2px; border: 1px solid rgb(229, 229, 229); color: #010d28; font-size: 16px; margin-bottom: 20px; outline: 0px; overflow: auto; padding: 20px; vertical-align: baseline;"&gt;&lt;span class="dlr" style="border: 0px; font-size: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;curl -sL https://deb.nodesource.com/setup_10.x | sudo bash -&lt;/span&gt;&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; color: #010d28; font-family: &amp;quot;Noto Sans&amp;quot;; font-size: 16px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="border: 0px; font-size: inherit; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;NOTE :&lt;/span&gt;&amp;nbsp;The latest LTS version of Node.js is 10.x if you want to install 8.x version then just replace&amp;nbsp;&lt;code class="hl" style="background-color: #ececec; border: 0px; font-family: Consolas, Monaco, &amp;quot;Lucida Console&amp;quot;, monospace; font-size: 0.875rem; margin: 0px; outline: 0px; padding: 0.1rem 0.25rem; vertical-align: baseline;"&gt;setup_10.x&lt;/code&gt;&amp;nbsp;with&amp;nbsp;&lt;code class="hl" style="background-color: #ececec; border: 0px; font-family: Consolas, Monaco, &amp;quot;Lucida Console&amp;quot;, monospace; font-size: 0.875rem; margin: 0px; outline: 0px; padding: 0.1rem 0.25rem; vertical-align: baseline;"&gt;setup_8.x&lt;/code&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #010d28; font-family: &amp;quot;Noto Sans&amp;quot;; font-size: 16px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;
After that, install Node.js and npm with the following command:&lt;/div&gt;
&lt;pre class="wp-block-preformatted" style="background-color: whitesmoke; border-radius: 2px; border: 1px solid rgb(229, 229, 229); color: #010d28; font-size: 16px; margin-bottom: 20px; outline: 0px; overflow: auto; padding: 20px; vertical-align: baseline;"&gt;&lt;span class="dlr" style="border: 0px; font-size: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;sudo apt install nodejs&lt;/span&gt;&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; color: #010d28; font-family: &amp;quot;Noto Sans&amp;quot;; font-size: 16px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;
Verify installation of Node.js and npm running below command:&lt;/div&gt;
&lt;pre class="wp-block-preformatted" style="background-color: whitesmoke; border-radius: 2px; border: 1px solid rgb(229, 229, 229); color: #010d28; font-size: 16px; margin-bottom: 20px; outline: 0px; overflow: auto; padding: 20px; vertical-align: baseline;"&gt;&lt;span class="dlr" style="border: 0px; font-size: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;node --version&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="wp-block-preformatted" style="background-color: whitesmoke; border-radius: 2px; border: 1px solid rgb(229, 229, 229); color: #010d28; font-size: 16px; margin-bottom: 20px; outline: 0px; overflow: auto; padding: 20px; vertical-align: baseline;"&gt;&lt;span class="out" style="border: 0px; color: rgba(0, 0, 0, 0.3); font-size: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;Output&lt;/span&gt;
v9.10.1&lt;/pre&gt;
&lt;pre class="wp-block-preformatted" style="background-color: whitesmoke; border-radius: 2px; border: 1px solid rgb(229, 229, 229); color: #010d28; font-size: 16px; margin-bottom: 20px; outline: 0px; overflow: auto; padding: 20px; vertical-align: baseline;"&gt;&lt;span class="dlr" style="border: 0px; font-size: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;npm --version&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="wp-block-preformatted" style="background-color: whitesmoke; border-radius: 2px; border: 1px solid rgb(229, 229, 229); color: #010d28; font-size: 16px; margin-bottom: 20px; outline: 0px; overflow: auto; padding: 20px; vertical-align: baseline;"&gt;&lt;span class="out" style="border: 0px; color: rgba(0, 0, 0, 0.3); font-size: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;Output&lt;/span&gt;
5.6.0&lt;/pre&gt;
&lt;h2 style="background-color: white; border-bottom-color: rgb(221, 223, 228); border-bottom-style: dashed; border-image: initial; border-left-color: initial; border-left-style: initial; border-right-color: initial; border-right-style: initial; border-top-color: initial; border-top-style: initial; border-width: 0px 0px 1px; color: #f48702; font-family: &amp;quot;Open Sans&amp;quot;; font-size: 24px; line-height: 1.4; margin: 0px 0px 15px; opacity: 1; outline: 0px; padding: 0px 0px 4px; transition: opacity 0.24s ease-in-out 0s; vertical-align: baseline; visibility: visible;"&gt;
Install Node.js and npm using nvm&lt;/h2&gt;
&lt;div style="background-color: white; border: 0px; color: #010d28; font-family: &amp;quot;Noto Sans&amp;quot;; font-size: 16px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;
NVM (Node Version Manager) script is used to manage multiple Node.js versions. You can install or uninstall specific Node.js versions using NVM.&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #010d28; font-family: &amp;quot;Noto Sans&amp;quot;; font-size: 16px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;
At first, we need to download nvm install script on your system using below command:&lt;/div&gt;
&lt;pre class="wp-block-preformatted" style="background-color: whitesmoke; border-radius: 2px; border: 1px solid rgb(229, 229, 229); color: #010d28; font-size: 16px; margin-bottom: 20px; outline: 0px; overflow: auto; padding: 20px; vertical-align: baseline;"&gt;&lt;span class="dlr" style="border: 0px; font-size: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash&lt;/span&gt;&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; color: #010d28; font-family: &amp;quot;Noto Sans&amp;quot;; font-size: 16px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;
It will copy the&amp;nbsp;&lt;code class="hl" style="background-color: #ececec; border: 0px; font-family: Consolas, Monaco, &amp;quot;Lucida Console&amp;quot;, monospace; font-size: 0.875rem; margin: 0px; outline: 0px; padding: 0.1rem 0.25rem; vertical-align: baseline;"&gt;nvm&lt;/code&gt;&amp;nbsp;&lt;a href="https://github.com/creationix/nvm" style="border-bottom: 1px solid; color: #067cd0; outline: none; text-decoration-line: none; transition: all 0.25s linear 0s;"&gt;repository from Github&lt;/a&gt;&amp;nbsp;to the ~/.nvm directory and add the nvm path to your Bash profile.&lt;/div&gt;
&lt;pre class="wp-block-preformatted" style="background-color: whitesmoke; border-radius: 2px; border: 1px solid rgb(229, 229, 229); color: #010d28; font-size: 16px; margin-bottom: 20px; outline: 0px; overflow: auto; padding: 20px; vertical-align: baseline;"&gt;=&amp;gt; Close and reopen your terminal to start using nvm or run the following to use it now:
 export NVM_DIR="$HOME/.nvm"
 [ -s "$NVM_DIR/nvm.sh" ] &amp;amp;&amp;amp; . "$NVM_DIR/nvm.sh"  # This loads nvm
 [ -s "$NVM_DIR/bash_completion" ] &amp;amp;&amp;amp; . "$NVM_DIR/bash_completion"  # This loads nvm bash_completion&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; color: #010d28; font-family: &amp;quot;Noto Sans&amp;quot;; font-size: 16px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;
As you can see in output, it is suggesting to either open new shell session or run the commands to add the path to the nvm script to your current session.&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #010d28; font-family: &amp;quot;Noto Sans&amp;quot;; font-size: 16px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;
You can verify that nvm is installed properly by typing:&lt;/div&gt;
&lt;pre class="wp-block-preformatted" style="background-color: whitesmoke; border-radius: 2px; border: 1px solid rgb(229, 229, 229); color: #010d28; font-size: 16px; margin-bottom: 20px; outline: 0px; overflow: auto; padding: 20px; vertical-align: baseline;"&gt;&lt;span class="dlr" style="border: 0px; font-size: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;nvm --version&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="wp-block-preformatted" style="background-color: whitesmoke; border-radius: 2px; border: 1px solid rgb(229, 229, 229); color: #010d28; font-size: 16px; margin-bottom: 20px; outline: 0px; overflow: auto; padding: 20px; vertical-align: baseline;"&gt;&lt;span class="out" style="border: 0px; color: rgba(0, 0, 0, 0.3); font-size: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;Output&lt;/span&gt;
0.33.11&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; color: #010d28; font-family: &amp;quot;Noto Sans&amp;quot;; font-size: 16px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;
Now you have nvm installed on your Debian system. You can install the latest available version of Node.js using below command:&lt;/div&gt;
&lt;pre class="wp-block-preformatted" style="background-color: whitesmoke; border-radius: 2px; border: 1px solid rgb(229, 229, 229); color: #010d28; font-size: 16px; margin-bottom: 20px; outline: 0px; overflow: auto; padding: 20px; vertical-align: baseline;"&gt;&lt;span class="dlr" style="border: 0px; font-size: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;nvm install node&lt;/span&gt;&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; color: #010d28; font-family: &amp;quot;Noto Sans&amp;quot;; font-size: 16px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;
It will show output as below:&lt;/div&gt;
&lt;pre class="wp-block-preformatted" style="background-color: whitesmoke; border-radius: 2px; border: 1px solid rgb(229, 229, 229); color: #010d28; font-size: 16px; margin-bottom: 20px; outline: 0px; overflow: auto; padding: 20px; vertical-align: baseline;"&gt;Downloading and installing node v12.0.0…
Downloading https://nodejs.org/dist/v12.0.0/node-v12.0.0-linux-x64.tar.xz…
################################################################## 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v12.0.0 (npm v6.9.0)
Creating default alias: default -&amp;gt; node (-&amp;gt; v12.0.0)&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; color: #010d28; font-family: &amp;quot;Noto Sans&amp;quot;; font-size: 16px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;
Once the installation is finished you can check the version of Node.js by typing :&lt;/div&gt;
&lt;pre class="wp-block-preformatted" style="background-color: whitesmoke; border-radius: 2px; border: 1px solid rgb(229, 229, 229); color: #010d28; font-size: 16px; margin-bottom: 20px; outline: 0px; overflow: auto; padding: 20px; vertical-align: baseline;"&gt;&lt;span class="dlr" style="border: 0px; font-size: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;node --version&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="wp-block-preformatted" style="background-color: whitesmoke; border-radius: 2px; border: 1px solid rgb(229, 229, 229); color: #010d28; font-size: 16px; margin-bottom: 20px; outline: 0px; overflow: auto; padding: 20px; vertical-align: baseline;"&gt;&lt;span class="out" style="border: 0px; color: rgba(0, 0, 0, 0.3); font-size: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;Output&lt;/span&gt;
v12.0.0&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; color: #010d28; font-family: &amp;quot;Noto Sans&amp;quot;; font-size: 16px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;
Next, We will install two more versions of Node.js. To do so type following:&lt;/div&gt;
&lt;pre class="wp-block-preformatted" style="background-color: whitesmoke; border-radius: 2px; border: 1px solid rgb(229, 229, 229); color: #010d28; font-size: 16px; margin-bottom: 20px; outline: 0px; overflow: auto; padding: 20px; vertical-align: baseline;"&gt;&lt;span class="dlr" style="border: 0px; font-size: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;nvm install --lts&lt;/span&gt;
&lt;span class="dlr" style="border: 0px; font-size: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;nvm install 9.10.1&lt;/span&gt;&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; color: #010d28; font-family: &amp;quot;Noto Sans&amp;quot;; font-size: 16px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;
Once the both of above versions are installed we can view list using below command:&lt;/div&gt;
&lt;pre class="wp-block-preformatted" style="background-color: whitesmoke; border-radius: 2px; border: 1px solid rgb(229, 229, 229); color: #010d28; font-size: 16px; margin-bottom: 20px; outline: 0px; overflow: auto; padding: 20px; vertical-align: baseline;"&gt;&lt;span class="dlr" style="border: 0px; font-size: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;nvm ls&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="wp-block-preformatted" style="background-color: whitesmoke; border-radius: 2px; border: 1px solid rgb(229, 229, 229); color: #010d28; font-size: 16px; margin-bottom: 20px; outline: 0px; overflow: auto; padding: 20px; vertical-align: baseline;"&gt;-&amp;gt;      v9.10.1
        v10.15.3
         v12.0.0
 default -&amp;gt; node (-&amp;gt; v12.0.0)
 node -&amp;gt; stable (-&amp;gt; v12.0.0) (default)
 stable -&amp;gt; 12.0 (-&amp;gt; v12.0.0) (default)
 iojs -&amp;gt; N/A (default)
 lts/* -&amp;gt; lts/dubnium (-&amp;gt; v10.15.3)
 lts/argon -&amp;gt; v4.9.1 (-&amp;gt; N/A)
 lts/boron -&amp;gt; v6.17.1 (-&amp;gt; N/A)
 lts/carbon -&amp;gt; v8.16.0 (-&amp;gt; N/A)
 lts/dubnium -&amp;gt; v10.15.3&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; color: #010d28; font-family: &amp;quot;Noto Sans&amp;quot;; font-size: 16px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;
In output version with arrow is used for the current shell session. Default version is set to&amp;nbsp;&lt;code class="hl" style="background-color: #ececec; border: 0px; font-family: Consolas, Monaco, &amp;quot;Lucida Console&amp;quot;, monospace; font-size: 0.875rem; margin: 0px; outline: 0px; padding: 0.1rem 0.25rem; vertical-align: baseline;"&gt;v12.0.0&lt;/code&gt;&amp;nbsp;and it will be used when you open new shell sessions.&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #010d28; font-family: &amp;quot;Noto Sans&amp;quot;; font-size: 16px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;
You can change the current default version of Node.js by using the following command:&lt;/div&gt;
&lt;pre class="wp-block-preformatted" style="background-color: whitesmoke; border-radius: 2px; border: 1px solid rgb(229, 229, 229); color: #010d28; font-size: 16px; margin-bottom: 20px; outline: 0px; overflow: auto; padding: 20px; vertical-align: baseline;"&gt;&lt;span class="dlr" style="border: 0px; font-size: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;nvm use 10.15.3&lt;/span&gt;&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; color: #010d28; font-family: &amp;quot;Noto Sans&amp;quot;; font-size: 16px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;
Now verify it by typing:&lt;/div&gt;
&lt;pre class="wp-block-preformatted" style="background-color: whitesmoke; border-radius: 2px; border: 1px solid rgb(229, 229, 229); color: #010d28; font-size: 16px; margin-bottom: 20px; outline: 0px; overflow: auto; padding: 20px; vertical-align: baseline;"&gt;&lt;span class="dlr" style="border: 0px; font-size: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;nvm current&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="wp-block-preformatted" style="background-color: whitesmoke; border-radius: 2px; border: 1px solid rgb(229, 229, 229); color: #010d28; font-size: 16px; margin-bottom: 20px; outline: 0px; overflow: auto; padding: 20px; vertical-align: baseline;"&gt;&lt;span class="out" style="border: 0px; color: rgba(0, 0, 0, 0.3); font-size: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;Output&lt;/span&gt;
v10.15.3&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; color: #010d28; font-family: &amp;quot;Noto Sans&amp;quot;; font-size: 16px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;
You also can set set version 10.15.3 as the default Node.js version using below command:&lt;/div&gt;
&lt;pre class="wp-block-preformatted" style="background-color: whitesmoke; border-radius: 2px; border: 1px solid rgb(229, 229, 229); color: #010d28; font-size: 16px; margin-bottom: 20px; outline: 0px; overflow: auto; padding: 20px; vertical-align: baseline;"&gt;&lt;span class="dlr" style="border: 0px; font-size: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;nvm alias default 10.15.3&lt;/span&gt;&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; color: #010d28; font-family: &amp;quot;Noto Sans&amp;quot;; font-size: 16px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;
You can uninstall a Node.js version type following command:&lt;/div&gt;
&lt;pre class="wp-block-preformatted" style="background-color: whitesmoke; border-radius: 2px; border: 1px solid rgb(229, 229, 229); color: #010d28; font-size: 16px; margin-bottom: 20px; outline: 0px; overflow: auto; padding: 20px; vertical-align: baseline;"&gt;&lt;span class="dlr" style="border: 0px; font-size: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;nvm uninstall 9.10.1&lt;/span&gt;&lt;/pre&gt;
&lt;h2 style="background-color: white; border-bottom-color: rgb(221, 223, 228); border-bottom-style: dashed; border-image: initial; border-left-color: initial; border-left-style: initial; border-right-color: initial; border-right-style: initial; border-top-color: initial; border-top-style: initial; border-width: 0px 0px 1px; color: #f48702; font-family: &amp;quot;Open Sans&amp;quot;; font-size: 24px; line-height: 1.4; margin: 0px 0px 15px; opacity: 1; outline: 0px; padding: 0px 0px 4px; transition: opacity 0.24s ease-in-out 0s; vertical-align: baseline; visibility: visible;"&gt;
Uninstall Node.js and npm&lt;/h2&gt;
&lt;div style="background-color: white; border: 0px; color: #010d28; font-family: &amp;quot;Noto Sans&amp;quot;; font-size: 16px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;
To uninstall Node.js use following command:&lt;/div&gt;
&lt;pre class="wp-block-preformatted" style="background-color: whitesmoke; border-radius: 2px; border: 1px solid rgb(229, 229, 229); color: #010d28; font-size: 16px; margin-bottom: 20px; outline: 0px; overflow: auto; padding: 20px; vertical-align: baseline;"&gt;&lt;span class="dlr" style="border: 0px; font-size: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;sudo apt remove nodejs npm&lt;/span&gt;
&lt;span class="dlr" style="border: 0px; font-size: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;sudo apt autoremove&lt;/span&gt;&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; color: #010d28; font-family: &amp;quot;Noto Sans&amp;quot;; font-size: 16px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;
To uninstall node.js version using nvm type following command:&lt;/div&gt;
&lt;pre class="wp-block-preformatted" style="background-color: whitesmoke; border-radius: 2px; border: 1px solid rgb(229, 229, 229); color: #010d28; font-size: 16px; margin-bottom: 20px; outline: 0px; overflow: auto; padding: 20px; vertical-align: baseline;"&gt;&lt;span class="dlr" style="border: 0px; font-size: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;nvm uninstall &lt;/span&gt;10.15.3&lt;/pre&gt;
&lt;h2 style="background-color: white; border-bottom-color: rgb(221, 223, 228); border-bottom-style: dashed; border-image: initial; border-left-color: initial; border-left-style: initial; border-right-color: initial; border-right-style: initial; border-top-color: initial; border-top-style: initial; border-width: 0px 0px 1px; color: #f48702; font-family: &amp;quot;Open Sans&amp;quot;; font-size: 24px; line-height: 1.4; margin: 0px 0px 15px; opacity: 1; outline: 0px; padding: 0px 0px 4px; transition: opacity 0.24s ease-in-out 0s; vertical-align: baseline; visibility: visible;"&gt;
Conclusion&lt;/h2&gt;
&lt;div style="background-color: white; border: 0px; color: #010d28; font-family: &amp;quot;Noto Sans&amp;quot;; font-size: 16px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;
Finally, you have learned how to install nodejs and npm on your Debian system with different methods. At the end of tutorial you also learned how to uninstall it.&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #010d28; font-family: &amp;quot;Noto Sans&amp;quot;; font-size: 16px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #010d28; font-family: &amp;quot;Noto Sans&amp;quot;; font-size: 16px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;
Original post:&amp;nbsp;&lt;a href="https://tecnstuff.net/how-to-install-node-js-on-debian-9/" style="background-color: transparent;"&gt;https://tecnstuff.net/how-to-install-node-js-on-debian-9/&lt;/a&gt;&lt;/div&gt;
</description><link>http://page.farhad.pw/2020/04/specific-nodejs-version-install-with-nvm.html</link><author>noreply@blogger.com (Farhad)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgESbRLfLUqFjU9tbXBQU0PUcNTnYx_mQZ3fr40LWc684OShnERrGn8AUwNOyPplrHPeVL5kd-VbobXn2gEHbjp1IN1ouGSxoiHIQEY9IB7mrtj2jpHTjFoAsCwV05-23qD94M2UYCn5HQ/s72-c/install-node-js-on-debian.jpg" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1026424054105678970.post-5017059315984315618</guid><pubDate>Wed, 12 Feb 2020 07:02:00 +0000</pubDate><atom:updated>2020-02-12T13:08:01.087+06:00</atom:updated><title>Install wkhtmltopdf from source</title><description>&lt;div itemprop="about" style="background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 14px;"&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFkk4jsZi7I8wnI_XdxKZFGEyDzLyID5bDpXbg6m90YTm0wjHf6jyUuWj9n0ghAzBA6po5YZkmBgKbWvjfb9ccQ-sdwckwGgTutwNKlVwMUScgOJFYIKI-o8805G1r91GW0hj9pGemedU/s1600/articleocw-590c895c5d17d.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="300" data-original-width="610" height="157" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFkk4jsZi7I8wnI_XdxKZFGEyDzLyID5bDpXbg6m90YTm0wjHf6jyUuWj9n0ghAzBA6po5YZkmBgKbWvjfb9ccQ-sdwckwGgTutwNKlVwMUScgOJFYIKI-o8805G1r91GW0hj9pGemedU/s320/articleocw-590c895c5d17d.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h2 style="text-align: center;"&gt;
Install wkhtmltopdf on Debian 8, 9&lt;/h2&gt;
&lt;div style="text-align: center;"&gt;
Reference:&amp;nbsp;&lt;a href="https://gist.github.com/fedir/48caf91c02197ecb68c22a70555f6f0e"&gt;https://gist.github.com/fedir/48caf91c02197ecb68c22a70555f6f0e&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="js-gist-file-update-container js-task-list-container file-box" style="background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 14px;"&gt;
&lt;div class="file" id="file-wkhtmltopdf-debian8-sh" style="border-radius: 3px; border: 1px solid rgb(221, 221, 221); box-sizing: border-box; margin-bottom: 16px; margin-top: 16px; position: relative;"&gt;
&lt;div class="file-header" style="background-color: #fafbfc; border-bottom: 1px solid rgb(225, 228, 232); border-top-left-radius: 2px; border-top-right-radius: 2px; box-sizing: border-box; padding: 5px 10px;"&gt;
&lt;div class="file-actions" style="box-sizing: border-box; float: right; font-size: 13px; padding-top: 2px;"&gt;
&lt;a class="btn btn-sm " href="https://gist.github.com/fedir/48caf91c02197ecb68c22a70555f6f0e/raw/01ed93195855f28f3de5f3e5e0fbdef8f11929c8/wkhtmltopdf@Debian8.sh" style="-webkit-appearance: none; background-color: #eff3f6; background-image: linear-gradient(-180deg, rgb(250, 251, 252), rgb(239, 243, 246) 90%); background-position: -1px -1px; background-repeat: repeat-x; background-size: 110% 110%; border-radius: 0.25em; border: 1px solid rgba(27, 31, 35, 0.2); box-sizing: border-box; color: #24292e; cursor: pointer; display: inline-block; font-size: 12px; font-weight: 600; line-height: 20px; padding: 3px 10px; position: relative; text-decoration-line: none; user-select: none; vertical-align: middle; white-space: nowrap;"&gt;Raw&lt;/a&gt;&lt;/div&gt;
&lt;div class="file-info" style="box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 12px; line-height: 32px;"&gt;
&lt;span class="icon" style="box-sizing: border-box;"&gt;&lt;svg aria-hidden="true" class="octicon octicon-gist" height="16" version="1.1" viewbox="0 0 12 16" width="12"&gt;&lt;path d="M7.5 5L10 7.5 7.5 10l-.75-.75L8.5 7.5 6.75 5.75 7.5 5zm-3 0L2 7.5 4.5 10l.75-.75L3.5 7.5l1.75-1.75L4.5 5zM0 13V2c0-.55.45-1 1-1h10c.55 0 1 .45 1 1v11c0 .55-.45 1-1 1H1c-.55 0-1-.45-1-1zm1 0h10V2H1v11z" fill-rule="evenodd"&gt;&lt;/path&gt;&lt;/svg&gt;&amp;nbsp;&lt;/span&gt;&lt;a class="css-truncate" href="https://gist.github.com/fedir/48caf91c02197ecb68c22a70555f6f0e#file-wkhtmltopdf-debian8-sh" style="background-color: initial; box-sizing: border-box; color: #0366d6; text-decoration-line: none;"&gt;&lt;span class="user-select-contain gist-blob-name css-truncate-target" style="box-sizing: border-box; display: inline-block; font-weight: 600; max-width: 690px; overflow: hidden; text-overflow: ellipsis; vertical-align: top; white-space: nowrap;"&gt;wkhtmltopdf@Debian8.sh&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="Box-body p-0 blob-wrapper data type-shell " itemprop="text" style="border-bottom-left-radius: 2px; border-bottom-right-radius: 2px; border-bottom: 1px solid rgb(225, 228, 232); box-sizing: border-box; margin-bottom: -1px; overflow: auto hidden; padding: 0px !important;"&gt;
&lt;table class="highlight tab-size js-file-line-container" data-tab-size="8" style="border-collapse: collapse; border-spacing: 0px; box-sizing: border-box; tab-size: 8;"&gt;&lt;tbody style="box-sizing: border-box;"&gt;
&lt;tr style="box-sizing: border-box;"&gt;&lt;td class="blob-num js-line-number" data-line-number="1" id="file-wkhtmltopdf-debian8-sh-L1" style="box-sizing: border-box; color: rgba(27, 31, 35, 0.3); cursor: pointer; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 12px; line-height: 20px; min-width: 50px; padding: 0px 10px; text-align: right; user-select: none; vertical-align: top; white-space: nowrap; width: 50.4px;"&gt;&lt;/td&gt;&lt;td class="blob-code blob-code-inner js-file-line" id="file-wkhtmltopdf-debian8-sh-LC1" style="box-sizing: border-box; color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 12px; line-height: 20px; overflow-wrap: normal; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre;"&gt;apt-get update&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="box-sizing: border-box;"&gt;&lt;td class="blob-num js-line-number" data-line-number="2" id="file-wkhtmltopdf-debian8-sh-L2" style="box-sizing: border-box; color: rgba(27, 31, 35, 0.3); cursor: pointer; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 12px; line-height: 20px; min-width: 50px; padding: 0px 10px; text-align: right; user-select: none; vertical-align: top; white-space: nowrap; width: 50.4px;"&gt;&lt;/td&gt;&lt;td class="blob-code blob-code-inner js-file-line" id="file-wkhtmltopdf-debian8-sh-LC2" style="box-sizing: border-box; color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 12px; line-height: 20px; overflow-wrap: normal; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre;"&gt;aptitude install xfonts-base xfonts-75dpi fontconfig xvfb&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="box-sizing: border-box;"&gt;&lt;td class="blob-num js-line-number" data-line-number="3" id="file-wkhtmltopdf-debian8-sh-L3" style="box-sizing: border-box; color: rgba(27, 31, 35, 0.3); cursor: pointer; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 12px; line-height: 20px; min-width: 50px; padding: 0px 10px; text-align: right; user-select: none; vertical-align: top; white-space: nowrap; width: 50.4px;"&gt;&lt;/td&gt;&lt;td class="blob-code blob-code-inner js-file-line" id="file-wkhtmltopdf-debian8-sh-LC3" style="box-sizing: border-box; color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 12px; line-height: 20px; overflow-wrap: normal; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre;"&gt;mkdir &lt;span class="pl-k" style="box-sizing: border-box; color: #d73a49;"&gt;~&lt;/span&gt;/src/wkhtmltopdf -p&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="box-sizing: border-box;"&gt;&lt;td class="blob-num js-line-number" data-line-number="4" id="file-wkhtmltopdf-debian8-sh-L4" style="box-sizing: border-box; color: rgba(27, 31, 35, 0.3); cursor: pointer; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 12px; line-height: 20px; min-width: 50px; padding: 0px 10px; text-align: right; user-select: none; vertical-align: top; white-space: nowrap; width: 50.4px;"&gt;&lt;/td&gt;&lt;td class="blob-code blob-code-inner js-file-line" id="file-wkhtmltopdf-debian8-sh-LC4" style="box-sizing: border-box; color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 12px; line-height: 20px; overflow-wrap: normal; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre;"&gt;&lt;span class="pl-c1" style="box-sizing: border-box; color: #005cc5;"&gt;cd&lt;/span&gt; &lt;span class="pl-k" style="box-sizing: border-box; color: #d73a49;"&gt;~&lt;/span&gt;/src/wkhtmltopdf&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="box-sizing: border-box;"&gt;&lt;td class="blob-num js-line-number" data-line-number="5" id="file-wkhtmltopdf-debian8-sh-L5" style="box-sizing: border-box; color: rgba(27, 31, 35, 0.3); cursor: pointer; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 12px; line-height: 20px; min-width: 50px; padding: 0px 10px; text-align: right; user-select: none; vertical-align: top; white-space: nowrap; width: 50.4px;"&gt;&lt;/td&gt;&lt;td class="blob-code blob-code-inner js-file-line" id="file-wkhtmltopdf-debian8-sh-LC5" style="box-sizing: border-box; color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 12px; line-height: 20px; overflow-wrap: normal; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre;"&gt;wget https://bitbucket.org/wkhtmltopdf/wkhtmltopdf/downloads/wkhtmltox-0.13.0-alpha-7b36694_linux-jessie-amd64.deb&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="box-sizing: border-box;"&gt;&lt;td class="blob-num js-line-number" data-line-number="6" id="file-wkhtmltopdf-debian8-sh-L6" style="box-sizing: border-box; color: rgba(27, 31, 35, 0.3); cursor: pointer; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 12px; line-height: 20px; min-width: 50px; padding: 0px 10px; text-align: right; user-select: none; vertical-align: top; white-space: nowrap; width: 50.4px;"&gt;&lt;/td&gt;&lt;td class="blob-code blob-code-inner js-file-line" id="file-wkhtmltopdf-debian8-sh-LC6" style="box-sizing: border-box; color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 12px; line-height: 20px; overflow-wrap: normal; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre;"&gt;dpkg -i wkhtmltox-0.13.0-alpha-7b36694_linux-jessie-amd64.deb&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="box-sizing: border-box;"&gt;&lt;td class="blob-num js-line-number" data-line-number="7" id="file-wkhtmltopdf-debian8-sh-L7" style="box-sizing: border-box; color: rgba(27, 31, 35, 0.3); cursor: pointer; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 12px; line-height: 20px; min-width: 50px; padding: 0px 10px; text-align: right; user-select: none; vertical-align: top; white-space: nowrap; width: 50.4px;"&gt;&lt;/td&gt;&lt;td class="blob-code blob-code-inner js-file-line" id="file-wkhtmltopdf-debian8-sh-LC7" style="box-sizing: border-box; color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 12px; line-height: 20px; overflow-wrap: normal; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre;"&gt;&lt;span class="pl-c1" style="box-sizing: border-box; color: #005cc5;"&gt;echo&lt;/span&gt; &lt;span class="pl-s" style="box-sizing: border-box; color: #032f62;"&gt;&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;'&lt;/span&gt;xvfb-run --server-args="-screen 0, 1024x768x24" /usr/local/bin/wkhtmltopdf $*&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;'&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-k" style="box-sizing: border-box; color: #d73a49;"&gt;&amp;gt;&lt;/span&gt; /usr/bin/wkhtmltopdf.sh&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="box-sizing: border-box;"&gt;&lt;td class="blob-num js-line-number" data-line-number="8" id="file-wkhtmltopdf-debian8-sh-L8" style="box-sizing: border-box; color: rgba(27, 31, 35, 0.3); cursor: pointer; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 12px; line-height: 20px; min-width: 50px; padding: 0px 10px; text-align: right; user-select: none; vertical-align: top; white-space: nowrap; width: 50.4px;"&gt;&lt;/td&gt;&lt;td class="blob-code blob-code-inner js-file-line" id="file-wkhtmltopdf-debian8-sh-LC8" style="box-sizing: border-box; color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 12px; line-height: 20px; overflow-wrap: normal; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre;"&gt;chmod a+rx /usr/bin/wkhtmltopdf.sh&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="box-sizing: border-box;"&gt;&lt;td class="blob-num js-line-number" data-line-number="9" id="file-wkhtmltopdf-debian8-sh-L9" style="box-sizing: border-box; color: rgba(27, 31, 35, 0.3); cursor: pointer; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 12px; line-height: 20px; min-width: 50px; padding: 0px 10px; text-align: right; user-select: none; vertical-align: top; white-space: nowrap; width: 50.4px;"&gt;&lt;/td&gt;&lt;td class="blob-code blob-code-inner js-file-line" id="file-wkhtmltopdf-debian8-sh-LC9" style="box-sizing: border-box; color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 12px; line-height: 20px; overflow-wrap: normal; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre;"&gt;ln -s /usr/bin/wkhtmltopdf.sh /usr/local/sbin/wkhtmltopdf&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="box-sizing: border-box;"&gt;&lt;td class="blob-num js-line-number" data-line-number="10" id="file-wkhtmltopdf-debian8-sh-L10" style="box-sizing: border-box; color: rgba(27, 31, 35, 0.3); cursor: pointer; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 12px; line-height: 20px; min-width: 50px; padding: 0px 10px; text-align: right; user-select: none; vertical-align: top; white-space: nowrap; width: 50.4px;"&gt;&lt;/td&gt;&lt;td class="blob-code blob-code-inner js-file-line" id="file-wkhtmltopdf-debian8-sh-LC10" style="box-sizing: border-box; color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 12px; line-height: 20px; overflow-wrap: normal; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre;"&gt;/usr/local/sbin/wkhtmltopdf https://www.google.fr output.pdf&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="js-gist-file-update-container js-task-list-container file-box" style="background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 14px;"&gt;
&lt;div class="file" id="file-wkhtmltopdf-debian9-sh" style="border-radius: 3px; border: 1px solid rgb(221, 221, 221); box-sizing: border-box; margin-bottom: 16px; margin-top: 16px; position: relative;"&gt;
&lt;div class="file-header" style="background-color: #fafbfc; border-bottom: 1px solid rgb(225, 228, 232); border-top-left-radius: 2px; border-top-right-radius: 2px; box-sizing: border-box; padding: 5px 10px;"&gt;
&lt;div class="file-actions" style="box-sizing: border-box; float: right; font-size: 13px; padding-top: 2px;"&gt;
&lt;a class="btn btn-sm " href="https://gist.github.com/fedir/48caf91c02197ecb68c22a70555f6f0e/raw/01ed93195855f28f3de5f3e5e0fbdef8f11929c8/wkhtmltopdf@Debian9.sh" style="-webkit-appearance: none; background-color: #eff3f6; background-image: linear-gradient(-180deg, rgb(250, 251, 252), rgb(239, 243, 246) 90%); background-position: -1px -1px; background-repeat: repeat-x; background-size: 110% 110%; border-radius: 0.25em; border: 1px solid rgba(27, 31, 35, 0.2); box-sizing: border-box; color: #24292e; cursor: pointer; display: inline-block; font-size: 12px; font-weight: 600; line-height: 20px; padding: 3px 10px; position: relative; text-decoration-line: none; user-select: none; vertical-align: middle; white-space: nowrap;"&gt;Raw&lt;/a&gt;&lt;/div&gt;
&lt;div class="file-info" style="box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 12px; line-height: 32px;"&gt;
&lt;span class="icon" style="box-sizing: border-box;"&gt;&lt;svg aria-hidden="true" class="octicon octicon-gist" height="16" version="1.1" viewbox="0 0 12 16" width="12"&gt;&lt;path d="M7.5 5L10 7.5 7.5 10l-.75-.75L8.5 7.5 6.75 5.75 7.5 5zm-3 0L2 7.5 4.5 10l.75-.75L3.5 7.5l1.75-1.75L4.5 5zM0 13V2c0-.55.45-1 1-1h10c.55 0 1 .45 1 1v11c0 .55-.45 1-1 1H1c-.55 0-1-.45-1-1zm1 0h10V2H1v11z" fill-rule="evenodd"&gt;&lt;/path&gt;&lt;/svg&gt;&amp;nbsp;&lt;/span&gt;&lt;a class="css-truncate" href="https://gist.github.com/fedir/48caf91c02197ecb68c22a70555f6f0e#file-wkhtmltopdf-debian9-sh" style="background-color: initial; box-sizing: border-box; color: #0366d6; text-decoration-line: none;"&gt;&lt;span class="user-select-contain gist-blob-name css-truncate-target" style="box-sizing: border-box; display: inline-block; font-weight: 600; max-width: 690px; overflow: hidden; text-overflow: ellipsis; vertical-align: top; white-space: nowrap;"&gt;wkhtmltopdf@Debian9.sh&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="Box-body p-0 blob-wrapper data type-shell " itemprop="text" style="border-bottom-left-radius: 2px; border-bottom-right-radius: 2px; border-bottom: 1px solid rgb(225, 228, 232); box-sizing: border-box; margin-bottom: -1px; overflow: auto hidden; padding: 0px !important;"&gt;
&lt;table class="highlight tab-size js-file-line-container" data-tab-size="8" style="border-collapse: collapse; border-spacing: 0px; box-sizing: border-box; tab-size: 8;"&gt;&lt;tbody style="box-sizing: border-box;"&gt;
&lt;tr style="box-sizing: border-box;"&gt;&lt;td class="blob-num js-line-number" data-line-number="1" id="file-wkhtmltopdf-debian9-sh-L1" style="box-sizing: border-box; color: rgba(27, 31, 35, 0.3); cursor: pointer; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 12px; line-height: 20px; min-width: 50px; padding: 0px 10px; text-align: right; user-select: none; vertical-align: top; white-space: nowrap; width: 50.4px;"&gt;&lt;/td&gt;&lt;td class="blob-code blob-code-inner js-file-line" id="file-wkhtmltopdf-debian9-sh-LC1" style="box-sizing: border-box; color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 12px; line-height: 20px; overflow-wrap: normal; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre;"&gt;apt-get update&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="box-sizing: border-box;"&gt;&lt;td class="blob-num js-line-number" data-line-number="2" id="file-wkhtmltopdf-debian9-sh-L2" style="box-sizing: border-box; color: rgba(27, 31, 35, 0.3); cursor: pointer; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 12px; line-height: 20px; min-width: 50px; padding: 0px 10px; text-align: right; user-select: none; vertical-align: top; white-space: nowrap; width: 50.4px;"&gt;&lt;/td&gt;&lt;td class="blob-code blob-code-inner js-file-line" id="file-wkhtmltopdf-debian9-sh-LC2" style="box-sizing: border-box; color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 12px; line-height: 20px; overflow-wrap: normal; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre;"&gt;apt-get install wkhtmltopdf xvfb xauth xfonts-base xfonts-75dpi fontconfig &lt;/td&gt;&lt;/tr&gt;
&lt;tr style="box-sizing: border-box;"&gt;&lt;td class="blob-num js-line-number" data-line-number="3" id="file-wkhtmltopdf-debian9-sh-L3" style="box-sizing: border-box; color: rgba(27, 31, 35, 0.3); cursor: pointer; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 12px; line-height: 20px; min-width: 50px; padding: 0px 10px; text-align: right; user-select: none; vertical-align: top; white-space: nowrap; width: 50.4px;"&gt;&lt;/td&gt;&lt;td class="blob-code blob-code-inner js-file-line" id="file-wkhtmltopdf-debian9-sh-LC3" style="box-sizing: border-box; color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 12px; line-height: 20px; overflow-wrap: normal; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre;"&gt;&lt;span class="pl-c1" style="box-sizing: border-box; color: #005cc5;"&gt;echo&lt;/span&gt; &lt;span class="pl-s" style="box-sizing: border-box; color: #032f62;"&gt;&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;'&lt;/span&gt;xvfb-run --server-args="-screen 0, 1024x768x24" /usr/bin/wkhtmltopdf $*&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;'&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-k" style="box-sizing: border-box; color: #d73a49;"&gt;&amp;gt;&lt;/span&gt; /usr/bin/wkhtmltopdf.sh&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="box-sizing: border-box;"&gt;&lt;td class="blob-num js-line-number" data-line-number="4" id="file-wkhtmltopdf-debian9-sh-L4" style="box-sizing: border-box; color: rgba(27, 31, 35, 0.3); cursor: pointer; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 12px; line-height: 20px; min-width: 50px; padding: 0px 10px; text-align: right; user-select: none; vertical-align: top; white-space: nowrap; width: 50.4px;"&gt;&lt;/td&gt;&lt;td class="blob-code blob-code-inner js-file-line" id="file-wkhtmltopdf-debian9-sh-LC4" style="box-sizing: border-box; color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 12px; line-height: 20px; overflow-wrap: normal; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre;"&gt;chmod a+rx /usr/bin/wkhtmltopdf.sh&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="box-sizing: border-box;"&gt;&lt;td class="blob-num js-line-number" data-line-number="5" id="file-wkhtmltopdf-debian9-sh-L5" style="box-sizing: border-box; color: rgba(27, 31, 35, 0.3); cursor: pointer; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 12px; line-height: 20px; min-width: 50px; padding: 0px 10px; text-align: right; user-select: none; vertical-align: top; white-space: nowrap; width: 50.4px;"&gt;&lt;/td&gt;&lt;td class="blob-code blob-code-inner js-file-line" id="file-wkhtmltopdf-debian9-sh-LC5" style="box-sizing: border-box; color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 12px; line-height: 20px; overflow-wrap: normal; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre;"&gt;ln -s /usr/bin/wkhtmltopdf.sh /usr/local/sbin/wkhtmltopdf&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="box-sizing: border-box;"&gt;&lt;td class="blob-num js-line-number" data-line-number="6" id="file-wkhtmltopdf-debian9-sh-L6" style="box-sizing: border-box; color: rgba(27, 31, 35, 0.3); cursor: pointer; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 12px; line-height: 20px; min-width: 50px; padding: 0px 10px; text-align: right; user-select: none; vertical-align: top; white-space: nowrap; width: 50.4px;"&gt;&lt;/td&gt;&lt;td class="blob-code blob-code-inner js-file-line" id="file-wkhtmltopdf-debian9-sh-LC6" style="box-sizing: border-box; color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 12px; line-height: 20px; overflow-wrap: normal; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre;"&gt;/usr/local/sbin/wkhtmltopdf https://www.google.fr output.pdf&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description><link>http://page.farhad.pw/2020/02/install-wkhtmltopdf-from-source.html</link><author>noreply@blogger.com (Farhad)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFkk4jsZi7I8wnI_XdxKZFGEyDzLyID5bDpXbg6m90YTm0wjHf6jyUuWj9n0ghAzBA6po5YZkmBgKbWvjfb9ccQ-sdwckwGgTutwNKlVwMUScgOJFYIKI-o8805G1r91GW0hj9pGemedU/s72-c/articleocw-590c895c5d17d.png" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1026424054105678970.post-3695723609468509661</guid><pubDate>Wed, 01 Aug 2018 08:50:00 +0000</pubDate><atom:updated>2018-08-01T14:50:38.678+06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">brute force</category><category domain="http://www.blogger.com/atom/ns#">Centos</category><category domain="http://www.blogger.com/atom/ns#">linux</category><category domain="http://www.blogger.com/atom/ns#">SSH</category><title>Prevent SSH Brute Force Attack by Automatically Blacklisted </title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgr93gb9hgNFA1wGiFH0uBk0mAYWkiORL3vXcpwrhvDeRXonmNqPf3-NUIEKjg2JmSpkxsVSRyIo9pOVtqpr4wSLkO8i3KlGeRCevSFI9jUc1QiW3eZZti-aNMdErWAL-CGu3wn7Opw81g/s1600/Untitled-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="500" data-original-width="500" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgr93gb9hgNFA1wGiFH0uBk0mAYWkiORL3vXcpwrhvDeRXonmNqPf3-NUIEKjg2JmSpkxsVSRyIo9pOVtqpr4wSLkO8i3KlGeRCevSFI9jUc1QiW3eZZti-aNMdErWAL-CGu3wn7Opw81g/s320/Untitled-1.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: white; border: 0px; box-sizing: inherit; clear: both; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin-bottom: 1em; padding: 0px; vertical-align: baseline;"&gt;
&lt;strong style="border: 0px; box-sizing: inherit; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;Automated Solution for Centos/RHEL to Block Bad Actors&lt;/strong&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; box-sizing: inherit; clear: both; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin-bottom: 1em; padding: 0px; vertical-align: baseline;"&gt;
Here's a script for Centos to check ssh failed logins for both invalid user accounts and bad passwords for valid accounts. If the source IP has hit us more than 3 times and is not already on the deny list, it gets added to the deny list. I run this every 15 minutes from root's crontab. I've also disallowed root logins via ssh, so the combination keeps things fairly quiet.&lt;/div&gt;
&lt;pre style="background-color: #eff0f1; border: 0px; box-sizing: inherit; color: #242729; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto; word-wrap: normal;"&gt;&lt;code style="border: 0px; box-sizing: inherit; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;"&gt;     #/bin/bash
     # Save a copy of the existing hosts.deny file for safety
     cp /etc/hosts.deny /etc/hosts.deny.bak
     # Get a list of the offending IP addresses and process them
     for z in `grep "Invalid\|Failed" /var/log/secure | awk '{ print $NF }' | sort | uniq`
     do
     # Get the number of times this IP hit us
     hits=`grep "Invalid\|Failed" /var/log/secure* | grep $z | wc -l`
     # Check whether this IP is already blocked
     blocked=`grep $z /etc/hosts.deny | wc -l`
     # If they hit us more than 3 times and are not already on the deny list
     # add them to the deny list
     if [ $hits -gt 3 -a $blocked -eq 0 ]
     then
          echo "sshd : $z" &amp;gt;&amp;gt; /etc/hosts.deny
     fi
     done&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;span style="background-color: white; font-size: 15px;"&gt;Another Example:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="background-color: #eff0f1; border: 0px; box-sizing: inherit; color: #242729; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto; word-wrap: normal;"&gt;&lt;code style="border: 0px; box-sizing: inherit; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;"&gt;for z in `grep Invalid /var/log/auth.log | awk '{ print $NF }' | sort | uniq`
do
  count1=`grep $z /etc/hosts.deny | wc -l`
  count2=`grep Invalid /var/log/auth.log | grep $z | wc -l`
  if [ $count1 -eq 0 -a $count2 -gt 10 ] ; then
    current=`egrep "^ssh" /etc/hosts.deny | sed 's/sshd[ :,]*//'`
    sudo cp /etc/hosts.deny.bak /etc/hosts.deny
    sudo chmod 666 /etc/hosts.deny
    if [ $current ] ; then
      echo "sshd : $current , $z" &amp;gt;&amp;gt; /etc/hosts.deny
    else
      echo "sshd : $z" &amp;gt;&amp;gt; /etc/hosts.deny
    fi
    sudo chmod 644 /etc/hosts.deny
  fi
done&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;span style="color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;span style="background-color: white; font-size: 15px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;span style="background-color: white; font-size: 15px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;span style="background-color: white; font-size: 15px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;span style="background-color: white; font-size: 15px;"&gt;Post Credit: https://serverfault.com/questions/594746/how-to-stop-prevent-ssh-bruteforce&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;</description><link>http://page.farhad.pw/2018/08/prevent-ssh-brute-force-attack-by.html</link><author>noreply@blogger.com (Farhad)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgr93gb9hgNFA1wGiFH0uBk0mAYWkiORL3vXcpwrhvDeRXonmNqPf3-NUIEKjg2JmSpkxsVSRyIo9pOVtqpr4wSLkO8i3KlGeRCevSFI9jUc1QiW3eZZti-aNMdErWAL-CGu3wn7Opw81g/s72-c/Untitled-1.png" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1026424054105678970.post-2165569625788127145</guid><pubDate>Wed, 18 Jul 2018 17:52:00 +0000</pubDate><atom:updated>2018-07-18T23:52:51.802+06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Bandwidth</category><category domain="http://www.blogger.com/atom/ns#">MikroTik</category><category domain="http://www.blogger.com/atom/ns#">Network</category><title>Bandwidth Limiting Big Files Download - Mikrotik</title><description>&lt;span style="background-color: white; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="background-color: white; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS0SRYXAa-0VIMlZHLBLTNjR-f11VuFG1a8nEFjWtgci0sLk_ielCDJmca0_JNBC1Q_P92m7a-xFJ7hWDuNF8QylW-iknC2H3tlO8BQnDJco4dXS2k8nWP-Y1l3tU-F1EwUK4uHGU4ZDY/s1600/mikrotik.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="900" data-original-width="1600" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS0SRYXAa-0VIMlZHLBLTNjR-f11VuFG1a8nEFjWtgci0sLk_ielCDJmca0_JNBC1Q_P92m7a-xFJ7hWDuNF8QylW-iknC2H3tlO8BQnDJco4dXS2k8nWP-Y1l3tU-F1EwUK4uHGU4ZDY/s320/mikrotik.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style="background-color: white; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="background-color: white; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="background-color: white; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="background-color: white; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="background-color: white; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="background-color: white; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;"&gt;Here is one of my queues with burst, setup using Winbox.&lt;/span&gt;&lt;br style="background-color: white; box-sizing: border-box; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;" /&gt;&lt;br style="background-color: white; box-sizing: border-box; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;" /&gt;&lt;span style="background-color: white; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;"&gt;All settings are on the General Tab. Settings are given as tx/rx (upload/download).&lt;/span&gt;&lt;br style="background-color: white; box-sizing: border-box; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;" /&gt;&lt;br style="background-color: white; box-sizing: border-box; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;" /&gt;&lt;span style="background-color: white; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;"&gt;Name - 2.201/32&lt;/span&gt;&lt;br style="background-color: white; box-sizing: border-box; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;" /&gt;&lt;span style="background-color: white; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;"&gt;Target Address - 192.168.2.201/32&lt;/span&gt;&lt;br style="background-color: white; box-sizing: border-box; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;" /&gt;&lt;span style="background-color: white; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;"&gt;Limit At - 65536/131072&lt;/span&gt;&lt;br style="background-color: white; box-sizing: border-box; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;" /&gt;&lt;span style="background-color: white; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;"&gt;Max Limit - 262144/524288&lt;/span&gt;&lt;br style="background-color: white; box-sizing: border-box; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;" /&gt;&lt;span style="background-color: white; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;"&gt;Burst Limit - 393216/786432&lt;/span&gt;&lt;br style="background-color: white; box-sizing: border-box; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;" /&gt;&lt;span style="background-color: white; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;"&gt;Burst Threshold - 262144/524288&lt;/span&gt;&lt;br style="background-color: white; box-sizing: border-box; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;" /&gt;&lt;span style="background-color: white; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;"&gt;Burst Time - 90/180&lt;/span&gt;&lt;br style="background-color: white; box-sizing: border-box; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;" /&gt;&lt;br style="background-color: white; box-sizing: border-box; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;" /&gt;&lt;span style="background-color: white; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;"&gt;This is a Simple queue for the user at IP 192.168.2.201. He is given a basic speed of 64k upload and 128k download. According to the MT manual, this is a guaranteed minimum speed, provided enough bandwidth is available. His maximum sustained speed is 256k upload and 512k download.&lt;/span&gt;&lt;br style="background-color: white; box-sizing: border-box; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;" /&gt;&lt;br style="background-color: white; box-sizing: border-box; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;" /&gt;&lt;span style="background-color: white; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;"&gt;His speed is allowed to burst as high as 384k upload and 768k download. If his speed goes above the threshold (256/512) and stays there, the burst timer starts. After the allowed time, 90sec for upload and 180sec for download, his speed is throttled back from the burst limit (384/768) to the max limit (256/512) and held there until the traffic flow stops. When the flow stops, the timer resets, and the process starts over.&lt;/span&gt;&lt;br style="background-color: white; box-sizing: border-box; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;" /&gt;&lt;br style="background-color: white; box-sizing: border-box; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;" /&gt;&lt;span style="background-color: white; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;"&gt;The variables are adjustable to suit different needs and situations. If you provide at least 75 seconds on the timer, most speed tests and small file transfers will complete in that time and show fast speeds. If they start a large file download, it will complete part of it fairly quick and then slow down for the remainder of the transfer so they are not hogging the pipe.&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: white; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="background-color: white; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="background-color: white; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="background-color: white; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="background-color: white; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="background-color: white; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="background-color: white; color: #303030; font-family: -apple-system, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;"&gt;Reference:&amp;nbsp;&lt;/span&gt;&lt;span style="color: #303030; font-family: -apple-system, Helvetica Neue, Helvetica, sans-serif;"&gt;&lt;span style="font-size: 14px;"&gt;https://forum.mikrotik.com/viewtopic.php?t=2138&lt;/span&gt;&lt;/span&gt;</description><link>http://page.farhad.pw/2018/07/bandwidth-limiting-big-files-download.html</link><author>noreply@blogger.com (Farhad)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS0SRYXAa-0VIMlZHLBLTNjR-f11VuFG1a8nEFjWtgci0sLk_ielCDJmca0_JNBC1Q_P92m7a-xFJ7hWDuNF8QylW-iknC2H3tlO8BQnDJco4dXS2k8nWP-Y1l3tU-F1EwUK4uHGU4ZDY/s72-c/mikrotik.jpg" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1026424054105678970.post-5862642321601389718</guid><pubDate>Thu, 05 Jul 2018 16:36:00 +0000</pubDate><atom:updated>2018-08-02T13:25:01.662+06:00</atom:updated><title>WSO2Torial: Setting up WSO2 with a valid SSL certificate</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjENId6w18XhMpLpuNbhbbVy8aLFgv_AW7B79DkZ75x2xb3hs4qswMjFoDVgaPG_Bxoye4j5CVxAlehlpoGQsNFLd91G6Yhp0k_SLDelOPs-KLx0ig-X5h4Lv2fSNQaTDJD43PCT-qNyaA/s1600/wso2-esb.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="675" data-original-width="1080" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjENId6w18XhMpLpuNbhbbVy8aLFgv_AW7B79DkZ75x2xb3hs4qswMjFoDVgaPG_Bxoye4j5CVxAlehlpoGQsNFLd91G6Yhp0k_SLDelOPs-KLx0ig-X5h4Lv2fSNQaTDJD43PCT-qNyaA/s320/wso2-esb.jpeg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px; text-align: justify;"&gt;
&lt;a href="https://www.yenlo.com/en/wso2" style="color: #45a9f2; text-decoration-line: none;"&gt;WSO2&lt;/a&gt;&amp;nbsp;products can be downloaded from the WSO2 website, installed in a matter of seconds after which you can try out the software. No fees, no contracts and …. no lawyers.&lt;/div&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px; text-align: justify;"&gt;
What you’ll find when you start up any WSO2 product is that the browser will balk on the certificate that is used to encrypt the connection. This is a so called self-signed certificate and is deemed to be less secure then one from a Certificate authority.&lt;/div&gt;
&lt;h2 style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 35.8px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 400; line-height: 1.2em; margin: 0px 0px 21px;"&gt;
How do Certificates work?&lt;/h2&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px; text-align: justify;"&gt;
Without going into too much detail, certificates work using a trust mechanism. Certificates are issued by a so called Certificate Authority like the companies Comodo or Symantec. A certificate issued by them should be trusted since the trust relationship with CA’s is beyond discussion. &amp;nbsp;The certificate issued guarantees that the site is indeed who it claims to be.&lt;/div&gt;
&lt;div style="margin-bottom: 24px;"&gt;
&lt;/div&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; text-align: justify;"&gt;
Certificates in this sense are used to encrypt the secure https traffic to and from your WSO2 products. To set up HTTPS you will need a valid certificate to enable the WSO2 product to encrypt the connection.&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="color: #333333; font-family: &amp;quot;varela round&amp;quot; , sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="color: #333333; font-family: &amp;quot;varela round&amp;quot; , sans-serif;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="color: #333333; font-family: &amp;quot;varela round&amp;quot; , sans-serif;"&gt;For this tutorial I've used a wildcard certificate signed by a (trusted) Certificate authority. This certificate will be used instead of the self-signed WSO2 certificates in the keystore . These are great for testing purposes but in a production environment you will of course want to change this keystore with a different one. And you also get rid of these pesky messages about security inherent with self signed certificates.&lt;/span&gt;&lt;/div&gt;
&lt;span style="color: #333333; font-family: &amp;quot;varela round&amp;quot; , sans-serif;"&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px; text-align: justify;"&gt;
Mind you that certificates cost money since a service (in this case trust) is offered. There are some organizations that offer free 90 days certificates if you want to try it out and not directly shell out money for a full certificate. Keep in mind that you will need to offer proof of ownership or control over the website that you want the certificate for. For more information we direct you to the internet.&lt;/div&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px; text-align: justify;"&gt;
We assume that you have a working WSO2 product, e.g. an&amp;nbsp;&lt;a href="https://www.yenlo.com/en/wso2/wso2-esb" style="color: #45a9f2; text-decoration-line: none;"&gt;WSO2 ESB&lt;/a&gt;. Before we start we will need to collect a few things.&lt;/div&gt;
&lt;ol style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin: 0px 0px 24px;"&gt;
&lt;li style="text-align: justify;"&gt;A valid certificate, usually acquired from your company’s system administrator&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;The Certificate private key, usually acquired from your company’s system administrator&lt;/li&gt;
&lt;li&gt;&lt;div style="text-align: justify;"&gt;
The intermediary and root certificates provided by the trust company who signed the valid certificate.&amp;nbsp;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
These can be downloaded from the company’s website (In this case I've used a comodo certificate&amp;nbsp;&lt;a href="https://support.comodo.com/index.php?/Default/Knowledgebase/List/Index/108/sha-2" style="color: #45a9f2; text-decoration-line: none;"&gt;https://support.comodo.com/index.php?/Default/Knowledgebase/List/Index/108/sha-2&lt;/a&gt;)&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px; text-align: justify;"&gt;
To find out which ones you need you will have to open the valid certificate and open the below window.&lt;/div&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px;"&gt;
&lt;img alt="Certificate.png" height="478" sizes="(max-width: 377px) 100vw, 377px" src="https://www.yenlo.com/hs-fs/hubfs/Blog_images/Certificate.png?t=1530782958028&amp;amp;width=377&amp;amp;height=478&amp;amp;name=Certificate.png" srcset="https://www.yenlo.com/hs-fs/hubfs/Blog_images/Certificate.png?t=1530782958028&amp;amp;width=189&amp;amp;height=239&amp;amp;name=Certificate.png 189w, https://www.yenlo.com/hs-fs/hubfs/Blog_images/Certificate.png?t=1530782958028&amp;amp;width=377&amp;amp;height=478&amp;amp;name=Certificate.png 377w, https://www.yenlo.com/hs-fs/hubfs/Blog_images/Certificate.png?t=1530782958028&amp;amp;width=566&amp;amp;height=717&amp;amp;name=Certificate.png 566w, https://www.yenlo.com/hs-fs/hubfs/Blog_images/Certificate.png?t=1530782958028&amp;amp;width=754&amp;amp;height=956&amp;amp;name=Certificate.png 754w, https://www.yenlo.com/hs-fs/hubfs/Blog_images/Certificate.png?t=1530782958028&amp;amp;width=943&amp;amp;height=1195&amp;amp;name=Certificate.png 943w, https://www.yenlo.com/hs-fs/hubfs/Blog_images/Certificate.png?t=1530782958028&amp;amp;width=1131&amp;amp;height=1434&amp;amp;name=Certificate.png 1131w" style="border: 0px; height: auto; max-width: 100%; vertical-align: bottom;" width="377" /&gt;&lt;/div&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px;"&gt;
&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
This is the tab you need to see the certificate chain, you can see that the clients wildcard certificate is the one currently selected.&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
Above the current certificate there are two other certificates listed, these are the intermediary certificates within the certificate chain.&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
When selected they will show the names of the intermediary certificates you’ll need:&lt;/div&gt;
&lt;br /&gt;
&lt;ul style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin: 0px 0px 24px;"&gt;
&lt;li style="text-align: justify;"&gt;Comodo RSA Organization Validation Secure Server ca certificate&lt;/li&gt;
&lt;li&gt;&lt;div style="text-align: justify;"&gt;
Comodo RSA Certification Authority certificate&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
In case of the root certificate this one is not listed and is most likely already embedded in the system you're using, if you're not sure it shouldn’t break anything to add this one too.&lt;/div&gt;
&lt;/li&gt;
&lt;li style="text-align: justify;"&gt;Add Trust External ca root certificate&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px; text-align: justify;"&gt;
Here you can see the signed wildcard certificate (*.domain.nl) and the two intermediary certificates in the chain. When you open the intermediaries you can find the exact name of the certificate you will need to find.&lt;/div&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px;"&gt;
&lt;img alt="Certificate information 1.png" caption="false" data-constrained="true" sizes="(max-width: 267px) 100vw, 267px" src="https://www.yenlo.com/hs-fs/hubfs/Blog_images/Certificate%20information%201.png?t=1530782958028&amp;amp;width=267&amp;amp;name=Certificate%20information%201.png" srcset="https://www.yenlo.com/hs-fs/hubfs/Blog_images/Certificate%20information%201.png?t=1530782958028&amp;amp;width=134&amp;amp;name=Certificate%20information%201.png 134w, https://www.yenlo.com/hs-fs/hubfs/Blog_images/Certificate%20information%201.png?t=1530782958028&amp;amp;width=267&amp;amp;name=Certificate%20information%201.png 267w, https://www.yenlo.com/hs-fs/hubfs/Blog_images/Certificate%20information%201.png?t=1530782958028&amp;amp;width=401&amp;amp;name=Certificate%20information%201.png 401w, https://www.yenlo.com/hs-fs/hubfs/Blog_images/Certificate%20information%201.png?t=1530782958028&amp;amp;width=534&amp;amp;name=Certificate%20information%201.png 534w, https://www.yenlo.com/hs-fs/hubfs/Blog_images/Certificate%20information%201.png?t=1530782958028&amp;amp;width=668&amp;amp;name=Certificate%20information%201.png 668w, https://www.yenlo.com/hs-fs/hubfs/Blog_images/Certificate%20information%201.png?t=1530782958028&amp;amp;width=801&amp;amp;name=Certificate%20information%201.png 801w" style="border: 0px; height: auto; max-width: 100%; vertical-align: bottom; width: 267px;" title="Certificate information 1.png" width="267" /&gt;&lt;img alt="Certificate Information 2.png" caption="false" data-constrained="true" sizes="(max-width: 252px) 100vw, 252px" src="https://www.yenlo.com/hs-fs/hubfs/Blog_images/Certificate%20Information%202.png?t=1530782958028&amp;amp;width=252&amp;amp;name=Certificate%20Information%202.png" srcset="https://www.yenlo.com/hs-fs/hubfs/Blog_images/Certificate%20Information%202.png?t=1530782958028&amp;amp;width=126&amp;amp;name=Certificate%20Information%202.png 126w, https://www.yenlo.com/hs-fs/hubfs/Blog_images/Certificate%20Information%202.png?t=1530782958028&amp;amp;width=252&amp;amp;name=Certificate%20Information%202.png 252w, https://www.yenlo.com/hs-fs/hubfs/Blog_images/Certificate%20Information%202.png?t=1530782958028&amp;amp;width=378&amp;amp;name=Certificate%20Information%202.png 378w, https://www.yenlo.com/hs-fs/hubfs/Blog_images/Certificate%20Information%202.png?t=1530782958028&amp;amp;width=504&amp;amp;name=Certificate%20Information%202.png 504w, https://www.yenlo.com/hs-fs/hubfs/Blog_images/Certificate%20Information%202.png?t=1530782958028&amp;amp;width=630&amp;amp;name=Certificate%20Information%202.png 630w, https://www.yenlo.com/hs-fs/hubfs/Blog_images/Certificate%20Information%202.png?t=1530782958028&amp;amp;width=756&amp;amp;name=Certificate%20Information%202.png 756w" style="border: 0px; height: auto; max-width: 100%; vertical-align: bottom;" title="Certificate Information 2.png" width="252" /&gt;&lt;/div&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px; text-align: justify;"&gt;
So the intermediaries we need are the COMODO RSA Certification authority cert and the Comodo Rsa Organization Validation Secure Server ca.&lt;/div&gt;
&lt;h2 style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 35.8px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 400; line-height: 1.2em; margin: 0px 0px 21px;"&gt;
Creating and configuring a new keystore&lt;/h2&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px;"&gt;
Creating a new keystore with a trusted key takes the following steps:&lt;/div&gt;
&lt;ol style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin: 0px 0px 24px;"&gt;
&lt;li&gt;Creating a PKCS12/PFX file&lt;/li&gt;
&lt;li&gt;Creating the Keystore&lt;/li&gt;
&lt;li&gt;Export a public key from the JKS file&lt;/li&gt;
&lt;li&gt;Adding the keystore and public key to the product&lt;ul style="margin: 0px 0px 24px;"&gt;
&lt;li&gt;Adding the public key to the Public truststore&lt;/li&gt;
&lt;li&gt;Configuring the product to use the new keystore&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Adding the intermediary certificates to the keystore.&lt;/li&gt;
&lt;li&gt;Done!&lt;/li&gt;
&lt;/ol&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px;"&gt;
We will describe these steps in more detail below.&lt;/div&gt;
&lt;div style="margin-bottom: 24px;"&gt;
&lt;/div&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; text-align: justify;"&gt;
Before we can create a keystore we will have to create &amp;nbsp;a .pfx file with the collected certificates and key.&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="color: #333333; font-family: &amp;quot;varela round&amp;quot; , sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;strong style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px;"&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;
&lt;strong style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px;"&gt;&lt;strong&gt;&lt;span style="color: #59a9da;"&gt;Step 1&amp;nbsp;- Creating a PKCS12/PFX File&lt;/span&gt;&lt;/strong&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;strong style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px;"&gt;
&lt;/strong&gt;&lt;span style="color: #333333; font-family: &amp;quot;varela round&amp;quot; , sans-serif;"&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="color: #333333; font-family: &amp;quot;varela round&amp;quot; , sans-serif;"&gt;First you must export certificates to the &amp;nbsp;PKCS12/PFX &amp;nbsp;format. Use strong passwords whenever required.&lt;/span&gt;&lt;/div&gt;
&lt;span style="color: #333333; font-family: &amp;quot;varela round&amp;quot; , sans-serif;"&gt;
&lt;/span&gt;&lt;span style="color: #333333; font-family: &amp;quot;varela round&amp;quot; , sans-serif;"&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="color: #333333; font-family: &amp;quot;varela round&amp;quot; , sans-serif;"&gt;We used an openssl prompt for this part of the process, you can open it in command line by typing "openssl".&lt;/span&gt;&lt;/div&gt;
&lt;span style="color: #333333; font-family: &amp;quot;varela round&amp;quot; , sans-serif;"&gt;
&lt;/span&gt;&lt;span style="color: #333333; font-family: &amp;quot;varela round&amp;quot; , sans-serif;"&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="color: #333333; font-family: &amp;quot;varela round&amp;quot; , sans-serif;"&gt;To generate a correct PFX file you will need to use the following command, if correctly executed it will ask for a password twice, don't forget whatever you decide to use as a password as you will need it later!&lt;/span&gt;&lt;/div&gt;
&lt;span style="color: #333333; font-family: &amp;quot;varela round&amp;quot; , sans-serif;"&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;table border="3" style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style="font-family: monospace;"&gt;&lt;b&gt;openssl pkcs12 -export -in (customer valid certificate file).crt -inkey (customer valid certficate file private key).key -name "alias for your pfx" -certfile (additional certificate intermediary1) -out (pfx keystore name).pfx&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px;"&gt;
&lt;br /&gt;
This will result in a valid pfx file.&lt;/div&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px;"&gt;
&lt;strong&gt;&lt;span style="color: #59a9da;"&gt;Step 2&amp;nbsp;- Creating the keystore&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
Now we will Convert the&amp;nbsp;PKCS12/PFX file&amp;nbsp;to a Java keystore using the following command:&lt;/div&gt;
&lt;table border="3" style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style="font-family: monospace;"&gt;&lt;b&gt;keytool -importkeystore -srckeystore (pkcs12/pfx file name).pfx -srcstoretype pkcs12 -destkeystore (Keystore file name).jks -deststoretype JKS&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style="text-align: justify;"&gt;
&lt;br /&gt;
&lt;br /&gt;
For this command you will need a valid JDK installation, keytool comes with the JDK. It can be found in the /bin directory of the JDK.&lt;/div&gt;
&lt;br /&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px; text-align: justify;"&gt;
If your command line cannot find keytool when you try to use it your PATH environment variable might not be set.&amp;nbsp;Edit the PATH environment variable on your computer and add the location of the jdk bin folder to it. Once this is configured you should be able to use keytool from any directory on the computer. Once the command is executed you will have a valid Keystore!&amp;nbsp;&lt;/div&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px;"&gt;
&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;strong&gt;&lt;span style="color: #59a9da;"&gt;Step 3&amp;nbsp;- Export a public key from your JKS file&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
Aside from the keystore there is a "Public truststore" inside the WSO2 product, we will need to add the public key of our keystore to this truststore.&lt;/div&gt;
&lt;br /&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px; text-align: justify;"&gt;
Since we don't have a public key yet we will have to export this one from the Keystore.&amp;nbsp;&lt;/div&gt;
&lt;table border="3" style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style="font-family: monospace;"&gt;&lt;b&gt;keytool -export -alias "certificate alias" -keystore (mykeystore.jks) -file (public key name).pem&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px;"&gt;
&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
Make sure the alias is the same as the one you used for your pfx file.&amp;nbsp;&lt;/div&gt;
&lt;br /&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px;"&gt;
&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;strong style="color: #59a9da;"&gt;Step 4&amp;nbsp;- Adding the keystore and public key to the product&lt;/strong&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
Before we can configure the keystore and public key for WSO2 product we have to place the files inside the&amp;nbsp;&lt;product_home&gt;/repository/resources/security folder.&lt;/product_home&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
Once the files are in position we can configure the product to use our newly created files.&lt;/div&gt;
&lt;br /&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px;"&gt;
&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="color: #59a9da;"&gt;Step 4.1&amp;nbsp;- Adding the public key to the Public truststore&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
The public truststore in the &lt;product_home&gt;/repository/resources/security/ folder is called "client-truststore.jks", we will add the public key to this truststore with the below command.&lt;/product_home&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;table border="3" style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; text-align: justify;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style="font-family: monospace;"&gt;&lt;b&gt;keytool -import -alias (certificate alias) -file (public key name).pem -keystore client-truststore.jks -storepass wso2carbon&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style="margin-bottom: 24px;"&gt;
&lt;/div&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; text-align: justify;"&gt;
Note: the default password for the client-truststore.jks is "wso2carbon".&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="color: #333333; font-family: &amp;quot;varela round&amp;quot; , sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;strong style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px;"&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;
&lt;strong style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px;"&gt;&lt;strong&gt;&lt;span style="color: #59a9da;"&gt;Step 4.2&amp;nbsp;- Configuring the product to use the new keystore&lt;/span&gt;&lt;/strong&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;strong style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px;"&gt;
&lt;/strong&gt;&lt;span style="color: #333333; font-family: &amp;quot;varela round&amp;quot; , sans-serif;"&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="color: #333333; font-family: &amp;quot;varela round&amp;quot; , sans-serif;"&gt;Inside each WSO2 product there are many different files that refer to the default keystore, if you want to replace it with the new one you will have to change the entry in all of the relevant places.&lt;/span&gt;&lt;/div&gt;
&lt;span style="color: #333333; font-family: &amp;quot;varela round&amp;quot; , sans-serif;"&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px;"&gt;
&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
The most important file to configure is the primary keystore entry in the&amp;nbsp;&amp;nbsp;&lt;product_home&gt;/repository/conf/carbon.xml file, if you don't want to edit this entry you can also manually add an extra keystore entry.&lt;/product_home&gt;&lt;/div&gt;
&lt;div&gt;
The entry will look like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;keystore&gt;&lt;/keystore&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;location&gt;${carbon.home}/resources/security/&lt;/location&gt;&lt;br /&gt;
wso2carbon.jks&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;type&gt;JKS&lt;/type&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;password&gt;wso2carbon&lt;/password&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;keyalias&gt;wso2carbon&lt;/keyalias&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;keypassword&gt;wso2carbon&lt;/keypassword&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#####&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;type&gt;JKS&lt;/type&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;password&gt;wso2carbon&lt;/password&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;keyalias&gt;wso2carbon&lt;/keyalias&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;keypassword&gt;wso2carbon&lt;/keypassword&gt;&lt;br /&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px; text-align: start;"&gt;
&lt;br /&gt;
Change it to something like this:&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;type&gt;JKS&lt;/type&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;password&gt;wso2carbon&lt;/password&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;keyalias&gt;wso2carbon&lt;/keyalias&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;keypassword&gt;wso2carbon&lt;/keypassword&gt;&lt;br /&gt;
&lt;br /&gt;
#####################################################################&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px;"&gt;
Change it to something like this:&lt;/div&gt;
&lt;table border="3" style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style="word-wrap: break-word;"&gt;&lt;strong&gt;&lt;keystore&gt;&lt;br /&gt;&lt;/keystore&gt;&lt;/strong&gt;&lt;strong&gt;&lt;keystore&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;location&gt;${carbon.home}/resources/security/&lt;yourkeystore .jks="" ocation=""&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;type&gt;JKS&lt;/type&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;password&gt;&lt;your keystore="" password=""&gt;&lt;/your&gt;&lt;/password&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;keyalias&gt;&lt;your alias="" keystore=""&gt;&lt;/your&gt;&lt;/keyalias&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;keypassword&gt;&lt;your as="" be="" key="" keystorepassword="" password="" same="" should="" the=""&gt;&lt;/your&gt;&lt;/keypassword&gt;&lt;/yourkeystore&gt;&lt;/location&gt;&lt;/keystore&gt;&lt;/strong&gt;&lt;strong&gt;&lt;keystore&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;keyalias&gt;&lt;your alias="" keystore=""&gt;&lt;/your&gt;&lt;/keyalias&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;keypassword&gt;&lt;your as="" be="" key="" keystore="" password="" same="" should="" the=""&gt;&lt;/your&gt;&lt;/keypassword&gt;&lt;/keystore&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
Note that the password is stored in plaintext. If you want to store a more secure placeholder with an encrypted value, use SecureVault. For more information on this subject I will refer you to my colleague’s blog: https://www.yenlo.com/blog/wso2torial-encrypt-passwords-using-secure-vault&lt;/div&gt;
&lt;br /&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px; text-align: justify;"&gt;
The easiest way to find all the other entries of the default keystore is to use the "grep -nr ".jks"&amp;nbsp;in the&amp;nbsp;&lt;product_home&gt;/repository/conf/&amp;nbsp;folder, this will list all the relevant entries and their files.&lt;/product_home&gt;&lt;/div&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px; text-align: justify;"&gt;
You will get something like below. Now you can open each of the files you find and change the relevant keystore entries.&lt;/div&gt;
&lt;table border="3" style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;strong style="font-family: monospace;"&gt;/axis2/axis2.xml:260:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;location&gt;repository/resources/security/wso2carbon.jks&lt;/location&gt;&lt;br /&gt;./axis2/axis2.xml:431:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;location&gt;repository/resources/security/wso2carbon.jks&lt;/location&gt;&lt;br /&gt;./carbon.xml:316:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;location&gt;${carbon.home}/repository/resources/security/wso2carbon.jks&lt;/location&gt;&lt;br /&gt;./carbon.xml:332:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;location&gt;${carbon.home}/repository/resources/security/wso2carbon.jks&lt;/location&gt;&lt;br /&gt;./identity.xml:180:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;location&gt;${carbon.home}/repository/resources/security/wso2carbon.jks&lt;/location&gt;&lt;br /&gt;./security/secret-conf.properties:21:#keystore.identity.location=repository/resources/security/wso2carbon.jks&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px;"&gt;
&lt;br /&gt;
Once you've replaced these entries, restart the server.&lt;/div&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px;"&gt;
&lt;span style="color: #59a9da;"&gt;&lt;b&gt;Step 5&amp;nbsp;- Adding the intermediary certificates to the keystore.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="color: #333333;"&gt;Now that we've correctly configured the keystore we can look it up in the carbon console.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
Under the Main tab there is a button called "Keystores" here you would originally see the "wso2carbon.jks" now you should see your own keystore.&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
If this is not the case, make sure you correctly configured the keystore entry in the carbon.xml.&lt;/div&gt;
&lt;br /&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px;"&gt;
It should look like this with your keystore name listed.&lt;/div&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px;"&gt;
&lt;img alt="KEYSTORE.JKS.png" height="40" sizes="(max-width: 557px) 100vw, 557px" src="https://www.yenlo.com/hs-fs/hubfs/Blog_images/KEYSTORE.JKS.png?t=1530782958028&amp;amp;width=557&amp;amp;height=40&amp;amp;name=KEYSTORE.JKS.png" srcset="https://www.yenlo.com/hs-fs/hubfs/Blog_images/KEYSTORE.JKS.png?t=1530782958028&amp;amp;width=279&amp;amp;height=20&amp;amp;name=KEYSTORE.JKS.png 279w, https://www.yenlo.com/hs-fs/hubfs/Blog_images/KEYSTORE.JKS.png?t=1530782958028&amp;amp;width=557&amp;amp;height=40&amp;amp;name=KEYSTORE.JKS.png 557w, https://www.yenlo.com/hs-fs/hubfs/Blog_images/KEYSTORE.JKS.png?t=1530782958028&amp;amp;width=836&amp;amp;height=60&amp;amp;name=KEYSTORE.JKS.png 836w, https://www.yenlo.com/hs-fs/hubfs/Blog_images/KEYSTORE.JKS.png?t=1530782958028&amp;amp;width=1114&amp;amp;height=80&amp;amp;name=KEYSTORE.JKS.png 1114w, https://www.yenlo.com/hs-fs/hubfs/Blog_images/KEYSTORE.JKS.png?t=1530782958028&amp;amp;width=1393&amp;amp;height=100&amp;amp;name=KEYSTORE.JKS.png 1393w, https://www.yenlo.com/hs-fs/hubfs/Blog_images/KEYSTORE.JKS.png?t=1530782958028&amp;amp;width=1671&amp;amp;height=120&amp;amp;name=KEYSTORE.JKS.png 1671w" style="border: 0px; height: auto; max-width: 100%; vertical-align: bottom;" width="557" /&gt;&lt;/div&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px; text-align: justify;"&gt;
Now we just need to add the intermediary and (optionally) the root certificate to the keystore.&amp;nbsp;&lt;/div&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px;"&gt;
&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
Click the Import cert button and do this for the intermediary certificates. It will end up looking something like this:&lt;/div&gt;
&lt;br /&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px;"&gt;
&lt;img alt="Certificate of private key.png" height="381" sizes="(max-width: 557px) 100vw, 557px" src="https://www.yenlo.com/hs-fs/hubfs/Blog_images/Certificate%20of%20private%20key.png?t=1530782958028&amp;amp;width=557&amp;amp;height=381&amp;amp;name=Certificate%20of%20private%20key.png" srcset="https://www.yenlo.com/hs-fs/hubfs/Blog_images/Certificate%20of%20private%20key.png?t=1530782958028&amp;amp;width=279&amp;amp;height=191&amp;amp;name=Certificate%20of%20private%20key.png 279w, https://www.yenlo.com/hs-fs/hubfs/Blog_images/Certificate%20of%20private%20key.png?t=1530782958028&amp;amp;width=557&amp;amp;height=381&amp;amp;name=Certificate%20of%20private%20key.png 557w, https://www.yenlo.com/hs-fs/hubfs/Blog_images/Certificate%20of%20private%20key.png?t=1530782958028&amp;amp;width=836&amp;amp;height=572&amp;amp;name=Certificate%20of%20private%20key.png 836w, https://www.yenlo.com/hs-fs/hubfs/Blog_images/Certificate%20of%20private%20key.png?t=1530782958028&amp;amp;width=1114&amp;amp;height=762&amp;amp;name=Certificate%20of%20private%20key.png 1114w, https://www.yenlo.com/hs-fs/hubfs/Blog_images/Certificate%20of%20private%20key.png?t=1530782958028&amp;amp;width=1393&amp;amp;height=953&amp;amp;name=Certificate%20of%20private%20key.png 1393w, https://www.yenlo.com/hs-fs/hubfs/Blog_images/Certificate%20of%20private%20key.png?t=1530782958028&amp;amp;width=1671&amp;amp;height=1143&amp;amp;name=Certificate%20of%20private%20key.png 1671w" style="border: 0px; height: auto; max-width: 100%; vertical-align: bottom;" width="557" /&gt;&lt;/div&gt;
&lt;div style="margin-bottom: 24px;"&gt;
&lt;strong style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px;"&gt;&lt;span style="color: #59a9da;"&gt;Step 6&amp;nbsp;-&amp;nbsp;&amp;nbsp;Done!&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; text-align: justify;"&gt;
Restart the server and go to the carbon console, in your browser next to your URL it will show whether the connection is valid HTTPS.&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="color: #333333; font-family: &amp;quot;varela round&amp;quot; , sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="color: #333333; font-family: &amp;quot;varela round&amp;quot; , sans-serif;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="color: #333333; font-family: &amp;quot;varela round&amp;quot; , sans-serif;"&gt;If it still shows the website as unsafe in your browser you can get extra details about the problem by clicking on the notification in your browser.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;span style="color: #333333; font-family: &amp;quot;varela round&amp;quot; , sans-serif;"&gt;
&lt;/span&gt;&lt;span style="color: #333333; font-family: &amp;quot;varela round&amp;quot; , sans-serif;"&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="color: #333333; font-family: &amp;quot;varela round&amp;quot; , sans-serif;"&gt;If you can't find enough information through there you can also try one of many SSL checker web tools like&amp;nbsp;&lt;a href="https://www.ssllabs.com/ssltest/" style="color: #45a9f2; font-size: 16px; text-decoration-line: none;"&gt;https://www.ssllabs.com/ssltest/&lt;/a&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;span style="color: #333333; font-family: &amp;quot;varela round&amp;quot; , sans-serif;"&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style="color: #333333; font-family: &amp;quot;varela round&amp;quot; , sans-serif;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="color: #333333; font-family: &amp;quot;varela round&amp;quot; , sans-serif;"&gt;Note: Don't forget that if you go straight to the IP address in your browser and not through a DNS address it will also say that the HTTPS is not correct. This is because in our case the certificate used was for *.domain.nl so the browser only rates the website as secure if you go through a variation of *.domain.nl.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;span style="color: #333333; font-family: &amp;quot;varela round&amp;quot; , sans-serif;"&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px; text-align: justify;"&gt;
If you have any questions about this blogpost contact us via the comments section of this blog. View also our&amp;nbsp;&lt;a href="https://www.yenlo.com/en/wso2/wso2-tutorial" style="color: #45a9f2; text-decoration-line: none;"&gt;WSO2 Tutorials&lt;/a&gt;,&amp;nbsp;&lt;a href="https://www.yenlo.com/en/free-advice/webinars" style="color: #45a9f2; text-decoration-line: none;"&gt;webinars&lt;/a&gt;&amp;nbsp;or&amp;nbsp;&lt;a href="https://www.yenlo.com/en/free-advice/white-papers" style="color: #45a9f2; text-decoration-line: none;"&gt;white papers&lt;/a&gt;&amp;nbsp;for more technical information. Need support? We do deliver&amp;nbsp;&lt;a href="https://www.yenlo.com/en/wso2/wso2-support" style="color: #45a9f2; text-decoration-line: none;"&gt;WSO2 Product Support&lt;/a&gt;,&amp;nbsp;&lt;a href="https://www.yenlo.com/en/wso2/wso2-support" style="color: #45a9f2; text-decoration-line: none;"&gt;WSO2 Development Support&lt;/a&gt;,&amp;nbsp;&lt;a href="https://www.yenlo.com/en/wso2/wso2-support" style="color: #45a9f2; text-decoration-line: none;"&gt;WSO2 Operational Support&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://www.yenlo.com/en/wso2/wso2-training" style="color: #45a9f2; text-decoration-line: none;"&gt;WSO2 Training Programs&lt;/a&gt;.&lt;/div&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px; text-align: justify;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px; text-align: justify;"&gt;
Tutorial Credit:&amp;nbsp;https://www.yenlo.com/blog/setting-up-wso2-with-a-valid-certificate&amp;nbsp;&lt;/div&gt;
&lt;div style="color: #333333; font-family: &amp;quot;Varela Round&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 24px; text-align: justify;"&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://page.farhad.pw/2018/07/wso2torial-setting-up-wso2-with-valid.html</link><author>noreply@blogger.com (Farhad)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjENId6w18XhMpLpuNbhbbVy8aLFgv_AW7B79DkZ75x2xb3hs4qswMjFoDVgaPG_Bxoye4j5CVxAlehlpoGQsNFLd91G6Yhp0k_SLDelOPs-KLx0ig-X5h4Lv2fSNQaTDJD43PCT-qNyaA/s72-c/wso2-esb.jpeg" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1026424054105678970.post-6112876598908819374</guid><pubDate>Mon, 16 Apr 2018 07:41:00 +0000</pubDate><atom:updated>2018-04-16T14:23:34.030+06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SFTP</category><category domain="http://www.blogger.com/atom/ns#">SSH</category><title>Give permission to a SSH user only to a specific directory and block terminal access !!</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZbGdPGXDpc2ywDK3gqGH5zgi-fh3C6WWBzjepcyHYqaJcsYPwYcuV1mbP_Yoh6CcpQjhb3Lq8kUv-iQaCm0_C0yIr8Dao1oHfRYSZA_xHZbNy6LXibUokkrLY8lPB6IbFfeQi4iQm0UE/s1600/Restrict_ssh.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="560" data-original-width="900" height="199" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZbGdPGXDpc2ywDK3gqGH5zgi-fh3C6WWBzjepcyHYqaJcsYPwYcuV1mbP_Yoh6CcpQjhb3Lq8kUv-iQaCm0_C0yIr8Dao1oHfRYSZA_xHZbNy6LXibUokkrLY8lPB6IbFfeQi4iQm0UE/s320/Restrict_ssh.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;b&gt;How do I restrict the user to only be able to do anything within that folder? (ie: that folder is the user's root and they cannot view/edit anything higher in the directory tree)&lt;/b&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;b&gt;Step-1&lt;/b&gt;: adding a new group&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
sudo addgroup sftptsl&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;b&gt;Step-2&lt;/b&gt;: Create the chroot directory&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
sudo mkdir /var/www/html/user-dir/&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
sudo chmod g+rx /var/www/html/user-dir/&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;b&gt;Step-3&lt;/b&gt;: Create the group-writable directory&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
sudo mkdir -p /var/www/html/user-dir/working-dir1/&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
sudo chmod g+rwx /var/www/html/user-dir/working-dir1/&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;b&gt;Step-4&lt;/b&gt;: Give them both to the new group.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
sudo chgrp -R sftptsl /var/www/html/user-dir/&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;b&gt;Step-5&lt;/b&gt;: create an user and asign to this group&amp;nbsp;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
sudo adduser --ingroup sftptsl sftpuser&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
## group change&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
You can also assign an existing user to the group&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
usermod -g primarygroupname username&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
usermod -G secondarygroupname username&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
-g (primary group assigned to the users)&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
-G (Other groups the user belongs to)&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;b&gt;Step-6&lt;/b&gt;: Open the SSH configuration file from "/etc/ssh/sshd_config", add the below text end of the file&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
Match Group sftptsl&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&amp;nbsp; # Force the connection to use SFTP and chroot to the required directory.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&amp;nbsp; ForceCommand internal-sftp&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&amp;nbsp; ChrootDirectory /var/www/html/user-dir/&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&amp;nbsp; # Disable tunneling, authentication agent, TCP and X11 forwarding.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&amp;nbsp; PermitTunnel no&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&amp;nbsp; AllowAgentForwarding no&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&amp;nbsp; AllowTcpForwarding no&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&amp;nbsp; X11Forwarding no&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;b&gt;Step-7&lt;/b&gt;: Check it is working or not by using filezilla or any remote file browser.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://page.farhad.pw/2018/04/give-permission-to-ssh-user-only.html</link><author>noreply@blogger.com (Farhad)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZbGdPGXDpc2ywDK3gqGH5zgi-fh3C6WWBzjepcyHYqaJcsYPwYcuV1mbP_Yoh6CcpQjhb3Lq8kUv-iQaCm0_C0yIr8Dao1oHfRYSZA_xHZbNy6LXibUokkrLY8lPB6IbFfeQi4iQm0UE/s72-c/Restrict_ssh.png" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1026424054105678970.post-5189418974545911666</guid><pubDate>Thu, 15 Mar 2018 15:51:00 +0000</pubDate><atom:updated>2018-03-15T21:51:58.365+06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Centos</category><category domain="http://www.blogger.com/atom/ns#">RAM</category><category domain="http://www.blogger.com/atom/ns#">Swap</category><title>SWAP: Allocate swap space in Centos7</title><description>&lt;h3 id="introduction" style="background-color: white; box-sizing: border-box; color: #3a3a3a; font-family: proxima-nova, sans-serif; font-size: 22px; letter-spacing: 0.005em; margin: 14px auto 11px; padding: 0px; width: 745px;"&gt;
Introduction&lt;/h3&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
One of the easiest ways to make your server more responsive, and guard against out-of-memory errors in your application, is to add some swap space.&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: 600;"&gt;Swap&lt;/span&gt;&amp;nbsp;is an area on a storage drive where the operating system can temporarily store data that it can no longer hold in memory.&lt;/div&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
This gives you the ability to increase the amount of information that your server can keep in its working memory, with some caveats. Reading from and writing to swap is slower than using memory, but it can provide a good safety net for when your server is low on memory.&lt;/div&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Without swap, a server that runs out of memory may start killing applications to free up memory, or even crash. This can cause you to lose unsaved data or experience downtime. To ensure reliable data access, some applications require swap to function.&lt;/div&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
In this guide, we will cover how to create and enable a swap file on a CentOS 7 server.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSpKKUFzPINAlmR7utqRMZ12kGSHURn5PeLMZ-AKQoQ33svmChFLRwsy2uU-FMuw2sIxhDDW5UhBVLGJOM5L4SllooCz0RUjqMxA0BK13DEZKQ5y45Mx4kYo4wjronRUWM-8XXZRFq2TI/s1600/swappiness-feaured.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="343" data-original-width="800" height="137" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSpKKUFzPINAlmR7utqRMZ12kGSHURn5PeLMZ-AKQoQ33svmChFLRwsy2uU-FMuw2sIxhDDW5UhBVLGJOM5L4SllooCz0RUjqMxA0BK13DEZKQ5y45Mx4kYo4wjronRUWM-8XXZRFq2TI/s320/swappiness-feaured.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="code-label notes-and-warnings note" style="background-color: #eae9cc; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; font-family: proxima-nova, sans-serif; font-size: 15px; line-height: 26px; margin-bottom: -3px; margin-left: auto; margin-right: auto; padding: 8px 15px; position: relative; text-align: center; width: 745px; z-index: 2;" title="Note"&gt;
Note&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; padding: 0px;"&gt;
Although swap is generally recommended for systems utilizing traditional spinning hard drives, using swap with SSDs can cause issues with hardware degradation over time. Due to this consideration, we do not recommend enabling swap on DigitalOcean or any other provider that utilizes SSD storage. Doing so can impact the reliability of the underlying hardware for you and your neighbors.&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; padding: 0px;"&gt;
If you need to improve the performance of your server, we recommend upgrading your Droplet. This will lead to better results in general and will decrease the likelihood of contributing to hardware issues that can affect your service.&lt;/div&gt;
&lt;span class="note" style="background-color: #f4f2d4; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; display: block; font-family: proxima-nova, sans-serif; font-size: 15px; line-height: 26px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 13px 17px; width: 745px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div data-unique="prerequisites" name="prerequisites" style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-left: auto; margin-right: auto; width: 745px;"&gt;
&lt;/div&gt;
&lt;h2 id="prerequisites" style="background-color: white; box-sizing: border-box; color: #3a3a3a; font-family: proxima-nova, sans-serif; font-size: 28px; font-weight: 400; letter-spacing: -0.5px; margin: 14px auto 10px; padding: 0px; width: 745px;"&gt;
Prerequisites&lt;/h2&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Before you begin with this guide, there are a few steps that need to be completed first.&lt;/div&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
You will need a CentOS 7 server installed and configured with a non-root user that has&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;sudo&lt;/code&gt;&amp;nbsp;privileges. If you haven't done this yet, you can run through steps 1-4 in the&amp;nbsp;&lt;a href="https://www.digitalocean.com/community/tutorials/initial-server-setup-with-centos-7" style="border-bottom: 1px dotted rgb(0, 0, 0); box-sizing: border-box; color: black; text-decoration-line: none;"&gt;CentOS 7 initial server setup guide&lt;/a&gt;&amp;nbsp;to create this account.&lt;/div&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Once you have your non-root user, you can use it to SSH into your CentOS server and continue with the installation of your swap file.&lt;/div&gt;
&lt;div data-unique="check-the-system-for-swap-information" name="check-the-system-for-swap-information" style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-left: auto; margin-right: auto; width: 745px;"&gt;
&lt;/div&gt;
&lt;h2 id="check-the-system-for-swap-information" style="background-color: white; box-sizing: border-box; color: #3a3a3a; font-family: proxima-nova, sans-serif; font-size: 28px; font-weight: 400; letter-spacing: -0.5px; margin: 14px auto 10px; padding: 0px; width: 745px;"&gt;
Check the System for Swap Information&lt;/h2&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Before we begin, we should take a look at our server's storage to see if we already have some swap space available. While we can have multiple swap files or swap partitions, one should generally be enough.&lt;/div&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
We can see if the system has any configured swap by using&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;swapon&lt;/code&gt;, a general-purpose swap utility. With the&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;-s&lt;/code&gt;&amp;nbsp;flag,&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;swapon&lt;/code&gt;&amp;nbsp;will display a summary of swap usage and availability on our storage device:&lt;/div&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;swapon -s
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
If nothing is returned by the command, then the summary was empty and no swap file exists.&lt;/div&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Another way of checking for swap space is with the&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;free&lt;/code&gt;&amp;nbsp;utility, which shows us the system's overall memory usage. We can see our current memory and swap usage (in megabytes) by typing:&lt;/div&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;free -m
&lt;/code&gt;&lt;/pre&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;             total       used       free     shared    buffers     cached
Mem:          3953        315       3637          8         11        107
-/+ buffers/cache:        196       3756
&lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;Swap:            0&lt;/span&gt;          0       4095
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
As you can see, our total swap space in the system is 0. This matches what we saw with&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;swapon&lt;/code&gt;.&lt;/div&gt;
&lt;div data-unique="check-available-storage-space" name="check-available-storage-space" style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-left: auto; margin-right: auto; width: 745px;"&gt;
&lt;/div&gt;
&lt;h2 id="check-available-storage-space" style="background-color: white; box-sizing: border-box; color: #3a3a3a; font-family: proxima-nova, sans-serif; font-size: 28px; font-weight: 400; letter-spacing: -0.5px; margin: 14px auto 10px; padding: 0px; width: 745px;"&gt;
Check Available Storage Space&lt;/h2&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
The typical way of allocating space for swap is to use a separate partition that is dedicated to the task. However, altering the partition scheme is not always possible due to hardware or software constraints. Fortunately, we can just as easily create a swap file that resides on an existing partition.&lt;/div&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Before we do this, we should be aware of our current drive usage. We can get this information by typing:&lt;/div&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;df -h
&lt;/code&gt;&lt;/pre&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;Filesystem      Size  Used Avail Use% Mounted on
&lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;/dev/vda1        59G  1.5G   55G   3% /&lt;/span&gt;
devtmpfs        2.0G     0  2.0G   0% /dev
tmpfs           2.0G     0  2.0G   0% /dev/shm
tmpfs           2.0G  8.3M  2.0G   1% /run
tmpfs           2.0G     0  2.0G   0% /sys/fs/cgroup
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
&lt;span style="box-sizing: border-box; font-weight: 600;"&gt;Note:&lt;/span&gt;&amp;nbsp;the&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;-h&lt;/code&gt;&amp;nbsp;flag simply tells&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;dh&lt;/code&gt;&amp;nbsp;to output drive information in a human-friendly reading format. For example, instead of outputting the raw number of memory blocks in a partition,&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;df -h&lt;/code&gt;&amp;nbsp;will tell us the space usage and availability in M (for megabytes) or G (for gigabytes).&lt;/div&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
As you can see on the first line, our storage partition has 59 gigabytes available, so we have quite a bit of space to work with. Keep in mind that this is on a fresh, medium-sized VPS instance, so your actual usage might be very different.&lt;/div&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Although there are many opinions about the appropriate size of a swap space, it really depends on your application requirements and your personal preferences. Generally, an amount equal to or double the amount of memory on your system is a good starting point.&lt;/div&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Since my system has 4 gigabytes of memory, and doubling that would take a larger chunk from my storage space than I am willing to part with, I will create a swap space of 4 gigabytes to match my system's memory.&lt;/div&gt;
&lt;div data-unique="create-a-swap-file" name="create-a-swap-file" style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-left: auto; margin-right: auto; width: 745px;"&gt;
&lt;/div&gt;
&lt;h2 id="create-a-swap-file" style="background-color: white; box-sizing: border-box; color: #3a3a3a; font-family: proxima-nova, sans-serif; font-size: 28px; font-weight: 400; letter-spacing: -0.5px; margin: 14px auto 10px; padding: 0px; width: 745px;"&gt;
Create a Swap File&lt;/h2&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Now that we know our available storage space, we can go about creating a swap file within our filesystem. We will create a file called&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;swapfile&lt;/code&gt;&amp;nbsp;in our root (&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;/&lt;/code&gt;) directory, though you can name the file something else if you prefer. The file must allocate the amount of space that we want for our swap file.&lt;/div&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
The fastest and easiest way to create a swap file is by using&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;fallocate or dd&lt;/code&gt;. This command creates a file of a preallocated size instantly. We can create a 4 gigabyte file by typing:&lt;/div&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;sudo fallocate -l &lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;4G&lt;/span&gt; &lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;/swapfile&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; line-height: 22px; margin: 0px; padding: 0px;"&gt;&lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; display: inline;"&gt;if fallocate fails then try dd&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;&lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;&lt;pre style="background-color: #eff0f1; border: 0px; box-sizing: inherit; color: #242729; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto; word-wrap: normal;"&gt;&lt;code style="border: 0px; box-sizing: inherit; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;"&gt;sudo dd if=/dev/zero of=/swapfile count=4096 bs=1MiB&lt;/code&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
After entering your password to authorize&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;sudo&lt;/code&gt;&amp;nbsp;privileges, the swap file will be created almost instantly, and the prompt will be returned to you. We can verify that the correct amount of space was reserved for swap by using&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;ls&lt;/code&gt;:&lt;/div&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;ls -lh &lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;/swapfile&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;-rw-r--r-- 1 root root &lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;4.0G&lt;/span&gt; Oct 30 11:00 &lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;/swapfile&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
As you can see, our swap file was created with the correct amount of space set aside.&lt;/div&gt;
&lt;div data-unique="enable-a-swap-file" name="enable-a-swap-file" style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-left: auto; margin-right: auto; width: 745px;"&gt;
&lt;/div&gt;
&lt;h2 id="enable-a-swap-file" style="background-color: white; box-sizing: border-box; color: #3a3a3a; font-family: proxima-nova, sans-serif; font-size: 28px; font-weight: 400; letter-spacing: -0.5px; margin: 14px auto 10px; padding: 0px; width: 745px;"&gt;
Enable a Swap File&lt;/h2&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Right now, our file is created, but our system does not know that this is supposed to be used for swap. We need to tell our system to format this file as swap and then enable it.&lt;/div&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Before we do that, we should adjust the permissions on our swap file so that it isn't readable by anyone besides the root account. Allowing other users to read or write to this file would be a huge security risk. We can lock down the permissions with&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;chmod&lt;/code&gt;:&lt;/div&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;sudo chmod 600 &lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;/swapfile&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
This will restrict both read and write permissions to the root account only. We can verify that the swap file has the correct permissions by using&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;ls -lh&lt;/code&gt;&amp;nbsp;again:&lt;/div&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;ls -lh &lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;/swapfile&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;-rw------- 1 root root &lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;4.0G&lt;/span&gt; Oct 30 11:00 &lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;/swapfile&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Now that our swap file is more secure, we can tell our system to set up the swap space for use by typing:&lt;/div&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;sudo mkswap &lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;/swapfile&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;Setting up swapspace version 1, size = &lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;4194300&lt;/span&gt; KiB
no label, UUID=b99230bb-21af-47bc-8c37-de41129c39bf
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Our swap file is now ready to be used as a swap space. We can begin using it by typing:&lt;/div&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;sudo swapon &lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;/swapfile&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
To verify that the procedure was successful, we can check whether our system reports swap space now:&lt;/div&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;swapon -s
&lt;/code&gt;&lt;/pre&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;Filename                Type        Size    Used    Priority
&lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;/swapfile&lt;/span&gt;               file        &lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;4194300&lt;/span&gt; 0     -1
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
This output confirms that we have a new swap file. We can use the&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;free&lt;/code&gt;&amp;nbsp;utility again to corroborate our findings:&lt;/div&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;free -m
&lt;/code&gt;&lt;/pre&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;             total       used       free     shared    buffers     cached
Mem:          3953        315       3637          8         11        107
-/+ buffers/cache:        196       3756
&lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;Swap:         4095&lt;/span&gt;          0       4095
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Our swap has been set up successfully, and our operating system will begin to use it as needed.&lt;/div&gt;
&lt;div data-unique="make-the-swap-file-permanent" name="make-the-swap-file-permanent" style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-left: auto; margin-right: auto; width: 745px;"&gt;
&lt;/div&gt;
&lt;h2 id="make-the-swap-file-permanent" style="background-color: white; box-sizing: border-box; color: #3a3a3a; font-family: proxima-nova, sans-serif; font-size: 28px; font-weight: 400; letter-spacing: -0.5px; margin: 14px auto 10px; padding: 0px; width: 745px;"&gt;
Make the Swap File Permanent&lt;/h2&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Our swap file is enabled at the moment, but when we reboot, the server will not automatically enable the file for use. We can change that by modifying the&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;fstab&lt;/code&gt;&amp;nbsp;file, which is a table that manages filesystems and partitions.&lt;/div&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Edit the file with&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;sudo&lt;/code&gt;&amp;nbsp;privileges in your text editor:&lt;/div&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;sudo nano /etc/fstab
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
At the bottom of the file, you need to add a line that will tell the operating system to automatically use the swap file that you created:&lt;/div&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;&lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;/swapfile&lt;/span&gt;   swap    swap    sw  0   0
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
When you are finished adding the line, you can save and close the file. The server will check this file on each bootup, so the swap file will be ready for use from now on.&lt;/div&gt;
&lt;div data-unique="tweak-your-swap-settings-(optional)" name="tweak-your-swap-settings-(optional)" style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-left: auto; margin-right: auto; width: 745px;"&gt;
&lt;/div&gt;
&lt;h2 id="tweak-your-swap-settings-optional" style="background-color: white; box-sizing: border-box; color: #3a3a3a; font-family: proxima-nova, sans-serif; font-size: 28px; font-weight: 400; letter-spacing: -0.5px; margin: 14px auto 10px; padding: 0px; width: 745px;"&gt;
Tweak Your Swap Settings (Optional)&lt;/h2&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
There are a few options that you can configure that will have an impact on your system's performance when dealing with swap. These configurations are optional in most cases, and the changes that you make will depend on your application needs and your personal preference.&lt;/div&gt;
&lt;h3 id="swappiness" style="background-color: white; box-sizing: border-box; color: #3a3a3a; font-family: proxima-nova, sans-serif; font-size: 22px; letter-spacing: 0.005em; margin: 14px auto 11px; padding: 0px; width: 745px;"&gt;
Swappiness&lt;/h3&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
The&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;swappiness&lt;/code&gt;&amp;nbsp;parameter determines how often your system swaps data out of memory to the swap space. This is a value between 0 and 100 that represents the percentage of memory usage that will trigger the use of swap.&lt;/div&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
With values close to zero, the system will not swap data to the drive unless absolutely necessary. Remember, interactions with the swap file are "expensive" in that they are a lot slower than interactions with memory, and this difference in read and write speed can cause a significant reduction in an application's performance. Telling the system not to rely on the swap as much will generally make your system faster.&lt;/div&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Values that are closer to 100 will try to put more data into swap in an effort to keep more memory free. Depending on your applications' memory profile, or what you are using your server for, this might be the better choice in some cases.&lt;/div&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
We can see the current swappiness value by reading the&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;swappiness&lt;/code&gt;&amp;nbsp;configuration file:&lt;/div&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;cat /proc/sys/vm/swappiness
&lt;/code&gt;&lt;/pre&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;30
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
CentOS 7 defaults to a swappiness setting of 30, which is a fair middle ground for most desktops and local servers. For a VPS system, we'd probably want to move it closer to 0.&lt;/div&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
We can set the swappiness to a different value by using the&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;sysctl&lt;/code&gt;&amp;nbsp;command. For instance, to set the swappiness to 10, we could type:&lt;/div&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;sudo sysctl vm.swappiness=&lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;10&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;vm.swappiness = &lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;10&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
This setting will persist until the next reboot. To make the setting persist between reboots, we can add the outputted line to our&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;sysctl&lt;/code&gt;&amp;nbsp;configuration file:&lt;/div&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;sudo nano /etc/sysctl.conf
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Add your swappiness setting to the bottom of the file:&lt;/div&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;vm.swappiness = &lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;10&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
When you are finished adding the line, you can save and close the file. The server will now automatically set the swappiness to the value you declared on each bootup.&lt;/div&gt;
&lt;h3 id="cache-pressure" style="background-color: white; box-sizing: border-box; color: #3a3a3a; font-family: proxima-nova, sans-serif; font-size: 22px; letter-spacing: 0.005em; margin: 14px auto 11px; padding: 0px; width: 745px;"&gt;
Cache Pressure&lt;/h3&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Another related value that you might want to modify is the&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;vfs_cache_pressure&lt;/code&gt;. This setting affects the storage of special filesystem metadata entries. Constantly reading and refreshing this information is generally very costly, so storing it on the cache for longer is excellent for your system's performance.&lt;/div&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
You can see the current value of this cache pressure by querying the&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;proc&lt;/code&gt;&amp;nbsp;filesystem again:&lt;/div&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;cat /proc/sys/vm/vfs_cache_pressure
&lt;/code&gt;&lt;/pre&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;100
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
As it is currently configured, our system removes inode information from the cache far too quickly. We can set this to a more conservative setting, like 50, by using&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;sysctl&lt;/code&gt;:&lt;/div&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;sudo sysctl vm.vfs_cache_pressure=&lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;50&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;vm.vfs_cache_pressure = &lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;50&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Again, this is only valid for our current session. We can change that by adding it to our configuration file, like we did with our swappiness setting:&lt;/div&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;sudo nano /etc/sysctl.conf
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
At the bottom, add the line that specifies your new value:&lt;/div&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;vm.vfs_cache_pressure = &lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;50&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
When you are finished adding the line, you can save and close the file. The server will now automatically set the cache pressure to the value you declared on each bootup.&lt;/div&gt;
&lt;div data-unique="conclusion" name="conclusion" style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-left: auto; margin-right: auto; width: 745px;"&gt;
&lt;/div&gt;
&lt;h2 id="conclusion" style="background-color: white; box-sizing: border-box; color: #3a3a3a; font-family: proxima-nova, sans-serif; font-size: 28px; font-weight: 400; letter-spacing: -0.5px; margin: 14px auto 10px; padding: 0px; width: 745px;"&gt;
Conclusion&lt;/h2&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
By following the steps in this guide, you will have given your server some breathing room in terms of memory usage. Swap space is incredibly useful in avoiding some common problems.&lt;/div&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
If you are running into OOM (out of memory) errors, or if you find that your system is unable to use the applications that you need, the best solution is to optimize your application configurations or upgrade your server. However, configuring swap space can give you more flexibility and can help buy you time on a less powerful server.&lt;/div&gt;
&lt;div style="background-color: white; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 16px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Credit:&amp;nbsp;https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-centos-7&lt;/div&gt;
</description><link>http://page.farhad.pw/2018/03/swap-allocate-swap-space-in-centos7.html</link><author>noreply@blogger.com (Farhad)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSpKKUFzPINAlmR7utqRMZ12kGSHURn5PeLMZ-AKQoQ33svmChFLRwsy2uU-FMuw2sIxhDDW5UhBVLGJOM5L4SllooCz0RUjqMxA0BK13DEZKQ5y45Mx4kYo4wjronRUWM-8XXZRFq2TI/s72-c/swappiness-feaured.png" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1026424054105678970.post-5767014506849649290</guid><pubDate>Sun, 21 Jan 2018 08:54:00 +0000</pubDate><atom:updated>2018-01-21T14:54:03.070+06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Centos</category><title>Initial Server Setup with CentOS 7</title><description>&lt;div class="section-content section-content-growable content Tutorial-content" style="background-color: white; box-sizing: inherit; font-family: proxima-nova, sans-serif; font-size: 20px; line-height: 1.5; margin-bottom: 0px; margin-left: auto; margin-right: auto; margin-top: 92px !important; padding-left: 0px; padding-right: 0px; position: relative; width: auto;"&gt;
&lt;div class="content-body tutorial-content" data-growable-markdown="" style="box-sizing: inherit; clear: both; font-size: 16px; overflow-x: auto;"&gt;
&lt;h3 id="introduction" style="box-sizing: border-box; color: #3a3a3a; font-size: 22px; letter-spacing: 0.005em; margin: 14px auto 11px; padding: 0px; width: 745px;"&gt;
Introduction&lt;/h3&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
When you first create a new server, there are a few configuration steps that you should take early on as part of the basic setup. This will increase the security and usability of your server and will give you a solid foundation for subsequent actions.&lt;/div&gt;
&lt;div data-unique="step-one-—-root-login" name="step-one-—-root-login" style="box-sizing: border-box; margin-left: auto; margin-right: auto; width: 745px;"&gt;
&lt;/div&gt;
&lt;h2 id="step-one-—-root-login" style="box-sizing: border-box; color: #3a3a3a; font-size: 28px; font-weight: 400; letter-spacing: -0.5px; margin: 14px auto 10px; padding: 0px; width: 745px;"&gt;
Step One — Root Login&lt;/h2&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
To log into your server, you will need to know your server's public IP address and the password for the "root" user's account. If you have not already logged into your server, you may want to follow the first tutorial in this series,&amp;nbsp;&lt;a href="https://www.digitalocean.com/community/tutorials/how-to-connect-to-your-droplet-with-ssh" style="border-bottom: 1px dotted rgb(0, 0, 0); box-sizing: border-box; color: black; text-decoration-line: none;"&gt;How to Connect to Your Droplet with SSH&lt;/a&gt;, which covers this process in detail.&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
If you are not already connected to your server, go ahead and log in as the&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;root&lt;/code&gt;&amp;nbsp;user using the following command (substitute the highlighted word with your server's public IP address):&lt;/div&gt;
&lt;pre class="code-pre custom_prefix" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;&lt;ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;"&gt;
&lt;li class="line" prefix="local$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;"&gt;ssh root@&lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;SERVER_IP_ADDRESS&lt;/span&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Complete the login process by accepting the warning about host authenticity, if it appears, then providing your root authentication (password or private key). If it is your first time logging into the server, with a password, you will also be prompted to change the root password.&lt;/div&gt;
&lt;h3 id="about-root" style="box-sizing: border-box; color: #3a3a3a; font-size: 22px; letter-spacing: 0.005em; margin: 14px auto 11px; padding: 0px; width: 745px;"&gt;
About Root&lt;/h3&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
The root user is the administrative user in a Linux environment that has very broad privileges. Because of the heightened privileges of the root account, you are actually&amp;nbsp;&lt;em style="box-sizing: border-box;"&gt;discouraged&lt;/em&gt;&amp;nbsp;from using it on a regular basis. This is because part of the power inherent with the root account is the ability to make very destructive changes, even by accident.&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
The next step is to set up an alternative user account with a reduced scope of influence for day-to-day work. We'll teach you how to gain increased privileges during the times when you need them.&lt;/div&gt;
&lt;div data-unique="step-two-—-create-a-new-user" name="step-two-—-create-a-new-user" style="box-sizing: border-box; margin-left: auto; margin-right: auto; width: 745px;"&gt;
&lt;/div&gt;
&lt;h2 id="step-two-—-create-a-new-user" style="box-sizing: border-box; color: #3a3a3a; font-size: 28px; font-weight: 400; letter-spacing: -0.5px; margin: 14px auto 10px; padding: 0px; width: 745px;"&gt;
Step Two — Create a New User&lt;/h2&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Once you are logged in as&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;root&lt;/code&gt;, we're prepared to add the new user account that we will use to log in from now on.&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
This example creates a new user called "demo", but you should replace it with a user name that you like:&lt;/div&gt;
&lt;pre class="code-pre super_user" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;&lt;ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;"&gt;
&lt;li class="line" prefix="#" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;"&gt;adduser &lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;demo&lt;/span&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Next, assign a password to the new user (again, substitute "demo" with the user that you just created):&lt;/div&gt;
&lt;pre class="code-pre super_user" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;&lt;ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;"&gt;
&lt;li class="line" prefix="#" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;"&gt;passwd &lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;demo&lt;/span&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Enter a strong password, and repeat it again to verify it.&lt;/div&gt;
&lt;div data-unique="step-three-—-root-privileges" name="step-three-—-root-privileges" style="box-sizing: border-box; margin-left: auto; margin-right: auto; width: 745px;"&gt;
&lt;/div&gt;
&lt;h2 id="step-three-—-root-privileges" style="box-sizing: border-box; color: #3a3a3a; font-size: 28px; font-weight: 400; letter-spacing: -0.5px; margin: 14px auto 10px; padding: 0px; width: 745px;"&gt;
Step Three — Root Privileges&lt;/h2&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Now, we have a new user account with regular account privileges. However, we may sometimes need to do administrative tasks.&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
To avoid having to log out of our normal user and log back in as the root account, we can set up what is known as "super user" or root privileges for our normal account. This will allow our normal user to run commands with administrative privileges by putting the word&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;sudo&lt;/code&gt;&amp;nbsp;before each command.&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
To add these privileges to our new user, we need to add the new user to the "wheel" group. By default, on CentOS 7, users who belong to the "wheel" group are allowed to use the&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;sudo&lt;/code&gt;&amp;nbsp;command.&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
As&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;root&lt;/code&gt;, run this command to add your new user to the&amp;nbsp;&lt;em style="box-sizing: border-box;"&gt;wheel&lt;/em&gt;&amp;nbsp;group (substitute the highlighted word with your new user):&lt;/div&gt;
&lt;pre class="code-pre super_user" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;&lt;ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;"&gt;
&lt;li class="line" prefix="#" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;"&gt;gpasswd -a &lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;demo&lt;/span&gt; wheel
&lt;/li&gt;
&lt;/ul&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Now your user can run commands with super user privileges! For more information about how this works, check out&amp;nbsp;&lt;a href="https://www.digitalocean.com/community/tutorials/how-to-edit-the-sudoers-file-on-ubuntu-and-centos" style="border-bottom: 1px dotted rgb(0, 0, 0); box-sizing: border-box; color: black; text-decoration-line: none;"&gt;our sudoers tutorial&lt;/a&gt;.&lt;/div&gt;
&lt;div data-unique="step-four-—-add-public-key-authentication-(recommended)" name="step-four-—-add-public-key-authentication-(recommended)" style="box-sizing: border-box; margin-left: auto; margin-right: auto; width: 745px;"&gt;
&lt;/div&gt;
&lt;h2 id="step-four-—-add-public-key-authentication-recommended" style="box-sizing: border-box; color: #3a3a3a; font-size: 28px; font-weight: 400; letter-spacing: -0.5px; margin: 14px auto 10px; padding: 0px; width: 745px;"&gt;
Step Four — Add Public Key Authentication (Recommended)&lt;/h2&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
The next step in securing your server is to set up public key authentication for your new user. Setting this up will increase the security of your server by requiring a private SSH key to log in.&lt;/div&gt;
&lt;h3 id="generate-a-key-pair" style="box-sizing: border-box; color: #3a3a3a; font-size: 22px; letter-spacing: 0.005em; margin: 14px auto 11px; padding: 0px; width: 745px;"&gt;
Generate a Key Pair&lt;/h3&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
If you do not already have an SSH key pair, which consists of a public and private key, you need to generate one. If you already have a key that you want to use, skip to the&amp;nbsp;&lt;em style="box-sizing: border-box;"&gt;Copy the Public Key&lt;/em&gt;&amp;nbsp;step.&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
To generate a new key pair, enter the following command at the terminal of your&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: 600;"&gt;local machine&lt;/span&gt;:&lt;/div&gt;
&lt;pre class="code-pre custom_prefix" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;&lt;ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;"&gt;
&lt;li class="line" prefix="local$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;"&gt;ssh-keygen
&lt;/li&gt;
&lt;/ul&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Assuming your local user is called "localuser", you will see output that looks like the following:&lt;/div&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;&lt;div class="secondary-code-label " style="box-sizing: border-box; color: rgba(0, 0, 0, 0.3); margin-bottom: 4px;" title="ssh-keygen output"&gt;
ssh-keygen output&lt;/div&gt;
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/&lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;localuser&lt;/span&gt;/.ssh/id_rsa):
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Hit return to accept this file name and path (or enter a new name).&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Next, you will be prompted for a passphrase to secure the key with. You may either enter a passphrase or leave the passphrase blank.&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
&lt;span style="box-sizing: border-box; font-weight: 600;"&gt;Note:&lt;/span&gt;&amp;nbsp;If you leave the passphrase blank, you will be able to use the private key for authentication without entering a passphrase. If you enter a passphrase, you will need both the private key&amp;nbsp;&lt;em style="box-sizing: border-box;"&gt;and&lt;/em&gt;&amp;nbsp;the passphrase to log in. Securing your keys with passphrases is more secure, but both methods have their uses and are more secure than basic password authentication.&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
This generates a private key,&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;id_rsa&lt;/code&gt;, and a public key,&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;id_rsa.pub&lt;/code&gt;, in the&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;.ssh&lt;/code&gt;&amp;nbsp;directory of the&amp;nbsp;&lt;em style="box-sizing: border-box;"&gt;localuser&lt;/em&gt;'s home directory. Remember that the private key should not be shared with anyone who should not have access to your servers!&lt;/div&gt;
&lt;h3 id="copy-the-public-key" style="box-sizing: border-box; color: #3a3a3a; font-size: 22px; letter-spacing: 0.005em; margin: 14px auto 11px; padding: 0px; width: 745px;"&gt;
Copy the Public Key&lt;/h3&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
After generating an SSH key pair, you will want to copy your public key to your new server. We will cover two easy ways to do this.&lt;/div&gt;
&lt;span class="note" style="background-color: #f4f2d4; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; display: block; font-size: 15px; line-height: 26px; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 13px 17px; width: 745px;"&gt;&lt;div style="box-sizing: border-box; margin-bottom: 22px; padding: 0px;"&gt;
&lt;span style="box-sizing: border-box; font-weight: 600;"&gt;Note&lt;/span&gt;: The&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; line-height: 22px; padding: 3px;"&gt;ssh-copy-id&lt;/code&gt;&amp;nbsp;method will not work on DigitalOcean if an SSH key was selected during Droplet creation. This is because DigitalOcean disables password authentication if an SSH key is present, and the&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; line-height: 22px; padding: 3px;"&gt;ssh-copy-id&lt;/code&gt;&amp;nbsp;relies on password authentication to copy the key.&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; padding: 0px;"&gt;
If you are using DigitalOcean and selected an SSH key during Droplet creation, use&amp;nbsp;&lt;a href="https://www.digitalocean.com/community/tutorials/initial-server-setup-with-centos-7#option-2-manually-install-the-key" style="border-bottom: 1px dotted rgb(0, 0, 0); box-sizing: border-box; color: black; text-decoration-line: none;"&gt;option 2&lt;/a&gt;&amp;nbsp;instead.&lt;/div&gt;
&lt;/span&gt;&lt;h3 id="option-1-use-ssh-copy-id" style="box-sizing: border-box; color: #3a3a3a; font-size: 22px; letter-spacing: 0.005em; margin: 14px auto 11px; padding: 0px; width: 745px;"&gt;
Option 1: Use ssh-copy-id&lt;/h3&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
If your local machine has the&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;ssh-copy-id&lt;/code&gt;&amp;nbsp;script installed, you can use it to install your public key to any user that you have login credentials for.&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Run the&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;ssh-copy-id&lt;/code&gt;&amp;nbsp;script by specifying the user and IP address of the server that you want to install the key on, like this:&lt;/div&gt;
&lt;pre class="code-pre custom_prefix" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;&lt;ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;"&gt;
&lt;li class="line" prefix="local$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;"&gt;ssh-copy-id &lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;demo&lt;/span&gt;@&lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;SERVER_IP_ADDRESS&lt;/span&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
After providing your password at the prompt, your public key will be added to the remote user's&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;.ssh/authorized_keys&lt;/code&gt;&amp;nbsp;file. The corresponding private key can now be used to log into the server.&lt;/div&gt;
&lt;h3 id="option-2-manually-install-the-key" style="box-sizing: border-box; color: #3a3a3a; font-size: 22px; letter-spacing: 0.005em; margin: 14px auto 11px; padding: 0px; width: 745px;"&gt;
Option 2: Manually Install the Key&lt;/h3&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Assuming you generated an SSH key pair using the previous step, use the following command&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: 600;"&gt;at the terminal of your local machine&lt;/span&gt;&amp;nbsp;to print your public key (&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;id_rsa.pub&lt;/code&gt;):&lt;/div&gt;
&lt;pre class="code-pre custom_prefix" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;&lt;ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;"&gt;
&lt;li class="line" prefix="local$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;"&gt;cat ~/.ssh/id_rsa.pub
&lt;/li&gt;
&lt;/ul&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
This should print your public SSH key, which should look something like the following:&lt;/div&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;&lt;div class="secondary-code-label " style="box-sizing: border-box; color: rgba(0, 0, 0, 0.3); margin-bottom: 4px;" title="id_rsa.pub contents"&gt;
id_rsa.pub contents&lt;/div&gt;
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDBGTO0tsVejssuaYR5R3Y/i73SppJAhme1dH7W2c47d4gOqB4izP0+fRLfvbz/tnXFz4iOP/H6eCV05hqUhF+KYRxt9Y8tVMrpDZR2l75o6+xSbUOMu6xN+uVF0T9XzKcxmzTmnV7Na5up3QM3DoSRYX/EP3utr2+zAqpJIfKPLdA74w7g56oYWI9blpnpzxkEd3edVJOivUkpZ4JoenWManvIaSdMTJXMy3MtlQhva+j9CgguyVbUkdzK9KKEuah+pFZvaugtebsU+bllPTB0nlXGIJk98Ie9ZtxuY3nCKneB+KjKiXrAvXUPCI9mWkYS/1rggpFmu3HbXBnWSUdf localuser@machine.local
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Select the public key, and copy it to your clipboard.&lt;/div&gt;
&lt;h4 id="add-public-key-to-new-remote-user" style="box-sizing: border-box; font-size: 18px; font-weight: 400; letter-spacing: -0.5px; margin: 0px auto; padding: 0px; width: 745px;"&gt;
Add Public Key to New Remote User&lt;/h4&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
To enable the use of SSH key to authenticate as the new remote user, you must add the public key to a special file in the user's home directory.&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
&lt;span style="box-sizing: border-box; font-weight: 600;"&gt;On the server&lt;/span&gt;, as the&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;root&lt;/code&gt;&amp;nbsp;user, enter the following command to switch to the new user (substitute your own user name):&lt;/div&gt;
&lt;pre class="code-pre super_user" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;&lt;ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;"&gt;
&lt;li class="line" prefix="#" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;"&gt;su - &lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;demo&lt;/span&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Now you will be in your new user's home directory.&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Create a new directory called&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;.ssh&lt;/code&gt;&amp;nbsp;and restrict its permissions with the following commands:&lt;/div&gt;
&lt;pre class="code-pre command" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;&lt;ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;"&gt;
&lt;li class="line" prefix="$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;"&gt;mkdir .ssh
&lt;/li&gt;
&lt;li class="line" prefix="$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;"&gt;chmod 700 .ssh
&lt;/li&gt;
&lt;/ul&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Now open a file in&amp;nbsp;&lt;em style="box-sizing: border-box;"&gt;.ssh&lt;/em&gt;&amp;nbsp;called&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;authorized_keys&lt;/code&gt;&amp;nbsp;with a text editor. We will use&amp;nbsp;&lt;em style="box-sizing: border-box;"&gt;vi&lt;/em&gt;&amp;nbsp;to edit the file:&lt;/div&gt;
&lt;pre class="code-pre command" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;&lt;ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;"&gt;
&lt;li class="line" prefix="$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;"&gt;vi .ssh/authorized_keys
&lt;/li&gt;
&lt;/ul&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Enter insert mode, by pressing&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;i&lt;/code&gt;, then enter your public key (which should be in your clipboard) by pasting it into the editor. Now hit&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;ESC&lt;/code&gt;&amp;nbsp;to leave insert mode.&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Enter&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;:x&lt;/code&gt;&amp;nbsp;then&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;ENTER&lt;/code&gt;&amp;nbsp;to save and exit the file.&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Now restrict the permissions of the&amp;nbsp;&lt;em style="box-sizing: border-box;"&gt;authorized_keys&lt;/em&gt;&amp;nbsp;file with this command:&lt;/div&gt;
&lt;pre class="code-pre command" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;&lt;ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;"&gt;
&lt;li class="line" prefix="$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;"&gt;chmod 600 .ssh/authorized_keys
&lt;/li&gt;
&lt;/ul&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Type this command&amp;nbsp;&lt;em style="box-sizing: border-box;"&gt;once&lt;/em&gt;&amp;nbsp;to return to the&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;root&lt;/code&gt;&amp;nbsp;user:&lt;/div&gt;
&lt;pre class="code-pre command" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;&lt;ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;"&gt;
&lt;li class="line" prefix="$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;"&gt;exit
&lt;/li&gt;
&lt;/ul&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Now you may SSH login as your new user, using the private key as authentication.&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
To read more about how key authentication works, read this tutorial:&amp;nbsp;&lt;a href="https://www.digitalocean.com/community/tutorials/how-to-configure-ssh-key-based-authentication-on-a-linux-server" style="border-bottom: 1px dotted rgb(0, 0, 0); box-sizing: border-box; color: black; text-decoration-line: none;"&gt;How To Configure SSH Key-Based Authentication on a Linux Server&lt;/a&gt;.&lt;/div&gt;
&lt;div data-unique="step-five-—-configure-ssh-daemon" name="step-five-—-configure-ssh-daemon" style="box-sizing: border-box; margin-left: auto; margin-right: auto; width: 745px;"&gt;
&lt;/div&gt;
&lt;h2 id="step-five-—-configure-ssh-daemon" style="box-sizing: border-box; color: #3a3a3a; font-size: 28px; font-weight: 400; letter-spacing: -0.5px; margin: 14px auto 10px; padding: 0px; width: 745px;"&gt;
Step Five — Configure SSH Daemon&lt;/h2&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Now that we have our new account, we can secure our server a little bit by modifying its SSH daemon configuration (the program that allows us to log in remotely) to disallow remote SSH access to the&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: 600;"&gt;root&lt;/span&gt;account.&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Begin by opening the configuration file with your text editor as root:&lt;/div&gt;
&lt;pre class="code-pre super_user" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;&lt;ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;"&gt;
&lt;li class="line" prefix="#" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;"&gt;vi /etc/ssh/sshd_config
&lt;/li&gt;
&lt;/ul&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Here, we have the option to disable root login through SSH. This is generally a more secure setting since we can now access our server through our normal user account and escalate privileges when necessary.&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
To disable remote root logins, we need to find the line that looks like this:&lt;/div&gt;
&lt;div class="code-label " style="background-color: #e5e5e5; border-radius: 3px 3px 0px 0px; box-sizing: border-box; color: #3a3a3a; font-size: 14px; margin-bottom: -30px; margin-left: auto; margin-right: auto; padding: 8px 15px; position: relative; text-align: center; width: 745px; z-index: 2;" title="/etc/ssh/sshd_config (before)"&gt;
/etc/ssh/sshd_config (before)&lt;/div&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;#PermitRootLogin yes
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Hint: To search for this line, type&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;/PermitRoot&lt;/code&gt;&amp;nbsp;then hit&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;ENTER&lt;/code&gt;. This should bring the cursor to the "P" character on that line.&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Uncomment the line by deleting the "#" symbol (press&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;Shift-x&lt;/code&gt;).&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Now move the cursor to the "yes" by pressing&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;c&lt;/code&gt;.&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Now replace "yes" by pressing&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;cw&lt;/code&gt;, then typing in "no". Hit&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;Escape&lt;/code&gt;&amp;nbsp;when you are done editing. It should look like this:&lt;/div&gt;
&lt;div class="code-label " style="background-color: #e5e5e5; border-radius: 3px 3px 0px 0px; box-sizing: border-box; color: #3a3a3a; font-size: 14px; margin-bottom: -30px; margin-left: auto; margin-right: auto; padding: 8px 15px; position: relative; text-align: center; width: 745px; z-index: 2;" title="/etc/ssh/sshd_config (after)"&gt;
/etc/ssh/sshd_config (after)&lt;/div&gt;
&lt;pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;PermitRootLogin no
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Disabling remote root login is highly recommended on every server!&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Enter&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;:x&lt;/code&gt;&amp;nbsp;then&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;ENTER&lt;/code&gt;&amp;nbsp;to save and exit the file.&lt;/div&gt;
&lt;h3 id="reload-ssh" style="box-sizing: border-box; color: #3a3a3a; font-size: 22px; letter-spacing: 0.005em; margin: 14px auto 11px; padding: 0px; width: 745px;"&gt;
Reload SSH&lt;/h3&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Now that we have made our changes, we need to restart the SSH service so that it will use our new configuration.&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Type this to restart SSH:&lt;/div&gt;
&lt;pre class="code-pre super_user" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;&lt;ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;"&gt;
&lt;li class="line" prefix="#" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;"&gt;systemctl reload sshd
&lt;/li&gt;
&lt;/ul&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Now, before we log out of the server, we should&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: 600;"&gt;test&lt;/span&gt;&amp;nbsp;our new configuration. We do not want to disconnect until we can confirm that new connections can be established successfully.&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Open a&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: 600;"&gt;new&lt;/span&gt;&amp;nbsp;terminal window. In the new window, we need to begin a new connection to our server. This time, instead of using the root account, we want to use the new account that we created.&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
For the server that we configured above, connect using this command. Substitute your own information where it is appropriate:&lt;/div&gt;
&lt;pre class="code-pre custom_prefix" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;&lt;ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;"&gt;
&lt;li class="line" prefix="local$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;"&gt;ssh &lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;demo&lt;/span&gt;@&lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;SERVER_IP_ADDRESS&lt;/span&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
&lt;span style="box-sizing: border-box; font-weight: 600;"&gt;Note:&lt;/span&gt;&amp;nbsp;If you are using PuTTY to connect to your servers, be sure to update the session's&amp;nbsp;&lt;em style="box-sizing: border-box;"&gt;port&lt;/em&gt;&amp;nbsp;number to match your server's current configuration.&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
You will be prompted for the new user's password that you configured. After that, you will be logged in as your new user.&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
Remember, if you need to run a command with root privileges, type "sudo" before it like this:&lt;/div&gt;
&lt;pre class="code-pre command" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;&lt;ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;"&gt;
&lt;li class="line" prefix="$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;"&gt;sudo &lt;span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;"&gt;command_to_run&lt;/span&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
If all is well, you can exit your sessions by typing:&lt;/div&gt;
&lt;pre class="code-pre command" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 14px; margin: 1rem auto; overflow: auto !important; padding: 1rem; width: 745px; word-wrap: normal;"&gt;&lt;code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: #3a3a3a; line-height: 22px; margin: 0px; padding: 0px;"&gt;&lt;ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;"&gt;
&lt;li class="line" prefix="$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;"&gt;exit
&lt;/li&gt;
&lt;/ul&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div data-unique="where-to-go-from-here" name="where-to-go-from-here" style="box-sizing: border-box; margin-left: auto; margin-right: auto; width: 745px;"&gt;
&lt;/div&gt;
&lt;h2 id="where-to-go-from-here" style="box-sizing: border-box; color: #3a3a3a; font-size: 28px; font-weight: 400; letter-spacing: -0.5px; margin: 14px auto 10px; padding: 0px; width: 745px;"&gt;
Where To Go From Here?&lt;/h2&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
At this point, you have a solid foundation for your server. You can install any of the software you need on your server now.&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
If you are not sure what you want to do with your server, check out the next tutorial in this series for&amp;nbsp;&lt;a href="https://www.digitalocean.com/community/tutorials/additional-recommended-steps-for-new-centos-7-servers" style="border-bottom: 1px dotted rgb(0, 0, 0); box-sizing: border-box; color: black; text-decoration-line: none;"&gt;Additional Recommended Steps for New CentOS 7 Servers&lt;/a&gt;. It covers things like enabling&amp;nbsp;&lt;code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;"&gt;fail2ban&lt;/code&gt;&amp;nbsp;to reduce the effectiveness of brute force attacks, basic firewall settings, NTP, and swap files. It also provides links to tutorials that show you how to set up common web applications.&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;"&gt;
If you just want to explore, take a look at the rest of our&amp;nbsp;&lt;a href="https://digitalocean.com/community/articles" style="border-bottom: 1px dotted rgb(0, 0, 0); box-sizing: border-box; color: black; text-decoration-line: none;"&gt;community&lt;/a&gt;&amp;nbsp;to find more tutorials. Some popular ideas are configuring a&amp;nbsp;&lt;a href="https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-centos-7" style="border-bottom: 1px dotted rgb(0, 0, 0); box-sizing: border-box; color: black; text-decoration-line: none;"&gt;LAMP stack&lt;/a&gt;&amp;nbsp;or a&amp;nbsp;&lt;a href="https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-centos-7" style="border-bottom: 1px dotted rgb(0, 0, 0); box-sizing: border-box; color: black; text-decoration-line: none;"&gt;LEMP stack&lt;/a&gt;, which will&lt;br style="box-sizing: border-box;" /&gt;allow you to host websites.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="tutorial-footer" style="background-color: white; box-sizing: inherit; font-family: proxima-nova, sans-serif;"&gt;
&lt;div class="tutorial-footer-details" style="border-bottom: 1px solid rgb(229, 229, 229); box-sizing: inherit; padding: 0px;"&gt;
&lt;div class="postable-info-bar-container" style="box-sizing: inherit; margin-bottom: 15px;"&gt;
&lt;div class="postable-info-bar" style="box-sizing: border-box; clear: both; color: #999999; margin: 0px auto; max-width: 745px; overflow: auto; padding-bottom: 10px; padding-top: 15px; width: 745px; z-index: 100;"&gt;
&lt;div class="left-section" style="box-sizing: inherit; float: left; margin: 0px; padding: 0px;"&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description><link>http://page.farhad.pw/2018/01/initial-server-setup-with-centos-7.html</link><author>noreply@blogger.com (Farhad)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1026424054105678970.post-5085564935854101265</guid><pubDate>Sun, 21 Jan 2018 06:52:00 +0000</pubDate><atom:updated>2018-01-21T12:54:40.025+06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Apache</category><category domain="http://www.blogger.com/atom/ns#">httpd</category><title>Upgrade Apache 2.4.6 to 2.4.29 without losing config</title><description>&lt;div class="article-content__paragraph" style="background-color: white; border: 0px; box-sizing: border-box; color: #222222; font-family: Roboto, sans-serif; font-size: 20px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;"&gt;
Apache is the most widely used web server software for serving web applications and it is essential part of any server. To have the latest version installed, means that your software package will probably have more new features and known bugs fixes.&lt;/div&gt;
&lt;div class="article-content__paragraph" style="background-color: white; border: 0px; box-sizing: border-box; color: #222222; font-family: Roboto, sans-serif; font-size: 20px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLH566KBHKQVfgTlO69IDDENJ6HzG-r7jiHE6Z5aa0w8xilIDn34Da8HQdoDDfhor6rsD3QHtBk80Nm8Qb2_TEQg9vo_m3ldRT9V3YRo2xDJd3SB02FlfH7vmk8Q5ackoObXCDIyEpZp8/s1600/maxresdefault.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="720" data-original-width="1280" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLH566KBHKQVfgTlO69IDDENJ6HzG-r7jiHE6Z5aa0w8xilIDn34Da8HQdoDDfhor6rsD3QHtBk80Nm8Qb2_TEQg9vo_m3ldRT9V3YRo2xDJd3SB02FlfH7vmk8Q5ackoObXCDIyEpZp8/s320/maxresdefault.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="article-content__paragraph" style="background-color: white; border: 0px; box-sizing: border-box; color: #222222; font-family: Roboto, sans-serif; font-size: 20px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 class="article-content__header article-content__header--h3" style="background-color: white; border: 0px; box-sizing: border-box; color: #237ea2; font-family: Roboto, sans-serif; font-size: 2.4rem; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-weight: 500; line-height: 1; margin: 0px; padding: 0.625em 0px; vertical-align: baseline;"&gt;
Introduction&lt;/h3&gt;
&lt;div class="article-content__paragraph" style="background-color: white; border: 0px; box-sizing: border-box; color: #222222; font-family: Roboto, sans-serif; font-size: 20px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;"&gt;
In this tutorial I am going to describe simple steps to install the latest Apache (httpd) version on your Centos 7 system.&lt;/div&gt;
&lt;div class="article-content__paragraph" style="background-color: white; border: 0px; box-sizing: border-box; color: #222222; font-family: Roboto, sans-serif; font-size: 20px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;"&gt;
By default Centos 7 has few predefined repositories for installing packages, but unfortunately a lot of packages are out of date there.&lt;/div&gt;
&lt;h2 class="article-content__header article-content__header--h2" style="background-color: white; border: 0px; box-sizing: border-box; color: #237ea2; font-family: Roboto, sans-serif; font-size: 3rem; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-weight: 500; line-height: 1; margin: 0px; padding: 0.625em 0px; vertical-align: baseline;"&gt;
Step 1 — Find out the Apache version in default repos&lt;/h2&gt;
&lt;div class="article-content__paragraph" style="background-color: white; border: 0px; box-sizing: border-box; color: #222222; font-family: Roboto, sans-serif; font-size: 20px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;"&gt;
In order to check the current version of&amp;nbsp;&lt;span style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: bolder; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;httpd&lt;/span&gt;&amp;nbsp;package available in repositories – type the following command:&lt;/div&gt;
&lt;div class="table-responsive" style="background-color: white; border-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; color: #222222; font-family: Roboto, sans-serif; font-size: 0.75em; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0.833333em 0px; overflow: auto; padding: 0px; vertical-align: baseline;"&gt;
&lt;table class="highlighted-source native bash table" style="background: rgb(32, 32, 32); border-collapse: collapse; border-spacing: 0px; border: 0px; box-sizing: border-box; color: #d0d0d0; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px 0px 0px 10px; table-layout: fixed; vertical-align: baseline; white-space: nowrap; width: 903px;"&gt;&lt;tbody style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;tr style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;td class="linenos" style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; overflow: hidden; padding: 0px; vertical-align: baseline; width: 50px;"&gt;&lt;div class="linenodiv" style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; overflow: hidden; padding: 0px; text-align: center; vertical-align: baseline;"&gt;
&lt;pre style="border-bottom: none; border-image: initial; border-left: none; border-radius: 0px; border-right: 1px solid; border-top: none; box-sizing: border-box; color: #aaaaaa; font-family: monospace, monospace; font-size: 1em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 6px; margin-top: 6px; overflow: auto; padding: 0px 10px; vertical-align: baseline; word-wrap: normal;"&gt;1&lt;/pre&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;td class="code" style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;div class="highlighted-source native bash " style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px 0px 0px 10px; table-layout: fixed; vertical-align: baseline; width: 853px;"&gt;
&lt;pre style="border: 0px; box-sizing: border-box; font-family: monospace, monospace; font-size: 1em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; overflow: auto; padding: 0px; vertical-align: baseline;"&gt;&lt;span style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;/span&gt;yum info httpd
&lt;/pre&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class="article-content__paragraph" style="background-color: white; border: 0px; box-sizing: border-box; color: #222222; font-family: Roboto, sans-serif; font-size: 20px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;"&gt;
If you have default installation, you will most likely see similar output.&lt;/div&gt;
&lt;div class="table-responsive" style="background-color: white; border-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; color: #222222; font-family: Roboto, sans-serif; font-size: 0.75em; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0.833333em 0px; overflow: auto; padding: 0px; vertical-align: baseline;"&gt;
&lt;table class="highlighted-source native html table" style="background: rgb(32, 32, 32); border-collapse: collapse; border-spacing: 0px; border: 0px; box-sizing: border-box; color: #d0d0d0; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px 0px 0px 10px; table-layout: fixed; vertical-align: baseline; white-space: nowrap; width: 903px;"&gt;&lt;tbody style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;tr style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;td class="linenos" style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; overflow: hidden; padding: 0px; vertical-align: baseline; width: 50px;"&gt;&lt;div class="linenodiv" style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; overflow: hidden; padding: 0px; text-align: center; vertical-align: baseline;"&gt;
&lt;pre style="border-bottom: none; border-image: initial; border-left: none; border-radius: 0px; border-right: 1px solid; border-top: none; box-sizing: border-box; color: #aaaaaa; font-family: monospace, monospace; font-size: 1em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 6px; margin-top: 6px; overflow: auto; padding: 0px 10px; vertical-align: baseline; word-wrap: normal;"&gt; 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24&lt;/pre&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;td class="code" style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;div class="highlighted-source native html " style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px 0px 0px 10px; table-layout: fixed; vertical-align: baseline; width: 853px;"&gt;
&lt;pre style="border: 0px; box-sizing: border-box; font-family: monospace, monospace; font-size: 1em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; overflow: auto; padding: 0px; vertical-align: baseline;"&gt;&lt;span style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;/span&gt;[root@crosp ~]# yum info httpd
Loaded plugins: fastestmirror
epel/x86_64/metalink                                     |  19 kB     00:00
epel                                                     | 4.3 kB     00:00
(1/3): epel/x86_64/group_gz                                | 170 kB   00:00
(2/3): epel/x86_64/primary_db                              | 4.6 MB   00:00
(3/3): epel/x86_64/updateinfo                              | 780 kB   00:00
Loading mirror speeds from cached hostfile
 * base: mirrors.ircam.fr
 * epel: mirrors.ircam.fr
 * extras: centos.mirror.fr.planethoster.net
 * updates: centos.mirror.fr.planethoster.net
Available Packages
Name        : httpd
Arch        : x86_64
&lt;span class="hll" style="background-color: #404040; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;Version     : 2.4.6
&lt;/span&gt;Release     : 45.el7.centos.4
Size        : 2.7 M
Repo        : updates/7/x86_64
Summary     : Apache HTTP Server
URL         : &lt;a class="vglnk" href="http://httpd.apache.org/" rel="nofollow" style="background-color: transparent; border: 0px; box-sizing: border-box; color: #337ab7; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: 0px; padding: 0px; text-decoration-line: none; transition: all 0.3s ease-in-out; vertical-align: baseline;"&gt;&lt;span style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;http&lt;/span&gt;&lt;span style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;://&lt;/span&gt;&lt;span style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;httpd&lt;/span&gt;&lt;span style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;.&lt;/span&gt;&lt;span style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;apache&lt;/span&gt;&lt;span style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;.&lt;/span&gt;&lt;span style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;org&lt;/span&gt;&lt;span style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;/&lt;/span&gt;&lt;/a&gt;
License     : ASL 2.0
Description : The Apache HTTP Server is a powerful, efficient, and extensible
            : web server.
&lt;/pre&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class="article-content__paragraph" style="background-color: white; border: 0px; box-sizing: border-box; color: #222222; font-family: Roboto, sans-serif; font-size: 20px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;"&gt;
As you can see from the output above, there is only 2.4.6 Apache version available in default repos.&lt;/div&gt;
&lt;span style="background-color: white; border: 0px; box-sizing: border-box; color: #222222; font-family: &amp;quot;roboto&amp;quot; , sans-serif; font-size: 20px; font-stretch: inherit; font-weight: bolder; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;Please note:&lt;/span&gt;&lt;span style="background-color: white; color: #222222; font-family: &amp;quot;roboto&amp;quot; , sans-serif; font-size: 20px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class="article-content__paragraph" style="background-color: white; border: 0px; box-sizing: border-box; color: #222222; font-family: Roboto, sans-serif; font-size: 20px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;"&gt;
Centos uses&amp;nbsp;&lt;a class="article-content__link" href="https://access.redhat.com/security/updates/backporting/" style="background-color: transparent; border: 0px; box-sizing: border-box; color: #337ab7; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: 0px; padding: 0px; text-decoration-line: none; transition: all 0.3s ease-in-out; vertical-align: baseline;" target="_blank"&gt;Security Backporting Practice&lt;/a&gt;&amp;nbsp;in order to apply most recent fixes to older versions of a software package, as a result it doesn’t mean that an older version provided by default repositories is vulnerable. But in my case I didn’t have a required update.&lt;/div&gt;
&lt;span style="background-color: white; color: #222222; font-family: &amp;quot;roboto&amp;quot; , sans-serif; font-size: 20px;"&gt;You can see a changelog using these commands :&lt;/span&gt;&lt;br /&gt;
&lt;div class="table-responsive" style="background-color: white; border-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; color: #222222; font-family: Roboto, sans-serif; font-size: 0.75em; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0.833333em 0px; overflow: auto; padding: 0px; vertical-align: baseline;"&gt;
&lt;table class="highlighted-source native html table" style="background: rgb(32, 32, 32); border-collapse: collapse; border-spacing: 0px; border: 0px; box-sizing: border-box; color: #d0d0d0; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px 0px 0px 10px; table-layout: fixed; vertical-align: baseline; white-space: nowrap; width: 903px;"&gt;&lt;tbody style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;tr style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;td class="linenos" style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; overflow: hidden; padding: 0px; vertical-align: baseline; width: 50px;"&gt;&lt;div class="linenodiv" style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; overflow: hidden; padding: 0px; text-align: center; vertical-align: baseline;"&gt;
&lt;pre style="border-bottom: none; border-image: initial; border-left: none; border-radius: 0px; border-right: 1px solid; border-top: none; box-sizing: border-box; color: #aaaaaa; font-family: monospace, monospace; font-size: 1em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 6px; margin-top: 6px; overflow: auto; padding: 0px 10px; vertical-align: baseline; word-wrap: normal;"&gt;1
2&lt;/pre&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;td class="code" style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;div class="highlighted-source native html " style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px 0px 0px 10px; table-layout: fixed; vertical-align: baseline; width: 853px;"&gt;
&lt;pre style="border: 0px; box-sizing: border-box; font-family: monospace, monospace; font-size: 1em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; overflow: auto; padding: 0px; vertical-align: baseline;"&gt;&lt;span style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;/span&gt;sudo yum install yum-changelog
yum changelog httpd
&lt;/pre&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;h2 class="article-content__header article-content__header--h2" style="background-color: white; border: 0px; box-sizing: border-box; color: #237ea2; font-family: Roboto, sans-serif; font-size: 3rem; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-weight: 500; line-height: 1; margin: 0px; padding: 0.625em 0px; vertical-align: baseline;"&gt;
Step 2 — Set up CodeIT repositories&lt;/h2&gt;
&lt;div class="article-content__paragraph" style="background-color: white; border: 0px; box-sizing: border-box; color: #222222; font-family: Roboto, sans-serif; font-size: 20px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;"&gt;
There is a great custom repo created by these guys&amp;nbsp;&lt;a class="article-content__link" href="https://codeit.guru/en_US/" style="background-color: transparent; border: 0px; box-sizing: border-box; color: #337ab7; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: 0px; padding: 0px; text-decoration-line: none; transition: all 0.3s ease-in-out; vertical-align: baseline;" target="_blank"&gt;CodeIT&lt;/a&gt;&amp;nbsp;It provides latest versions of web servers (Apache &amp;amp; Nginx).&lt;/div&gt;
&lt;div class="article-content__paragraph" style="background-color: white; border: 0px; box-sizing: border-box; color: #222222; font-family: Roboto, sans-serif; font-size: 20px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;"&gt;
Before setting up the CodeIT repository first of all you need to enable the&amp;nbsp;&lt;a class="article-content__link" href="https://fedoraproject.org/wiki/EPEL" style="background-color: transparent; border: 0px; box-sizing: border-box; color: #337ab7; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: 0px; padding: 0px; text-decoration-line: none; transition: all 0.3s ease-in-out; vertical-align: baseline;" target="_blank"&gt;EPEL&lt;/a&gt;. It satisfies some dependencies required by the CodeIT repo.&lt;/div&gt;
&lt;div class="table-responsive" style="background-color: white; border-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; color: #222222; font-family: Roboto, sans-serif; font-size: 0.75em; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0.833333em 0px; overflow: auto; padding: 0px; vertical-align: baseline;"&gt;
&lt;table class="highlighted-source native html table" style="background: rgb(32, 32, 32); border-collapse: collapse; border-spacing: 0px; border: 0px; box-sizing: border-box; color: #d0d0d0; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px 0px 0px 10px; table-layout: fixed; vertical-align: baseline; white-space: nowrap; width: 903px;"&gt;&lt;tbody style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;tr style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;td class="linenos" style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; overflow: hidden; padding: 0px; vertical-align: baseline; width: 50px;"&gt;&lt;div class="linenodiv" style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; overflow: hidden; padding: 0px; text-align: center; vertical-align: baseline;"&gt;
&lt;pre style="border-bottom: none; border-image: initial; border-left: none; border-radius: 0px; border-right: 1px solid; border-top: none; box-sizing: border-box; color: #aaaaaa; font-family: monospace, monospace; font-size: 1em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 6px; margin-top: 6px; overflow: auto; padding: 0px 10px; vertical-align: baseline; word-wrap: normal;"&gt;1&lt;/pre&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;td class="code" style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;div class="highlighted-source native html " style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px 0px 0px 10px; table-layout: fixed; vertical-align: baseline; width: 853px;"&gt;
&lt;pre style="border: 0px; box-sizing: border-box; font-family: monospace, monospace; font-size: 1em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; overflow: auto; padding: 0px; vertical-align: baseline;"&gt;&lt;span style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;/span&gt;sudo yum install -y epel-release
&lt;/pre&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class="article-content__paragraph" style="background-color: white; border: 0px; box-sizing: border-box; color: #222222; font-family: Roboto, sans-serif; font-size: 20px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;"&gt;
Finally enable the CodeIT repository.&lt;/div&gt;
&lt;div class="table-responsive" style="background-color: white; border-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; color: #222222; font-family: Roboto, sans-serif; font-size: 0.75em; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0.833333em 0px; overflow: auto; padding: 0px; vertical-align: baseline;"&gt;
&lt;table class="highlighted-source native bash table" style="background: rgb(32, 32, 32); border-collapse: collapse; border-spacing: 0px; border: 0px; box-sizing: border-box; color: #d0d0d0; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px 0px 0px 10px; table-layout: fixed; vertical-align: baseline; white-space: nowrap; width: 903px;"&gt;&lt;tbody style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;tr style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;td class="linenos" style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; overflow: hidden; padding: 0px; vertical-align: baseline; width: 50px;"&gt;&lt;div class="linenodiv" style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; overflow: hidden; padding: 0px; text-align: center; vertical-align: baseline;"&gt;
&lt;pre style="border-bottom: none; border-image: initial; border-left: none; border-radius: 0px; border-right: 1px solid; border-top: none; box-sizing: border-box; color: #aaaaaa; font-family: monospace, monospace; font-size: 1em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 6px; margin-top: 6px; overflow: auto; padding: 0px 10px; vertical-align: baseline; word-wrap: normal;"&gt;1&lt;/pre&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;td class="code" style="border: 0px; box-sizing: border-box; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;div class="highlighted-source native bash " style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px; padding: 0px 0px 0px 10px; table-layout: fixed; vertical-align: baseline; width: 853px;"&gt;
&lt;pre style="border: 0px; box-sizing: border-box; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; overflow: auto; padding: 0px; vertical-align: baseline;"&gt;&lt;span style="font-family: monospace , monospace;"&gt;&lt;span style="font-size: 12px;"&gt;&lt;span style="border: 0px; box-sizing: border-box; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;/span&gt;cd /etc/yum.repos.d &amp;amp;&amp;amp; wget https://repo.codeit.guru/codeit.el7.repo&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class="article-content__paragraph" style="background-color: white; border: 0px; box-sizing: border-box; color: #222222; font-family: Roboto, sans-serif; font-size: 20px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;"&gt;
Then verify the Apache package version again and you should see something like that.&lt;/div&gt;
&lt;div class="table-responsive" style="background-color: white; border-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; color: #222222; font-family: Roboto, sans-serif; font-size: 0.75em; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0.833333em 0px; overflow: auto; padding: 0px; vertical-align: baseline;"&gt;
&lt;table class="highlighted-source native html table" style="background: rgb(32, 32, 32); border-collapse: collapse; border-spacing: 0px; border: 0px; box-sizing: border-box; color: #d0d0d0; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px 0px 0px 10px; table-layout: fixed; vertical-align: baseline; white-space: nowrap; width: 903px;"&gt;&lt;tbody style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;tr style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;td class="linenos" style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; overflow: hidden; padding: 0px; vertical-align: baseline; width: 50px;"&gt;&lt;div class="linenodiv" style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; overflow: hidden; padding: 0px; text-align: center; vertical-align: baseline;"&gt;
&lt;pre style="border-bottom: none; border-image: initial; border-left: none; border-radius: 0px; border-right: 1px solid; border-top: none; box-sizing: border-box; color: #aaaaaa; font-family: monospace, monospace; font-size: 1em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 6px; margin-top: 6px; overflow: auto; padding: 0px 10px; vertical-align: baseline; word-wrap: normal;"&gt; 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19&lt;/pre&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;td class="code" style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;div class="highlighted-source native html " style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px 0px 0px 10px; table-layout: fixed; vertical-align: baseline; width: 853px;"&gt;
&lt;pre style="border: 0px; box-sizing: border-box; font-family: monospace, monospace; font-size: 1em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; overflow: auto; padding: 0px; vertical-align: baseline;"&gt;&lt;span style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;/span&gt;[root@crosp ~]# yum info httpd
Loaded plugins: changelog, fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.crazyfrogs.org
 * epel: mirror.23media.de
 * extras: mirrors.ircam.fr
 * updates: centos.mirror.fr.planethoster.net
Available Packages
Name        : httpd
Arch        : x86_64
&lt;span class="hll" style="background-color: #404040; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;Version     : 2.4.29
&lt;/span&gt;Release     : 3.el7.codeit
Size        : 1.4 M
Repo        : CodeIT/x86_64
Summary     : Apache HTTP Server
URL         : &lt;a class="vglnk" href="http://httpd.apache.org/" rel="nofollow" style="background-color: transparent; border: 0px; box-sizing: border-box; color: #337ab7; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: 0px; padding: 0px; text-decoration-line: none; transition: all 0.3s ease-in-out; vertical-align: baseline;"&gt;&lt;span style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;http&lt;/span&gt;&lt;span style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;://&lt;/span&gt;&lt;span style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;httpd&lt;/span&gt;&lt;span style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;.&lt;/span&gt;&lt;span style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;apache&lt;/span&gt;&lt;span style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;.&lt;/span&gt;&lt;span style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;org&lt;/span&gt;&lt;span style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;/&lt;/span&gt;&lt;/a&gt;
License     : ASL 2.0
Description : The Apache HTTP Server is a powerful, efficient, and extensible
            : web server.
&lt;/pre&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;h2 class="article-content__header article-content__header--h2" style="background-color: white; border: 0px; box-sizing: border-box; color: #237ea2; font-family: Roboto, sans-serif; font-size: 3rem; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-weight: 500; line-height: 1; margin: 0px; padding: 0.625em 0px; vertical-align: baseline;"&gt;
Step 3 — Update the Apache web-server&lt;/h2&gt;
&lt;div class="article-content__paragraph" style="background-color: white; border: 0px; box-sizing: border-box; color: #222222; font-family: Roboto, sans-serif; font-size: 20px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;"&gt;
Now you should have everything set up and upgrade to the latest Apache package.&lt;/div&gt;
&lt;div class="table-responsive" style="background-color: white; border-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; color: #222222; font-family: Roboto, sans-serif; font-size: 0.75em; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0.833333em 0px; overflow: auto; padding: 0px; vertical-align: baseline;"&gt;
&lt;table class="highlighted-source native html table" style="background: rgb(32, 32, 32); border-collapse: collapse; border-spacing: 0px; border: 0px; box-sizing: border-box; color: #d0d0d0; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px 0px 0px 10px; table-layout: fixed; vertical-align: baseline; white-space: nowrap; width: 903px;"&gt;&lt;tbody style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;tr style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;td class="linenos" style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; overflow: hidden; padding: 0px; vertical-align: baseline; width: 50px;"&gt;&lt;div class="linenodiv" style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; overflow: hidden; padding: 0px; text-align: center; vertical-align: baseline;"&gt;
&lt;pre style="border-bottom: none; border-image: initial; border-left: none; border-radius: 0px; border-right: 1px solid; border-top: none; box-sizing: border-box; color: #aaaaaa; font-family: monospace, monospace; font-size: 1em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 6px; margin-top: 6px; overflow: auto; padding: 0px 10px; vertical-align: baseline; word-wrap: normal;"&gt;1&lt;/pre&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;td class="code" style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;div class="highlighted-source native html " style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px 0px 0px 10px; table-layout: fixed; vertical-align: baseline; width: 853px;"&gt;
&lt;pre style="border: 0px; box-sizing: border-box; font-family: monospace, monospace; font-size: 1em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; overflow: auto; padding: 0px; vertical-align: baseline;"&gt;&lt;span style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;pre style="border: 0px; box-sizing: border-box; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; overflow: auto; padding: 0px; vertical-align: baseline;"&gt;&lt;span style="font-family: monospace , monospace;"&gt;yum upgrade httpd&lt;/span&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class="article-content__paragraph" style="background-color: white; border: 0px; box-sizing: border-box; color: #222222; font-family: Roboto, sans-serif; font-size: 20px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;"&gt;
Once Apache is installed, let’s start, restart or check the status of it and test whether it is working.&lt;/div&gt;
&lt;div class="table-responsive" style="background-color: white; border-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; color: #222222; font-family: Roboto, sans-serif; font-size: 0.75em; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0.833333em 0px; overflow: auto; padding: 0px; vertical-align: baseline;"&gt;
&lt;table class="highlighted-source native html table" style="background: rgb(32, 32, 32); border-collapse: collapse; border-spacing: 0px; border: 0px; box-sizing: border-box; color: #d0d0d0; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px 0px 0px 10px; table-layout: fixed; vertical-align: baseline; white-space: nowrap; width: 903px;"&gt;&lt;tbody style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;tr style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;td class="linenos" style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; overflow: hidden; padding: 0px; vertical-align: baseline; width: 50px;"&gt;&lt;div class="linenodiv" style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; overflow: hidden; padding: 0px; text-align: center; vertical-align: baseline;"&gt;
&lt;pre style="border-bottom: none; border-image: initial; border-left: none; border-radius: 0px; border-right: 1px solid; border-top: none; box-sizing: border-box; color: #aaaaaa; font-family: monospace, monospace; font-size: 1em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 6px; margin-top: 6px; overflow: auto; padding: 0px 10px; vertical-align: baseline; word-wrap: normal;"&gt;1&lt;/pre&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;td class="code" style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;div class="highlighted-source native html " style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px 0px 0px 10px; table-layout: fixed; vertical-align: baseline; width: 853px;"&gt;
&lt;pre style="border: 0px; box-sizing: border-box; font-family: monospace, monospace; font-size: 1em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; overflow: auto; padding: 0px; vertical-align: baseline;"&gt;&lt;span style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;/span&gt;[root@crosp ~]# systemctl start httpd
&lt;/pre&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class="table-responsive" style="background-color: white; border-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; color: #222222; font-family: Roboto, sans-serif; font-size: 0.75em; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0.833333em 0px; overflow: auto; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="article-content__paragraph" style="background-color: white; border: 0px; box-sizing: border-box; color: #222222; font-family: Roboto, sans-serif; font-size: 20px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;"&gt;
Finally, tell&amp;nbsp;&lt;span style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: bolder; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;systemd&lt;/span&gt;&amp;nbsp;to start the Apache service automatically at boot.&lt;/div&gt;
&lt;div class="table-responsive" style="background-color: white; border-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; color: #222222; font-family: Roboto, sans-serif; font-size: 0.75em; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0.833333em 0px; overflow: auto; padding: 0px; vertical-align: baseline;"&gt;
&lt;table class="highlighted-source native html table" style="background: rgb(32, 32, 32); border-collapse: collapse; border-spacing: 0px; border: 0px; box-sizing: border-box; color: #d0d0d0; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px 0px 0px 10px; table-layout: fixed; vertical-align: baseline; white-space: nowrap; width: 903px;"&gt;&lt;tbody style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;tr style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;td class="linenos" style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; overflow: hidden; padding: 0px; vertical-align: baseline; width: 50px;"&gt;&lt;div class="linenodiv" style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; overflow: hidden; padding: 0px; text-align: center; vertical-align: baseline;"&gt;
&lt;pre style="border-bottom: none; border-image: initial; border-left: none; border-radius: 0px; border-right: 1px solid; border-top: none; box-sizing: border-box; color: #aaaaaa; font-family: monospace, monospace; font-size: 1em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 6px; margin-top: 6px; overflow: auto; padding: 0px 10px; vertical-align: baseline; word-wrap: normal;"&gt;1&lt;/pre&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;td class="code" style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;div class="highlighted-source native html " style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px 0px 0px 10px; table-layout: fixed; vertical-align: baseline; width: 853px;"&gt;
&lt;pre style="border: 0px; box-sizing: border-box; font-family: monospace, monospace; font-size: 1em; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; overflow: auto; padding: 0px; vertical-align: baseline;"&gt;&lt;span style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;/span&gt;[root@crosp ~]# systemctl enable httpd
&lt;/pre&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class="article-content__paragraph" style="background-color: white; border: 0px; box-sizing: border-box; color: #222222; font-family: Roboto, sans-serif; font-size: 20px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;"&gt;
That’s all, if you have any troubles please feel free to leave comments below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ref:&amp;nbsp;https://stackoverflow.com/questions/45505411/upgrade-apache-2-4-6-to-2-4-27-without-losing-config&lt;/div&gt;
</description><link>http://page.farhad.pw/2018/01/upgrade-apache-246-to-2429-without.html</link><author>noreply@blogger.com (Farhad)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLH566KBHKQVfgTlO69IDDENJ6HzG-r7jiHE6Z5aa0w8xilIDn34Da8HQdoDDfhor6rsD3QHtBk80Nm8Qb2_TEQg9vo_m3ldRT9V3YRo2xDJd3SB02FlfH7vmk8Q5ackoObXCDIyEpZp8/s72-c/maxresdefault.jpg" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1026424054105678970.post-409073581128264543</guid><pubDate>Sun, 21 Jan 2018 06:43:00 +0000</pubDate><atom:updated>2018-01-21T13:11:53.245+06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">OpenSSL</category><category domain="http://www.blogger.com/atom/ns#">SSL</category><title>How To Update Or Install Openssl From Source To Latest Version</title><description>&lt;h2 style="background-color: white; box-sizing: border-box; line-height: 1.1; margin-bottom: 11px; margin-top: 22px;"&gt;
&lt;span style="color: #222222; font-family: &amp;quot;roboto&amp;quot; , , &amp;quot;blinkmacsystemfont&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;oxygen&amp;quot; , &amp;quot;ubuntu&amp;quot; , &amp;quot;cantarell&amp;quot; , &amp;quot;open sans&amp;quot; , sans-serif;"&gt;&lt;span style="font-size: 34px; font-weight: 400; text-transform: capitalize;"&gt;https://www.openssl.org/&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjurB_TxxSGIya_VJQdEb3CcgiRBY80pwGmWJQIZRhS4Dyd_6y0T4o0XGv2NRFeZ6EhB-QNYyhvkB2lvL3LfFpbBwOpk2JgSaIEhEEp6IHiMes1rE95BaFMCOy_N5P8OTZWiDbOC0BdCh8/s1600/crowfund-openssl-bug-bounty.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="283" data-original-width="670" height="135" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjurB_TxxSGIya_VJQdEb3CcgiRBY80pwGmWJQIZRhS4Dyd_6y0T4o0XGv2NRFeZ6EhB-QNYyhvkB2lvL3LfFpbBwOpk2JgSaIEhEEp6IHiMes1rE95BaFMCOy_N5P8OTZWiDbOC0BdCh8/s320/crowfund-openssl-bug-bounty.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h2 style="background-color: white; box-sizing: border-box; color: #222222; font-family: Roboto, -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;Segoe UI&amp;quot;, Oxygen, Ubuntu, Cantarell, &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 34px; font-weight: 400; line-height: 1.1; margin-bottom: 11px; margin-top: 22px; text-transform: capitalize;"&gt;
&lt;/h2&gt;
&lt;h2 style="background-color: white; box-sizing: border-box; color: #222222; font-family: Roboto, -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;Segoe UI&amp;quot;, Oxygen, Ubuntu, Cantarell, &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 34px; font-weight: 400; line-height: 1.1; margin-bottom: 11px; margin-top: 22px; text-transform: capitalize;"&gt;
Update Openssl&lt;/h2&gt;
&lt;div style="background-color: white; box-sizing: border-box; color: #2c3e50; font-family: Roboto, -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;Segoe UI&amp;quot;, Oxygen, Ubuntu, Cantarell, &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 15px; margin-bottom: 11px;"&gt;
For Linux&lt;/div&gt;
&lt;h3 style="background-color: white; box-sizing: border-box; color: #222222; font-family: Roboto, -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;Segoe UI&amp;quot;, Oxygen, Ubuntu, Cantarell, &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 23px; font-weight: 400; line-height: 1.1; margin-bottom: 11px; margin-top: 22px; text-transform: capitalize;"&gt;
Steps ( For Linux )&lt;/h3&gt;
&lt;h3 style="background-color: white; box-sizing: border-box; color: #222222; font-family: Roboto, -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;Segoe UI&amp;quot;, Oxygen, Ubuntu, Cantarell, &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 23px; font-weight: 400; line-height: 1.1; margin-bottom: 11px; margin-top: 22px; text-transform: capitalize;"&gt;
&lt;pre class="codesBash" style="background-color: #002b40; border-radius: 0px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; color: white; font-size: 14px; line-height: 1.42857; margin-bottom: 10.5px; overflow: auto; padding: 10px; text-transform: none; word-break: break-all; word-wrap: break-word;"&gt;  wget http://www.openssl.org/source/openssl-1.0.2n.tar.gz
  tar -xvzf openssl-1.0.2n.tar.gz
  cd openssl-1.0.2n
  ./config --prefix=/usr/
  make
  sudo make install &lt;/pre&gt;
&lt;/h3&gt;
&lt;h3 style="background-color: white; box-sizing: border-box; color: #222222; font-family: Roboto, -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;Segoe UI&amp;quot;, Oxygen, Ubuntu, Cantarell, &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 23px; font-weight: 400; line-height: 1.1; margin-bottom: 11px; margin-top: 22px; text-transform: capitalize;"&gt;
&lt;/h3&gt;
&lt;h3 style="background-color: white; box-sizing: border-box; color: #222222; font-family: Roboto, -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;Segoe UI&amp;quot;, Oxygen, Ubuntu, Cantarell, &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 23px; font-weight: 400; line-height: 1.1; margin-bottom: 11px; margin-top: 22px; text-transform: capitalize;"&gt;
Steps ( For Mac )&lt;/h3&gt;
&lt;pre class="codesBash" style="background-color: #002b40; border-radius: 0px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; font-size: 14px; line-height: 1.42857; margin-bottom: 10.5px; overflow: auto; padding: 10px; word-break: break-all; word-wrap: break-word;"&gt;  wget http://www.openssl.org/source/openssl-1.0.2n.tar.gz
  tar -xvzf openssl-1.0.2n.tar.gz
  cd openssl-1.0.2n
  ./Configure darwin64-x86_64-cc --prefix=/usr
  make
  sudo make install 
&lt;/pre&gt;
&lt;div style="background-color: white; box-sizing: border-box; color: #2c3e50; font-family: Roboto, -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;Segoe UI&amp;quot;, Oxygen, Ubuntu, Cantarell, &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 15px; margin-bottom: 11px;"&gt;
Now verify your installed openssl version by typing&lt;/div&gt;
&lt;div style="background-color: white; box-sizing: border-box; color: #2c3e50; font-family: Roboto, -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;Segoe UI&amp;quot;, Oxygen, Ubuntu, Cantarell, &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 15px; margin-bottom: 11px;"&gt;
openssl version&lt;/div&gt;
&lt;div style="background-color: white; box-sizing: border-box; color: #2c3e50; font-family: Roboto, -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;Segoe UI&amp;quot;, Oxygen, Ubuntu, Cantarell, &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 15px; margin-bottom: 11px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; box-sizing: border-box; color: #2c3e50; font-family: Roboto, -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;Segoe UI&amp;quot;, Oxygen, Ubuntu, Cantarell, &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 15px; margin-bottom: 11px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; box-sizing: border-box; color: #2c3e50; font-family: Roboto, -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;Segoe UI&amp;quot;, Oxygen, Ubuntu, Cantarell, &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 15px; margin-bottom: 11px;"&gt;
Ref:&amp;nbsp;https://www.computersnyou.com/3155/update-install-openssl-source-latest-version/&lt;/div&gt;
</description><link>http://page.farhad.pw/2018/01/how-to-update-or-install-openssl-from.html</link><author>noreply@blogger.com (Farhad)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjurB_TxxSGIya_VJQdEb3CcgiRBY80pwGmWJQIZRhS4Dyd_6y0T4o0XGv2NRFeZ6EhB-QNYyhvkB2lvL3LfFpbBwOpk2JgSaIEhEEp6IHiMes1rE95BaFMCOy_N5P8OTZWiDbOC0BdCh8/s72-c/crowfund-openssl-bug-bounty.jpg" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1026424054105678970.post-7058829336325610579</guid><pubDate>Sun, 21 Jan 2018 06:31:00 +0000</pubDate><atom:updated>2018-01-21T12:31:02.362+06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Centos Update</category><title>How to Upgrade CentOS 7.4 from CentOS 7.3/7.2/7.1/7.0</title><description>&lt;span style="background-color: white; border: 0px; color: #4a4949; font-family: Poppins; font-size: 16px; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;"&gt;CentOS 7.4 Released&lt;/span&gt;&lt;span style="background-color: white; color: #4a4949; font-family: Poppins; font-size: 16px; text-align: justify;"&gt;. Recently latest version of CentOS 7.4 has been released. All the CentOS 7.3, 7.2 7.1 and 7.0 users can upgrade their system to latest release. All the users running with WHM/cPanel don’t need to do anything. WHM/cPanel will automatically upgrade their operating system to next scheduled upgrade. If you are using CentOS without cPanel, this article is helpful for you for upgrading your current CentOS 7.x to latest CentOS 7.2&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: white; color: #4a4949; font-family: Poppins; font-size: 16px; text-align: justify;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi40KkuRaXlKUuRkm-WH-o8favAGfPXwdbnD6s-stMw0xo6W5Eyw7p9cPUh45QKHoFQQIfVTBqA-RLGoqUsnWS95VGhyphenhyphenhapCxGLJ69JAC81UI-U0ILBsLvkKxY6f_95W5rNzcRcKyW0JBY/s1600/How-to-Update-CentOS-or-Upgrade-CentOS-to-the-Latest-Version.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="900" data-original-width="1600" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi40KkuRaXlKUuRkm-WH-o8favAGfPXwdbnD6s-stMw0xo6W5Eyw7p9cPUh45QKHoFQQIfVTBqA-RLGoqUsnWS95VGhyphenhyphenhapCxGLJ69JAC81UI-U0ILBsLvkKxY6f_95W5rNzcRcKyW0JBY/s320/How-to-Update-CentOS-or-Upgrade-CentOS-to-the-Latest-Version.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style="background-color: white; color: #4a4949; font-family: Poppins; font-size: 16px; text-align: justify;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;h2 class="heading1" style="background-color: white; border-bottom-color: rgb(207, 202, 202); border-bottom-style: dashed; border-image: initial; border-left-color: initial; border-left-style: initial; border-right-color: initial; border-right-style: initial; border-top-color: initial; border-top-style: initial; border-width: 0px 0px 1px; color: #ca2129; font-family: &amp;quot;Roboto Condensed&amp;quot;, Arial, sans-serif; font-size: 26px; font-weight: inherit; letter-spacing: -0.7px; line-height: 34px; margin: 45px 0px 12px; opacity: 1; outline: 0px; padding: 0px 0px 4px; transition: opacity 0.24s ease-in-out; vertical-align: baseline; visibility: visible;"&gt;
Step 1 – Check Your CentOS Version&lt;/h2&gt;
&lt;div style="background-color: white; border: 0px; color: #4a4949; font-family: Poppins; font-size: 16px; margin-bottom: 20px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;"&gt;
CentOS systems keep version details in&amp;nbsp;&lt;green style="color: green;"&gt;/etc/redhat-release&lt;/green&gt;&amp;nbsp;and&amp;nbsp;&lt;green style="color: green;"&gt;/etc/centos-release&lt;/green&gt;. You just need to check content of one of these files.&lt;/div&gt;
&lt;pre style="background-color: #3c3f42; border-color: rgb(2, 149, 255); border-image: initial; border-style: solid; border-width: 1px 1px 1px 4px; color: white; font-size: 0.9em; line-height: 1.5em; margin-bottom: 24px; margin-top: 24px; outline: 0px; overflow-x: auto; overflow-y: hidden; padding: 10px; vertical-align: baseline; word-wrap: break-word;"&gt;&lt;hprompt&gt;cat /etc/redhat-release

CentOS Linux release 7.3.1503 (Core)
&lt;/hprompt&gt;&lt;/pre&gt;
&lt;h2 class="heading1" style="background-color: white; border-bottom-color: rgb(207, 202, 202); border-bottom-style: dashed; border-image: initial; border-left-color: initial; border-left-style: initial; border-right-color: initial; border-right-style: initial; border-top-color: initial; border-top-style: initial; border-width: 0px 0px 1px; color: #ca2129; font-family: &amp;quot;Roboto Condensed&amp;quot;, Arial, sans-serif; font-size: 26px; font-weight: inherit; letter-spacing: -0.7px; line-height: 34px; margin: 45px 0px 12px; opacity: 1; outline: 0px; padding: 0px 0px 4px; transition: opacity 0.24s ease-in-out; vertical-align: baseline; visibility: visible;"&gt;
Step 2 – Backup Important Data&lt;/h2&gt;
&lt;div style="background-color: white; border: 0px; color: #4a4949; font-family: Poppins; font-size: 16px; margin-bottom: 20px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;"&gt;
Before upgrading centos make sure you have taken backup of all your data to the remote location. Below are few suggested items to take backup.&lt;/div&gt;
&lt;ul style="background-color: white; border: 0px; color: #4a4949; font-family: Poppins; font-size: 16px; list-style-image: initial; list-style-position: initial; margin: 0px 0px 20px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;li style="border: 0px; font-size: inherit; margin: 0px 0px 0px 30px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;Backup all databases ( MySQL, PostgreSQL, etc.. )&lt;/li&gt;
&lt;li style="border: 0px; font-size: inherit; margin: 0px 0px 0px 30px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;Backup all configuration files ( Apache, PHP, MySQL, DNS and Other services )&lt;/li&gt;
&lt;li style="border: 0px; font-size: inherit; margin: 0px 0px 0px 30px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;Backup all websites data running in webserver&lt;/li&gt;
&lt;li style="border: 0px; font-size: inherit; margin: 0px 0px 0px 30px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;Backup other service if any running on system&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 class="heading1" style="background-color: white; border-bottom-color: rgb(207, 202, 202); border-bottom-style: dashed; border-image: initial; border-left-color: initial; border-left-style: initial; border-right-color: initial; border-right-style: initial; border-top-color: initial; border-top-style: initial; border-width: 0px 0px 1px; color: #ca2129; font-family: &amp;quot;Roboto Condensed&amp;quot;, Arial, sans-serif; font-size: 26px; font-weight: inherit; letter-spacing: -0.7px; line-height: 34px; margin: 45px 0px 12px; opacity: 1; outline: 0px; padding: 0px 0px 4px; transition: opacity 0.24s ease-in-out; vertical-align: baseline; visibility: visible;"&gt;
Step 3 – Upgrade CentOS 7&lt;/h2&gt;
&lt;div style="background-color: white; border: 0px; color: #4a4949; font-family: Poppins; font-size: 16px; margin-bottom: 20px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;"&gt;
Following are the steps to help you to upgrade CentOS to latest release. Use yum upgrade command to upgrade your current running system.&lt;/div&gt;
&lt;pre style="background-color: #3c3f42; border-color: rgb(2, 149, 255); border-image: initial; border-style: solid; border-width: 1px 1px 1px 4px; color: white; font-size: 0.9em; line-height: 1.5em; margin-bottom: 24px; margin-top: 24px; outline: 0px; overflow-x: auto; overflow-y: hidden; padding: 10px; vertical-align: baseline; word-wrap: break-word;"&gt;&lt;hprompt&gt;yum clean all
&lt;hprompt&gt;yum update
&lt;/hprompt&gt;&lt;/hprompt&gt;&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; color: #4a4949; font-family: Poppins; font-size: 16px; margin-bottom: 20px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;"&gt;
After successful completion of above command just reboot your system.&lt;/div&gt;
&lt;pre style="background-color: #3c3f42; border-color: rgb(2, 149, 255); border-image: initial; border-style: solid; border-width: 1px 1px 1px 4px; color: white; font-size: 0.9em; line-height: 1.5em; margin-bottom: 24px; margin-top: 24px; outline: 0px; overflow-x: auto; overflow-y: hidden; padding: 10px; vertical-align: baseline; word-wrap: break-word;"&gt;# reboot
&lt;/pre&gt;
&lt;h2 class="heading1" style="background-color: white; border-bottom-color: rgb(207, 202, 202); border-bottom-style: dashed; border-image: initial; border-left-color: initial; border-left-style: initial; border-right-color: initial; border-right-style: initial; border-top-color: initial; border-top-style: initial; border-width: 0px 0px 1px; color: #ca2129; font-family: &amp;quot;Roboto Condensed&amp;quot;, Arial, sans-serif; font-size: 26px; font-weight: inherit; letter-spacing: -0.7px; line-height: 34px; margin: 45px 0px 12px; opacity: 1; outline: 0px; padding: 0px 0px 4px; transition: opacity 0.24s ease-in-out; vertical-align: baseline; visibility: visible;"&gt;
Step 4 – Verify Upgrade&lt;/h2&gt;
&lt;div style="background-color: white; border: 0px; color: #4a4949; font-family: Poppins; font-size: 16px; margin-bottom: 20px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;"&gt;
Finally verify that your system has been upgraded successfully. To confirm it check the&amp;nbsp;&lt;span style="border: 0px; font-size: inherit; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;/etc/redhat-release&lt;/span&gt;&amp;nbsp;file content.&lt;/div&gt;
&lt;pre style="background-color: #3c3f42; border-color: rgb(2, 149, 255); border-image: initial; border-style: solid; border-width: 1px 1px 1px 4px; color: white; font-size: 0.9em; line-height: 1.5em; margin-bottom: 24px; margin-top: 24px; outline: 0px; overflow-x: auto; overflow-y: hidden; padding: 10px; vertical-align: baseline; word-wrap: break-word;"&gt;&lt;hprompt&gt;cat /etc/redhat-release

CentOS Linux release 7.4.1708 (Core)
&lt;/hprompt&gt;&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; color: #4a4949; font-family: Poppins; font-size: 16px; margin-bottom: 20px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;"&gt;
&lt;/div&gt;
&lt;div class="apss-social-share apss-theme-1 counter-enable apss-buttons-left clearfix" style="border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;div class="apss-share-wrapper-div" style="background-color: white; border: 0px; color: #4a4949; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="apss-share-wrapper-div" style="background-color: white; border: 0px; color: #4a4949; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="apss-share-wrapper-div" style="border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="background-color: #f7f7f7; color: #4a4949; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 18px;"&gt;Ref:&amp;nbsp;&lt;/span&gt;&lt;span style="color: #4a4949; font-family: Open Sans, sans-serif;"&gt;&lt;span style="font-size: 18px;"&gt;https://tecadmin.net/upgrade-centos-7-to-latest-release/&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</description><link>http://page.farhad.pw/2018/01/how-to-upgrade-centos-74-from-centos.html</link><author>noreply@blogger.com (Farhad)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi40KkuRaXlKUuRkm-WH-o8favAGfPXwdbnD6s-stMw0xo6W5Eyw7p9cPUh45QKHoFQQIfVTBqA-RLGoqUsnWS95VGhyphenhyphenhapCxGLJ69JAC81UI-U0ILBsLvkKxY6f_95W5rNzcRcKyW0JBY/s72-c/How-to-Update-CentOS-or-Upgrade-CentOS-to-the-Latest-Version.jpg" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1026424054105678970.post-2315592763327164952</guid><pubDate>Tue, 09 Jan 2018 17:22:00 +0000</pubDate><atom:updated>2018-01-09T23:22:31.650+06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">https</category><title>Redirect http to https permanently in apache</title><description>Can be use in both virtualhost and HTACCESS file.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="code-sample-blue" style="background-color: #0f192a; box-sizing: inherit; color: #d1edff; font-family: Courier, &amp;quot;Courier New&amp;quot;, monospace; font-size: 0.9rem; margin-bottom: 1rem; overflow: auto; padding: 0.67857rem;"&gt;RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]&lt;/pre&gt;
</description><link>http://page.farhad.pw/2018/01/redirect-http-to-https-permanently-in.html</link><author>noreply@blogger.com (Farhad)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1026424054105678970.post-2230525367801830321</guid><pubDate>Tue, 12 Dec 2017 08:00:00 +0000</pubDate><atom:updated>2017-12-12T14:00:33.772+06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">BlockChain</category><category domain="http://www.blogger.com/atom/ns#">Cryptocurrency</category><category domain="http://www.blogger.com/atom/ns#">Fabric</category><category domain="http://www.blogger.com/atom/ns#">HyperLedger</category><title>Hyperledger/blockchain-explorer Sample Application Setup</title><description>&lt;h1 style="border-bottom: 1px solid rgb(234, 236, 239); box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; line-height: 1.25; margin-bottom: 16px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0.3em;"&gt;
Hyperledger Explorer&lt;/h1&gt;
&lt;div style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px;"&gt;
Hyperledger Explorer is a simple, powerful, easy-to-use, highly maintainable, open source browser for viewing activity on the underlying blockchain network.&lt;/div&gt;
&lt;h2 style="border-bottom: 1px solid rgb(234, 236, 239); box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; line-height: 1.25; margin-bottom: 16px; margin-top: 24px; padding-bottom: 0.3em;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/hyperledger/blockchain-explorer#directory-structure" id="user-content-directory-structure" style="box-sizing: border-box; color: #0366d6; float: left; line-height: 1; margin-left: -20px; padding-right: 4px; text-decoration-line: none;"&gt;&lt;svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewbox="0 0 16 16" width="16"&gt;&lt;path d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z" fill-rule="evenodd"&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Directory Structure&lt;/h2&gt;
&lt;pre style="background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; line-height: inherit; margin: 0px; overflow: visible; padding: 0px; word-break: normal; word-wrap: normal;"&gt;├── app                    fabric GRPC interface
├── db      the mysql script and help class
├── explorer_client        Web Ui
├── first-network Basic fabric network setup
├── listener               websocket listener
├── metrics                metrics about tx count per minute and block count per minute
├── service                the service 
├── socket     push real time data to front end
├── timer                  Timer to post information periodically  
└── utils                  Various utility scripts 
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 style="border-bottom: 1px solid rgb(234, 236, 239); box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; line-height: 1.25; margin-bottom: 16px; margin-top: 24px; padding-bottom: 0.3em;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/hyperledger/blockchain-explorer#requirements" id="user-content-requirements" style="box-sizing: border-box; color: #0366d6; float: left; line-height: 1; margin-left: -20px; padding-right: 4px; text-decoration-line: none;"&gt;&lt;svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewbox="0 0 16 16" width="16"&gt;&lt;path d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z" fill-rule="evenodd"&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Requirements&lt;/h2&gt;
&lt;div style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px;"&gt;
Following are the software dependencies required to install and run hyperledger explorer&lt;/div&gt;
&lt;ul style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px; padding-left: 2em;"&gt;
&lt;li style="box-sizing: border-box;"&gt;nodejs 6.9.x (Note that v7.x is not yet supported)&lt;/li&gt;
&lt;li style="box-sizing: border-box; margin-top: 0.25em;"&gt;mysql 5.7 or greater&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px;"&gt;
Hyperledger Explorer works with Hyperledger Fabric 1.0. Install the following software dependencies to manage fabric network.&lt;/div&gt;
&lt;ul style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px; padding-left: 2em;"&gt;
&lt;li style="box-sizing: border-box;"&gt;docker 17.06.2-ce [&lt;a href="https://www.docker.com/community-edition" style="box-sizing: border-box; color: #0366d6; text-decoration-line: none;"&gt;https://www.docker.com/community-edition&lt;/a&gt;]&lt;/li&gt;
&lt;li style="box-sizing: border-box; margin-top: 0.25em;"&gt;docker-compose 1.14.0 [&lt;a href="https://docs.docker.com/compose/" style="box-sizing: border-box; color: #0366d6; text-decoration-line: none;"&gt;https://docs.docker.com/compose/&lt;/a&gt;]&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 style="border-bottom: 1px solid rgb(234, 236, 239); box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; line-height: 1.25; margin-bottom: 16px; margin-top: 24px; padding-bottom: 0.3em;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/hyperledger/blockchain-explorer#clone-repository" id="user-content-clone-repository" style="box-sizing: border-box; color: #0366d6; float: left; line-height: 1; margin-left: -20px; padding-right: 4px; text-decoration-line: none;"&gt;&lt;svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewbox="0 0 16 16" width="16"&gt;&lt;path d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z" fill-rule="evenodd"&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Clone Repository&lt;/h2&gt;
&lt;div style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px;"&gt;
Clone this repository to get the latest using the following command.&lt;/div&gt;
&lt;ol style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px; padding-left: 2em;"&gt;
&lt;li style="box-sizing: border-box;"&gt;&lt;code style="background-color: rgba(27, 31, 35, 0.05); border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; margin: 0px; padding: 0.2em 0.4em;"&gt;git clone https://github.com/hyperledger/blockchain-explorer.git&lt;/code&gt;&lt;/li&gt;
&lt;li style="box-sizing: border-box; margin-top: 0.25em;"&gt;&lt;code style="background-color: rgba(27, 31, 35, 0.05); border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; margin: 0px; padding: 0.2em 0.4em;"&gt;cd blockchain-explorer&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 style="border-bottom: 1px solid rgb(234, 236, 239); box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; line-height: 1.25; margin-bottom: 16px; margin-top: 24px; padding-bottom: 0.3em;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/hyperledger/blockchain-explorer#database-setup" id="user-content-database-setup" style="box-sizing: border-box; color: #0366d6; float: left; line-height: 1; margin-left: -20px; padding-right: 4px; text-decoration-line: none;"&gt;&lt;svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewbox="0 0 16 16" width="16"&gt;&lt;path d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z" fill-rule="evenodd"&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Database setup&lt;/h2&gt;
&lt;div style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px;"&gt;
Run the database setup scripts located under&amp;nbsp;&lt;code style="background-color: rgba(27, 31, 35, 0.05); border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; margin: 0px; padding: 0.2em 0.4em;"&gt;db/fabricexplorer.sql&lt;/code&gt;&lt;/div&gt;
&lt;div style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px;"&gt;
&lt;code style="background-color: rgba(27, 31, 35, 0.05); border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; margin: 0px; padding: 0.2em 0.4em;"&gt;mysql -u&lt;username&gt; -p &amp;lt; db/fabricexplorer.sql&lt;/username&gt;&lt;/code&gt;&lt;/div&gt;
&lt;h2 style="border-bottom: 1px solid rgb(234, 236, 239); box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; line-height: 1.25; margin-bottom: 16px; margin-top: 24px; padding-bottom: 0.3em;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/hyperledger/blockchain-explorer#fabric-network-setup" id="user-content-fabric-network-setup" style="box-sizing: border-box; color: #0366d6; float: left; line-height: 1; margin-left: -20px; padding-right: 4px; text-decoration-line: none;"&gt;&lt;svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewbox="0 0 16 16" width="16"&gt;&lt;path d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z" fill-rule="evenodd"&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Fabric network setup&lt;/h2&gt;
&lt;div style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px;"&gt;
This repository comes with a sample network configuration to start with&lt;/div&gt;
&lt;ol style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px; padding-left: 2em;"&gt;
&lt;li style="box-sizing: border-box;"&gt;&lt;code style="background-color: rgba(27, 31, 35, 0.05); border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; margin: 0px; padding: 0.2em 0.4em;"&gt;cd first-network&lt;/code&gt;&lt;/li&gt;
&lt;li style="box-sizing: border-box; margin-top: 0.25em;"&gt;&lt;code style="background-color: rgba(27, 31, 35, 0.05); border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; margin: 0px; padding: 0.2em 0.4em;"&gt;./bootstrap-1.0.2.sh&lt;/code&gt;&amp;nbsp;- This is going to download the necessary binaries and hyperledger docker images.&lt;/li&gt;
&lt;li style="box-sizing: border-box; margin-top: 0.25em;"&gt;&lt;code style="background-color: rgba(27, 31, 35, 0.05); border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; margin: 0px; padding: 0.2em 0.4em;"&gt;mkdir -p ./channel-artifacts&lt;/code&gt;&lt;/li&gt;
&lt;li style="box-sizing: border-box; margin-top: 0.25em;"&gt;&lt;code style="background-color: rgba(27, 31, 35, 0.05); border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; margin: 0px; padding: 0.2em 0.4em;"&gt;./byfn.sh -m generate -c mychannel&lt;/code&gt;&lt;/li&gt;
&lt;li style="box-sizing: border-box; margin-top: 0.25em;"&gt;&lt;code style="background-color: rgba(27, 31, 35, 0.05); border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; margin: 0px; padding: 0.2em 0.4em;"&gt;./byfn.sh -m up -c mychannel&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px;"&gt;
Alternatively you can setup your own network using&amp;nbsp;&lt;a href="http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html" style="box-sizing: border-box; color: #0366d6; text-decoration-line: none;"&gt;Build your network&lt;/a&gt;&amp;nbsp;tutorial from Fabric. Once you setup the network, please modify the values in&amp;nbsp;&lt;code style="background-color: rgba(27, 31, 35, 0.05); border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; margin: 0px; padding: 0.2em 0.4em;"&gt;network-config.json&lt;/code&gt;&amp;nbsp;accordingly.&lt;/div&gt;
&lt;div style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px;"&gt;
This brings up a 2 org network with channel name&amp;nbsp;&lt;code style="background-color: rgba(27, 31, 35, 0.05); border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; margin: 0px; padding: 0.2em 0.4em;"&gt;mychannel&lt;/code&gt;&amp;nbsp;.&lt;/div&gt;
&lt;h2 style="border-bottom: 1px solid rgb(234, 236, 239); box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; line-height: 1.25; margin-bottom: 16px; margin-top: 24px; padding-bottom: 0.3em;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/hyperledger/blockchain-explorer#running-blockchain-explorer" id="user-content-running-blockchain-explorer" style="box-sizing: border-box; color: #0366d6; float: left; line-height: 1; margin-left: -20px; padding-right: 4px; text-decoration-line: none;"&gt;&lt;svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewbox="0 0 16 16" width="16"&gt;&lt;path d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z" fill-rule="evenodd"&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Running blockchain-explorer&lt;/h2&gt;
&lt;div style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px;"&gt;
On another terminal,&lt;/div&gt;
&lt;ol style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px; padding-left: 2em;"&gt;
&lt;li style="box-sizing: border-box;"&gt;&lt;code style="background-color: rgba(27, 31, 35, 0.05); border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; margin: 0px; padding: 0.2em 0.4em;"&gt;cd blockchain-explorer&lt;/code&gt;&lt;/li&gt;
&lt;li style="box-sizing: border-box; margin-top: 0.25em;"&gt;Modify config.json to update the values for&lt;ul style="box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; padding-left: 2em;"&gt;
&lt;li style="box-sizing: border-box;"&gt;channels&lt;/li&gt;
&lt;li style="box-sizing: border-box; margin-top: 0.25em;"&gt;mysql host, username, password details&lt;/li&gt;
&lt;li style="box-sizing: border-box; margin-top: 0.25em;"&gt;tls&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight highlight-source-json" style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px;"&gt;
&lt;pre style="background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; line-height: 1.45; overflow: auto; padding: 16px; word-break: normal; word-wrap: normal;"&gt; &lt;span class="pl-s" style="box-sizing: border-box; color: #032f62;"&gt;&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;"&lt;/span&gt;channelsList&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;"&lt;/span&gt;&lt;/span&gt;: [&lt;span class="pl-s" style="box-sizing: border-box; color: #032f62;"&gt;&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;"&lt;/span&gt;mychannel&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;"&lt;/span&gt;&lt;/span&gt;],
 &lt;span class="pl-s" style="box-sizing: border-box; color: #032f62;"&gt;&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;"&lt;/span&gt;enableTls&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;"&lt;/span&gt;&lt;/span&gt;:&lt;span class="pl-c1" style="box-sizing: border-box; color: #005cc5;"&gt;true&lt;/span&gt;, 
 &lt;span class="pl-s" style="box-sizing: border-box; color: #032f62;"&gt;&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;"&lt;/span&gt;mysql&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;"&lt;/span&gt;&lt;/span&gt;:{
      &lt;span class="pl-s" style="box-sizing: border-box; color: #032f62;"&gt;&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;"&lt;/span&gt;host&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;"&lt;/span&gt;&lt;/span&gt;:&lt;span class="pl-s" style="box-sizing: border-box; color: #032f62;"&gt;&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;"&lt;/span&gt;127.0.0.1&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;"&lt;/span&gt;&lt;/span&gt;,
      &lt;span class="pl-s" style="box-sizing: border-box; color: #032f62;"&gt;&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;"&lt;/span&gt;database&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;"&lt;/span&gt;&lt;/span&gt;:&lt;span class="pl-s" style="box-sizing: border-box; color: #032f62;"&gt;&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;"&lt;/span&gt;fabricexplorer&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;"&lt;/span&gt;&lt;/span&gt;,
      &lt;span class="pl-s" style="box-sizing: border-box; color: #032f62;"&gt;&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;"&lt;/span&gt;username&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;"&lt;/span&gt;&lt;/span&gt;:&lt;span class="pl-s" style="box-sizing: border-box; color: #032f62;"&gt;&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;"&lt;/span&gt;root&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;"&lt;/span&gt;&lt;/span&gt;,
      &lt;span class="pl-s" style="box-sizing: border-box; color: #032f62;"&gt;&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;"&lt;/span&gt;passwd&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;"&lt;/span&gt;&lt;/span&gt;:&lt;span class="pl-s" style="box-sizing: border-box; color: #032f62;"&gt;&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;"&lt;/span&gt;123456&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;"&lt;/span&gt;&lt;/span&gt;
   }&lt;/pre&gt;
&lt;/div&gt;
&lt;ol start="3" style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px; padding-left: 2em;"&gt;
&lt;li style="box-sizing: border-box;"&gt;&lt;code style="background-color: rgba(27, 31, 35, 0.05); border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; margin: 0px; padding: 0.2em 0.4em;"&gt;npm install&lt;/code&gt;&lt;/li&gt;
&lt;li style="box-sizing: border-box; margin-top: 0.25em;"&gt;&lt;code style="background-color: rgba(27, 31, 35, 0.05); border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; margin: 0px; padding: 0.2em 0.4em;"&gt;./start.sh&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px;"&gt;
Launch the URL&amp;nbsp;&lt;a href="http://localhost:8080/" style="box-sizing: border-box; color: #0366d6; text-decoration-line: none;"&gt;http://localhost:8080&lt;/a&gt;&amp;nbsp;on a browser.&lt;/div&gt;
&lt;h2 style="border-bottom: 1px solid rgb(234, 236, 239); box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; line-height: 1.25; margin-bottom: 16px; margin-top: 24px; padding-bottom: 0.3em;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/hyperledger/blockchain-explorer#screenshots" id="user-content-screenshots" style="box-sizing: border-box; color: #0366d6; float: left; line-height: 1; margin-left: -20px; padding-right: 4px; text-decoration-line: none;"&gt;&lt;svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewbox="0 0 16 16" width="16"&gt;&lt;path d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z" fill-rule="evenodd"&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Screenshots&lt;/h2&gt;
&lt;div style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px;"&gt;
This is how the fabric-explorer looks like,&lt;/div&gt;
&lt;div style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px;"&gt;
&lt;a href="https://github.com/xspeedcruiser/explorer-images/raw/master/blockchain-exp1.png" style="box-sizing: border-box; color: #0366d6; text-decoration-line: none;" target="_blank"&gt;&lt;img alt="Fabric Explorer" src="https://github.com/xspeedcruiser/explorer-images/raw/master/blockchain-exp1.png" style="background-color: white; border-style: none; box-sizing: content-box; max-width: 100%;" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px;"&gt;
&lt;a href="https://github.com/xspeedcruiser/explorer-images/raw/master/blockchain-exp.png" style="box-sizing: border-box; color: #0366d6; text-decoration-line: none;" target="_blank"&gt;&lt;img alt="Fabric Explorer" src="https://github.com/xspeedcruiser/explorer-images/raw/master/blockchain-exp.png" style="background-color: white; border-style: none; box-sizing: content-box; max-width: 100%;" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px;"&gt;
&lt;a href="https://github.com/xspeedcruiser/explorer-images/raw/master/blockchain-exp3.png" style="box-sizing: border-box; color: #0366d6; text-decoration-line: none;" target="_blank"&gt;&lt;img alt="Fabric Explorer" src="https://github.com/xspeedcruiser/explorer-images/raw/master/blockchain-exp3.png" style="background-color: white; border-style: none; box-sizing: content-box; max-width: 100%;" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h2 style="border-bottom: 1px solid rgb(234, 236, 239); box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; line-height: 1.25; margin-bottom: 16px; margin-top: 24px; padding-bottom: 0.3em;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/hyperledger/blockchain-explorer#simple-rest-api" id="user-content-simple-rest-api" style="box-sizing: border-box; color: #0366d6; float: left; line-height: 1; margin-left: -20px; padding-right: 4px; text-decoration-line: none;"&gt;&lt;svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewbox="0 0 16 16" width="16"&gt;&lt;path d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z" fill-rule="evenodd"&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;SIMPLE REST-API&lt;/h2&gt;
&lt;div style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px;"&gt;
This also provides a simple rest-api to access the following&lt;/div&gt;
&lt;ul style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px; padding-left: 2em;"&gt;
&lt;li style="box-sizing: border-box;"&gt;Block&lt;/li&gt;
&lt;li style="box-sizing: border-box; margin-top: 0.25em;"&gt;Transaction&lt;/li&gt;
&lt;li style="box-sizing: border-box; margin-top: 0.25em;"&gt;Peer Status&lt;/li&gt;
&lt;li style="box-sizing: border-box; margin-top: 0.25em;"&gt;List of chaincodes deployed&lt;/li&gt;
&lt;/ul&gt;
&lt;pre style="background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; line-height: inherit; margin: 0px; overflow: visible; padding: 0px; word-break: normal; word-wrap: normal;"&gt;//get block info
curl -X POST  http://localhost:8080/api/block/json -H 'cache-control: no-cache' -H 'content-type: application/json' -d '{
    "number":"${block number}"
}'

//get transcation JOSN
curl -X POST  http://localhost:8080/api/tx/json -H 'cache-control: no-cache' -H 'content-type: application/json' -d '{
    "number":"${ Tx hex }"
}'


//get peer status
curl -X POST  http://localhost:8080/api/status/get -H 'cache-control: no-cache' -H 'content-type: application/json' -d ''

//get chaincode list
curl -X POST  http://localhost:8080/chaincodelist -H 'cache-control: no-cache' -H 'content-type: application/json' -d ''

&lt;/code&gt;&lt;/pre&gt;
&lt;ul style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px; padding-left: 2em;"&gt;
&lt;li style="box-sizing: border-box;"&gt;Query to fetch channels&lt;/li&gt;
&lt;/ul&gt;
&lt;pre style="background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; line-height: inherit; margin: 0px; overflow: visible; padding: 0px; word-break: normal; word-wrap: normal;"&gt;http://localhost:8080/apis/channels?peer=peer1

returns:

{"channels":[{"channel_id":"mychannel1"},{"channel_id":"mychannel2"}]}

&lt;/code&gt;&lt;/pre&gt;
&lt;ul style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px; padding-left: 2em;"&gt;
&lt;li style="box-sizing: border-box;"&gt;Query to get BlockCount on a channel&lt;/li&gt;
&lt;/ul&gt;
&lt;pre style="background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; line-height: inherit; margin: 0px; overflow: visible; padding: 0px; word-break: normal; word-wrap: normal;"&gt;http://localhost:8080/apis/channels/:channelname/height

example:

http://localhost:8080/apis/channels/mychannel1/height

returns:

11

&lt;/code&gt;&lt;/pre&gt;
&lt;ul style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px; padding-left: 2em;"&gt;
&lt;li style="box-sizing: border-box;"&gt;Query to fetch all Installed/instantiated chaincodes&lt;/li&gt;
&lt;/ul&gt;
&lt;pre style="background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; line-height: inherit; margin: 0px; overflow: visible; padding: 0px; word-break: normal; word-wrap: normal;"&gt;
example:

http://localhost:8080/apis/chaincodes?channel=mychannel1

returns:

[{"name":"mycc","version":"v1","path":"github.com/uniqueKeyValue"}]


&lt;/code&gt;&lt;/pre&gt;
&lt;ul style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px; padding-left: 2em;"&gt;
&lt;li style="box-sizing: border-box;"&gt;Query for Channel Information&lt;/li&gt;
&lt;/ul&gt;
&lt;pre style="background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; line-height: inherit; margin: 0px; overflow: visible; padding: 0px; word-break: normal; word-wrap: normal;"&gt;http://localhost:8080/apis/channels/:channelName?peer=peer1

example:

http://localhost:8080/apis/channels/mychannel1?peer=peer1

returns:

{"height":{"low":11,"high":0,"unsigned":true},"currentBlockHash":{"buffer":{"type":"Buffer","data":[8,11,18,32,90,45,133,231,141,67,36,144,207,89,0,146,16,148,152,87,45,74,92,18,81,15,204,7,46,18,45,19,107,246,6,137,26,32,211,81,65,122,137,193,139,40,222,151,12,146,250,86,9,198,149,213,97,220,41,202,26,167,187,251,114,17,101,146,45,76]},"offset":4,"markedOffset":-1,"limit":36,"littleEndian":true,"noAssert":false},"previousBlockHash":{"buffer":{"type":"Buffer","data":[8,11,18,32,90,45,133,231,141,67,36,144,207,89,0,146,16,148,152,87,45,74,92,18,81,15,204,7,46,18,45,19,107,246,6,137,26,32,211,81,65,122,137,193,139,40,222,151,12,146,250,86,9,198,149,213,97,220,41,202,26,167,187,251,114,17,101,146,45,76]},"offset":38,"markedOffset":-1,"limit":70,"littleEndian":true,"noAssert":false}}

&lt;/code&gt;&lt;/pre&gt;
&lt;ul style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px; padding-left: 2em;"&gt;
&lt;li style="box-sizing: border-box;"&gt;Query Get Block by Hash&lt;/li&gt;
&lt;/ul&gt;
&lt;pre style="background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; line-height: inherit; margin: 0px; overflow: visible; padding: 0px; word-break: normal; word-wrap: normal;"&gt;http://localhost:8080/apis/channels/:channelName/blocks?peer=peer1&amp;amp;hash=blockHash

example:

http://localhost:8080/apis/channels/mychannel1/blocks?peer=peer1&amp;amp;hash=17edcc4ab8dbac1bca83d4108a24cb7708f1305c09df0908e90399df665a462d

returns:

{"header":{"number":{"low":0,"high":0,"unsigned":true},"previous_hash":"","data_hash":"0d37b6e459b5b1ab536488b459743497ca41756877395fd83cee1a247a18a7a6"},"data":{"data":[{"signature":{"type":"Buffer","data":[48,69,2,33,0,235,193,198,202,68,232,94,94,84,187,198,24,165,76,64,5,230,187,54,42,13,208,49,180,44,92,45,193,141,59,75,252,2,32,66,9,142,72,25,163,108,1,117,225,129,218,88,31,112,58,114,252,147,142,233,138,233,59,40,202,230,49,31,245,61,125]},"payload":{"header":{"channel_header":{"type":"CONFIG","version":1,"timestamp":"Thu Sep 28 2017 10:11:05 GMT+0800 (CST)","channel_id":"mychannel1","tx_id":"","epoch":0,"extension":{"type":"Buffer","data":[]}},"signature_header":{"creator":{"Mspid":"OrdererMSP","IdBytes":"-----BEGIN -----\nMIICDDCCAbOgAwIBAgIQOHE/ondSQMSlUNNQazSIXTAKBggqhkjOPQQDAjBpMQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w\nbGUuY29tMB4XDTE3MDcxNTAyMDYzNloXDTI3MDcxMzAyMDYzNlowWTELMAkGA1UE\nBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz\nY28xHTAbBgNVBAMTFG9yZGVyZXIwLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYI\nKoZIzj0DAQcDQgAEhaQ2UremZlrOMvYberqt4fppOO7pgYHrYou2fafNzk5Rdtp8\nGsP3hDum49p+9jLYzzp5c6zDCaLsjm+Xvl2zDqNNMEswDgYDVR0PAQH/BAQDAgeA\nMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgrlTI/LkISeYsdjEWv9fZyWppSzBu\nr9kNeyV2jlUJkVswCgYIKoZIzj0EAwIDRwAwRAIgQuOrMWolp2iJrCG6R/3jVYRF\nuivJkRQsAkRnel25y6ACIDcxY4zuGR1cHEAIFlbvt3oq83mwIYcTF+mT1+caLkOL\n-----END -----\n"},"nonce":{"type":"Buffer","data":[112,94,14,11,197,72,6,126,254,29,66,47,220,119,125,132,27,139,0,212,3,129,213,76]}}},"data":{"config":{"sequence":{"low":1,"high":0,"unsigned":true},"channel_group":{"version":0,"groups":{"Orderer":{"version":0,"groups":{"OrdererMSP":{"version":0,"groups":{},"values":{"MSP":{"version":0,"mod_policy":"Admins","value":{"type":0,"config":{"name":"OrdererMSP","root_certs":["-----BEGIN CERTIFICATE-----\nMIICLzCCAdagAwIBAgIRAO7tuPK9KmxUdlKSx13kjs8wCgYIKoZIzj0EAwIwaTEL\nMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG\ncmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFt\ncGxlLmNvbTAeFw0xNzA3MTUwMjA2MzZaFw0yNzA3MTMwMjA2MzZaMGkxCzAJBgNV\nBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNp\nc2NvMRQwEgYDVQQKEwtleGFtcGxlLmNvbTEXMBUGA1UEAxMOY2EuZXhhbXBsZS5j\nb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAARrwQalsz34OGRcWl2d6QaJt7YQ\nq+113l0rzqY6/eMNKkFU5mKuKlhEFlPje0uxEwCqBaN8qt+ErwoEGC+2ajWGo18w\nXTAOBgNVHQ8BAf8EBAMCAaYwDwYDVR0lBAgwBgYEVR0lADAPBgNVHRMBAf8EBTAD\nAQH/MCkGA1UdDgQiBCCuVMj8uQhJ5ix2MRa/19nJamlLMG6v2Q17JXaOVQmRWzAK\nBggqhkjOPQQDAgNHADBEAiBzzvzAhn8ZHHPFEeSRklweZATDzVSSg2UoRHmRzrfB\nyQIgC+y8O4EzLxvst/RWo2kKzCKaUULX3x8V4JitSjkfkyA=\n-----END CERTIFICATE-----\n"],"intermediate_certs":[],"admins":["-----BEGIN CERTIFICATE-----\nMIICCTCCAbCgAwIBAgIQO9MVJymGxa51LJnAD/+WCTAKBggqhkjOPQQDAjBpMQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w\nbGUuY29tMB4XDTE3MDcxNTAyMDYzNloXDTI3MDcxMzAyMDYzNlowVjELMAkGA1UE\nBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz\nY28xGjAYBgNVBAMMEUFkbWluQGV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZI\nzj0DAQcDQgAED098sJ5MWt+G+iTYndqxVJNYcc/9tQJNrGo6WT3y72GDKRvrjOJO\ngj9LESvfRkhR2DLUjrcOAWuxUFkQVl2Y8aNNMEswDgYDVR0PAQH/BAQDAgeAMAwG\nA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgrlTI/LkISeYsdjEWv9fZyWppSzBur9kN\neyV2jlUJkVswCgYIKoZIzj0EAwIDRwAwRAIgNjM48iYrYHjLb4HtiWZSqJCSyip4\nQOINhia7Ox+sOkkCIBC7GSCNHUwjXF2W39ct+URK4w+6zpTXK17OoCPijCT6\n-----END CERTIFICATE-----\n"],"revocation_list":[],"signing_identity":null,"organizational_unit_identifiers":[]}}}},"policies":{"Admins":{"version":0,"mod_policy":"Admins","policy":{"type":"SIGNATURE","policy":{"version":0,"policy":{"Type":"n_out_of","n_out_of":{"N":1,"policies":[{"Type":"signed_by","signed_by":0}]}},"identities":[{"principal_classification":0,"msp_identifier":"OrdererMSP","Role":"ADMIN"}]}}},"Readers":{"version":0,"mod_policy":"Admins","policy":{"type":"SIGNATURE","policy":{"version":0,"policy":{"Type":"n_out_of","n_out_of":{"N":1,"policies":[{"Type":"signed_by","signed_by":0}]}},"identities":[{"principal_classification":0,"msp_identifier":"OrdererMSP","Role":"MEMBER"}]}}},"Writers":{"version":0,"mod_policy":"Admins","policy":{"type":"SIGNATURE","policy":{"version":0,"policy":{"Type":"n_out_of","n_out_of":{"N":1,"policies":[{"Type":"signed_by","signed_by":0}]}},"identities":[{"principal_classification":0,"msp_identifier":"OrdererMSP","Role":"MEMBER"}]}}}},"mod_policy":"Admins"}},"values":{"BatchSize":{"version":0,"mod_policy":"Admins","value":{"max_message_count":3,"absolute_max_bytes":102760448,"preferred_max_bytes":524288}},"BatchTimeout":{"version":0,"mod_policy":"Admins","value":{"timeout":"2s"}},"ChannelRestrictions":{"version":0,"mod_policy":"Admins","value":{"max_count":{"low":0,"high":0,"unsigned":true}}},"KafkaBrokers":{"version":0,"mod_policy":"Admins","value":{}},"ConsensusType":{"version":0,"mod_policy":"Admins","value":{"type":"kafka"}}},"policies":{"Readers":{"version":0,"mod_policy":"Admins","policy":{"type":"IMPLICIT_META","policy":{"sub_policy":"Readers","rule":"ANY"}}},"Writers":{"version":0,"mod_policy":"Admins","policy":{"type":"IMPLICIT_META","policy":{"sub_policy":"Writers","rule":"ANY"}}},"Admins":{"version":0,"mod_policy":"Admins","policy":{"type":"IMPLICIT_META","policy":{"sub_policy":"Admins","rule":"MAJORITY"}}},"BlockValidation":{"version":0,"mod_policy":"Admins","policy":{"type":"IMPLICIT_META","policy":{"sub_policy":"Writers","rule":"ANY"}}}},"mod_policy":"Admins"},"Application":{"version":1,"groups":{"Org1MSP":{"version":0,"groups":{},"values":{"MSP":{"version":0,"mod_policy":"Admins","value":{"type":0,"config":{"name":"Org1MSP","root_certs":["-----BEGIN CERTIFICATE-----\nMIICQzCCAeqgAwIBAgIRAMTkVne1BkUA+xrG1IucKzwwCgYIKoZIzj0EAwIwczEL\nMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG\ncmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh\nLm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwNzE1MDIwNjM2WhcNMjcwNzEzMDIwNjM2\nWjBzMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN\nU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UE\nAxMTY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA\nBAKOsvBuwa68x3TYUlc915mlX1YkIjul1eiluBmwjKoEPNv9huuW81u14jqBiiyO\nfnssCPqIh81IPbiw7hN5GR+jXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAG\nBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIHuoXLT6fErJvkxl4466\nzHfapm6CqPobUFL2jLQBLNY5MAoGCCqGSM49BAMCA0cAMEQCIG8p1VWO64Alyn/X\n1Sg29ub89B9qBpsh0r8aVdwrPD7AAiBFAMVmNlVW/4ez2qAFSLRDlv9WLEFtD7BF\nUis5K9ze1Q==\n-----END CERTIFICATE-----\n"],"intermediate_certs":[],"admins":["-----BEGIN CERTIFICATE-----\nMIICGDCCAb+gAwIBAgIQcSoGCOGOr4YBmSoZf3+xKDAKBggqhkjOPQQDAjBzMQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu\nb3JnMS5leGFtcGxlLmNvbTAeFw0xNzA3MTUwMjA2MzZaFw0yNzA3MTMwMjA2MzZa\nMFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T\nYW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZBZG1pbkBvcmcxLmV4YW1wbGUuY29tMFkw\nEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9ShZ73kVS0lIvaRV7eLhZaokkD1WAJ9i\n/A7Q+Wo4EmVjFE5Q+zxQ8XdYf+c3Qb/oujc4DBWoBfyu5h0CGmJ4TKNNMEswDgYD\nVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAge6hctPp8Ssm+\nTGXjjrrMd9qmboKo+htQUvaMtAEs1jkwCgYIKoZIzj0EAwIDRwAwRAIgAynT6AFB\n3cyecXoI8jpT1PYLxLlQDYtIKzLy9wLwpgoCICxT8Zkq2F8phZ7LDnpKmqELIAsW\nPFzJ3ihODDc6GqCk\n-----END CERTIFICATE-----\n"],"revocation_list":[],"signing_identity":null,"organizational_unit_identifiers":[]}}}},"policies":{"Writers":{"version":0,"mod_policy":"Admins","policy":{"type":"SIGNATURE","policy":{"version":0,"policy":{"Type":"n_out_of","n_out_of":{"N":1,"policies":[{"Type":"signed_by","signed_by":0}]}},"identities":[{"principal_classification":0,"msp_identifier":"Org1MSP","Role":"MEMBER"}]}}},"Admins":{"version":0,"mod_policy":"Admins","policy":{"type":"SIGNATURE","policy":{"version":0,"policy":{"Type":"n_out_of","n_out_of":{"N":1,"policies":[{"Type":"signed_by","signed_by":0}]}},"identities":[{"principal_classification":0,"msp_identifier":"Org1MSP","Role":"ADMIN"}]}}},"Readers":{"version":0,"mod_policy":"Admins","policy":{"type":"SIGNATURE","policy":{"version":0,"policy":{"Type":"n_out_of","n_out_of":{"N":1,"policies":[{"Type":"signed_by","signed_by":0}]}},"identities":[{"principal_classification":0,"msp_identifier":"Org1MSP","Role":"MEMBER"}]}}}},"mod_policy":"Admins"},"Org2MSP":{"version":0,"groups":{},"values":{"MSP":{"version":0,"mod_policy":"Admins","value":{"type":0,"config":{"name":"Org2MSP","root_certs":["-----BEGIN CERTIFICATE-----\nMIICRDCCAeqgAwIBAgIRAOAK6UNPLpdERhKmnBd05RYwCgYIKoZIzj0EAwIwczEL\nMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG\ncmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh\nLm9yZzIuZXhhbXBsZS5jb20wHhcNMTcwNzE1MDIwNjM2WhcNMjcwNzEzMDIwNjM2\nWjBzMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN\nU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEcMBoGA1UE\nAxMTY2Eub3JnMi5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA\nBGiYV2PdPnvwA0EYnm2Elhfq12yF2+le6QsJR+S7wYKiE/Uaa3LF3w7GQ2DFltqt\nS3lZVo8dmeWUqehwkOfdew6jXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAG\nBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIEGIqeaKQHLFUoz4lbUG\nlBL8Z5gRKToptVGcAgnWIW4bMAoGCCqGSM49BAMCA0gAMEUCIQDruLry79r1Vfrg\nnrXaBNBUFM8rgb9YCTlEkFpr2z41bgIgVcs7ZZE1H2m+mv7GYIONKlq8tFc4fu45\nd/EQIdCoCPU=\n-----END CERTIFICATE-----\n"],"intermediate_certs":[],"admins":["-----BEGIN CERTIFICATE-----\nMIICGDCCAb+gAwIBAgIQQE26BPVgQfIchcdcirObmjAKBggqhkjOPQQDAjBzMQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu\nb3JnMi5leGFtcGxlLmNvbTAeFw0xNzA3MTUwMjA2MzZaFw0yNzA3MTMwMjA2MzZa\nMFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T\nYW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZBZG1pbkBvcmcyLmV4YW1wbGUuY29tMFkw\nEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEP9miyVrFxkYxDSeGcxnj5SWYdzMRorw7\nN2Gagvm6yUBfEszIFJQZvarC1pIIFqpC8b8q+ZI4zLWn1HYGcvYj4KNNMEswDgYD\nVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgQYip5opAcsVS\njPiVtQaUEvxnmBEpOim1UZwCCdYhbhswCgYIKoZIzj0EAwIDRwAwRAIgGC37d8De\nx9fubLTwf07GzEd4ds5V643MW1lD3V6wcLMCIDjpr+mIl/4qPZTui6QEb9GHwd2D\nfxsBBk1JfiImxMTj\n-----END CERTIFICATE-----\n"],"revocation_list":[],"signing_identity":null,"organizational_unit_identifiers":[]}}}},"policies":{"Admins":{"version":0,"mod_policy":"Admins","policy":{"type":"SIGNATURE","policy":{"version":0,"policy":{"Type":"n_out_of","n_out_of":{"N":1,"policies":[{"Type":"signed_by","signed_by":0}]}},"identities":[{"principal_classification":0,"msp_identifier":"Org2MSP","Role":"ADMIN"}]}}},"Readers":{"version":0,"mod_policy":"Admins","policy":{"type":"SIGNATURE","policy":{"version":0,"policy":{"Type":"n_out_of","n_out_of":{"N":1,"policies":[{"Type":"signed_by","signed_by":0}]}},"identities":[{"principal_classification":0,"msp_identifier":"Org2MSP","Role":"MEMBER"}]}}},"Writers":{"version":0,"mod_policy":"Admins","policy":{"type":"SIGNATURE","policy":{"version":0,"policy":{"Type":"n_out_of","n_out_of":{"N":1,"policies":[{"Type":"signed_by","signed_by":0}]}},"identities":[{"principal_classification":0,"msp_identifier":"Org2MSP","Role":"MEMBER"}]}}}},"mod_policy":"Admins"}},"values":{},"policies":{"Admins":{"version":0,"mod_policy":"","policy":{"type":"IMPLICIT_META","policy":{"sub_policy":"Admins","rule":"MAJORITY"}}},"Writers":{"version":0,"mod_policy":"","policy":{"type":"IMPLICIT_META","policy":{"sub_policy":"Writers","rule":"ANY"}}},"Readers":{"version":0,"mod_policy":"","policy":{"type":"IMPLICIT_META","policy":{"sub_policy":"Readers","rule":"ANY"}}}},"mod_policy":"Admins"}},"values":{"BlockDataHashingStructure":{"version":0,"mod_policy":"Admins","value":{"width":4294967295}},"OrdererAddresses":{"version":0,"mod_policy":"/Channel/Orderer/Admins","value":{"addresses":["orderer0.example.com:7050","orderer1.example.com:7050","orderer2.example.com:7050"]}},"Consortium":{"version":0,"mod_policy":"","value":{"name":"SampleConsortium"}},"HashingAlgorithm":{"version":0,"mod_policy":"Admins","value":{"name":"SHA256"}}},"policies":{"Admins":{"version":0,"mod_policy":"Admins","policy":{"type":"IMPLICIT_META","policy":{"sub_policy":"Admins","rule":"MAJORITY"}}},"Readers":{"version":0,"mod_policy":"Admins","policy":{"type":"IMPLICIT_META","policy":{"sub_policy":"Readers","rule":"ANY"}}},"Writers":{"version":0,"mod_policy":"Admins","policy":{"type":"IMPLICIT_META","policy":{"sub_policy":"Writers","rule":"ANY"}}}},"mod_policy":""}},"last_update":{"payload":{"header":{"channel_header":{"type":"CONFIG_UPDATE","version":2,"timestamp":"Thu Sep 28 2017 10:11:05 GMT+0800 (CST)","channel_id":"mychannel1","tx_id":"9276c884f36cbd751acc38ca21219c741b936702246c2bdb13821d0199ae5193","epoch":0,"extension":{"type":"Buffer","data":[]}},"signature_header":{"creator":{"Mspid":"Org1MSP","IdBytes":"-----BEGIN CERTIFICATE-----\nMIICGDCCAb+gAwIBAgIQcSoGCOGOr4YBmSoZf3+xKDAKBggqhkjOPQQDAjBzMQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu\nb3JnMS5leGFtcGxlLmNvbTAeFw0xNzA3MTUwMjA2MzZaFw0yNzA3MTMwMjA2MzZa\nMFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T\nYW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZBZG1pbkBvcmcxLmV4YW1wbGUuY29tMFkw\nEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9ShZ73kVS0lIvaRV7eLhZaokkD1WAJ9i\n/A7Q+Wo4EmVjFE5Q+zxQ8XdYf+c3Qb/oujc4DBWoBfyu5h0CGmJ4TKNNMEswDgYD\nVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAge6hctPp8Ssm+\nTGXjjrrMd9qmboKo+htQUvaMtAEs1jkwCgYIKoZIzj0EAwIDRwAwRAIgAynT6AFB\n3cyecXoI8jpT1PYLxLlQDYtIKzLy9wLwpgoCICxT8Zkq2F8phZ7LDnpKmqELIAsW\nPFzJ3ihODDc6GqCk\n-----END CERTIFICATE-----\n"},"nonce":{"type":"Buffer","data":[43,139,71,235,5,13,93,235,212,213,247,31,150,236,178,78,32,5,207,37,120,72,141,63]}}},"data":{"config_update":{"channel_id":"mychannel1","read_set":{"version":0,"groups":{"Application":{"version":0,"groups":{"Org1MSP":{"version":0,"groups":{},"values":{},"policies":{},"mod_policy":""},"Org2MSP":{"version":0,"groups":{},"values":{},"policies":{},"mod_policy":""}},"values":{},"policies":{},"mod_policy":""}},"values":{"Consortium":{"version":0,"mod_policy":"","value":{"name":"SampleConsortium"}}},"policies":{},"mod_policy":""},"write_set":{"version":0,"groups":{"Application":{"version":1,"groups":{"Org1MSP":{"version":0,"groups":{},"values":{},"policies":{},"mod_policy":""},"Org2MSP":{"version":0,"groups":{},"values":{},"policies":{},"mod_policy":""}},"values":{},"policies":{"Admins":{"version":0,"mod_policy":"","policy":{"type":"IMPLICIT_META","policy":{"sub_policy":"Admins","rule":"MAJORITY"}}},"Writers":{"version":0,"mod_policy":"","policy":{"type":"IMPLICIT_META","policy":{"sub_policy":"Writers","rule":"ANY"}}},"Readers":{"version":0,"mod_policy":"","policy":{"type":"IMPLICIT_META","policy":{"sub_policy":"Readers","rule":"ANY"}}}},"mod_policy":"Admins"}},"values":{"Consortium":{"version":0,"mod_policy":"","value":{"name":"SampleConsortium"}}},"policies":{},"mod_policy":""}},"signatures":[{"signature_header":{"creator":{"Mspid":"Org1MSP","IdBytes":"-----BEGIN CERTIFICATE-----\nMIICGDCCAb+gAwIBAgIQcSoGCOGOr4YBmSoZf3+xKDAKBggqhkjOPQQDAjBzMQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu\nb3JnMS5leGFtcGxlLmNvbTAeFw0xNzA3MTUwMjA2MzZaFw0yNzA3MTMwMjA2MzZa\nMFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T\nYW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZBZG1pbkBvcmcxLmV4YW1wbGUuY29tMFkw\nEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9ShZ73kVS0lIvaRV7eLhZaokkD1WAJ9i\n/A7Q+Wo4EmVjFE5Q+zxQ8XdYf+c3Qb/oujc4DBWoBfyu5h0CGmJ4TKNNMEswDgYD\nVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAge6hctPp8Ssm+\nTGXjjrrMd9qmboKo+htQUvaMtAEs1jkwCgYIKoZIzj0EAwIDRwAwRAIgAynT6AFB\n3cyecXoI8jpT1PYLxLlQDYtIKzLy9wLwpgoCICxT8Zkq2F8phZ7LDnpKmqELIAsW\nPFzJ3ihODDc6GqCk\n-----END CERTIFICATE-----\n"},"nonce":{"type":"Buffer","data":[22,72,248,96,183,237,7,68,93,154,2,218,248,1,10,72,92,24,175,210,127,226,60,255]}},"sigature":{"type":"Buffer","data":[48,67,2,32,76,141,129,192,143,172,36,250,136,141,92,185,150,174,60,106,161,60,194,82,63,190,130,225,187,211,196,74,172,222,7,181,2,31,104,149,126,161,206,128,183,254,57,136,143,189,93,217,140,188,221,169,220,102,234,154,223,8,132,60,85,149,152,21,192]}}]}},"signature":{"type":"Buffer","data":[48,69,2,33,0,146,151,131,117,5,81,236,2,113,198,126,10,4,91,110,90,89,12,245,161,219,154,222,102,194,47,98,6,141,88,177,110,2,32,114,169,151,5,216,117,124,89,52,10,76,238,177,136,201,71,203,162,140,198,64,72,43,159,111,155,224,84,48,145,214,197]}}}}}]},"metadata":{"metadata":[{"value":"","signatures":[]},{"value":{"index":{"low":0,"high":0,"unsigned":true}},"signatures":[]},[]]}}

&lt;/code&gt;&lt;/pre&gt;
&lt;ul style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px; padding-left: 2em;"&gt;
&lt;li style="box-sizing: border-box;"&gt;Query Get Transaction by Transaction ID&lt;/li&gt;
&lt;/ul&gt;
&lt;pre style="background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; line-height: inherit; margin: 0px; overflow: visible; padding: 0px; word-break: normal; word-wrap: normal;"&gt;
http://localhost:8080/apis/channels/:channeName/transactions/:txid?peer=peer1

example:

http://localhost:8080/apis/channels/mychannel1/transactions/a19085e35ecb78a83cd2ae6762ae46c0924c765e16d6e5afc51492b522e0ceca?peer=peer1

returns:

{"validationCode":0,"transactionEnvelope":{"signature":{"type":"Buffer","data":[48,69,2,33,0,149,175,192,18,254,216,10,188,108,248,48,93,94,245,76,116,24,110,82,229,117,109,116,114,63,62,73,110,82,242,11,121,2,32,24,221,131,22,192,165,150,133,71,69,13,163,170,41,169,129,17,79,150,20,30,231,45,97,243,253,174,195,166,56,235,227]},"payload":{"header":{"channel_header":{"type":"ENDORSER_TRANSACTION","version":3,"timestamp":"Thu Sep 28 2017 10:11:26 GMT+0800 (CST)","channel_id":"mychannel1","tx_id":"a19085e35ecb78a83cd2ae6762ae46c0924c765e16d6e5afc51492b522e0ceca","epoch":0,"extension":{"type":"Buffer","data":[18,6,18,4,108,115,99,99]}},"signature_header":{"creator":{"Mspid":"Org1MSP","IdBytes":"-----BEGIN CERTIFICATE-----\nMIICGDCCAb+gAwIBAgIQcSoGCOGOr4YBmSoZf3+xKDAKBggqhkjOPQQDAjBzMQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu\nb3JnMS5leGFtcGxlLmNvbTAeFw0xNzA3MTUwMjA2MzZaFw0yNzA3MTMwMjA2MzZa\nMFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T\nYW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZBZG1pbkBvcmcxLmV4YW1wbGUuY29tMFkw\nEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9ShZ73kVS0lIvaRV7eLhZaokkD1WAJ9i\n/A7Q+Wo4EmVjFE5Q+zxQ8XdYf+c3Qb/oujc4DBWoBfyu5h0CGmJ4TKNNMEswDgYD\nVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAge6hctPp8Ssm+\nTGXjjrrMd9qmboKo+htQUvaMtAEs1jkwCgYIKoZIzj0EAwIDRwAwRAIgAynT6AFB\n3cyecXoI8jpT1PYLxLlQDYtIKzLy9wLwpgoCICxT8Zkq2F8phZ7LDnpKmqELIAsW\nPFzJ3ihODDc6GqCk\n-----END CERTIFICATE-----\n"},"nonce":{"type":"Buffer","data":[1,179,210,163,179,35,107,187,114,229,11,173,206,227,107,62,86,88,80,58,62,145,165,145]}}},"data":{"actions":[{"header":{"creator":{"Mspid":"Org1MSP","IdBytes":"-----BEGIN CERTIFICATE-----\nMIICGDCCAb+gAwIBAgIQcSoGCOGOr4YBmSoZf3+xKDAKBggqhkjOPQQDAjBzMQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu\nb3JnMS5leGFtcGxlLmNvbTAeFw0xNzA3MTUwMjA2MzZaFw0yNzA3MTMwMjA2MzZa\nMFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T\nYW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZBZG1pbkBvcmcxLmV4YW1wbGUuY29tMFkw\nEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9ShZ73kVS0lIvaRV7eLhZaokkD1WAJ9i\n/A7Q+Wo4EmVjFE5Q+zxQ8XdYf+c3Qb/oujc4DBWoBfyu5h0CGmJ4TKNNMEswDgYD\nVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAge6hctPp8Ssm+\nTGXjjrrMd9qmboKo+htQUvaMtAEs1jkwCgYIKoZIzj0EAwIDRwAwRAIgAynT6AFB\n3cyecXoI8jpT1PYLxLlQDYtIKzLy9wLwpgoCICxT8Zkq2F8phZ7LDnpKmqELIAsW\nPFzJ3ihODDc6GqCk\n-----END CERTIFICATE-----\n"},"nonce":{"type":"Buffer","data":[1,179,210,163,179,35,107,187,114,229,11,173,206,227,107,62,86,88,80,58,62,145,165,145]}},"payload":{"chaincode_proposal_payload":{"input":{"type":"Buffer","data":[10,122,8,1,18,6,18,4,108,115,99,99,26,110,10,6,100,101,112,108,111,121,10,10,109,121,99,104,97,110,110,101,108,49,10,26,10,24,8,1,18,10,18,4,109,121,99,99,26,2,118,48,26,8,10,4,105,110,105,116,10,0,10,60,18,16,18,14,8,1,18,2,8,0,18,2,8,1,18,2,8,2,26,14,18,12,10,10,79,114,100,101,114,101,114,77,83,80,26,11,18,9,10,7,79,114,103,49,77,83,80,26,11,18,9,10,7,79,114,103,50,77,83,80]}},"action":{"proposal_response_payload":{"proposal_hash":"9b247c653f3e92ec6f58dde261dfee3511627a1af2964813825edeb88df3c06f","extension":{"results":{"data_model":0,"ns_rwset":[{"namespace":"lscc","rwset":{"reads":[{"key":"mycc","version":null}],"range_queries_info":[],"writes":[{"key":"mycc","is_delete":false,"value":"\n\u0004mycc\u0012\u0002v0\u001a\u0004escc\"\u0004vscc*&amp;lt;\u0012\u0010\u0012\u000e\b\u0001\u0012\u0002\b\u0000\u0012\u0002\b\u0001\u0012\u0002\b\u0002\u001a\u000e\u0012\f\n\nOrdererMSP\u001a\u000b\u0012\t\n\u0007Org1MSP\u001a\u000b\u0012\t\n\u0007Org2MSP2D\n �jO������Cgt��\u0000S ��\u0012��!�-�\u0001u6���\u0012 *PI�w�\u000fjL5x6^�E=�)ˡF��\t\u0019\u0015��C5\u00115: \u001a�[$�\u001f�\u0013؉]�R74\u001fGƆ2��+�5.�z��G�B,\u0012\f\u0012\n\b\u0001\u0012\u0002\b\u0000\u0012\u0002\b\u0001\u001a\r\u0012\u000b\n\u0007Org1MSP\u0010\u0001\u001a\r\u0012\u000b\n\u0007Org2MSP\u0010\u0001"}]}}]},"events":{"chaincode_id":"","tx_id":"","event_name":"","payload":{"type":"Buffer","data":[]}},"response":{"status":200,"message":"","payload":"\n\u0004mycc\u0012\u0002v0\u001a\u0004escc\"\u0004vscc*&amp;lt;\u0012\u0010\u0012\u000e\b\u0001\u0012\u0002\b\u0000\u0012\u0002\b\u0001\u0012\u0002\b\u0002\u001a\u000e\u0012\f\n\nOrdererMSP\u001a\u000b\u0012\t\n\u0007Org1MSP\u001a\u000b\u0012\t\n\u0007Org2MSP2D\n �jO������Cgt��\u0000S ��\u0012��!�-�\u0001u6���\u0012 *PI�w�\u000fjL5x6^�E=�)ˡF��\t\u0019\u0015��C5\u00115: \u001a�[$�\u001f�\u0013؉]�R74\u001fGƆ2��+�5.�z��G�B,\u0012\f\u0012\n\b\u0001\u0012\u0002\b\u0000\u0012\u0002\b\u0001\u001a\r\u0012\u000b\n\u0007Org1MSP\u0010\u0001\u001a\r\u0012\u000b\n\u0007Org2MSP\u0010\u0001"}}},"endorsements":[{"endorser":{"Mspid":"Org1MSP","IdBytes":"-----BEGIN -----\nMIICGDCCAb+gAwIBAgIQXORLj+M+bZmvRJoszFNTLzAKBggqhkjOPQQDAjBzMQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu\nb3JnMS5leGFtcGxlLmNvbTAeFw0xNzA3MTUwMjA2MzZaFw0yNzA3MTMwMjA2MzZa\nMFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T\nYW4gRnJhbmNpc2NvMR8wHQYDVQQDExZwZWVyMC5vcmcxLmV4YW1wbGUuY29tMFkw\nEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEqx9TvzAVDCYkcI7PolGydUptHN4s59n5\nPlWCCYNLkLvfHZRSYlZV+ZtEJTJuVsS+0cFe9mK4no8DsESvKy3fFqNNMEswDgYD\nVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAge6hctPp8Ssm+\nTGXjjrrMd9qmboKo+htQUvaMtAEs1jkwCgYIKoZIzj0EAwIDRwAwRAIgdHMM2mnd\nCYQg7tNXlxCeeCXimerCBZI2c0Jq79Pi3X8CIA5AN0pyIuDnl05c7sugzpYtMoKq\nZPNHf5DiHsG9Ddx0\n-----END -----\n"},"signature":{"type":"Buffer","data":[48,68,2,32,44,155,59,238,100,189,209,112,135,105,125,202,163,152,90,6,77,93,239,73,128,22,42,225,191,212,145,34,216,178,184,18,2,32,122,82,29,77,119,60,169,203,52,136,35,193,44,155,134,75,107,69,32,137,251,170,97,0,88,236,253,78,153,184,246,22]}},{"endorser":{"Mspid":"Org1MSP","IdBytes":"-----BEGIN -----\nMIICGDCCAb+gAwIBAgIQR6SpGhVy3iGFbuqxW/UmgjAKBggqhkjOPQQDAjBzMQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu\nb3JnMS5leGFtcGxlLmNvbTAeFw0xNzA3MTUwMjA2MzZaFw0yNzA3MTMwMjA2MzZa\nMFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T\nYW4gRnJhbmNpc2NvMR8wHQYDVQQDExZwZWVyMS5vcmcxLmV4YW1wbGUuY29tMFkw\nEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE8lS4rakieycXrWvkqpitrL1BOtTpB8d+\nrIQd1Dq0851vTwFtKOGM+/AyZj3YFmPquLyjh+Y/f8gEOhl2ukbxaKNNMEswDgYD\nVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAge6hctPp8Ssm+\nTGXjjrrMd9qmboKo+htQUvaMtAEs1jkwCgYIKoZIzj0EAwIDRwAwRAIgdNm6ogr4\nh5IOGqgxvxKQIgcVotBWSE22ienKZMxaMsACICH02+7VWNGoegJIxh3uSbSxczUd\nkIq+MzhhkpPKGly7\n-----END -----\n"},"signature":{"type":"Buffer","data":[48,69,2,33,0,175,157,205,24,107,173,2,11,115,93,222,233,81,233,62,154,58,80,174,140,163,75,69,134,90,10,6,208,190,197,97,64,2,32,85,188,87,232,107,88,209,230,47,166,33,55,144,122,127,96,254,233,232,126,135,142,197,32,244,185,161,153,55,158,145,53]}}]}}}]}}}}

&lt;/code&gt;&lt;/pre&gt;
&lt;ul style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px; padding-left: 2em;"&gt;
&lt;li style="box-sizing: border-box;"&gt;Query Get Block by BlockNumber&lt;/li&gt;
&lt;/ul&gt;
&lt;pre style="background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; line-height: inherit; margin: 0px; overflow: visible; padding: 0px; word-break: normal; word-wrap: normal;"&gt;http://localhost:8080/apis/channels/:channelName/blocks/:blockNumber?peer=peer1

example:

http://localhost:8080/apis/channels/mychannel1/blocks/1?peer=peer1

returns:

{"header":{"number":{"low":1,"high":0,"unsigned":true},"previous_hash":"17edcc4ab8dbac1bca83d4108a24cb7708f1305c09df0908e90399df665a462d","data_hash":"5d0ce069c0d1832a1860459293573d1b16fda1504a94718840e6a4531f2933c4"},"data":{"data":[{"signature":{"type":"Buffer","data":[48,69,2,33,0,149,175,192,18,254,216,10,188,108,248,48,93,94,245,76,116,24,110,82,229,117,109,116,114,63,62,73,110,82,242,11,121,2,32,24,221,131,22,192,165,150,133,71,69,13,163,170,41,169,129,17,79,150,20,30,231,45,97,243,253,174,195,166,56,235,227]},"payload":{"header":{"channel_header":{"type":"ENDORSER_TRANSACTION","version":3,"timestamp":"Thu Sep 28 2017 10:11:26 GMT+0800 (CST)","channel_id":"mychannel1","tx_id":"a19085e35ecb78a83cd2ae6762ae46c0924c765e16d6e5afc51492b522e0ceca","epoch":0,"extension":{"type":"Buffer","data":[18,6,18,4,108,115,99,99]}},"signature_header":{"creator":{"Mspid":"Org1MSP","IdBytes":"-----BEGIN CERTIFICATE-----\nMIICGDCCAb+gAwIBAgIQcSoGCOGOr4YBmSoZf3+xKDAKBggqhkjOPQQDAjBzMQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu\nb3JnMS5leGFtcGxlLmNvbTAeFw0xNzA3MTUwMjA2MzZaFw0yNzA3MTMwMjA2MzZa\nMFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T\nYW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZBZG1pbkBvcmcxLmV4YW1wbGUuY29tMFkw\nEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9ShZ73kVS0lIvaRV7eLhZaokkD1WAJ9i\n/A7Q+Wo4EmVjFE5Q+zxQ8XdYf+c3Qb/oujc4DBWoBfyu5h0CGmJ4TKNNMEswDgYD\nVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAge6hctPp8Ssm+\nTGXjjrrMd9qmboKo+htQUvaMtAEs1jkwCgYIKoZIzj0EAwIDRwAwRAIgAynT6AFB\n3cyecXoI8jpT1PYLxLlQDYtIKzLy9wLwpgoCICxT8Zkq2F8phZ7LDnpKmqELIAsW\nPFzJ3ihODDc6GqCk\n-----END CERTIFICATE-----\n"},"nonce":{"type":"Buffer","data":[1,179,210,163,179,35,107,187,114,229,11,173,206,227,107,62,86,88,80,58,62,145,165,145]}}},"data":{"actions":[{"header":{"creator":{"Mspid":"Org1MSP","IdBytes":"-----BEGIN CERTIFICATE-----\nMIICGDCCAb+gAwIBAgIQcSoGCOGOr4YBmSoZf3+xKDAKBggqhkjOPQQDAjBzMQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu\nb3JnMS5leGFtcGxlLmNvbTAeFw0xNzA3MTUwMjA2MzZaFw0yNzA3MTMwMjA2MzZa\nMFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T\nYW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZBZG1pbkBvcmcxLmV4YW1wbGUuY29tMFkw\nEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9ShZ73kVS0lIvaRV7eLhZaokkD1WAJ9i\n/A7Q+Wo4EmVjFE5Q+zxQ8XdYf+c3Qb/oujc4DBWoBfyu5h0CGmJ4TKNNMEswDgYD\nVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAge6hctPp8Ssm+\nTGXjjrrMd9qmboKo+htQUvaMtAEs1jkwCgYIKoZIzj0EAwIDRwAwRAIgAynT6AFB\n3cyecXoI8jpT1PYLxLlQDYtIKzLy9wLwpgoCICxT8Zkq2F8phZ7LDnpKmqELIAsW\nPFzJ3ihODDc6GqCk\n-----END CERTIFICATE-----\n"},"nonce":{"type":"Buffer","data":[1,179,210,163,179,35,107,187,114,229,11,173,206,227,107,62,86,88,80,58,62,145,165,145]}},"payload":{"chaincode_proposal_payload":{"input":{"type":"Buffer","data":[10,122,8,1,18,6,18,4,108,115,99,99,26,110,10,6,100,101,112,108,111,121,10,10,109,121,99,104,97,110,110,101,108,49,10,26,10,24,8,1,18,10,18,4,109,121,99,99,26,2,118,48,26,8,10,4,105,110,105,116,10,0,10,60,18,16,18,14,8,1,18,2,8,0,18,2,8,1,18,2,8,2,26,14,18,12,10,10,79,114,100,101,114,101,114,77,83,80,26,11,18,9,10,7,79,114,103,49,77,83,80,26,11,18,9,10,7,79,114,103,50,77,83,80]}},"action":{"proposal_response_payload":{"proposal_hash":"9b247c653f3e92ec6f58dde261dfee3511627a1af2964813825edeb88df3c06f","extension":{"results":{"data_model":0,"ns_rwset":[{"namespace":"lscc","rwset":{"reads":[{"key":"mycc","version":null}],"range_queries_info":[],"writes":[{"key":"mycc","is_delete":false,"value":"\n\u0004mycc\u0012\u0002v0\u001a\u0004escc\"\u0004vscc*&amp;lt;\u0012\u0010\u0012\u000e\b\u0001\u0012\u0002\b\u0000\u0012\u0002\b\u0001\u0012\u0002\b\u0002\u001a\u000e\u0012\f\n\nOrdererMSP\u001a\u000b\u0012\t\n\u0007Org1MSP\u001a\u000b\u0012\t\n\u0007Org2MSP2D\n �jO������Cgt��\u0000S ��\u0012��!�-�\u0001u6���\u0012 *PI�w�\u000fjL5x6^�E=�)ˡF��\t\u0019\u0015��C5\u00115: \u001a�[$�\u001f�\u0013؉]�R74\u001fGƆ2��+�5.�z��G�B,\u0012\f\u0012\n\b\u0001\u0012\u0002\b\u0000\u0012\u0002\b\u0001\u001a\r\u0012\u000b\n\u0007Org1MSP\u0010\u0001\u001a\r\u0012\u000b\n\u0007Org2MSP\u0010\u0001"}]}}]},"events":{"chaincode_id":"","tx_id":"","event_name":"","payload":{"type":"Buffer","data":[]}},"response":{"status":200,"message":"","payload":"\n\u0004mycc\u0012\u0002v0\u001a\u0004escc\"\u0004vscc*&amp;lt;\u0012\u0010\u0012\u000e\b\u0001\u0012\u0002\b\u0000\u0012\u0002\b\u0001\u0012\u0002\b\u0002\u001a\u000e\u0012\f\n\nOrdererMSP\u001a\u000b\u0012\t\n\u0007Org1MSP\u001a\u000b\u0012\t\n\u0007Org2MSP2D\n �jO������Cgt��\u0000S ��\u0012��!�-�\u0001u6���\u0012 *PI�w�\u000fjL5x6^�E=�)ˡF��\t\u0019\u0015��C5\u00115: \u001a�[$�\u001f�\u0013؉]�R74\u001fGƆ2��+�5.�z��G�B,\u0012\f\u0012\n\b\u0001\u0012\u0002\b\u0000\u0012\u0002\b\u0001\u001a\r\u0012\u000b\n\u0007Org1MSP\u0010\u0001\u001a\r\u0012\u000b\n\u0007Org2MSP\u0010\u0001"}}},"endorsements":[{"endorser":{"Mspid":"Org1MSP","IdBytes":"-----BEGIN -----\nMIICGDCCAb+gAwIBAgIQXORLj+M+bZmvRJoszFNTLzAKBggqhkjOPQQDAjBzMQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu\nb3JnMS5leGFtcGxlLmNvbTAeFw0xNzA3MTUwMjA2MzZaFw0yNzA3MTMwMjA2MzZa\nMFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T\nYW4gRnJhbmNpc2NvMR8wHQYDVQQDExZwZWVyMC5vcmcxLmV4YW1wbGUuY29tMFkw\nEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEqx9TvzAVDCYkcI7PolGydUptHN4s59n5\nPlWCCYNLkLvfHZRSYlZV+ZtEJTJuVsS+0cFe9mK4no8DsESvKy3fFqNNMEswDgYD\nVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAge6hctPp8Ssm+\nTGXjjrrMd9qmboKo+htQUvaMtAEs1jkwCgYIKoZIzj0EAwIDRwAwRAIgdHMM2mnd\nCYQg7tNXlxCeeCXimerCBZI2c0Jq79Pi3X8CIA5AN0pyIuDnl05c7sugzpYtMoKq\nZPNHf5DiHsG9Ddx0\n-----END -----\n"},"signature":{"type":"Buffer","data":[48,68,2,32,44,155,59,238,100,189,209,112,135,105,125,202,163,152,90,6,77,93,239,73,128,22,42,225,191,212,145,34,216,178,184,18,2,32,122,82,29,77,119,60,169,203,52,136,35,193,44,155,134,75,107,69,32,137,251,170,97,0,88,236,253,78,153,184,246,22]}},{"endorser":{"Mspid":"Org1MSP","IdBytes":"-----BEGIN -----\nMIICGDCCAb+gAwIBAgIQR6SpGhVy3iGFbuqxW/UmgjAKBggqhkjOPQQDAjBzMQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu\nb3JnMS5leGFtcGxlLmNvbTAeFw0xNzA3MTUwMjA2MzZaFw0yNzA3MTMwMjA2MzZa\nMFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T\nYW4gRnJhbmNpc2NvMR8wHQYDVQQDExZwZWVyMS5vcmcxLmV4YW1wbGUuY29tMFkw\nEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE8lS4rakieycXrWvkqpitrL1BOtTpB8d+\nrIQd1Dq0851vTwFtKOGM+/AyZj3YFmPquLyjh+Y/f8gEOhl2ukbxaKNNMEswDgYD\nVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAge6hctPp8Ssm+\nTGXjjrrMd9qmboKo+htQUvaMtAEs1jkwCgYIKoZIzj0EAwIDRwAwRAIgdNm6ogr4\nh5IOGqgxvxKQIgcVotBWSE22ienKZMxaMsACICH02+7VWNGoegJIxh3uSbSxczUd\nkIq+MzhhkpPKGly7\n-----END -----\n"},"signature":{"type":"Buffer","data":[48,69,2,33,0,175,157,205,24,107,173,2,11,115,93,222,233,81,233,62,154,58,80,174,140,163,75,69,134,90,10,6,208,190,197,97,64,2,32,85,188,87,232,107,88,209,230,47,166,33,55,144,122,127,96,254,233,232,126,135,142,197,32,244,185,161,153,55,158,145,53]}}]}}}]}}}]},"metadata":{"metadata":[{"value":"","signatures":[{"signature_header":{"creator":{"Mspid":"OrdererMSP","IdBytes":"-----BEGIN -----\nMIICDjCCAbSgAwIBAgIRAL3LhCHP9JqZHZZ7b9ySDv4wCgYIKoZIzj0EAwIwaTEL\nMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG\ncmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFt\ncGxlLmNvbTAeFw0xNzA3MTUwMjA2MzZaFw0yNzA3MTMwMjA2MzZaMFkxCzAJBgNV\nBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNp\nc2NvMR0wGwYDVQQDExRvcmRlcmVyMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEG\nCCqGSM49AwEHA0IABJ03AFAenfTyKuUizftsgDoCSehL8Rq4P1aOZcWB9Vyc++wL\nVtLLRwY6KxsVXjWxWulB0ZTtB6eo87YZK+NTzrOjTTBLMA4GA1UdDwEB/wQEAwIH\ngDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIK5UyPy5CEnmLHYxFr/X2clqaUsw\nbq/ZDXsldo5VCZFbMAoGCCqGSM49BAMCA0gAMEUCIQDJTrQshJZisDFc6P8dQk+6\n1g/mMk9Ca5O7NCtRkZVk2gIgN/hhNZUgrn9R2IKUDkTkJYJNXxufE+50XW/73GAU\n+VE=\n-----END -----\n"},"nonce":{"type":"Buffer","data":[221,219,25,77,4,161,236,90,80,83,195,131,16,249,199,42,225,136,101,48,237,211,172,31]}},"signature":{"type":"Buffer","data":[48,69,2,33,0,232,219,57,242,62,100,183,208,105,96,73,9,233,92,96,78,19,242,46,152,93,100,11,227,145,148,90,66,145,188,128,148,2,32,70,185,2,84,194,105,13,44,254,10,154,56,69,114,115,230,70,80,182,235,30,204,220,151,250,40,182,196,11,45,104,68]}}]},{"value":{"index":{"low":0,"high":0,"unsigned":true}},"signatures":[{"signature_header":{"creator":{"Mspid":"OrdererMSP","IdBytes":"-----BEGIN -----\nMIICDjCCAbSgAwIBAgIRAL3LhCHP9JqZHZZ7b9ySDv4wCgYIKoZIzj0EAwIwaTEL\nMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG\ncmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFt\ncGxlLmNvbTAeFw0xNzA3MTUwMjA2MzZaFw0yNzA3MTMwMjA2MzZaMFkxCzAJBgNV\nBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNp\nc2NvMR0wGwYDVQQDExRvcmRlcmVyMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEG\nCCqGSM49AwEHA0IABJ03AFAenfTyKuUizftsgDoCSehL8Rq4P1aOZcWB9Vyc++wL\nVtLLRwY6KxsVXjWxWulB0ZTtB6eo87YZK+NTzrOjTTBLMA4GA1UdDwEB/wQEAwIH\ngDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIK5UyPy5CEnmLHYxFr/X2clqaUsw\nbq/ZDXsldo5VCZFbMAoGCCqGSM49BAMCA0gAMEUCIQDJTrQshJZisDFc6P8dQk+6\n1g/mMk9Ca5O7NCtRkZVk2gIgN/hhNZUgrn9R2IKUDkTkJYJNXxufE+50XW/73GAU\n+VE=\n-----END -----\n"},"nonce":{"type":"Buffer","data":[102,198,192,148,105,195,95,35,227,159,243,46,170,54,139,206,1,178,202,106,101,138,20,40]}},"signature":{"type":"Buffer","data":[48,68,2,32,103,165,68,221,214,173,63,247,51,103,89,78,203,4,88,195,138,195,24,208,187,42,18,130,85,77,113,53,21,236,98,58,2,32,69,74,193,231,116,52,159,94,196,191,0,46,249,45,15,78,164,60,74,242,92,200,149,185,113,241,175,7,13,200,228,142]}}]},[]]}}

&lt;/code&gt;&lt;/pre&gt;
&lt;ul style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px; padding-left: 2em;"&gt;
&lt;li style="box-sizing: border-box;"&gt;Query on chaincode on target peers&lt;/li&gt;
&lt;/ul&gt;
&lt;pre style="background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; line-height: inherit; margin: 0px; overflow: visible; padding: 0px; word-break: normal; word-wrap: normal;"&gt;http://localhost:8080/apis/channels/:channelName/chaincodes/:chaincodeName?peer=peer1&amp;amp;fcn=:fcn&amp;amp;args=:args

example:

http://localhost:8080/apis/channels/mychannel1/chaincodes/mycc?peer=peer1&amp;amp;fcn=get&amp;amp;args=%5B%22org2%22%5D

returns:

putsomerandomvalue-org2

&lt;/code&gt;&lt;/pre&gt;
&lt;ul style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px; padding-left: 2em;"&gt;
&lt;li style="box-sizing: border-box;"&gt;Invoke transaction on chaincode on target peers&lt;/li&gt;
&lt;/ul&gt;
&lt;pre style="background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; line-height: inherit; margin: 0px; overflow: visible; padding: 0px; word-break: normal; word-wrap: normal;"&gt;curl -s -X POST \
 http://localhost:8080/apis/channels/:channelName/chaincodes/:chaincodeName \
 -H "content-type: application/json" \
 -d '{
 "peers": ["127.0.0.1:7051", "127.0.0.1:8051"],
 "fcn":"put",
 "args":["org1","putsomerandomvalue-org1"]
}'

example:

curl -s -X POST \
 http://localhost:8080/apis/channels/mychannel1/chaincodes/mycc \
 -H "content-type: application/json" \
 -d '{
 "peers": ["127.0.0.1:7051", "127.0.0.1:8051"],
 "fcn":"put",
 "args":["org1","putsomerandomvalue-org1"]
}'


returns txid:

423d0a22c07cd577d6f7f32bd02cd7ed5989baa11b08abcc714077a3a7e9eefe

&lt;/code&gt;&lt;/pre&gt;
&lt;ul style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px; padding-left: 2em;"&gt;
&lt;li style="box-sizing: border-box;"&gt;Instantiate chaincode on target peers&lt;/li&gt;
&lt;/ul&gt;
&lt;pre style="background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; line-height: inherit; margin: 0px; overflow: visible; padding: 0px; word-break: normal; word-wrap: normal;"&gt;curl -s -X POST \
  http://localhost:8080/apis/channels/:channelName/chaincodes \
  -H "content-type: application/json" \
  -d '{
 "chaincodeName":"mycc",
 "chaincodeVersion":"v0",
 "functionName":"init",
 "args":[""]
}'

example:

curl -s -X POST \
  http://localhost:8080/apis/channels/mychannel1/chaincodes \
  -H "content-type: application/json" \
  -d '{
 "chaincodeName":"mycc",
 "chaincodeVersion":"v0",
 "functionName":"init",
 "args":[""]
}'

&lt;/code&gt;&lt;/pre&gt;
&lt;ul style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px; padding-left: 2em;"&gt;
&lt;li style="box-sizing: border-box;"&gt;Install chaincode on target peers&lt;/li&gt;
&lt;/ul&gt;
&lt;pre style="background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; line-height: inherit; margin: 0px; overflow: visible; padding: 0px; word-break: normal; word-wrap: normal;"&gt;example:

curl -s -X POST \
  http://localhost:8080/apis/chaincodes \
  -H "content-type: application/json" \
  -d '{
 "peers": ["127.0.0.1:7051","127.0.0.1:8051"],
 "chaincodeName":"mycc",
 "chaincodePath":"github.com/uniqueKeyValue",
 "chaincodeVersion":"v0"
}'

&lt;/code&gt;&lt;/pre&gt;
&lt;ul style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px; padding-left: 2em;"&gt;
&lt;li style="box-sizing: border-box;"&gt;Join Channel&lt;/li&gt;
&lt;/ul&gt;
&lt;pre style="background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; line-height: inherit; margin: 0px; overflow: visible; padding: 0px; word-break: normal; word-wrap: normal;"&gt;curl -s -X POST \
  http://localhost:8080/apis/channels/:channelName/peers \
  -H "content-type: application/json" \
  -d '{
 "peers": ["127.0.0.1:7051","127.0.0.1:8051"]
}'

example:

curl -s -X POST \
  http://localhost:8080/apis/channels/mychannel1/peers \
  -H "content-type: application/json" \
  -d '{
 "peers": ["127.0.0.1:7051","127.0.0.1:8051"]
}'

&lt;/code&gt;&lt;/pre&gt;
&lt;ul style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px; padding-left: 2em;"&gt;
&lt;li style="box-sizing: border-box;"&gt;Create/Update Channel&lt;/li&gt;
&lt;/ul&gt;
&lt;pre style="background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; line-height: 1.45; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 13.6px; line-height: inherit; margin: 0px; overflow: visible; padding: 0px; word-break: normal; word-wrap: normal;"&gt;
example:

curl -s -X POST \
  http://localhost:8080/apis/channels \
  -H "content-type: application/json" \
  -d '{
 "channelName":"mychannel1",
 "channelConfigPath":"../artifacts/channel/mychannel1.tx",
 "configUpdate":false
}'&lt;/code&gt;&lt;/pre&gt;
&lt;span style="color: #24292e;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #24292e; font-size: 16px;"&gt;Courtesy:&amp;nbsp;&lt;/span&gt;&lt;span style="color: #24292e;"&gt;https://github.com/hyperledger/blockchain-explorer&lt;/span&gt;&lt;ul style="box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px; padding-left: 2em;"&gt;
&lt;/ul&gt;
</description><link>http://page.farhad.pw/2017/12/hyperledgerblockchain-explorer-sample.html</link><author>noreply@blogger.com (Farhad)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1026424054105678970.post-7922356234347914855</guid><pubDate>Wed, 06 Dec 2017 11:02:00 +0000</pubDate><atom:updated>2017-12-06T17:02:06.990+06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">BlockChain</category><category domain="http://www.blogger.com/atom/ns#">Cryptocurrency</category><category domain="http://www.blogger.com/atom/ns#">HyperLedger</category><title>How to Setup the Hyperledger Fabric-ca Client Setup on Ubuntu 16.04 - Part 3</title><description>&lt;h2 class="section-title" style="background-color: white; box-sizing: border-box; color: #333333; font-family: Raleway, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 1.8em; font-weight: 400; line-height: 1.1; margin: 0px 0px 0.67em;"&gt;
How to Setup the Hyperledger Fabric-ca Client Setup on Ubuntu 16.04 - Part 3&lt;/h2&gt;
&lt;div class="divider-light" style="background-color: white; box-sizing: border-box; color: #333333; font-family: Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px;"&gt;
&lt;/div&gt;
&lt;div class="page-content" style="background-color: white; box-sizing: border-box; color: #333333; font-family: Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px;"&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
This article is about the steps needed to setup your own CA Server and register/enroll new users into your database. The server provides the public/private key pair as a response to enrolling the user into the database. If you need help to&amp;nbsp;&lt;a href="https://mlgblockchain.com/hyperledger-pre.html" style="background-color: transparent; box-sizing: border-box; color: #555555; text-decoration-line: none; transition: all 0.5s;"&gt;configure the requirements to download Hyperledger&lt;/a&gt;, check out the&amp;nbsp;&lt;a href="https://mlgblockchain.com/hyperledger-pre.html" style="background-color: transparent; box-sizing: border-box; color: #555555; text-decoration-line: none; transition: all 0.5s;"&gt;first article&lt;/a&gt;&amp;nbsp;in this three part tutorial series to&amp;nbsp;&lt;a href="https://mlgblockchain.com/hyperledger-tutorials.html" style="background-color: transparent; box-sizing: border-box; color: #555555; text-decoration-line: none; transition: all 0.5s;"&gt;learn Hyperledger&lt;/a&gt;. If you need help to&amp;nbsp;&lt;a href="https://mlgblockchain.com/setup-hyperledger-fabric.html" style="background-color: transparent; box-sizing: border-box; color: #555555; text-decoration-line: none; transition: all 0.5s;"&gt;set up your Hyperledger server&lt;/a&gt;&amp;nbsp;check out the&amp;nbsp;&lt;a href="https://mlgblockchain.com/setup-hyperledger-fabric.html" style="background-color: transparent; box-sizing: border-box; color: #555555; text-decoration-line: none; transition: all 0.5s;"&gt;second article&lt;/a&gt;&amp;nbsp;in this series.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
Now, that we have our server setup, we want to enroll existing and register new clients to the database. Let’s move on to it.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
Just as we build the fabric-ca-server command in the Fabric-CA directory, we need to do the same for the fabric-ca-client to access commands for the client side. Use the following command in the root directory of your fabric-ca cloned project:&lt;/div&gt;
&lt;code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;make fabric-ca-client&amp;nbsp;&lt;/code&gt;&lt;br style="box-sizing: border-box;" /&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
You should see the output similar to the one mentioned below and should see a new executable in the bin directory of fabric-ca.&lt;/div&gt;
&lt;img alt="Hyperledger Client setup" class="img-responsive" src="https://mlgblockchain.com/assets/img/hyperledger-3/setup.jpg" style="border: 0px; box-sizing: border-box; display: block; height: auto; margin-bottom: 20px; max-height: 300px; max-width: 100%; vertical-align: middle;" /&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
For this part of the tutorial, we use the FABRIC_CA_CLIENT_HOME variable. Please add the following lines to the end of .bashrc file and reload the file too. The lines are:&lt;/div&gt;
&lt;code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;export FABRIC_CA_HOME=~/Documents/Fabric-CA&lt;br style="box-sizing: border-box;" /&gt;export FABRIC_CA_CLIENT_HOME=$FABRIC_CA_HOME/client&lt;/code&gt;&lt;br style="box-sizing: border-box;" /&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
You can initialise the variable with any directory you feel like doing. But, we assume that you have already set your FABRIC_CA_CLIENT_HOME variable for the rest of the tutorial.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
To check, whether your fabric-ca-client is accessible or not, just type:&lt;/div&gt;
&lt;code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;fabric-ca-client&amp;nbsp;&lt;/code&gt;&lt;br style="box-sizing: border-box;" /&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
And you should see a similar output:&lt;/div&gt;
&lt;img alt="Hyperledger Client Output" class="img-responsive" src="https://mlgblockchain.com/assets/img/hyperledger-3/output.jpg" style="border: 0px; box-sizing: border-box; display: block; height: auto; margin-bottom: 20px; max-height: 300px; max-width: 100%; vertical-align: middle;" /&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
Now, we know that from our server configuration, we have an admin user already registered into the database since the start of the server. So, we will use that credentials to enroll our admin user first and retrieve the public/private key pair to be able to register new users afterwards.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
We use the following command:&lt;/div&gt;
&lt;code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;fabric-ca-client enroll -u “http://admin:adminpw@localhost:7054”&amp;nbsp;&lt;/code&gt;&lt;br style="box-sizing: border-box;" /&gt;&lt;br style="box-sizing: border-box;" /&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
The “admin:adminpw” is actually a “username:password” pair which we need to send to localhost:7054, the default server url and port, our server listens to. If everything goes well, you should see the following output:&lt;/div&gt;
&lt;img alt="Hyperledger Client Admin Output" class="img-responsive" src="https://mlgblockchain.com/assets/img/hyperledger-3/admin-output.jpg" style="border: 0px; box-sizing: border-box; display: block; height: auto; margin-bottom: 20px; max-height: 300px; max-width: 100%; vertical-align: middle;" /&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
Now, that we have successfully enrolled the admin user, we have cert.pem (public key) and key.pem (private key) of the user. Also, as we were using this for the first time, we have the config file, fabric-ca-client-config.yaml, in the directory mentioned in the output.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
Let us discuss some important fields in the fabric-ca-client-config.yaml file:&lt;/div&gt;
&lt;ul style="box-sizing: border-box; margin-bottom: 10px; margin-top: 0px; padding-left: 20px;"&gt;
&lt;li style="box-sizing: border-box; font-size: 1em; line-height: 2em;"&gt;The&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: 700;"&gt;“URL”&lt;/span&gt;&amp;nbsp;field defines the default URL to connect to the server. It can be custom specified by the “-u” flag in the fabric-ca-client command.&lt;/li&gt;
&lt;li style="box-sizing: border-box; font-size: 1em; line-height: 2em;"&gt;The&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: 700;"&gt;“TLS”&lt;/span&gt;&amp;nbsp;section defines the tls configuration, required for secure connection to the server and ensure privacy over the internet. But, as we were using localhost in the system, there was no need to tls and so it was disabled by-default.&lt;/li&gt;
&lt;li style="box-sizing: border-box; font-size: 1em; line-height: 2em;"&gt;The&lt;span style="box-sizing: border-box; font-weight: 700;"&gt;“CSR”&lt;/span&gt;&amp;nbsp;field is the “Certificate Signing Request”, which is sent to the server to sign the certificates with the provided details only. By-default, there are some values provided, but can be edited according to the needs.&lt;/li&gt;
&lt;li style="box-sizing: border-box; font-size: 1em; line-height: 2em;"&gt;The&lt;span style="box-sizing: border-box; font-weight: 700;"&gt;“Id”&lt;/span&gt;&amp;nbsp;section defines the defails of a new user we want to register. This field eliminates the need to provide command line arguments as mentioned below in the tutorial. We use command line to ensure no error in the config file.&lt;/li&gt;
&lt;li style="box-sizing: border-box; font-size: 1em; line-height: 2em;"&gt;The&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: 700;"&gt;“Enrollment”&lt;/span&gt;&amp;nbsp;section as defined in the config file, is used to enroll any user with the appropriate details, stored in the server DB.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
Now, we have to create a new user and register it. For that, we need to use the following command:&lt;/div&gt;
&lt;code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;fabric-ca-client register -u “http://localhost:7054” --id.name “mlgblockchain” --id.secret “mlg” --id.type “client” --id.affiliation “org1.department1”&amp;nbsp;&lt;/code&gt;&lt;br style="box-sizing: border-box;" /&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
When you run this command, you should see the following output upon successful execution:&lt;/div&gt;
&lt;img alt="Register User Hyperledger Fabric" class="img-responsive" src="https://mlgblockchain.com/assets/img/hyperledger-3/register.jpg" style="border: 0px; box-sizing: border-box; display: block; height: auto; margin-bottom: 20px; max-height: 300px; max-width: 100%; vertical-align: middle;" /&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
Now, we have registered our new user “mlgblockchain”, with the following values:&lt;/div&gt;
&lt;ul style="box-sizing: border-box; margin-bottom: 10px; margin-top: 0px; padding-left: 20px;"&gt;
&lt;li style="box-sizing: border-box; font-size: 1em; line-height: 2em;"&gt;&lt;span style="box-sizing: border-box; font-weight: 700;"&gt;--id.name&lt;/span&gt;&amp;nbsp;- The name of the user.&lt;/li&gt;
&lt;li style="box-sizing: border-box; font-size: 1em; line-height: 2em;"&gt;&lt;span style="box-sizing: border-box; font-weight: 700;"&gt;--id.secret&lt;/span&gt;&amp;nbsp;- The password for the user to enroll.&lt;/li&gt;
&lt;li style="box-sizing: border-box; font-size: 1em; line-height: 2em;"&gt;&lt;span style="box-sizing: border-box; font-weight: 700;"&gt;--id.affiliation&lt;/span&gt;&amp;nbsp;- The organization and department the user is affiliated to. Mainly to segregate the user permissions.&lt;/li&gt;
&lt;li style="box-sizing: border-box; font-size: 1em; line-height: 2em;"&gt;&lt;span style="box-sizing: border-box; font-weight: 700;"&gt;--id.type&lt;/span&gt;&amp;nbsp;- The type of the user. We are using “client”, but a user can be peer, validator, auditor, ca, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
Now, that we have registered our new user, we need to enroll into the server to get the public / private keys for the user “mlgblockchain”.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
So we use the following command:&lt;/div&gt;
&lt;code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;fabric-ca-client enroll -u “http://mlgblockchain:mlg@localhost:7054”&amp;nbsp;&lt;/code&gt;&lt;br style="box-sizing: border-box;" /&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
If all goes well, you should see the following output:&lt;/div&gt;
&lt;img alt="Encoll Client Hyperledger Fabric" class="img-responsive" src="https://mlgblockchain.com/assets/img/hyperledger-3/enroll.jpg" style="border: 0px; box-sizing: border-box; display: block; height: auto; margin-bottom: 20px; max-height: 300px; max-width: 100%; vertical-align: middle;" /&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
So, upon successful enrollment of the user, you shall receive the keys in the directory mentioned in the output.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
Congrats! Finally, you are able to setup your own CA Server for the enrollment and signing of new Users required for your application.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
&lt;u style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; outline: 0px; transition: all 0.3s ease;"&gt;&lt;span style="font-size: xx-small; margin: 0px; outline: 0px; padding: 0px; transition: all 0.3s ease;"&gt;Courtesy&lt;/span&gt;:&amp;nbsp;&lt;span style="color: #444444; margin: 0px; outline: 0px; padding: 0px; transition: all 0.3s ease;"&gt;&lt;span style="font-family: Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 11px; margin: 0px; outline: 0px; padding: 0px; transition: all 0.3s ease;"&gt;Akarsh Agarwal&lt;/span&gt;&lt;span style="font-family: Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 11px; margin: 0px; outline: 0px; padding: 0px; transition: all 0.3s ease;"&gt;&lt;br style="outline: 0px; transition: all 0.3s ease;" /&gt;Original Source :&amp;nbsp;https://mlgblockchain.com/setup-hyperledger-client.html&lt;/span&gt;&lt;/span&gt;&lt;/u&gt;&lt;/div&gt;
&lt;/div&gt;
</description><link>http://page.farhad.pw/2017/12/how-to-setup-hyperledger-fabric-ca_6.html</link><author>noreply@blogger.com (Farhad)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1026424054105678970.post-5920219169118041973</guid><pubDate>Wed, 06 Dec 2017 10:53:00 +0000</pubDate><atom:updated>2017-12-06T16:53:40.896+06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">BlockChain</category><category domain="http://www.blogger.com/atom/ns#">Cryptocurrency</category><category domain="http://www.blogger.com/atom/ns#">HyperLedger</category><title>How to Setup the Hyperledger Fabric-ca Server Setup on Ubuntu 16.04 - Part 2</title><description>&lt;h2 class="section-title" style="background-color: white; box-sizing: border-box; color: #333333; font-family: Raleway, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 1.8em; font-weight: 400; line-height: 1.1; margin: 0px 0px 0.67em;"&gt;
How to Setup the Hyperledger Fabric-ca Server Setup on Ubuntu 16.04 - Part 2&lt;/h2&gt;
&lt;div class="divider-light" style="background-color: white; box-sizing: border-box; color: #333333; font-family: Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px;"&gt;
&lt;/div&gt;
&lt;div class="page-content" style="background-color: white; box-sizing: border-box; color: #333333; font-family: Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px;"&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
The Hyperledger Fabric project by IBM provides an easy plug-n-play interface for the users to attach their custom Certificate Authority(CA) Server. This has been actively made possible in the newer version of Hyperledger Fabric v1.0 as opposed to v0.6. There is support for this functionality in older versions, but they have been made more easily integrated in the newer release.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
This article is about the steps needed to setup your own CA Server and register/enroll new users into your database. The server provides the public/private key pair as a response to enrolling the user into the database. If you need help to&amp;nbsp;&lt;a href="https://mlgblockchain.com/hyperledger-pre.html" style="background-color: transparent; box-sizing: border-box; color: #555555; text-decoration-line: none; transition: all 0.5s;"&gt;configure the requirements to download Hyperledger&lt;/a&gt;, check out the&amp;nbsp;&lt;a href="https://mlgblockchain.com/hyperledger-pre.html" style="background-color: transparent; box-sizing: border-box; color: #555555; text-decoration-line: none; transition: all 0.5s;"&gt;first article&lt;/a&gt;&amp;nbsp;in this three part tutorial series to&amp;nbsp;&lt;a href="https://mlgblockchain.com/hyperledger-tutorials.html" style="background-color: transparent; box-sizing: border-box; color: #555555; text-decoration-line: none; transition: all 0.5s;"&gt;learn Hyperledger&lt;/a&gt;.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
The fabric-ca project can be downloaded from the official gerrit codebase using the following command. This will download the required files into your directory. The directory structure is important for the fabric-ca to work. The picture below is a sample of where to place the fabric-ca directory:&lt;/div&gt;
&lt;code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;git clone https://gerrit.hyperledger.org/r/fabric-ca&lt;/code&gt;&lt;img alt="Hyperledger Fabric" class="img-responsive" src="https://mlgblockchain.com/assets/img/hyperledger-2/fabric-ca.jpg" style="border: 0px; box-sizing: border-box; display: block; height: auto; margin-bottom: 20px; max-height: 300px; max-width: 100%; vertical-align: middle;" /&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
To make the above screenshot more clear, the fabric-ca directory should be placed inside the GOPATH variable of your system. To set the GOPATH locally run the following command:&lt;/div&gt;
&lt;code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;export GOPATH=~/Documents/Blockchain&lt;/code&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
The directory structure that follows the GOPATH is GOPATH -&amp;gt; src -&amp;gt; github.com -&amp;gt; hyperledger -&amp;gt; fabric-ca. It is recommended that you follow the same directory structure to avoid any errors that might arise during building or compiling the code.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
Now, as we have downloaded the files into the required location, we need to build the fabric-ca server and add the path to the executable to have the command available across the system in the terminal. To build the fabric-ca server, go to the root directory of fabric-ca, i.e., inside the fabric-ca directory and run the following command and you should see the screenshow below.&lt;/div&gt;
&lt;code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;make fabric-ca-server&lt;/code&gt;&lt;img alt="Hyperledger Fabric" class="img-responsive" src="https://mlgblockchain.com/assets/img/hyperledger-2/run-fabric-ca.jpg" style="border: 0px; box-sizing: border-box; display: block; height: auto; margin-bottom: 20px; max-height: 300px; max-width: 100%; vertical-align: middle;" /&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
When the above command finishes, the output should be similar to the one shown above. It might take from a few seconds to a minute so be patient. To check whether you have the executable or not, list the contents of the directory “bin” and there should be a new file, in a different color, which is the executable.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
Now, that we have the executable, we need to be able to access it from anywhere in the system. To do this we need to append the directory of fabric-ca to the PATH variable in the .bashrc file. The command to edit the .bashrc file is:&lt;/div&gt;
&lt;code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;sudo nano ~/.bashrc&amp;nbsp;&lt;/code&gt;&lt;br style="box-sizing: border-box;" /&gt;&lt;br style="box-sizing: border-box;" /&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
Next, append the following line at the bottom of the file:&amp;nbsp;&lt;code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;export PATH=$PATH:~/Documents/Blockchain/src/github.com/hyperledger/fabric-ca/bin&lt;/code&gt;&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
Save the file and close it. Now, we need to refresh the variables to be able to access the fabric-ca command from anywhere. The command to do this is:&lt;/div&gt;
&lt;code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;source ~/.bashrc&lt;/code&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
To check whether the fabric-ca-server command works or not, just type in the following command and you should see the output below returned to your terminal.&lt;/div&gt;
&lt;code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;fabric-ca-server&lt;/code&gt;&lt;img alt="Hyperledger Fabric" class="img-responsive" src="https://mlgblockchain.com/assets/img/hyperledger-2/terminal.jpg" style="border: 0px; box-sizing: border-box; display: block; height: auto; margin-bottom: 20px; max-height: 300px; max-width: 100%; vertical-align: middle;" /&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
If you see any other output from the one displayed here, maybe there is some error in the installation and you might want to revisit the starting of the tutorial again.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
Please ensure that, this documentation is the basic installation of the Fabric-CA service. More tweaking and settings can be found under the section of Fabric-CA Setup, at the official documentation of Hyperledger Fabric.&lt;/div&gt;
&lt;h3 style="box-sizing: border-box; font-family: Raleway, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 1.5em; font-weight: 400; letter-spacing: 0.3px; line-height: 1.1; margin: 0px 0px 0.67em;"&gt;
Fabric-CA Server Setup&lt;/h3&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
The Fabric-CA Server acts as our custom CA to register and enroll new users, as well as existing users into the database. The server sends the key pair, when trying to enroll an already registered user.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
To get started, we set-up a new directory for our work environment, so as to not disturb the original files. To create a new directory you can name it whatever you like. Here is what I’ve done below:&lt;/div&gt;
&lt;img alt="Hyperledger Fabric" class="img-responsive" src="https://mlgblockchain.com/assets/img/hyperledger-2/users.jpg" style="border: 0px; box-sizing: border-box; display: block; height: auto; margin-bottom: 20px; max-height: 300px; max-width: 100%; vertical-align: middle;" /&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
For our server to save our files to the current directory, we need to set-up a new environment variable. Call this environment variable FABRIC_CA_SERVER_HOME to follow along with the tutorial. Set this variable to the current directory adding the following lines to the .bashrc file at the end of the file:&lt;/div&gt;
&lt;code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;export FABRIC_CA_HOME=~/Documents/Fabric-CA&amp;nbsp;&lt;br style="box-sizing: border-box;" /&gt;export FABRIC_CA_SERVER_HOME=$FABRIC_CA_HOME/server&lt;/code&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
I assume that you have set your FABRIC_CA_SERVER_HOME as your current directory, for the rest of the Fabric-CA Server Setup.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
We need some configuration files, but first we need a pair of keys for the server to ensure the client is able to contact the right server. We use the following commands to generate the public/private key pair. Here, ca-cert.pem is the public key and ca-key.pem is the private key.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
Now that we have our private and public keypair, we run the following command to auto-initialise all the config files and auto-create the keys. In the command, the ‘-b “admin:adminpw” ‘ initialises our bootstrap user for the database. A user which will be used to login the first time we want to start using our system. Now, after you run the command, you shall see the following output:&lt;/div&gt;
&lt;code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;fabric-ca-server init -b “admin:adminpw”&lt;/code&gt;&lt;img alt="Hyperledger Fabric" class="img-responsive" src="https://mlgblockchain.com/assets/img/hyperledger-2/output.jpg" style="border: 0px; box-sizing: border-box; display: block; height: auto; margin-bottom: 20px; max-height: 300px; max-width: 100%; vertical-align: middle;" /&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
From the above output, you can make out that we have the keys and the configuration files auto-generated for us by the Fabric-CA. Also, we see another file, fabric-ca-server.db. This file stores all the users that are currently registered with the Fabric-CA server. This is by-default a SQLITE3 database, however you are able to configure the fabric-ca-server-config.yaml file to use either a PostGreSQL or a Mysql database instead.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
We have configured all of our files now, but it is important to understand the various fields in the config file before we run our first server. These fields are important and the documentation is given in the config file. The explanation of each field is below.&lt;/div&gt;
&lt;h3 style="box-sizing: border-box; font-family: Raleway, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 1.5em; font-weight: 400; letter-spacing: 0.3px; line-height: 1.1; margin: 0px 0px 0.67em;"&gt;
Config File Variables&lt;/h3&gt;
&lt;ul style="box-sizing: border-box; margin-bottom: 10px; margin-top: 0px; padding-left: 20px;"&gt;
&lt;li style="box-sizing: border-box; font-size: 1em; line-height: 2em;"&gt;The “port” field defines on which port to run the server. By-default the port is 7054.&lt;/li&gt;
&lt;li style="box-sizing: border-box; font-size: 1em; line-height: 2em;"&gt;The “debug” field is for logging while working in development environment.&lt;/li&gt;
&lt;li style="box-sizing: border-box; font-size: 1em; line-height: 2em;"&gt;If your server is run on a HTTPS protocol, the “tls” should be enabled, as we are working on localhost, the default value is always “false”.&lt;/li&gt;
&lt;li style="box-sizing: border-box; font-size: 1em; line-height: 2em;"&gt;We define the keys to be used by the server for signing the client keys, in the “certfile” and “keyfile” section. This variable is mainly used, when we know that the CA and the server are two different entities, but here, the server is itself the CA, so we put the server’s keys in the ca’s keys.&lt;/li&gt;
&lt;li style="box-sizing: border-box; font-size: 1em; line-height: 2em;"&gt;Max_enrollments defines how many users can be enrolled using the same password. If is set to 0, it can be infinitely done, but suppose it is set to 1, it will allow a user to enroll only once.&lt;/li&gt;
&lt;li style="box-sizing: border-box; font-size: 1em; line-height: 2em;"&gt;The next section defines the database we are going to use. By-default, Hyperledger Fabric-CA provides support for 3 types of databases, namely, Sqlite, Postgres and Mysql. You can configure any of the three, but default configuration is “sqlite3” for this tutorial. More can be found about configuring the other two, on the&amp;nbsp;&lt;a href="https://hyperledger-fabric.readthedocs.io/en/latest/" style="background-color: transparent; box-sizing: border-box; color: #555555; text-decoration-line: none; transition: all 0.5s;" target="_blank"&gt;documentation of Hyperledger Fabric&lt;/a&gt;.&lt;/li&gt;
&lt;li style="box-sizing: border-box; font-size: 1em; line-height: 2em;"&gt;The LDAP section we are going to skip and keep the value to the default as it is out of the scope of this tutorial.&lt;/li&gt;
&lt;li style="box-sizing: border-box; font-size: 1em; line-height: 2em;"&gt;The affiliations section defines the organizations and departments with which your user is going to be associated to classfiy different types of users.&lt;/li&gt;
&lt;li style="box-sizing: border-box; font-size: 1em; line-height: 2em;"&gt;Signing section is used to define what is the time period for the validity of the client’s signed certificates and what are the other usages of server certificate used in the configuration.&lt;/li&gt;
&lt;li style="box-sizing: border-box; font-size: 1em; line-height: 2em;"&gt;“CSR” section is used to create “Certificate Signing Request” required to generate CA certificates, so as to put in the default details.&lt;/li&gt;
&lt;li style="box-sizing: border-box; font-size: 1em; line-height: 2em;"&gt;The last section we have is the “crypto”, which defines what type of algorithm the server should use and other cryptographic terms. This is also left as it is.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
Now, that we have all the files required, our server is ready to be initiated. Use the command below to start your server.&lt;/div&gt;
&lt;code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;fabric-ca-server start -b “admin:adminpw”&lt;/code&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
If everything goes right, you should see the following output from your terminal.&lt;/div&gt;
&lt;img alt="Hyperledger Fabric" class="img-responsive" src="https://mlgblockchain.com/assets/img/hyperledger-2/goesright.jpg" style="border: 0px; box-sizing: border-box; display: block; height: auto; margin-bottom: 20px; max-height: 300px; max-width: 100%; vertical-align: middle;" /&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
Now, our localhost Fabric-CA Server is up and running. Congrats for achieving this milestone. Next we shall move onto setting up the Fabric-CA Client, to enable it to communicate it with our localhost.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
&lt;u style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; outline: 0px; transition: all 0.3s ease;"&gt;&lt;span style="font-size: xx-small; margin: 0px; outline: 0px; padding: 0px; transition: all 0.3s ease;"&gt;Courtesy&lt;/span&gt;:&amp;nbsp;&lt;span style="color: #444444; margin: 0px; outline: 0px; padding: 0px; transition: all 0.3s ease;"&gt;&lt;span style="font-family: Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 11px; margin: 0px; outline: 0px; padding: 0px; transition: all 0.3s ease;"&gt;Akarsh Agarwal&lt;/span&gt;&lt;span style="font-family: Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 11px; margin: 0px; outline: 0px; padding: 0px; transition: all 0.3s ease;"&gt;&lt;br style="outline: 0px; transition: all 0.3s ease;" /&gt;Original Source :&amp;nbsp;https://mlgblockchain.com/setup-hyperledger-fabric.html&lt;/span&gt;&lt;/span&gt;&lt;/u&gt;&lt;/div&gt;
&lt;/div&gt;
</description><link>http://page.farhad.pw/2017/12/how-to-setup-hyperledger-fabric-ca.html</link><author>noreply@blogger.com (Farhad)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1026424054105678970.post-5996944349365042709</guid><pubDate>Wed, 06 Dec 2017 10:49:00 +0000</pubDate><atom:updated>2017-12-06T16:49:49.926+06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">BlockChain</category><category domain="http://www.blogger.com/atom/ns#">Cryptocurrency</category><category domain="http://www.blogger.com/atom/ns#">HyperLedger</category><title>Install Hyperledger Fabric on Ubuntu 16 and execute Deploy, Invoke and Query - Part I</title><description>&lt;h2 class="section-title" style="background-color: white; box-sizing: border-box; color: #333333; font-family: Raleway, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 1.8em; font-weight: 400; line-height: 1.1; margin: 0px 0px 0.67em;"&gt;
Install Hyperledger Fabric on Ubuntu 16 and execute Deploy, Invoke and Query - Part I&lt;/h2&gt;
&lt;div class="divider-light" style="background-color: white; box-sizing: border-box; color: #333333; font-family: Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px;"&gt;
&lt;/div&gt;
&lt;div class="page-content" style="background-color: white; box-sizing: border-box; color: #333333; font-family: Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px;"&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
There is an entire library of Blockchain APIs which you can select according to the needs that suffice your application. Some libraries are open-sourced and some are private. For examples,&amp;nbsp;&lt;a href="https://www.hyperledger.org/" style="background-color: transparent; box-sizing: border-box; color: #555555; text-decoration-line: none; transition: all 0.5s;" target="_blank"&gt;IBM’s Hyperledger Fabric Project&lt;/a&gt;,&amp;nbsp;&lt;a href="https://www.ethereum.org/" style="background-color: transparent; box-sizing: border-box; color: #555555; text-decoration-line: none; transition: all 0.5s;" target="_blank"&gt;Ethereum&lt;/a&gt;,&amp;nbsp;&lt;a href="https://www.openchain.org/" style="background-color: transparent; box-sizing: border-box; color: #555555; text-decoration-line: none; transition: all 0.5s;" target="_blank"&gt;OpenChain&lt;/a&gt;&amp;nbsp;are few of the open sourced models which are popular in the market today.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
This tutorial is to help you setup your development environment for a blockchain application using the IBM-Hyperledger Fabric API.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
In this tutorial, we will be setting Hyperledger Fabric v1.0 on Ubuntu 16.04 on a localhost server. This tutorial can be applied to Ubuntu 14.04 too, but would involve certain changes to the commands due to the difference in the OS.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
This tutorial is broken into 2 parts so that it is easier for you to understand and follow through the steps without making the article too long. The 1st part focuses on installing the prerequisites for the API and the 2nd part will focus on installing and running of Hyperledger API itself.&lt;/div&gt;
&lt;h3 style="box-sizing: border-box; font-family: Raleway, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 1.5em; font-weight: 400; letter-spacing: 0.3px; line-height: 1.1; margin: 0px 0px 0.67em;"&gt;
Prerequesites&lt;/h3&gt;
&lt;ul style="box-sizing: border-box; margin-bottom: 10px; margin-top: 0px; padding-left: 20px;"&gt;
&lt;li style="box-sizing: border-box; font-size: 1em; line-height: 2em;"&gt;&amp;nbsp;Go Language v1.8.x&lt;/li&gt;
&lt;li style="box-sizing: border-box; font-size: 1em; line-height: 2em;"&gt;&amp;nbsp;Docker Engine&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 style="box-sizing: border-box; font-family: Raleway, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 1.5em; font-weight: 400; letter-spacing: 0.3px; line-height: 1.1; margin: 0px 0px 0.67em;"&gt;
Go Language v1.8.x&lt;/h3&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
Go Language has been developed by Google and the IBM Hyperledger Fabric API uses Go for compiling and building. Go integrates the properties of C++ and Python into one language. It has fast runtime because it is a compiled language, similar to C++, as compared to an interpreted language like Python. It is also written in a similar way to Python so it benefits from have having a simpler syntax to C++. So, we get the faster speed and easiness of syntax in one package, Go.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
To install the Go Language, we need to download the package from the official&amp;nbsp;&lt;a href="https://golang.org/dl/" style="background-color: transparent; box-sizing: border-box; color: #555555; text-decoration-line: none; transition: all 0.5s;" target="_blank"&gt;Go Download Page&lt;/a&gt;. To follow along with this tutorial, select the option in the Linux section, as described in the screenshot below (xx.tar.gz package).&lt;/div&gt;
&lt;img alt="Download Golang" class="img-responsive" src="https://mlgblockchain.com/assets/img/hyperledger-pre/download-go.jpg" style="border: 0px; box-sizing: border-box; display: block; height: auto; margin-bottom: 20px; max-height: 300px; max-width: 100%; vertical-align: middle;" /&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
Once the package is downloaded, we need to extract it and move it to /usr/local/ directory, so that our application can access it and more importantly, the Go files are situated at a safe place, where you don’t accidently delete them.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
To extract the Go package, use the command below.&lt;/div&gt;
&lt;code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;sudo mv go /usr/local/&amp;nbsp;&lt;/code&gt;&lt;br style="box-sizing: border-box;" /&gt;&lt;br style="box-sizing: border-box;" /&gt;&lt;img alt="Extract Golang to proper folder" class="img-responsive" src="https://mlgblockchain.com/assets/img/hyperledger-pre/usr-local.jpg" style="border: 0px; box-sizing: border-box; display: block; height: auto; margin-bottom: 20px; max-height: 300px; max-width: 100%; vertical-align: middle;" /&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
When you see the directory (/usr/local/), you should now see that there is a new folder named “go”, in your directory. This shows that the go files have been correctly placed in the desired location. Here is a screenshot for you to verify and check whether you have something similar to this or not.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
Now that we have the Go files in the correct place, we want to configure the terminal to locate the files when we want to execute any Go command. We need to include it into our environment variables. For this, we need to edit the ~/.bashrc file of the system, which keeps track of the environment variables of your system. To edit that file, use the following command.&lt;/div&gt;
&lt;code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;sudo nano ~/.bashrc&amp;nbsp;&lt;/code&gt;&lt;br style="box-sizing: border-box;" /&gt;&lt;br style="box-sizing: border-box;" /&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
Include the following lines at the end of the file&lt;/div&gt;
&lt;code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;#GO VARIABLES&lt;br style="box-sizing: border-box;" /&gt;export GOROOT=/usr/local/go&lt;br style="box-sizing: border-box;" /&gt;export PATH=$PATH:$GOROOT/bin&lt;br style="box-sizing: border-box;" /&gt;#END GO VARIABLES&lt;/code&gt;&lt;br style="box-sizing: border-box;" /&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
The PATH variable is the environment Path variable. The GOROOT variable defines where are your Go files situated in the system.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
To reload the environment variables, we use the following command.&lt;/div&gt;
&lt;code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;source ~/.bashrc&amp;nbsp;&lt;/code&gt;&lt;br style="box-sizing: border-box;" /&gt;&lt;br style="box-sizing: border-box;" /&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
This command gives no output, but just simply reloads all the environment variable in background. Now, we can check the installation of Go in our terminal by typing:&lt;/div&gt;
&lt;code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;go&amp;nbsp;&lt;/code&gt;&lt;br style="box-sizing: border-box;" /&gt;&lt;br style="box-sizing: border-box;" /&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
If the installation was successful, you should see the following output.&lt;/div&gt;
&lt;img alt="Go installed correctly" class="img-responsive" src="https://mlgblockchain.com/assets/img/hyperledger-pre/go-installed.jpg" style="border: 0px; box-sizing: border-box; display: block; height: auto; margin-bottom: 20px; max-height: 300px; max-width: 100%; vertical-align: middle;" /&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
If you see any other output except this, maybe you might have done some mistake. Please go through the steps again above.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
Now we have installed the Go language on the host machine and we are halfway through setup of prerequisites for the Hyperledger API, Congrats!.&lt;/div&gt;
&lt;h3 style="box-sizing: border-box; font-family: Raleway, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 1.5em; font-weight: 400; letter-spacing: 0.3px; line-height: 1.1; margin: 0px 0px 0.67em;"&gt;
Docker Engine&lt;/h3&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
Docker is the container where you will be running your instances which makes sure that the blockchain application you run is available. Consider docker as a Virtual Machine Box, which runs images which have specific functionalities, just like Windows and Ubuntu, however each Docker image is smaller in size as compared to an Operating Systems. Each docker images will run a service associated with the Hyperledger network in your localhost. We shall cover two such services absolutely required by the Blockchain Network to run your application, in the next part of the tutorial. We will see how to install docker in this part.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
We need to install docker on your system to be able to understand the beauty that lies within. So, let’s get started!&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
To install docker through CLI or Terminal, we will need to install two packages: Docker-engine and Docker-compose. Docker-engine is like the base package which makes all the necessary files available for the docker container to run properly. Docker-compose configures your docker images according to the specific configuration you provide, which will enable the Blockchain service.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
To install docker-engine, enter the following command in the terminal.&lt;/div&gt;
&lt;code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;sudo apt-get install -y docker-engine&amp;nbsp;&lt;/code&gt;&lt;br style="box-sizing: border-box;" /&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
Your output will differ from me as I have the Docker-Engine already installed on my system. But there is no error in the console, which ensures that it has been installed correctly. After you run the above command, docker should be installed on your system.&lt;/div&gt;
&lt;img alt="Install docker" class="img-responsive" src="https://mlgblockchain.com/assets/img/hyperledger-pre/docker-install.jpg" style="border: 0px; box-sizing: border-box; display: block; height: auto; margin-bottom: 20px; max-height: 300px; max-width: 100%; vertical-align: middle;" /&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
Now, we need to enable the docker service at startup of the system. We write the following commands:&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
To start the docker service:&lt;/div&gt;
&lt;code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;sudo service docker start&lt;/code&gt;&lt;br style="box-sizing: border-box;" /&gt;&lt;br style="box-sizing: border-box;" /&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
If all goes well, there will be no output. If you get an error, please consider re-installing the docker-engine again.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
To enable the docker to start at startup of the system, we use the following command:&lt;/div&gt;
&lt;code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;sudo systemctl enable docker&amp;nbsp;&lt;/code&gt;&lt;br style="box-sizing: border-box;" /&gt;&lt;br style="box-sizing: border-box;" /&gt;&lt;img alt="Enable docker" class="img-responsive" src="https://mlgblockchain.com/assets/img/hyperledger-pre/docker-enable.jpg" style="border: 0px; box-sizing: border-box; display: block; height: auto; margin-bottom: 20px; max-height: 300px; max-width: 100%; vertical-align: middle;" /&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
If all goes well, your output should match with the screenshot displayed above. Now, each time you reboot your system, your docker container will be reloaded automatically.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
To check if the docker service is running, just type:&lt;/div&gt;
&lt;code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;docker&amp;nbsp;&lt;/code&gt;&lt;br style="box-sizing: border-box;" /&gt;&lt;br style="box-sizing: border-box;" /&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
And you should get a similar output as below.&lt;/div&gt;
&lt;img alt="Run docker" class="img-responsive" src="https://mlgblockchain.com/assets/img/hyperledger-pre/docker-run.jpg" style="border: 0px; box-sizing: border-box; display: block; height: auto; margin-bottom: 20px; max-height: 300px; max-width: 100%; vertical-align: middle;" /&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
If you get anything else, please consider re-installing the docker-engine.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
Now, the second part of docker-engine is the docker-compose function, which is needed to configure the docker images you are calling.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
For that, we use python’s pip. You can use the following command to install docker-compose:&lt;/div&gt;
&lt;code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;sudo pip install docker-compose&amp;nbsp;&lt;/code&gt;&lt;br style="box-sizing: border-box;" /&gt;&lt;br style="box-sizing: border-box;" /&gt;&lt;img alt="Install docker-compose" class="img-responsive" src="https://mlgblockchain.com/assets/img/hyperledger-pre/docker-compose.jpg" style="border: 0px; box-sizing: border-box; display: block; height: auto; margin-bottom: 20px; max-height: 300px; max-width: 100%; vertical-align: middle;" /&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
The installation should complete without any red text at the bottom. This makes sure that we have our docker-engine and docker-compose properly installed in our system. But to work with the docker images, you need to add your user to the docker group, which was created during installation of docker-engine as a part of setup.&lt;/div&gt;
&lt;code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;sudo usermod -aG docker $(whoami)&amp;nbsp;&lt;/code&gt;&lt;br style="box-sizing: border-box;" /&gt;&lt;br style="box-sizing: border-box;" /&gt;&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
This command will provide no output. If any output is displayed, maybe there is something wrong with the command you just typed into your console. Please check if you have written the same line of code. After successfully completing, this adds your current logged in user to the docker group, which will enable you to run docker images.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
So, at this point, we have setup our two essential packages, Go Language and Docker-Engine, which are required to run the Hyperledger Fabric API. The setup and installation part of Hyperledger Fabric API will be presented in the next part of the tutorial.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
If you have any doubts or errors, please email hello@mlgblockchain.com and we shall get back to you as soon as possible, with a possible solution.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
&lt;a href="https://mlgblockchain.com/index.html" style="background-color: transparent; box-sizing: border-box; color: #555555; text-decoration-line: none; transition: all 0.5s;"&gt;MLG Blockchain&lt;/a&gt;&amp;nbsp;is a blockchain development and consulting firm based in Toronto that is focused on building next generation applications using blockchain and smart contract technology. View all our&amp;nbsp;&lt;a href="https://mlgblockchain.com/learn.html" style="background-color: transparent; box-sizing: border-box; color: #555555; text-decoration-line: none; transition: all 0.5s;"&gt;blockchain development tutorials&lt;/a&gt;&amp;nbsp;at&amp;nbsp;&lt;a href="https://mlgblockchain.com/learn.html" style="background-color: transparent; box-sizing: border-box; color: #555555; text-decoration-line: none; transition: all 0.5s;"&gt;www.mlgblockchain.com/learn.html&lt;/a&gt;.&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="box-sizing: border-box; font-size: 1em; line-height: 1.7em; margin-bottom: 20px;"&gt;
&lt;u style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium;"&gt;&lt;span style="font-size: x-small;"&gt;Courtesy&lt;/span&gt;:&amp;nbsp;&lt;span style="color: #444444;"&gt;&lt;span style="font-family: Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 11px;"&gt;Akarsh Agarwal&lt;/span&gt;&lt;span style="font-family: Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 11px;"&gt;&lt;br /&gt;Original Source :&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/u&gt;&lt;span style="color: #444444; font-family: Roboto, Helvetica Neue, Helvetica, Arial, sans-serif; font-size: small;"&gt;&lt;span style="font-size: 11px;"&gt;&lt;u&gt;https://mlgblockchain.com/hyperledger-pre.html&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</description><link>http://page.farhad.pw/2017/12/install-hyperledger-fabric-on-ubuntu-16.html</link><author>noreply@blogger.com (Farhad)</author><thr:total>0</thr:total></item></channel></rss>