Tag - 数据库

环境搭建 数据库    2019-05-06 06:51:53    30    0    0

Install MongoDB Community Edition

Download the binary files for the desired release of MongoDB.

  1. curl -O https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.2.9.tgz

Extract the files from the downloaded archive.

  1. tar -zxvf mongodb-linux-x86_64-3.2.9.tgz

Copy the extracted archive to the target directory

  1. mkdir -p ~/mongodb-3.2.9
  2. mv mongodb-linux-x86_64-3.2.9 ~/mongodb-3.2.9

Ensure the location of the binaries is in the PATH variable.

  1. export PATH=<mongodb-install-directory>/bin:$PATH

Run MongoDB Community Edition

Create the data directory

Before you start MongoDB for the first time, create the directory to which the mongod process will write data.

By default, the mongod process uses the /data/db directory.

If you create a directory other than this one, you must specify that directory in the dbpath option when starting the mongod process later in this procedure.

  1. mkdir -p /data/mongodb

Set permission

数据库 环境搭建    2019-05-06 06:51:53    109    0    0
## 安装postgresql sudo yum install postgresql-server postgresql ## 验证是否安装成功 sudo rpm -aq| grep postgres ## 初始化数据库 #/var/lib/pgsql/data service postgresql initdb ## 启动服务并设置为开机启动
数据库 环境搭建    2019-05-06 06:51:53    52    0    0

1.安装httpd

下载并安装apr(Apache Portable Runtime )

tar zxvf apr-1.5.1.tar.gz 
./configure --prefix=/home/xxx/programs/apr
make
make install​


下载并安装apr-util

./configure --prefix=/home/xxx/programs/a
数据库 环境搭建    2019-05-06 06:51:53    99    0    0

1.下载解压h2

2.根目录下新建.h2.server.properties

 webAllowOthers=true
 webPort=8082

3.导入导出

call CSVWRITE ( 'e://h2/articles.csv', 'SELECT * FROM articles' )
CREATE TABLE TEST AS SELECT * FROM CSVREAD('test.csv')​