일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
Tags
- Active Directory
- AD Migration
- AWS S3
- Active Directory Migration
- ELK
- vCenter
- Exchange Server
- ADFS Traffic Manager
- Azure
- vCenter Syslog collector
- 하이퍼바이저
- AWS EFS
- ADFS 이중화
- mongodb 설치
- Application Gateway
- ADFS SSO
- awx
- AWS
- vmware vsphere
- ADFS 구성 방법 및 이중화
- MSSQL 2012
- Exchange 2003
- Docker
- ansible
- Kubernetes
- ADFS proxy
- 도커
- AWS EBS
- vSphere
- ELK 설치
Archives
- Today
- Total
practice makes perfect
MongoDB 간단 설치 본문
- MongoDB 테스트 목적으로 간단하게 설치
- MongoDB를 Grafana로 모니터링 하고 싶어서 직접 MongoDB 구성함
## Mongo Repo 추가##
$ vi /etc/yum.repos.d/mongodb-org.repo
[mongodb-org-3.4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.4.asc
$ yum repolist (올바른지 확인)
$ yum install mongodb-org
$ systemctl start mongod (시작)
$ systemctl stop mongod (중지)
$ systemctl reload mongod (설정파일 다시 읽기 및 반영)
$ tail /var/log/mongodb/mongod.log (로그)
## 접속 ##
# mongo localhost:27017
MongoDB shell version v3.4.24
connecting to: mongodb://localhost:27017/test
MongoDB server version: 3.4.24
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
http://docs.mongodb.org/
Questions? Try the support group
http://groups.google.com/group/mongodb-user
Server has startup warnings:
2020-02-18T00:34:40.300+0000 I CONTROL [initandlisten]
2020-02-18T00:34:40.300+0000 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
2020-02-18T00:34:40.300+0000 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
2020-02-18T00:34:40.300+0000 I CONTROL [initandlisten]
2020-02-18T00:34:40.300+0000 I CONTROL [initandlisten]
2020-02-18T00:34:40.300+0000 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2020-02-18T00:34:40.300+0000 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2020-02-18T00:34:40.300+0000 I CONTROL [initandlisten]
2020-02-18T00:34:40.300+0000 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2020-02-18T00:34:40.300+0000 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2020-02-18T00:34:40.300+0000 I CONTROL [initandlisten]
> db
test
> show dbs
admin 0.000GB
local 0.000GB
>
## 계정만들기(admin) ##
> use admin
switched to db admin
> db.createUser(
... {
... user: "testadmin",
... pwd: "abc123",
... roles: [ { role: "userAdminAnyDatabase", db: "admin" } ]
... }
... )
Successfully added user: {
"user" : "testadmin",
"roles" : [
{
"role" : "userAdminAnyDatabase",
"db" : "admin"
}
]
}
## 새로만든계정으로 접속 ##
mongo --port 27017 -u "testadmin" -p "abc123" --authenticationDatabase "admin"
## 모니터링 용 계정 생성 ##
use admin
db.createUser(
{
user: "monitoruser",
pwd: "monitoruser",
roles: [ { role: "clusterMonitor", db: "admin" } ]
}
)
'ETC' 카테고리의 다른 글
Cloud (클라우드) 기술 (0) | 2019.04.05 |
---|---|
Android 루팅 없이 Frep 사용하기 (1) | 2014.06.11 |
Comments