# mongo 설치
# 22.04 에서 5/6 버전은 에러가 나서 4.4 로 설치함
sudo apt update
sudo apt dist-upgrade -y
sudo apt install gnupg
echo "deb http://security.ubuntu.com/ubuntu impish-security main" | sudo tee /etc/apt/sources.list.d/impish-security.list
sudo apt update
sudo apt install libssl1.1
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
sudo apt update
sudo apt install -y mongodb-org
systemctl enable mongod
# 외부접속
vi /etc/mongod.conf
net:
bindIp: 0.0.0.0
# mongo command
mongo
show dbs
show collections
# 계정 비번 만들기
db.createUser({user:"root", pwd:"1q2w3e", roles:["root"]});
# mongod.conf
security:
authorization: enabled
# 재시작 후 로그인
mongo -u rise -p --authenticationDatabase "admin"
'ubuntu 22.04' 카테고리의 다른 글
ubuntu 22.04 filebeat 설치 (0) | 2023.02.16 |
---|---|
ubuntu 22.04 cassandra 설치 (0) | 2023.02.16 |
ubuntu 22.04 fluentd 설치 (0) | 2023.01.16 |
ubuntu 22.04 fluent-bit 설치 (0) | 2023.01.16 |
The repository 'http://security.ubuntu.com/ubuntu impish-security Release' does not have a Release file (0) | 2023.01.09 |