Showing posts with label centos 7. Show all posts
Showing posts with label centos 7. Show all posts

Wednesday, January 16, 2019

openvpn pam_google_authenticator.so error in centos 7

This is the short story: I was trying to implement google OTP authentication while connecting to openvpn, so that in addition to normal password you need to pass timed token generated by your mobile app. My OS was CentOS 7.

The problem was that it didn't work after following some instruction on the web. (like this one http://dillidba.blogspot.com/2017/02/install-openvpn-on-centos-with-google.html)

My openvpn log was showing this error:

Tuesday, November 20, 2018

psql: FATAL: Ident authentication failed for user (Centos 7)

What's up?

In this article you will know how to fix this error:
psql: FATAL:  Ident authentication failed for user "username"
which happens when you try to connect as follows:
psql -U username -h 127.0.0.1 -d postgres

How to install/upgrade postgresql server from 9.2 to 9.6 on Centos 7

Hello!

This tutorial includes detailed steps on how to upgrade from old 9.2 postgresql server to new 9.6 postgresql server, with data migration. But you can also use this article if you want to install fresh 9.6 version - you just need to skip migration steps. You can also check this link for more information.

1. install PGDG RPM file for new postgresql server
sudo yum install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm
(for the list of all options, check this link: https://yum.postgresql.org/repopackages.php)

Friday, November 9, 2018

How to install latest version of nginx in Centos 7

As of now current nginx version in centos 7 repo is 1.12.2, but latest version of stable nginx is 1.14.1.

In this article we will install latest nginx/1.14.1 in Centos 7.

1. Remove current version of nginx (1.12.2)
sudo yum remove nginx*

Wednesday, November 7, 2018

Running php site with php5-fpm behind nginx (centos 7)

If you're using latest version of nginx nginx-1.14.1-1.el7_4.ngx.x86_64, then by default in /etc/nginx/ you will have this files:

[centos@ip-172-31-37-214 ~]$ ls -la /etc/nginx
total 56
drwxr-xr-x.  3 root root 4096 Nov  7 07:41 .
drwxr-xr-x. 91 root root 8192 Nov  7 07:28 ..
drwxr-xr-x.  2 root root   89 Nov  7 07:37 conf.d
-rw-r--r--.  1 root root 1007 Nov  6 14:04 fastcgi_params
-rw-r--r--.  1 root root 2837 Nov  6 14:04 koi-utf
-rw-r--r--.  1 root root 2223 Nov  6 14:04 koi-win
-rw-r--r--.  1 root root 5170 Nov  6 14:04 mime.types
lrwxrwxrwx.  1 root root   29 Nov  7 07:28 modules -> ../../usr/lib64/nginx/modules
-rw-r--r--.  1 root root  643 Nov  6 13:54 nginx.conf
-rw-r--r--.  1 root root  636 Nov  6 14:04 scgi_params
-rw-r--r--.  1 root root  664 Nov  6 14:04 uwsgi_params
-rw-r--r--.  1 root root 3610 Nov  6 14:04 win-utf

Saturday, January 6, 2018

How to install python 3.5 in CentOS 7 from source

At the time of writing, repository of Centos 7 contains python 3 of version 3.4, which is not the newest. And sometimes it's useful to have newer version. For example, I needed python 3.5. And here I will show you how to install it. We will be installing it from source.

1. Update repositories and install couple packages:
sudo yum update
sudo yum install zlib-devel openssl-devel

Thursday, June 15, 2017

How to update openssl and/or install openssl 1.1.0 in centos 7 from sources

Updating openssl


After deploying new centos 7 distro, I checked version of openssl and it appeared to be very old (2013!!). To check openssl version, you can use this command:
openssl version
OpenSSL 1.0.1e-fips 11 Feb 2013
or this:
yum info openssl
Name        : openssl
Arch        : x86_64
Epoch       : 1
Version     : 1.0.1e
Release     : 60.el7_3.1

Then if you want to update it, simply run:
sudo yum update openssl
And if you check it again, it will show updated version:
openssl version
OpenSSL 1.0.2k-fips  26 Jan 2017
So this should include all security fixes and you're good to go.

But if you still want to install newer openssl alongside with the current one, below I will show how.