CentOS 7系统上添加netcdf库

这里提供两种方法来安装 netcdf:

一是 yum 安装,yum 安装时采用的是系统自带的 gfortran 编译器,版本较旧;

二是采用源码来 Makefile 编译安装的方式,它可以下载最新版的源码,并自行指定 Intel 或 PGI 编译器,适合自定义的需求。

O  系统环境

centOS 64位系统:centos-release-7-3.1611.el7.centos.x86_64

PGI 2017:PGI Compilers and Tools 17.4-0 64-bit target on x86-64 Linux -tp sandybridge

一 yum 安装 netcdf

在CentOS 下安装比较简单,两句命令即可:

[[email protected] netcdf-cxx4-4.3.0]$ sudo yum install netcdf
...==========================================================================
 Package        架构           版本                    源            大小
==========================================================================
正在安装:
 netcdf         x86_64         4.3.3.1-5.el7           epel         693 k
为依赖而安装:
 hdf5           x86_64         1.8.12-8.el7            epel         1.6 M

事务概要
==========================================================================
安装  1 软件包 (+1 依赖软件包)
...
完毕!

[[email protected]-centos7 netcdf-cxx4-4.3.0]$ sudo yum install netcdf-devel
...
依赖关系解决

==========================================================================
 Package            架构        版本                      源         大小
==========================================================================
正在安装:
 netcdf-devel       x86_64      4.3.3.1-5.el7             epel       67 k
为依赖而安装:
 hdf5-devel         x86_64      1.8.12-8.el7              epel      642 k
 libcurl-devel      x86_64      7.29.0-35.el7.centos      base      299 k

事务概要
==========================================================================
安装  1 软件包 (+2 依赖软件包)
...
完毕!

以上方法安装的 netcdf 版本为 4.3.3.1,是2015年的版本,比较老。

二 从源码编译安装 netcdf

下面采用编译安装的方式,保证每个模块都使用当前最新的版本。

(1). http://www.zlib.net/zlib-1.2.11.tar.gz

(2). https://www.hdfgroup.org/downloads/hdf5/source-code/

(3). https://curl.haxx.se/download/curl-7.55.1.tar.gz

(4).

(5).

截止netcdf 4.1.3版本,C lib和fortran lib没有分开,从4.2版本开始分开。这就导致了netcdf-fortran-4.2的安装麻烦了一点。

需要依次安装 zlib,hdf5,netcdf,netcdf-c,netcdf-fortran。

1  安装 zlib

(1). 下载地址:http://www.zlib.net/zlib-1.2.11.tar.gz

$ cd zlib-1.2.11
$ ./configure --prefix=/usr/local/netcdf4 --sharedlibdir=/opt/pgi/linux86-64/17.4/lib
Checking for gcc...
Checking for shared library support...
Building shared library libz.so.1.2.11 with gcc.
Checking for size_t... Yes.
Checking for off64_t... Yes.
Checking for fseeko... Yes.
Checking for strerror... Yes.
Checking for unistd.h... Yes.
Checking for stdarg.h... Yes.
Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf().
Checking for vsnprintf() in stdio.h... Yes.
Checking for return value of vsnprintf()... Yes.
Checking for attribute(visibility) support... Yes.

$ make

$ make check

$ sudo make install

$ make clean

2 安装 hdf5

下载地址:在网页 https://www.hdfgroup.org/downloads/hdf5/source-code/ 中选择版本 1.10.1,下载 gz 格式的文件。

$ cd hdf5-1.10.1$ ./configure --with-zlib=/usr/local/netcdf4 --prefix=/usr/local/netcdf4$ make$ make check $ make install
...  CC       H5Zdeflate.lo
  CC       H5Zfletcher32.lo
  CC       H5Znbit.lo
  CC       H5Zshuffle.lo
  CC       H5Zscaleoffset.lo
  CC       H5Zszip.lo
  CC       H5Ztrans.lo
  CCLD     libhdf5.la
/bin/ld: /usr/local/netcdf4/lib/libz.a(inflate.o): relocation R_X86_64_32S against `zcfree‘ can not be used when making a shared object; recompile with -fPIC
/usr/local/netcdf4/lib/libz.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [libhdf5.la] 错误 1
make[2]: 离开目录“/home/She/Downloads/NetCDF/hdf5-1.10.1/src”
make[1]: *** [all] 错误 2
make[1]: 离开目录“/home/She/Downloads/NetCDF/hdf5-1.10.1/src”
make: *** [all-recursive] 错误 1

如果安装时没有提示上述错误,则跳过步骤“1.new” 和“2.new”,直接转至步骤3。

有关这个错误的原因及解决办法,可参见这里

这个错误一般是64 位 电脑才会出现。

解决方法为重新安装 zlib 和 hdf5,即步骤“1.new” 和“2.new”:

cd zlib-1.2.11 //进入zlib目录
CFLAGS="-O3 -fPIC" ./configure   //使用64位元的方法进行编译

1.new 重新安装 zlib

$ CFLAGS="-O3 -fPIC" ./configure --prefix=/usr/local/netcdf4 --sharedlibdir=/opt/pgi/linux86-64/17.4/lib

$ make check

$ sudo make install
[sudo] password for She: 

$ make clean

2.new 重新安装 hdf5

$ cd hdf5-1.10.1/

$ ./configure --with-zlib=/usr/local/netcdf4 --prefix=/usr/local/netcdf4

$ sudo make

$ sudo make check

$ sudo make install

$ sudo make clean

3 安装netcdf

$ CPPFLAGS=-I/usr/local/netcdf4/include LDFLAGS=-L/usr/local/netcdf4/lib \  ./configure --prefix=/usr/local/netcdf4 CC=pgcc FC=pgf90
... ...
# NetCDF C Configuration Summary
==============================

# General
-------
NetCDF Version:        4.4.1
Configured On:        Wed Sep 27 13:34:01 CST 2017
Host System:        x86_64-unknown-linux-gnu
Build Directory:     /home/She/Downloads/NetCDF/netcdf-4.4.1
Install Prefix:         /usr/local/netcdf4

# Compiling Options
-----------------
C Compiler:        /opt/pgi/linux86-64/17.4/bin/pgcc
CFLAGS:
CPPFLAGS:        -I/usr/local/netcdf4/include
LDFLAGS:        -L/usr/local/netcdf4/lib
AM_CFLAGS:
AM_CPPFLAGS:
AM_LDFLAGS:
Shared Library:        yes
Static Library:        yes
Extra libraries:    -lhdf5_hl -lhdf5 -ldl -lm -lz -lcurl 

# Features
--------
NetCDF-2 API:        yes
HDF4 Support:        no
NetCDF-4 API:        yes
NC-4 Parallel Support:    no
PNetCDF Support:    no
DAP Support:        yes
Diskless Support:    yes
MMap Support:        no
JNA Support:        no

$ make
$ make check
...
make  check-TESTS
make[2]: 进入目录“/home/She/Downloads/NetCDF/netcdf-4.4.1/h5_test”
make[3]: 进入目录“/home/She/Downloads/NetCDF/netcdf-4.4.1/h5_test”
PASS: tst_h_files
PASS: tst_h_files2
PASS: tst_h_files4
PASS: tst_h_atts
PASS: tst_h_atts3
PASS: tst_h_atts4
PASS: tst_h_vars
PASS: tst_h_vars2
PASS: tst_h_vars3
PASS: tst_h_grps
PASS: tst_h_compounds
PASS: tst_h_compounds2
PASS: tst_h_wrt_cmp
PASS: tst_h_rd_cmp
PASS: tst_h_vl
PASS: tst_h_opaques
PASS: tst_h_strings
PASS: tst_h_strings1
PASS: tst_h_strings2
PASS: tst_h_ints
FAIL: tst_h_dimscales
PASS: tst_h_dimscales1
PASS: tst_h_dimscales2
PASS: tst_h_dimscales3
PASS: tst_h_enums
PASS: tst_h_dimscales4
============================================================================
Testsuite summary for netCDF 4.4.1
============================================================================
# TOTAL: 26
# PASS:  25
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0
============================================================================
See h5_test/test-suite.log
Please report to support-[email protected]
============================================================================
make[3]: *** [test-suite.log] 错误 1
make[3]: 离开目录“/home/She/Downloads/NetCDF/netcdf-4.4.1/h5_test”
make[2]: *** [check-TESTS] 错误 2
make[2]: 离开目录“/home/She/Downloads/NetCDF/netcdf-4.4.1/h5_test”
make[1]: *** [check-am] 错误 2
make[1]: 离开目录“/home/She/Downloads/NetCDF/netcdf-4.4.1/h5_test”
make: *** [check-recursive] 错误 1

$ sudo make install
...
Making install in CDL
make[2]: 进入目录“/home/She/Downloads/NetCDF/netcdf-4.4.1/examples/CDL”
make[3]: 进入目录“/home/She/Downloads/NetCDF/netcdf-4.4.1/examples/CDL”
make[3]: 对“install-exec-am”无需做任何事。
make[3]: 对“install-data-am”无需做任何事。
make[3]: 离开目录“/home/She/Downloads/NetCDF/netcdf-4.4.1/examples/CDL”
make[2]: 离开目录“/home/She/Downloads/NetCDF/netcdf-4.4.1/examples/CDL”
make[2]: 进入目录“/home/She/Downloads/NetCDF/netcdf-4.4.1/examples”
make[3]: 进入目录“/home/She/Downloads/NetCDF/netcdf-4.4.1/examples”
make[3]: 对“install-exec-am”无需做任何事。
make[3]: 对“install-data-am”无需做任何事。
make[3]: 离开目录“/home/She/Downloads/NetCDF/netcdf-4.4.1/examples”
make[2]: 离开目录“/home/She/Downloads/NetCDF/netcdf-4.4.1/examples”
make[1]: 离开目录“/home/She/Downloads/NetCDF/netcdf-4.4.1/examples”
make[1]: 进入目录“/home/She/Downloads/NetCDF/netcdf-4.4.1”
make[2]: 进入目录“/home/She/Downloads/NetCDF/netcdf-4.4.1”
 /usr/bin/mkdir -p ‘/usr/local/netcdf4/bin‘
 /usr/bin/install -c nc-config ‘/usr/local/netcdf4/bin‘
 /usr/bin/mkdir -p ‘/usr/local/netcdf4/lib/pkgconfig‘
 /usr/bin/install -c -m 644 netcdf.pc ‘/usr/local/netcdf4/lib/pkgconfig‘
 /usr/bin/mkdir -p ‘/usr/local/netcdf4/lib‘
 /usr/bin/install -c -m 644 libnetcdf.settings ‘/usr/local/netcdf4/lib‘
make  install-data-hook
make[3]: 进入目录“/home/She/Downloads/NetCDF/netcdf-4.4.1”

+-------------------------------------------------------------+
| Congratulations! You have successfully installed netCDF!    |
|                                                             |
| You can use script "nc-config" to find out the relevant     |
| compiler options to build your application. Enter           |
|                                                             |
|     nc-config --help                                        |
|                                                             |
| for additional information.                                 |
|                                                             |
| CAUTION:                                                    |
|                                                             |
| If you have not already run "make check", then we strongly  |
| recommend you do so. It does not take very long.            |
|                                                             |
| Before using netCDF to store important data, test your      |
| build with "make check".                                    |
|                                                             |
| NetCDF is tested nightly on many platforms at Unidata       |
| but your platform is probably different in some ways.       |
|                                                             |
| If any tests fail, please see the netCDF web site:          |
| http://www.unidata.ucar.edu/software/netcdf/                |
|                                                             |
| NetCDF is developed and maintained at the Unidata Program   |
| Center. Unidata provides a broad array of data and software |
| tools for use in geoscience education and research.         |
| http://www.unidata.ucar.edu                                 |
+-------------------------------------------------------------+

make[3]: 离开目录“/home/She/Downloads/NetCDF/netcdf-4.4.1”
make[2]: 离开目录“/home/She/Downloads/NetCDF/netcdf-4.4.1”
make[1]: 离开目录“/home/She/Downloads/NetCDF/netcdf-4.4.1”

$ sudo make clean

4 安装 netcdf-c 库

[[email protected] netcdf-cxx4-4.3.0]$ CPPFLAGS=-I/usr/local/netcdf4/include LDFLAGS=-L/usr/local/netcdf4/lib \./configure --prefix=/usr/local/netcdf4 CC=pgcc FC=pgf90

[[email protected] netcdf-cxx4-4.3.0]$ make

[[email protected]-centos7 netcdf-cxx4-4.3.0]$ make check
...
============================================================================
Testsuite summary for netCDF-cxx4 4.3.0
============================================================================
# TOTAL: 7
# PASS:  7
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================
make[3]: 离开目录“/home/She/Downloads/NetCDF/netcdf-cxx4-4.3.0/examples”
make[2]: 离开目录“/home/She/Downloads/NetCDF/netcdf-cxx4-4.3.0/examples”
make[1]: 离开目录“/home/She/Downloads/NetCDF/netcdf-cxx4-4.3.0/examples”
Making check in docs
make[1]: 进入目录“/home/She/Downloads/NetCDF/netcdf-cxx4-4.3.0/docs”
make[1]: 对“check”无需做任何事。
make[1]: 离开目录“/home/She/Downloads/NetCDF/netcdf-cxx4-4.3.0/docs”
make[1]: 进入目录“/home/She/Downloads/NetCDF/netcdf-cxx4-4.3.0”
make[1]: 离开目录“/home/She/Downloads/NetCDF/netcdf-cxx4-4.3.0”

[[email protected]-centos7 netcdf-cxx4-4.3.0]$ sudo make install
...
+-------------------------------------------------------------+
| Congratulations! You have successfully installed the        |
| new netCDF-4 C++ Library                                    |
|                                                             |
| CAUTION:                                                    |
|                                                             |
| If you have not already run "make check", then we strongly  |
| recommend you do so. It does not take very long.            |
|                                                             |
| Before using netCDF to store important data, test your      |
| build with "make check".                                    |
|                                                             |
| If any tests fail, please see the netCDF web site:          |
| http://www.unidata.ucar.edu/software/netcdf/                |
|                                                             |
| NetCDF is developed and maintained at the Unidata Program   |
| Center. Unidata provides a broad array of data and software |
| tools for use in geoscience education and research.         |
| http://www.unidata.ucar.edu                                 |
+-------------------------------------------------------------+

make[3]: 离开目录“/home/She/Downloads/NetCDF/netcdf-cxx4-4.3.0”
make[2]: 离开目录“/home/She/Downloads/NetCDF/netcdf-cxx4-4.3.0”
make[1]: 离开目录“/home/She/Downloads/NetCDF/netcdf-cxx4-4.3.0”

[[email protected]-centos7 netcdf-cxx4-4.3.0]$ make clean

5 添加 netcdf 的环境变量

[[email protected] NetCDF]$ vi /home/She/Downloads/NetCDF/env_netcdf_LD.sh
#!/bin/bash
# setting for netcdf, edit by She
export LD_LIBRARY_PATH=/usr/local/netcdf4/lib:${LD_LIBRARY_PATH}

[[email protected] NetCDF]$ sudo cp /home/She/Downloads/NetCDF/env_netcdf_LD.sh /etc/profile.d
[sudo] password for She:
[[email protected] NetCDF]$ source /etc/profile.d/env_netcdf_LD.sh
[[email protected] NetCDF]$ echo $LD_LIBRARY_PATH
/usr/local/netcdf4/lib:

6 安装netcdf-fortran 库

[[email protected] NetCDF] cd netcdf-fortran-4.4.4[[email protected] netcdf-fortran-4.4.4]$ CPPFLAGS=-I/usr/local/netcdf4/include \  LDFLAGS=-L/usr/local/netcdf4/lib ./configure --prefix=/usr/local/netcdf4 CC=pgcc FC=pgf90

[[email protected]-centos7 netcdf-fortran-4.4.4]$ make[[email protected]-centos7 netcdf-fortran-4.4.4]$ make check
Making check in fortran
make[1]: 进入目录“/home/She/Downloads/NetCDF/netcdf-fortran-4.4.4/fortran”
make  check-am
make[2]: 进入目录“/home/She/Downloads/NetCDF/netcdf-fortran-4.4.4/fortran”
make[2]: 对“check-am”无需做任何事。
make[2]: 离开目录“/home/She/Downloads/NetCDF/netcdf-fortran-4.4.4/fortran”
make[1]: 离开目录“/home/She/Downloads/NetCDF/netcdf-fortran-4.4.4/fortran”
Making check in nf_test
make[1]: 进入目录“/home/She/Downloads/NetCDF/netcdf-fortran-4.4.4/nf_test”
make  nf_test tst_f77_v2 ftst_vars ftst_vars2 ftst_vars3 ftst_vars4 ftst_vars5 ftst_vars6 ftst_types ftst_types2 ftst_types3 ftst_groups ftst_path ftst_rengrps f90tst_vars tst_types tst_types2 f90tst_vars_vlen tst_f90_nc4 f90tst_grps f90tst_fill f90tst_fill2 f90tst_vars3 f90tst_vars4 f90tst_vars2 f90tst_path f90tst_rengrps ftst_v2    ftest tst_f90
make[2]: 进入目录“/home/She/Downloads/NetCDF/netcdf-fortran-4.4.4/nf_test”
pgf90 -I../fortran   -I../fortran -g -c -o f03lib_f_interfaces.o  f03lib_f_interfaces.f90
/opt/pgi/linux86-64/17.4/bin/pgf77 -DHAVE_CONFIG_H -I. -I.. -I../libsrc   -I/usr/local/netcdf4/include -I../fortran   -I../fortran -g -c -o test_get.o test_get.F
/opt/pgi/linux86-64/17.4/bin/pgf77 -DHAVE_CONFIG_H -I. -I.. -I../libsrc   -I/usr/local/netcdf4/include -I../fortran   -I../fortran -g -c -o test_put.o test_put.F
/opt/pgi/linux86-64/17.4/bin/pgf77 -DHAVE_CONFIG_H -I. -I.. -I../libsrc   -I/usr/local/netcdf4/include -I../fortran   -I../fortran -g -c -o nf_error.o nf_error.F
/opt/pgi/linux86-64/17.4/bin/pgf77 -DHAVE_CONFIG_H -I. -I.. -I../libsrc   -I/usr/local/netcdf4/include -I../fortran   -I../fortran -g -c -o nf_test.o nf_test.F
/opt/pgi/linux86-64/17.4/bin/pgf77 -DHAVE_CONFIG_H -I. -I.. -I../libsrc   -I/usr/local/netcdf4/include -I../fortran   -I../fortran -g -c -o test_read.o test_read.F
/opt/pgi/linux86-64/17.4/bin/pgf77 -DHAVE_CONFIG_H -I. -I.. -I../libsrc   -I/usr/local/netcdf4/include -I../fortran   -I../fortran -g -c -o test_write.o test_write.F
PGFTN-S-0034-Syntax error at or near / (test_write.F: 167)
PGFTN-S-0034-Syntax error at or near / (test_write.F: 197)
  0 inform,   0 warnings,   2 severes, 0 fatal for test_nf_redef
make[2]: *** [test_write.o] 错误 2
make[2]: 离开目录“/home/She/Downloads/NetCDF/netcdf-fortran-4.4.4/nf_test”
make[1]: *** [check-am] 错误 2
make[1]: 离开目录“/home/She/Downloads/NetCDF/netcdf-fortran-4.4.4/nf_test”
make: *** [check-recursive] 错误 1

[[email protected]-centos7 netcdf-fortran-4.4.4]$ sudo make install
[sudo] password for She:
...
+-------------------------------------------------------------+
| Congratulations! You have successfully installed the netCDF |
| Fortran libraries.                                          |
|                                                             |
| You can use script "nf-config" to find out the relevant     |
| compiler options to build your application. Enter           |
|                                                             |
|     nf-config --help                                        |
|                                                             |
| for additional information.                                 |
|                                                             |
| CAUTION:                                                    |
|                                                             |
| If you have not already run "make check", then we strongly  |
| recommend you do so. It does not take very long.            |
|                                                             |
| Before using netCDF to store important data, test your      |
| build with "make check".                                    |
|                                                             |
| NetCDF is tested nightly on many platforms at Unidata       |
| but your platform is probably different in some ways.       |
|                                                             |
| If any tests fail, please see the netCDF web site:          |
| http://www.unidata.ucar.edu/software/netcdf/                |
|                                                             |
| NetCDF is developed and maintained at the Unidata Program   |
| Center. Unidata provides a broad array of data and software |
| tools for use in geoscience education and research.         |
| http://www.unidata.ucar.edu                                 |
+-------------------------------------------------------------+

make[3]: 离开目录“/home/She/Downloads/NetCDF/netcdf-fortran-4.4.4”
make[2]: 离开目录“/home/She/Downloads/NetCDF/netcdf-fortran-4.4.4”
make[1]: 离开目录“/home/She/Downloads/NetCDF/netcdf-fortran-4.4.4”

[[email protected]-centos7 netcdf-fortran-4.4.4]$ make clean

7 再次添加 netcdf 终版的环境变量

[[email protected] NetCDF]$ vi /home/She/Downloads/NetCDF/env_netcdf_final.sh
#!/bin/bash
# setting for netcdf, edit by She
export NETCDF=/usr/local/netcdf4
export PATH=$PATH:$NETCDF/bin:$NETCDF/include:$NETCDF/lib
export MANPATH=$MANPATH:$NETCDF/share/man

[[email protected]-centos7 NetCDF]$ sudo cp /home/She/Downloads/NetCDF/env_netcdf_final.sh /etc/profile.d
[sudo] password for She:
[[email protected]-centos7 NetCDF]$ source /etc/profile.d/env_netcdf_final.sh 

三 参考文献

1. 【CESM】1.2.0环境搭建扩充版

2. HDF5 Source Code

3. zlib download

4. curl release and download

5. netcdf-4.4.1 FTP source download

6. netcdf-cxx4-4.3.0.tar.gz FTP source download

7. netcdf-fortran-4.4.4.tar.gz FTP source download

8. CentOS 7 编译安装 WRF 3.8

9. 在linux下用fortran读取netcdf文件(以WRF模式输出的数据为例)

10. 延伸阅读:NCL基础讲解(一)——NCL简介

11. 延伸阅读:NCL基础讲解(二)——NCL安装与运行

时间: 2024-10-10 08:12:22

CentOS 7系统上添加netcdf库的相关文章

在CentOS 7系统上架设DNS服务

文档说明: 本文档以一个案例来介绍如何在CentOS 7系统上部署DNS服务.该案例仅是我对如何部署DNS服务的知识总结,并非是生产环境中存在的案例.并且,该案例中用到的CentOS系统均是安装在VMware虚拟机内的,虽然一般情况下这不会有什么不妥,但还是特别说明一下. 案例说明: 本案例使用了两台VMware虚拟机.两台虚拟机上均安装CentOS 7(详细版本号为7.0.1406,核心版本号为3.10.0-123.el7.x86_64),其中一台虚拟机用于模拟Master DNS服务器(假设

在CentOS 7系统上搭建LNMP

简要介绍: 一般来说,LNMP是Linux+Nginx+MySQL+PHP的简称,是一种用于替代LAMP的解决方案.在本文档中,我使用CentOS 7来搭建LNMP平台,其中,PHP采用FastCGIserver方式部署.此外,还介绍了如何部署Memcached和phpMyadmin. CentOS系统安装时选择的是basic server版本,详细版本号为CentOS 7.0.1406,核心版本号为3.10.0-123.el7.x86_64.系统安装在虚拟机上,IP为172.31.2.3,其可

如何在现有的 Linux 系统上添加新的磁盘

摘要: 作为一个系统管理员,我们会有这样的一些需求:作为升级服务器容量的一部分,或者有时出现磁盘故障时更换磁盘,我们需要将新的硬盘配置到现有服务器. 在这篇文章中,我会向你逐步介绍添加新硬盘到现有 RHEL/CentOS 或者 Debian/Ubuntu Linux 系统的步骤. 作为一个系统管理员,我们会有这样的一些需求:作为升级服务器容量的一部分,或者有时出现磁盘故障时更换磁盘,我们需要将新的硬盘配置到现有服务器. 在这篇文章中,我会向你逐步介绍添加新硬盘到现有 RHEL/CentOS 或者

mac系统上添加定时任务

mac系统上的定时任务用launchctl来管理 先写要执行的脚本run.sh: ``` #!/bin/bashecho `date` > $HOME/test_result.log ``` 再写调度任务的plist文件task.plist: <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"

centos linux 系统上 log4j打印的时间与CST时间差8小时的解决方法

在启动参数上加上时区设置-Duser.timezone=GMT+08 java -jar -Duser.timezone=GMT+08 target/micservice_histclientsdataetl-1.0-SNAPSHOT-jar-with-dependencies.jar local

在android设备上添加thttpd及CGI

============问题描述============ 我想在android系统上添加一个WEB服务,可以使用pc机上的浏览器对于设备的一些参数进行设置.现在选定 httpd+CGI+Sqlite3.但是不知道怎样将httpd+CGI编译并加载到android系统上.请不吝赐教.谢谢. ============解决方案1============ 请问一下:移动端能使用CGI接口么 ============解决方案2============ 你app上设置设备的参数具体是设置什么参数呀,难道不需

Spire.Cloud 私有化部署教程(一) - CentOS 7 系统

Spire.Cloud支持的Linux服务器系统包括CentOS和Ubuntu(推荐使用CentOS 7和Ubuntu 18版本),本教程主要介绍如何在CentOS 7系统上实现Spire.Cloud私有化部署. 详细步骤如下: 一.安装CentOS 7系统 首先,需要在服务器上安装CentOS 7系统,如果已安装,可跳过该步骤. 1.安装CentOS 7,进入以下界面,点击continue. 2.选择最小安装. 3.设置分区,选择默认设置即可. 4.开启网络. 5.配置完毕开始安装. 6.设置

CentOS 6.5系统上安装SVN服务器端的方法及目录访问权限配置(转总结)

SVN其实就是Subversion,分为服务器端和客户端.之前在网上搜了很多方法,都有各种问题,经过自己搜集整理以及实际尝试,总算有个比较靠谱的方法.本文主要介绍CentOS 6.5系统上安装SVN服务器端的方法及步骤. 系统环境说明如下: 操作系统:        Centos6.5 x86-64 SVN:             subversion-1.8.11 1.检查是否安装了低版本的SVN rpm -qa | grep subversion 如果已安装SVN,则会返回版本信息,如:s

centos系统上的二进制格式软件包的安装及管理(rpm和yum)

linux系统管理员在管理操作系统时,管理操作系统上的软件几乎是系统管理员必备的功能.在早期debain发行版中,debain的开发人员为开发了一款名叫dpkg的软件包管理器.后来redhat的开发人员仿照dpkg开发了一个和dpkg功能类似,但功能比其更强大的一款名叫rpm(RPM is Package Manager)的软件包管理器.目前rpm软件包管理器已经是linux界软件包管理器的工业标准.由于linux中的大多数功能复杂的软件都是由众多功能单一软件组合起来实现的.因此,当我们用rpm