
SLES 15 vm 遇到 kernel panic, 看起來 /init 有問題
wsunccake 發表在 痞客邦 留言(0) 人氣(0)
# 安裝
centos:~ # git clone git://github.com/KittyKatt/screenFetch.git /usr/local/screenfetch
centos:~ # cp /usr/local/screenfetch/screenfetch-dev /usr/bin/screenfetch
centos:~ # chmod +x /usr/bin/screenfetch
centos:~ # screenfetch
wsunccake 發表在 痞客邦 留言(0) 人氣(111)
# 安裝
centos:~ # yum install fortune-mod cowsay
centos:~ # fortune | cowsay -pn
wsunccake 發表在 痞客邦 留言(0) 人氣(83)
# 使用 insertOne, 增加一筆資料
> db.fruit.insertOne({_id: "apples", qty: 5})
# 使用 insertMany, 增加多筆資料
> db.fruit.insertMany([
{_id: "bananas", qty: 7},
{_id: "oranges", qty: {"in stock": 8, "ordered": 12}},
{_id: "avocados", qty: "fourteen"}
])
wsunccake 發表在 痞客邦 留言(0) 人氣(5)
# 備份
centos:~ # mongodump [-h <hostname>[:<port>]
centos:~ # ls dump # 在執行完 mongodump 後, 會將備份資料產生 dump 資料夾
wsunccake 發表在 痞客邦 留言(0) 人氣(1)
MongoDB 和 SQL 術語對照
MongoDB |
SQL |
database |
database |
collection |
table |
document |
row |
wsunccake 發表在 痞客邦 留言(0) 人氣(17)
# 設定 repository
centos:~ # yum install epel-release
# 安裝 docker
centos:~ # yum install docker
wsunccake 發表在 痞客邦 留言(0) 人氣(1,055)
# 設定 repository
centos:~ # vi /etc/yum.repos.d/mongodb-org.repo
[mongodb-org]
baseurl = https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/x86_64/
gpgcheck = 1
gpgkey = https://www.mongodb.org/static/pgp/server-3.2.asc
name = mongodb-org
wsunccake 發表在 痞客邦 留言(0) 人氣(1,187)
須先安裝 Java, Groovy 和 Gradle
linux:~ # mkdir hello
linux:~ # cd hello
linux:~/hello # gradle init
linux:~/hello # mkdir -p src/main/{groovy,java}
wsunccake 發表在 痞客邦 留言(0) 人氣(18)
# 啟動 Xvfb, 有啟動 x window 可忽略此步驟
centos:~ # Xvfb :99 -ac -screen 0 1280x960x16 &
centos:~ # export DISPLAY=:99
wsunccake 發表在 痞客邦 留言(0) 人氣(24)