CentOS7 installation Cmdbuild

Source: Internet
Author: User
Tags md5 postgresql psql unix domain socket
CentOS7 install CMDBuild

Experimental background, do not want to use execl to count physical resources and assets.


 Experimental environment

 CentOS Linux release 7.4.1708 (Core) PostgreSQL 9.6 JDK8 + Tomcat8


 installation related services

 1. Configure psotgresql yum source


wget https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm
##
yum install -y postgresql96 postgresql96-server # install postgresql service

# yum installing postgrasql will create a postgres system account by default


2. Initialize postgresql
[root @ aniu-saas-4 ~] # /usr/pgsql-9.6/bin/postgresql96-setup initdb
Initializing database ... OK
3. Set to start automatically
[root @ aniu-saas-4 ~] # systemctl enable postgresql-9.6
Created symlink from /etc/systemd/system/multi-user.target.wants/postgresql-9.6.service to /usr/lib/systemd/system/postgresql-9.6.service.
[root @ aniu-saas-4 ~] # systemctl start postgresql-9.6
4. Postgresql initial settings
# Modify user password

su-postgres
#After switching users, the prompt changes to "-bash-4.2 $";
#At the same time, a database user named "postgres" will also be generated in the database, and the password has been automatically generated;
#PostgreSQL login password-free under the system account with the same name of the database user;

[root @ aniu-saas-4 ~] # su-postgres
-bash-4.2 $ psql -U postgres
psql (9.6.6)
Type "help" for help.
postgres = # alter user postgres with password 'Aniupostgresql123.'

# Set to allow remote access
#In the configuration file, only the local machine can access postgresql by default;
#Modify listen_addresses = 'localhost' to listen_addresses = '*' to allow all remote access;
#Modify the configuration file needs to restart the service

# sed -i "s | #listen_addresses = 'localhost' | listen_addresses = '*' | g" /var/lib/pgsql/9.6/data/postgresql.conf
5. JDK8 + Tomcat environment installation is relatively simple, but not much description
# Reference: http://www.linuxidc.com/Linux/2017-10/148155.htm is very detailed
Deployment configuration CMDBuild Download cmdbbuild
# cd / usr / local / src
# wget https://ncu.dl.sourceforge.net/project/cmdbuild/2.5.0/cmdbuild-2.5.0.zip
Deploy cmdbuild
# unzip cmdbuild-2.5.0.zip
# cd cmdbuild-2.5.0

#Copy the "cmdbuild-2.5.0.war" in the unzipped directory to the webapps directory of $ TOMCAT_HOME and rename it to "cmdbuild.war";
#Copy "extras / tomcat-libs / 6.0 \ or \ higher / postgresql-9.4.1207.jar" in the unzipped directory to the lib directory of $ TOMCAT_HOME, the version is inconsistent with postgresql and can be ignored;
#Tomcat needs to be restarted after configuration, war package will be parsed when tomcat starts
[root @ aniu-saas-4 cmdbuild-2.5.0] # cp cmdbuild-2.5.0.war /data/tomcats/tomcat8/webapps/cmdbuild.war
[root @ aniu-saas-4 cmdbuild-2.5.0] # cp extras / tomcat-libs / 6.0 \ or \ higher / postgresql-9.4.1207.jar / data / tomcats / tomcat8 / lib /
Set postgresql set pg_hba.conf
# vim /var/lib/pgsql/9.6/data/pg_hba.conf
# "local" is for Unix domain socket connections only
local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# Peer authentication failed for user "postgres" Solution: The computer user name and my database name are inconsistent, so you need to change Peer authentication to md5 authentication, and then set a password for the database.
Create cmdbuild database and account
[root @ aniu-saas-4 ~] # su-postgres
Last login: Wed Jan 3 10:30:59 CST 2018 on pts / 2
-bash-4.2 $ psql
psql (9.6.6)
Type "help" for help.

postgres = # create user cmdbadmin with password 'Aniucmdb123.';
CREATE ROLE
postgres = # create database cmdbuild owner cmdbadmin;
CREATE DATABASE
postgres = # grant all privileges on database cmdbuild to cmdbadmin;
GRANT
postgres = # \ q
-bash-4.2 $ exit
logout
Import Data Sheet
# su-postgres
-bash-4.2 $ psql -U cmdbadmin -d cmdbuild -f /data/tomcats/tomcat8/webapps/cmdbuild/WEB-INF/sql/sample_schemas/demo_schema.sql -W
# The author uses the above method to import sql prompting insufficient permissions, so use the following method to import
# su-postgres
# psql -U cmdbadmin -d cmdbuild -W # connect to cmdbuild library
carried out:
\ i /data/tomcats/tomcat8/webapps/cmdbuild/WEB-INF/sql/sample_schemas/demo_schema.sql

CMDBuild initialization 

Browser access: http://192.168.0.209:8081/cmdbuild



Note that the connection parameter selection already exists because we have imported the demo data table,


Get started Reference link: http://www.linuxidc.com/Linux/2017-10/148155.htm

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.