Senin, 23 September 2019

How to update haproxy 1.5 to 1.8 using cheese release

  Tidak ada komentar
Download cheese release repo
[user@haproxy ~]$ wget http://www.nosuchhost.net/~cheese/fedora/packages/epel-7/                                                      x86_64/cheese-release-7-1.noarch.rpm
--2019-09-22 23:11:16--  http://www.nosuchhost.net/~cheese/fedora/packages/epel-                                                      7/x86_64/cheese-release-7-1.noarch.rpm
Resolving www.nosuchhost.net (www.nosuchhost.net)... 78.46.40.125
Connecting to www.nosuchhost.net (www.nosuchhost.net)|78.46.40.125|:80... connec                                                      ted.
HTTP request sent, awaiting response... 200 OK
Length: 6104 (6.0K) [application/x-rpm]
Saving to: ‘cheese-release-7-1.noarch.rpm’

100%[======================================>] 6,104       25.6KB/s   in 0.2s

2019-09-22 23:11:22 (25.6 KB/s) - ‘cheese-release-7-1.noarch.rpm’ saved [6104/61                                                      04]

[user@haproxy ~]$
Install cheese release repo

[user@haproxy ~]$ ls
cheese-release-7-1.noarch.rpm  haproxy.cfg
[user@haproxy ~]$
[user@haproxy ~]$ sudo yum install cheese-release-7-1.noarch.rpm
[sudo] password for ecpa:
Loaded plugins: fastestmirror
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
Examining cheese-release-7-1.noarch.rpm: cheese-release-7-1.noarch
Marking cheese-release-7-1.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package cheese-release.noarch 0:7-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package             Arch        Version  Repository                       Size
================================================================================
Installing:
 cheese-release      noarch      7-1      /cheese-release-7-1.noarch      2.3 k

Transaction Summary
================================================================================
Install  1 Package

Total size: 2.3 k
Installed size: 2.3 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : cheese-release-7-1.noarch                                    1/1
  Verifying  : cheese-release-7-1.noarch                                    1/1

Installed:
  cheese-release.noarch 0:7-1

Complete!
[user@haproxy ~]$

Check the haproxy repo list

[user@haproxy ~]$ yum list haproxy
Loaded plugins: fastestmirror
base                                                                                                           | 3.6 kB  00:00:00
cheese                                                                                                         | 3.4 kB  00:00:00
extras                                                                                                         | 2.9 kB  00:00:00
updates                                                                                                        | 2.9 kB  00:00:00
(1/5): base/7/x86_64/group_gz                                                                                  | 165 kB  00:00:00
(2/5): extras/7/x86_64/primary_db                                                                              | 152 kB  00:00:00
(3/5): updates/7/x86_64/primary_db                                                                             | 1.1 MB  00:00:02
(4/5): base/7/x86_64/primary_db                                                                                | 6.0 MB  00:00:05
(5/5): cheese/7/x86_64/primary_db                                                                              | 532 kB  00:00:07
Determining fastest mirrors
 * base: mirror.vodien.com
 * extras: mirror.vodien.com
 * updates: mirror.qoxy.com
Installed Packages
haproxy.x86_64                                                   1.5.18-6.el7                                                   @base
Available Packages
haproxy.x86_64                                                   1.8.14-1.el7                                                   cheese
[user@haproxy ~]$

Backup the old haproxy configuration

[user@haproxy ~]$ sudo cp -R /etc/haproxy/ /etc/haproxy_bak
[user@haproxy ~]$ sudo yum install haproxy
Loaded plugins: fastestmirror
base                                                                                                           | 3.6 kB  00:00:00
cheese                                                                                                         | 3.4 kB  00:00:00
extras                                                                                                         | 2.9 kB  00:00:00
updates                                                                                                        | 2.9 kB  00:00:00
(1/5): extras/7/x86_64/primary_db                                                                              | 152 kB  00:00:00
(2/5): base/7/x86_64/group_gz                                                                                  | 165 kB  00:00:00
(3/5): updates/7/x86_64/primary_db                                                                             | 1.1 MB  00:00:01
(4/5): cheese/7/x86_64/primary_db                                                                              | 532 kB  00:00:02
(5/5): base/7/x86_64/primary_db                                                                                | 6.0 MB  00:00:08
Determining fastest mirrors
 * base: mirror.buana.web.id
 * extras: mirror.buana.web.id
 * updates: mirror.buana.web.id
Resolving Dependencies
--> Running transaction check
---> Package haproxy.x86_64 0:1.5.18-6.el7 will be updated
---> Package haproxy.x86_64 0:1.8.14-1.el7 will be an update
--> Processing Dependency: libcrypto.so.10(OPENSSL_1.0.2)(64bit) for package: haproxy-1.8.14-1.el7.x86_64
--> Processing Dependency: liblua-5.3.so()(64bit) for package: haproxy-1.8.14-1.el7.x86_64
--> Running transaction check
---> Package lua.x86_64 0:5.1.4-14.el7 will be updated
--> Processing Dependency: liblua-5.1.so()(64bit) for package: rpm-libs-4.11.3-17.el7.x86_64
--> Processing Dependency: liblua-5.1.so()(64bit) for package: rpm-python-4.11.3-17.el7.x86_64
--> Processing Dependency: liblua-5.1.so()(64bit) for package: rpm-build-libs-4.11.3-17.el7.x86_64
--> Processing Dependency: liblua-5.1.so()(64bit) for package: rpm-4.11.3-17.el7.x86_64
---> Package lua.x86_64 0:5.3.0-2.el7 will be an update
---> Package openssl-libs.x86_64 1:1.0.1e-42.el7.9 will be updated
--> Processing Dependency: openssl-libs(x86-64) = 1:1.0.1e-42.el7.9 for package: 1:openssl-1.0.1e-42.el7.9.x86_64
---> Package openssl-libs.x86_64 1:1.0.2k-19.el7 will be an update
--> Running transaction check
---> Package compat-lua-libs.x86_64 0:5.1.5-3.el7 will be installed
---> Package openssl.x86_64 1:1.0.1e-42.el7.9 will be updated
---> Package openssl.x86_64 1:1.0.2k-19.el7 will be an update
---> Package rpm.x86_64 0:4.11.3-17.el7 will be updated
---> Package rpm.x86_64 0:4.11.3-17.el7 will be updated
---> Package rpm.x86_64 0:4.11.3-40.el7 will be an update
---> Package rpm-build-libs.x86_64 0:4.11.3-17.el7 will be updated
---> Package rpm-build-libs.x86_64 0:4.11.3-17.el7 will be updated
---> Package rpm-build-libs.x86_64 0:4.11.3-40.el7 will be an update
---> Package rpm-libs.x86_64 0:4.11.3-17.el7 will be updated
---> Package rpm-libs.x86_64 0:4.11.3-17.el7 will be updated
---> Package rpm-libs.x86_64 0:4.11.3-40.el7 will be an update
---> Package rpm-python.x86_64 0:4.11.3-17.el7 will be updated
---> Package rpm-python.x86_64 0:4.11.3-17.el7 will be updated
---> Package rpm-python.x86_64 0:4.11.3-40.el7 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================================================
 Package                             Arch                       Version                              Repository                  Size
======================================================================================================================================
Updating:
 haproxy                             x86_64                     1.8.14-1.el7                         cheese                     1.3 M
Installing for dependencies:
 compat-lua-libs                     x86_64                     5.1.5-3.el7                          cheese                     160 k
Updating for dependencies:
 lua                                 x86_64                     5.3.0-2.el7                          cheese                     269 k
 openssl                             x86_64                     1:1.0.2k-19.el7                      base                       493 k
 openssl-libs                        x86_64                     1:1.0.2k-19.el7                      base                       1.2 M
 rpm                                 x86_64                     4.11.3-40.el7                        base                       1.2 M
 rpm-build-libs                      x86_64                     4.11.3-40.el7                        base                       107 k
 rpm-libs                            x86_64                     4.11.3-40.el7                        base                       278 k
 rpm-python                          x86_64                     4.11.3-40.el7                        base                        83 k

Transaction Summary
======================================================================================================================================
Install             ( 1 Dependent package)
Upgrade  1 Package  (+7 Dependent packages)

Total download size: 5.0 M
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
warning: /var/cache/yum/x86_64/7/cheese/packages/compat-lua-libs-5.1.5-3.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 3c3ebe43: NOKEY
Public key for compat-lua-libs-5.1.5-3.el7.x86_64.rpm is not installed
(1/9): compat-lua-libs-5.1.5-3.el7.x86_64.rpm                                                                  | 160 kB  00:00:06
(2/9): lua-5.3.0-2.el7.x86_64.rpm                                                                              | 269 kB  00:00:00
(3/9): openssl-1.0.2k-19.el7.x86_64.rpm                                                                        | 493 kB  00:00:01
(4/9): haproxy-1.8.14-1.el7.x86_64.rpm                                                                         | 1.3 MB  00:00:08
(5/9): openssl-libs-1.0.2k-19.el7.x86_64.rpm                                                                   | 1.2 MB  00:00:03
(6/9): rpm-build-libs-4.11.3-40.el7.x86_64.rpm                                                                 | 107 kB  00:00:00
(7/9): rpm-4.11.3-40.el7.x86_64.rpm                                                                            | 1.2 MB  00:00:02
(8/9): rpm-python-4.11.3-40.el7.x86_64.rpm                                                                     |  83 kB  00:00:00
(9/9): rpm-libs-4.11.3-40.el7.x86_64.rpm                                                                       | 278 kB  00:00:00
--------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                 452 kB/s | 5.0 MB  00:00:11
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-cheese-epel-7-x86_64
Importing GPG key 0x3C3EBE43:
 Userid     : "package system nosuchhost.net <[email protected]>"
 Fingerprint: f24a 6130 de8b a0c1 0ba3 1652 fb35 7108 3c3e be43
 Package    : cheese-release-7-1.noarch (@/cheese-release-7-1.noarch)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-cheese-epel-7-x86_64
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : compat-lua-libs-5.1.5-3.el7.x86_64                                                                                1/17
  Updating   : rpm-libs-4.11.3-40.el7.x86_64                                                                                     2/17
  Updating   : rpm-4.11.3-40.el7.x86_64                                                                                          3/17
  Updating   : 1:openssl-libs-1.0.2k-19.el7.x86_64                                                                               4/17
  Updating   : rpm-build-libs-4.11.3-40.el7.x86_64                                                                               5/17
  Updating   : lua-5.3.0-2.el7.x86_64                                                                                            6/17
  Updating   : haproxy-1.8.14-1.el7.x86_64                                                                                       7/17
warning: /etc/haproxy/haproxy.cfg created as /etc/haproxy/haproxy.cfg.rpmnew
  Updating   : rpm-python-4.11.3-40.el7.x86_64                                                                                   8/17
  Updating   : 1:openssl-1.0.2k-19.el7.x86_64                                                                                    9/17
  Cleanup    : rpm-python-4.11.3-17.el7.x86_64                                                                                  10/17
  Cleanup    : rpm-build-libs-4.11.3-17.el7.x86_64                                                                              11/17
  Cleanup    : rpm-libs-4.11.3-17.el7.x86_64                                                                                    12/17
  Cleanup    : rpm-4.11.3-17.el7.x86_64                                                                                         13/17
  Cleanup    : haproxy-1.5.18-6.el7.x86_64                                                                                      14/17


  Cleanup    : 1:openssl-1.0.1e-42.el7.9.x86_64                                                                                 15/17
  Cleanup    : 1:openssl-libs-1.0.1e-42.el7.9.x86_64                                                                            16/17
  Cleanup    : lua-5.1.4-14.el7.x86_64                                                                                          17/17
  Verifying  : rpm-python-4.11.3-40.el7.x86_64                                                                                   1/17
  Verifying  : rpm-4.11.3-40.el7.x86_64                                                                                          2/17
  Verifying  : 1:openssl-1.0.2k-19.el7.x86_64                                                                                    3/17
  Verifying  : haproxy-1.8.14-1.el7.x86_64                                                                                       4/17
  Verifying  : lua-5.3.0-2.el7.x86_64                                                                                            5/17
  Verifying  : rpm-libs-4.11.3-40.el7.x86_64                                                                                     6/17
  Verifying  : compat-lua-libs-5.1.5-3.el7.x86_64                                                                                7/17
  Verifying  : 1:openssl-libs-1.0.2k-19.el7.x86_64                                                                               8/17
  Verifying  : rpm-build-libs-4.11.3-40.el7.x86_64                                                                               9/17
  Verifying  : 1:openssl-libs-1.0.1e-42.el7.9.x86_64                                                                            10/17
  Verifying  : lua-5.1.4-14.el7.x86_64                                                                                          11/17
  Verifying  : 1:openssl-1.0.1e-42.el7.9.x86_64                                                                                 12/17
  Verifying  : rpm-libs-4.11.3-17.el7.x86_64                                                                                    13/17
  Verifying  : rpm-4.11.3-17.el7.x86_64                                                                                         14/17
  Verifying  : rpm-build-libs-4.11.3-17.el7.x86_64                                                                              15/17
  Verifying  : haproxy-1.5.18-6.el7.x86_64                                                                                      16/17
  Verifying  : rpm-python-4.11.3-17.el7.x86_64                                                                                  17/17

Dependency Installed:
  compat-lua-libs.x86_64 0:5.1.5-3.el7

Updated:
  haproxy.x86_64 0:1.8.14-1.el7

Dependency Updated:
  lua.x86_64 0:5.3.0-2.el7                  openssl.x86_64 1:1.0.2k-19.el7                openssl-libs.x86_64 1:1.0.2k-19.el7
  rpm.x86_64 0:4.11.3-40.el7                rpm-build-libs.x86_64 0:4.11.3-40.el7         rpm-libs.x86_64 0:4.11.3-40.el7
  rpm-python.x86_64 0:4.11.3-40.el7

Complete!
[user@haproxy ~]$
Restart the haproxy service


[user@haproxy haproxy]$ sudo service haproxy restart
Redirecting to /bin/systemctl restart  haproxy.service
[user@haproxy haproxy]$ sudo service haproxy status
Redirecting to /bin/systemctl status  haproxy.service
● haproxy.service - HAProxy Load Balancer
   Loaded: loaded (/usr/lib/systemd/system/haproxy.service; disabled; vendor preset: disabled)
   Active: active (running) since Sun 2019-09-22 23:18:09 EDT; 6s ago
  Process: 32507 ExecStartPre=/usr/sbin/haproxy -f $CONFIG -c -q (code=exited, status=0/SUCCESS)
 Main PID: 32509 (haproxy)
   CGroup: /system.slice/haproxy.service
           ├─32509 /usr/sbin/haproxy -Ws -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid
           └─32511 /usr/sbin/haproxy -Ws -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid

Sep 22 23:18:09 haproxy.myserver.id systemd[1]: haproxy.service: main process exited, code=exited, status=143/n/a
Sep 22 23:18:09 haproxy.myserver.id systemd[1]: Unit haproxy.service entered failed state.
Sep 22 23:18:09 haproxy.myserver.id systemd[1]: haproxy.service failed.
Sep 22 23:18:09 haproxy.myserver.id systemd[1]: Starting HAProxy Load Balancer...
Sep 22 23:18:09 haproxy.myserver.id systemd[1]: Started HAProxy Load Balancer.
[user@haproxy haproxy]$


Tidak ada komentar :

Posting Komentar