This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run \ | |
--name mongo \ | |
--net bridge \ | |
-p 27017:27017 \ | |
-v /etc/localtime:/etc/localtime:ro \ | |
-v mongo_data:/data/db \ | |
-d mongo:latest | |
--------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.安装docker jdk1.8 | |
2.下载docker镜像 | |
docker pull mongo | |
docker pull docker.elastic.co/elasticsearch/elasticsearch-oss:6.8.5 | |
docker pull graylog/graylog:3.1 | |
3.分开启动3个组件(推荐) | |
# mongodb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1.sudo su 切換到root權限 | |
# 2.以root身分, 進入lib/systemd/system/ 查看是否有rc.local.service檔案, 一般都會有啦XD | |
若沒有就走2-1 | |
## 2-1.nano lib/systemd/system/rc.local.service | |
在文件中最後加上 | |
[Install] | |
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"window.zoomLevel": 0, | |
"sync.gist": "f1c11c7a3f0ff5d0c3c19e298f69671c", | |
"sync.lastUpload": "", | |
"sync.autoDownload": false, | |
"sync.autoUpload": false, | |
"sync.lastDownload": "", | |
"sync.version": 262, | |
"sync.showSummary": true, | |
"sync.forceDownload": false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://kevintsengtw.blogspot.com/2018/08/aspnet-core-21-docker-image-nodejs.html | |
# install wget | |
RUN apt-get install -y wget | |
# install nodejs | |
ENV NODE_VERSION 10.8.0 | |
RUN wget https://nodejs.org/download/release/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.gz \ | |
&& tar -xzf "node-v${NODE_VERSION}-linux-x64.tar.gz" -C /usr/local --strip-components=1 \ | |
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://blog.51yip.com/cloud/1859.html | |
$ docker stop $(docker ps -a | grep "Exited" | awk '{print $1 }') //停止容器 | |
$ docker rm $(docker ps -a | grep "Exited" | awk '{print $1 }') //删除容器 | |
$ docker rmi $(docker images | grep "none" | awk '{print $3}') //删除镜像 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run --name qa-hrfe --rm -dit -p 8000:80 hrfe | |
docker run --name qa-hrfe-443 --rm -dit -p 443:443 hrfe | |
docker run --name qa-hr --rm -dit -p 8080:80 hr | |
docker run --name qa-hr-nginx --rm -dit -p 80:80 cec-nginx:1.0 | |
docker exec -ti <container> bash | |
docker commit -a '12061117' -m 'nginx init env' 6f80830d5132 cec-nginx:1.0 | |
docker run --name qa-hr-nginx --rm -dit -p 80:80 hr-nginx | |
docker run --name hr-nginx -p 80:80 -v /home/apps/nginx/html:/usr/share/nginx/html -d nginx | |
c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 一個專案push到多個遠端Git倉庫 | |
https://codertw.com/%E8%BB%9F%E9%AB%94%E9%96%8B%E7%99%BC%E5%B7%A5%E5%85%B7/22540/ | |
#display remote list | |
git remote -v | |
# add remote | |
git remote add <name> <your a repo url> | |
#push to remote |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sudo adduser | |
https://www.arthurtoday.com/2015/01/how-to-add-a-user-as-sudoer-using-the-command-line-in-ubuntu.html | |
# usermod | |
usermod -g root <user_name> | |
## cat /etc/passwd | |
## cat /etc/group | |
#server info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://www.opencli.com/linux/chmod-command |
NewerOlder