[HOW TO] fix HAPROXY Setting tune.ssl.default-dh-param to 1024 by default, if your workload permits it you should set it to at least 2048

Error:

Starting haproxy: [WARNING] 052/161359 (16821) : Setting tune.ssl.default-dh-param to 1024 by default, if your workload permits it you should set it to at least 2048. Please set a value >= 1024 to make this warning disappear.
                                                           [  OK  ]

How to resolve:
Step 1: ssh into serverStep 2: use vi to edit haproxy configuration /etc/haproxy/haproxy.cfgStep 3: In global section, add value: tune.ssl.default-dh-param 2048Step 4: Restart haproxy

Tiến Phan - R0039

Knowledge is Endless
 
Sharing for Success

[HOW TO] validate haproxy configuration

I just changed haproxy.cfg. I want to ensure haproxy.conf is valid before restarting haproxy service.

So I check haproxy manual
$man haproxy

I see paremetter -c -V and -f which validate the syntax.

Finally I use this to validate
haproxy -c -V -f /etc/haproxy/haproxy.cfg

I hope this helps anyone looking to check the synctax haproxy.cfg

Tiến Phan - R0039

Knowledge is Endless

Sharing for Success

[HOW TO] determine the serial number of a computer linux

Q: Hello, Do you want help me get the Laptop's serial number?
A: Easy :D wait me 
Q: Nice!
A: Ping ping!!! please open terminal and run below execute command 
"sudo dmidecode -t system | grep Serial"
Q: Thank you so much guys

Tiến Phan - R0039

Knowledge is Endless

Sharing for Success

[HOW TO] fix Error: xz compression not available

The last week I installed epel7 on CentOS6, and I got this error

Error: xz compression not available

Holy shit, how to solve it?

Simplicity:
yum remove epel-release
yum clean all
yum install epel-release
yum clean all

Tiến Phan - R0039

Knowledge is Endless

Sharing for Success

[HOW TO] get up time process linux?

Once day you want to get the up time of application/ process. But you cannot really tell how long the process has been alive. To get this you may use a couple of commands like the following:

cattek@cattek:~$ ps -ax | grep nylas
 7290 ?        Sl     0:22 /usr/share/nylas/nylas
 7294 ?        S      0:00 /usr/share/nylas/nylas --type=zygote --no-sandbox
 7320 ?        Sl     0:00 /usr/share/nylas/nylas --type=gpu-process --channel=7290.0.1818467183 --mojo-application-channel-token=EA75EFF296429385F4F336F81485903C --no-sandbox --window-depth=24 --x11-visual-id=32 --supports-dual-gpus=false --gpu-driver-bug-workarounds=5,18,48,56 --disable-gl-extensions=GL_ARB_occlusion_query GL_ARB_occlusion_query2 --gpu-vendor-id=0x8086 --gpu-device-id=0x191e --gpu-driver-vendor --gpu-driver-version --gpu-driver-date --v8-natives-passed-by-fd --v8-snapshot-passed-by-fd

The first column contains the PID, In this case, 7320 is the PID of the master process

cattek@cattek:~$ ps -p 7320 -o etime=
   01:26:58

Nice, good luck for you. Finally you can now write a script.

Tiến Phan - R0039

Knowledge is Endless

Sharing for Success