Skip to end of metadata
Go to start of metadata

CentOS 7
8G Memory
Hostname :

Package resource :

0. Preparation

Download JDK1.8, jdk-8u221-linux-x64.tar.gz from, then:

mkdir /usr/local/java/
tar -zxvf jdk-8u221-linux-x64.tar.gz -C /usr/local/java/

Environment variable settings :

vi /etc/profile

export JAVA_HOME=/usr/local/java/jdk1.8.0_221
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH

source /etc/profile
ln -s /usr/local/java/jdk1.8.0_221/bin/java /usr/bin/java

check if JDK have already installed successful:

java -version
java version "1.8.0_221"
Java(TM) SE Runtime Environment (build 1.8.0_221-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.221-b11, mixed mode)

If yes, modify : /etc/security/limits.conf

vi /etc/security/limits.conf

* soft nofile 65536
* hard nofile 65536

Modify port from 4096 to 32768 in /etc/security/limits.d/20-nproc.conf

# Default limit for number of user's processes to prevent

# accidental fork bombs.

# See rhbz #432903 for reasoning.

*          soft    nproc     32768
root       soft    nproc     unlimited

disable warning message from MongoDB :

echo never > /sys/kernel/mm/transparent_hugepage/enabled
echo never > /sys/kernel/mm/transparent_hugepage/defrag

Then, we can start to install Repository、Gateway、Management API、Web UI

1. Elasticsearch

In order to install Repository, we need to install Elasticsearch and MongoDB.

Add yum resource:

vi /etc/yum.repos.d /elasticsearch.repo

name=Elasticsearch repository for 5.x packages

Elasticsearch installation:

yum install -y elasticsearch

bootstrap.memory_lock: false
bootstrap.system_call_filter: false
network.publish_host: #The IP of your deployment server
http.port: 9200

Start Elasticsearch

service elasticsearch start

Check the elasticsearch to make sure if there is no error message.

tail -f /var/log/elasticsearch/elasticsearch.log

2. MongoDB

Add yum resource:

vi /etc/yum.repos.d/mongodb-org-3.4.repo

name=MongoDB 3.4 Repository

MongoDB installation:

yum install -y mongodb-org

Run MongoDB

service mongod start

Check MongoDB to make sure if there is no error message


MongoDB shell version v3.4.22
connecting to: mongodb://
MongoDB server version: 3.4.22

Server has startup warnings:
2019-08-08T16:54:00.591+0800 I CONTROL  [initandlisten]
2019-08-08T16:54:00.591+0800 I CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.
2019-08-08T16:54:00.591+0800 I CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.
2019-08-08T16:54:00.591+0800 I CONTROL  [initandlisten]

3. Gateway

Download gravitee.tar from

gravitee.tar have already setup all the Config file, is the original file, the configuration can follow these reference : ~PI Gateway(`and Management API(, then setup as follows:

mv gravitee.tar /usr/local
cd /usr/local
tar xvf gravitee.tar
cd gravitee/graviteeio-gateway-1.28.0/
bin/gravitee > run.log &

Check log to make sure if there is no error message

tail -f run.log

Use curl to check if gateway is working.(localhost is your IP Address)

curl -X GET http://localhost:8082/
No context-path matches the request URI.

4. Management API

Run Management API

cd ../graviteeio-management-api-1.28.0/
bin/gravitee > run.log &

Check log to make sure if there is no error message

tail -f run.log

Use curl to check if API is working

curl -X GET http://localhost:8083/management/apis/

5. UI

Install epel-release-latest-7

yum install

Install Nginx

yum install nginx

Modify nginx.conf:

Update server_name to your hostname and make sure the location/ root path is the same to the gravitee UI

server {

        listen       80 default_server;
        listen       [::]:80 default_server;
        #root         /usr/share/nginx/html;

        # Load configuration files for the default server block.
        #include /etc/nginx/default.d/*.conf;

        location / {

            root /usr/local/gravitee/graviteeio-management-ui-1.28.0;

            index index.html;


        #error_page 404 /404.html;
        #    location = /40x.html {

        error_page 500 502 503 504 /50x.html;

            location = /50x.html {

                root /usr/share/nginx/html;

Replace /etc/nginx/nginx.conf

cp nginx.conf /etc/nginx

Run Nginx

service nginx start

6. Verification

IF you don’t have DNS, you need to modify the /etc/hosts on the Gravitee server
Open browser to and you will get this:

Click Log In and the default user name/ password is admin/admin.Then,click “My Account”

Click Gateway to make sure the status is Started.

Then the management API link will be:

  • No labels