cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2388
Views
10
Helpful
1
Comments
jawei
Cisco Employee
Cisco Employee

 

Introduction


Installing CSM 3.4 on Red Hat (Centos / Enterprise) Linux 7 can be fairly straightforward with the information below.

 

Core Issue


Depending on the modules and software packages that were selected during the Linux installation, the required steps may vary. Here "Server with GUI" has been selected when Red Hat Linux 7 installation process loads a selection of software packages (Software Selection).

Because the installation steps may vary with different packages that were selected during the Linux installation, the purpose of this document is to serve only as an installation reference in addition to the installation guide.

There are two main areas to be addressed:

MySQL - unlike the earlier Red Hat Linux releases, there are extra installation steps in Red Hat Linux 7.

Python - Python has to be built from its source code. Red Hat Linux 7 is shipped with Python 2.7.5. However, CSM Server 3.4 requires Python 2.7.6 and newer because of the following bug in Python 2.7.5: https://bugs.python.org/issue18647

Extra caution has to be taken while building Python from its source code because CSM depends on two Python modules, zlib and ssl. The detail is given as follows:

Red Hat Linux 7 packages by default may not include the development library, zlib-devel. A manual step may be needed to install zlib-devel.

Red Hat Linux 7 is shipped with OpenSSL 1.0.1 but OpenSSL 1.0.2 and newer version is required because of the following bug in the open source library: https://github.com/kennethreitz/requests/issues/2435

 

Resolution

 

Below is a quick summary of steps to address all the above considerations. The working directory is '/usr/local/src'.

1) Packages that are shipped in RHEL 7.3:

[root@netbrain src]# python –V
Python 2.7.5 <=== Python version has to be 2.7.6 and newer
[root@netbrain src]# openssl version
OpenSSL 1.0.1e-fips 11 Feb 2013 <=== OpenSSL version needs to be 1.0.2 and newer
[root@netbrain src]# yum list installed | grep zlib
zlib.x86_64 1.2.7-17.el7 @anaconda/7.3 <=== zlib_devel is not installed
[root@netbrain src]# yum list installed | grep mysql <=== mysql is not installed


2) Run yum update:
[root@netbrain src]# yum update

3) Install development tools:
[root@netbrain openssl-1.0.2]# yum -y groupinstall "Development tools"

4) Install, start, and configure MySQL:
[root@netbrain src]# wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
[root@netbrain src]# rpm -ivh mysql-community-release-el7-5.noarch.rpm
[root@netbrain src]# yum update
[root@netbrain src]# yum install mysql-server
[root@Netbrain src]# systemctl start mysqld
[root@Netbrain src]# /usr/bin/mysql_secure_installation

5) Install zlib-devel:
[root@netbrain src]# yum list installed | grep zlib
zlib.i686 1.2.7-17.el7 @rhel-7-server-rpms
zlib.x86_64 1.2.7-17.el7 @anaconda/7.3 <=== please make sure that zlib.x86_64 is already installed

[root@netbrain src]# yum install zlib-devel

[root@netbrain src]# yum list installed | grep zlib
zlib.i686 1.2.7-17.el7 @rhel-7-server-rpms
zlib.x86_64 1.2.7-17.el7 @anaconda/7.3
zlib-devel.x86_64 1.2.7-17.el7 @rhel-7-server-rpms

6) Install OpenSSL 1.0.2:
[root@netbrain src]# wget http://www.openssl.org/source/openssl-1.0.2.tar.gz

[root@netbrain src]# tar -xvzf openssl-1.0.2.tar.gz

[root@netbrain src]# cd openssl-1.0.2
[root@netbrain openssl-1.0.2]# ./config --prefix=/usr --openssldir=/usr/lib shared

[root@netbrain openssl-1.0.2]# make
[root@netbrain openssl-1.0.2]# make test
[root@netbrain openssl-1.0.2]# make install
[root@netbrain openssl-1.0.2]# openssl version
OpenSSL 1.0.2 22 Jan 2015

7) Install Python 2.7.6:
[root@netbrain openssl-1.0.2]# cd ..
[root@netbrain src]# wget https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz

[root@netbrain src]# tar -xzf Python-2.7.6.tgz 

[root@netbrain src]# cd Python-2.7.6
[root@netbrain Python-2.7.6]# ./configure --enable-optimizations
[root@netbrain Python-2.7.6]# make install
[root@netbrain Python-2.7.6]# python –V
Python 2.7.5 <=== notice that Python version remains as 2.7.5 after the installation
[root@netbrain Python-2.7.6]# exit
exit
[cisco@netbrain ~]$ exit
logout
Connection to 172.28.98.212 closed.

After logout and login:
[root@netbrain cisco]# python -V
Python 2.7.6 <=== the Python version is updated

8) Install PIP:
[root@netbrain cisco]# which pip
/usr/bin/which: no pip in (/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/cisco/.local/bin:/home/cisco/bin)
[root@netbrain cisco]# cd /usr/local/src
[root@netbrain src]# wget https://bootstrap.pypa.io/get-pip.py
[root@netbrain src]# python get-pip.py
[root@netbrain src]# pip -V
pip 9.0.1 from /usr/local/lib/python2.7/site-packages (python 2.7)

9) Install python-devel:
[root@netbrain src]# yum install python-devel

10) Install LDAP:
[root@netbrain src]# yum install openldap-devel
[root@netbrain csmserver]# pip install python-ldap

11) Install and start CSM 3.4:
[root@netbrain local]# cd /usr/local/csm/csmserver
[root@netbrain csmserver]# pip install -r requirements.txt

[root@netbrain csmserver]# ./csmserver start
starting CSM Server.....
[root@netbrain csmserver]# [2017-08-01 18:50:49 +0000] [14516] [INFO] Starting gunicorn 19.2.1
[2017-08-01 18:50:49 +0000] [14516] [INFO] Listening at: http://0.0.0.0:5000 (14516)
[2017-08-01 18:50:49 +0000] [14516] [INFO] Using worker: sync
[2017-08-01 18:50:49 +0000] [14524] [INFO] Booting worker with pid: 14524
[2017-08-01 18:50:49 +0000] [14525] [INFO] Booting worker with pid: 14525
[2017-08-01 18:50:49 +0000] [14526] [INFO] Booting worker with pid: 14526
[2017-08-01 18:50:49 +0000] [14528] [INFO] Booting worker with pid: 14528

Comments
Yong Zhao
Cisco Employee
Cisco Employee

Resolved install issue in centos7 for csm3.5 by your article, thanks!

Btw, only notice follow when install csm:

1. after install mysql, you need edit database.ini file and set user/pass, that can been followed by install guide.

2. disable firewall by "systemctl stop firewalld.service", or modify rule in firewall.

 

[root@localhost csmserver]# cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)

 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links