Kylin OS + MIPS Godson open middleware adaptation

Outline 

I. Background 

Two-goal

Three-server

Four Middleware Adapter

Five applications

Six deployment 

Seven risk

Eight summary

Finally rpm nine production

 

I. Background

   19-year national project to begin preparations and implementation encore. Our fortunate to participate.

 

Two-goal

Adapter installed OS (operating system) and CPU

Dismantling the following objectives:

Open-source operating system and middleware adaptation CPU

Open middleware includes, javajdk1.8, elastticsearch6.4.1, fastdfs5.0.8 the like mounted on the OS.

Domestic middleware adaptation operating system and CPU

NPC gold warehouse database (Kingbase8-8.2.0) and the East Pass (TongWeb6.1.6.0) service vessel.

Application deployment running on middleware

Three-server

SM 1 confidential environment server

A OS sum CPU

Kirin OS 7.0

Kernel version: linux3.10.0 (mips64)

Cpu:model ICT Loongson-3.V0.13 FPU v0.1

 

SM system limits as follows:

The server allows only 1 rpm package all middleware, executable file, resource library.

After 2 can not modify the executable installation and mobile.

3 key system directories can not be modified to add files, system parameter modification is not allowed.

4 system does not allow easily create sub-accounts, create an account requires a secure client authorization to use 8 hours a day.

Before 5 rpm package installation must be complicated self-signed, the signature is completed before installation or click on the Uninstall button.

B IP server and login information

!!! Services Log root / (15 Ge 1) + a, secadm / (15 Ge a) +1, sugon / (8 Ge 1) + a sugon (the account configuration uses 10 times a day: 00-18: 00)

I Tongweb and Kingbase deployment information

IP

Domestic middleware

position

description

 

 

Tongweb

/ Opt / TongWeb

Single node

 

 

 

Tongweb

/ Opt / TongWeb

Single node

 

 

Tongweb

/ Opt / TongWeb

Single node

 

 

Kingbase

 

Cluster IP

 

K ingbase db username and password SYSTEM / 12345678ab

II Elasticsearch

IP

Open Source Middleware

position

description

Remark

 

 

 

 

 

 

Elasticsearch

/home/sugon/elasticsearch

Sugon account start

Es can first choose one

 

Elasticsearch,fastdfs

/usr/local/elasticsearch

Root account start

Es can first choose one

 

III application deployment plan

IP

application

position

description

Remark

 

Wydaas,datasource,wydataquality,wydataquality_executor

/ Opt / TongWeb / autodeploy

 

Port seriatim: 9001,9002,9003,9004

 

Wydataeye,executor,wytaskwatcher,bms,cas

 

 

Port seriatim: 9001,9002,9003,9004,9005

 

 

 

ETL plans to deploy services

 

C disk

There 2T disk hung on the / data mount point.

D Firewall

Firewall rule configuration is very unstable, the current measures are temporarily turn off the firewall and the firewall has contacted OS and related personnel.

E service boot from Kai

Not yet configured.

2 non-classified environment server FM

A Sinosoft provided test machine

Kirin OS 6.0

Kernel version: linux2.6.32 (mips64el)

Cpu:model ICT Loongson-

 

B Windows2019

Not repeat them here

C Centos7.x

Not repeat them here

 

Four Middleware Adapter

SM confidential mainly environmental adaptation system limitations lead to difficulty adapting renewed.

 

1 Godson jdk8

Godson jdk8.rpm corresponding to packet, the server is already classified, non-classified environments need to test (already installed).

2 ES6

Rpm package corresponding Elasticsearch6.4.1

You need to install the corresponding packet

sugon root account and the account corresponding to different positions installation package

root account the installation package corresponding to the mounting position of / usr / local / elasticsearch

sugon account the installation package corresponding to the mounting position / home / sugon / elasticsearch

elasticsearch-6.4.1-1.ns6.0.mips64el.rpm

case-1.0-1.ns6.0.mips64el.rpm

elasticsearch-6.4.1-SNAPSHOT.jar (change pack need to install only necessary to replace the root of the assembled package to a corresponding lib)

 

Installation Precautions

1 corresponding to the two rpm after installation, require the use of a corresponding elasticsearch-6.4.1-SNAPSHOT.jar package replaces installed inside lib directory elasticsearch-6.4.1.jar package. Then you can start elasticsearch.

 

Start command under Root Account

cd /usr/local/elasticsearch -d

3 fastdfs5.11

Rpm package corresponds Fastdfs 5.11

fastdfs-tool-5.11-1.ns7_4.mips64el.rpm

fastdfs-server-5.11-1.ns7_4.mips64el.rpm

fastdfs-5.11-1.ns7_4.mips64el.rpm

libfastcommon-devel-1.0.36-1.ns7_4.3.mips64el.rpm

libfastcommon-1.0.36-1.ns7_4.3.mips64el.rpm

1 After installation need to have a place to put the configuration file permissions to modify

2 need to manually modify the configuration file thread_stack_size = 128k

Start command

/ Usr / bin / fdfs_tracker start /root/fastdfs/conf/tracker.conf

/ Usr / bin / fdfs_storage start /root/fastdfs/conf/storage.conf

 

4 etl client

SDCETLDesigner-1.0-1.ns6.0.mips64el.rpm

libswt-1.0-1.ns6.0.mips64el, 5 packets .rpm

If you need to fit the NPC gold warehouse database needs to do the following:

20190722 1 open folder, in accordance with the operation steps readme.txt before.

5 tongweb

I Secretary for Security plug-in the East through the supplied adapter

sefonsoft-secure-4.0-1.ns6.0.mips64el.rpm

sefon-secure.zip

1 Create a directory where you can extract the open, the license.xml application into / etc below.

Add a line 2 if tongweb at home bin directory external.vmoptions file -server above

-javaagent: after sefon-secure.zip extract the directory /secure-agent-4.0.jar, then start tongweb

3 If the console is not started tongweb securesoft-secure to the beginning of the log, and then switch to the directory after the secure-sefon-secure unpacked bin directory, run the following command

java -cp "../secure-agent-4.0.jar:secure-serialnum-4.0.jar" com.sefonsoft.secure.serialnum.Main, if there is a successful serial number, if not, contact the project manager or the relevant R & D personnel.

 

 

6 k8

NPC gold positions to use (just use it)

 

Five applications

1XX Service

Seven applications

xx, xx2, etc.

2 large 2-dependent services

xxl,xxl2

3 ETL Service

 

Six deployment

1 initialization sql

First NPC gold positions to initialize the sql database.

2 deployment of applications

The seven major application deployment to the East Pass.

Seven risk

1 under the machine performance, stability under the system level software.

2 East through only one instance of each machine.

3-port firewall rules and configuration problems, can only temporarily closed.

Eight summary

Adaptation must test environment as a necessary condition.

Application middleware with services between server relationship diagram

Finally rpm package production

RPM is the RedHat Package Penalty for Manager ( RedHat abbreviation package management tools) , is a packaging and installation tool for Internet download package, which is included in some Linux distributions. It generates a .RPM file extension. Use rpm to install software and manage the software is very easy to use. And we are not in this section describes how to use rpm to install or manage software, but how to make the source code rpm package.

 

Kylin (OS) + Godson (MIPS)

Production nginx 's rpm examples

A build directory structure

/ Usr / src / linux / SOURCES - store source code, patches, icons and other documents.

/ Usr / src / linux / SPECS - storage for managing production processes rpm spec file.

/ Usr / src / linux / BUILD - after extracting files stored here.

/ Usr / src / linux / RPMS - deposited by rpmbuild binary packages.

/ Usr / src / linux / SRPMS - rpmbuild deposited by making good the package.

mkdir -p /usr/src/linux

cd /usr/src/linux

mkdir SOURCES SPECS BUILD RPMS SRPMS

Download Source Package B

Download Source Package to the SOURCES directory, you do not need to decompress.

 

cd /usr/src/linux/SOURCES

wget http://nginx.org/download/nginx-1.11.1.tar.gz

C to create Spec file

cd /usr/src/linux/SPECS

vi nginx.spec

It reads as follows:

#

# Example spec file for nginx

#

Summary: high performance web server

Name: nginx

Version: 1.11.1

Release: 1.el7.ngx

License: 2-clause BSD-like license

Group: Applications/Server

Source: http://nginx.org/download/nginx-1.11.1.tar.gz

URL: http://nginx.org/

Distribution: Linux

Packager: geekwolf <[email protected]>;

%description

nginx [engine x] is a HTTP and reverse proxy server, as well as

a mail proxy server

%prep

rm -rf $RPM_BUILD_DIR/nginx-1.11.1

zcat $RPM_SOURCE_DIR/nginx-1.11.1.tar.gz | tar -xvf -

%build

cd nginx-1.11.1

./configure --prefix=/usr/local/nginx

make

%install

cd nginx-1.11.1

make install

preun%

if [ -z "`ps aux | grep nginx | grep -v grep`" ];then

killall nginx >/dev/null

exit 0

be

%files

/usr/local/nginx

 

D Production rpm package

In the production of RPM before the packages to install the necessary tools, such as rpmbuild, gcc like. Start RPM production

Note: the production environment can not rely installation tool packaged compilation

 

yum install gcc rpm-build pcre-devel

cd /usr/src/linux/SPECS/

rpmbuild -bb nginx.spec

All goes well, will generate nginx rpm package, / usr / src / linux / RPMS / i386 / nginx-1.11.1-1.el7.ngx.x86_64.rpm.

 

E test rpm package

rpm -ivh /usr/src/linux/RPMS/i386/nginx-1.11.1-1.el7.ngx.x86_64.rpm

spec file interpretation

As can be seen from the above simple example, to make the most important thing rpm package spec file, the following instructions explain the examples used.

#: Beginning with # is a comment, rpm will ignore it.

Summary: brief description of the software.

Name: Defines the name of the rpm.

Version: custom software version

Release: Release

License: custom license

Group: Software Category

Source: Source Download

URL: Source Related Websites

Distribution: release series

Packager: package person's information

% Description: a detailed description of the software can be multi-line

% Prep: Before processing software compiler, such as decompression.

% Build: start compiling software, such as make

% Install: start installing the software, such as make install

% Files: specify which files need to be packaged, such as / usr / local / nginx

% Preun: the definition of the action before unloading, such as to kill the process.

Here only a few commonly used tag

 

 

references

http://www.rpm.org/max-rpm/ch-rpm-inside.html

https://www.cnblogs.com/noxy/articles/10894350.html

 

Published 43 original articles · won praise 28 · views 40000 +

Guess you like

Origin blog.csdn.net/u013380694/article/details/101121660