add
This commit is contained in:
parent
a6dd50a923
commit
c4a729c83d
@ -2,23 +2,26 @@
|
||||
id: "2018-11-20-10-38-05"
|
||||
date: "2018/11/20 10:38:05"
|
||||
title: "1.linux下mongodb的配置与安装"
|
||||
tags: ["docker", "linux","ubuntu"]
|
||||
tags: ["docker", "linux", "ubuntu"]
|
||||
categories:
|
||||
- "linux"
|
||||
- "docker教程"
|
||||
- "linux"
|
||||
- "docker教程"
|
||||
---
|
||||
|
||||
# 一、安装
|
||||
|
||||
  有两种安装方法,脚本安装和apt安装
|
||||
  有两种安装方法,脚本安装和 apt 安装
|
||||
|
||||
## 1、脚本安装
|
||||
|
||||
  root下执行以下命令(非root下会要求输入密码):
|
||||
  root 下执行以下命令(非 root 下会要求输入密码):
|
||||
|
||||
```bash
|
||||
wget -qO- https://get.docker.com/ | sh
|
||||
```
|
||||
|
||||
等待执行完毕后会有如下提示:
|
||||
|
||||
```
|
||||
If you would like to use Docker as a non-root user, you should now consider
|
||||
adding your user to the "docker" group with something like:
|
||||
@ -26,12 +29,15 @@ wget -qO- https://get.docker.com/ | sh
|
||||
sudo usermod -aG docker 用户名
|
||||
Remember that you will have to log out and back in for this to take effect!
|
||||
```
|
||||
就是如果要以非root用户直接运行docker时需要执行`sudo usermod -aG docker 非root用户名`,然后重新登陆即可。
|
||||
|
||||
就是如果要以非 root 用户直接运行 docker 时需要执行`sudo usermod -aG docker 非root用户名`,然后重新登陆即可。
|
||||
|
||||
<!-- more -->
|
||||
|
||||
## 2、apt安装
|
||||
  直接运行(root下)
|
||||
## 2、apt 安装
|
||||
|
||||
  直接运行(root 下)
|
||||
|
||||
```bash
|
||||
apt-get update
|
||||
apt-get install docker.io
|
||||
@ -40,14 +46,22 @@ apt-get install docker.io
|
||||
# 二、配置国内源
|
||||
|
||||
  国外源太慢配置为国内源。修改或创建`/etc/docker/daemon.json`,内容如下:
|
||||
|
||||
```json
|
||||
{
|
||||
"registry-mirrors": [
|
||||
"加速地址"
|
||||
],
|
||||
"registry-mirrors": ["加速地址"],
|
||||
"insecure-registries": []
|
||||
}
|
||||
```
|
||||
|
||||
以下是国内加速地址:
|
||||
|
||||
- 网易 [http://hub-mirror.c.163.com](http://hub-mirror.c.163.com)
|
||||
- ustc [https://docker.mirrors.ustc.edu.cn](https://docker.mirrors.ustc.edu.cn)
|
||||
|
||||
然后重启生效
|
||||
|
||||
```bash
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl restart docker
|
||||
```
|
||||
|
@ -2,10 +2,10 @@
|
||||
id: "2019-02-01-14-05"
|
||||
date: "2019/02/01 14:05"
|
||||
title: "3.从零开始在docker中部署java应用"
|
||||
tags: ["docker","springboot","jar","war","elastricsearch","activemq"]
|
||||
tags: ["docker", "springboot", "jar", "war", "elastricsearch", "activemq"]
|
||||
categories:
|
||||
- "linux"
|
||||
- "docker教程"
|
||||
- "linux"
|
||||
- "docker教程"
|
||||
---
|
||||
|
||||
**本篇原创发布于 Flex 的个人博客**:[点击跳转](http://tapme.top/blog/detail/2019-02-01-14-05)
|
||||
@ -207,6 +207,8 @@ docker run -itd --name=oms -p 8082:9090 -v /etc/localtime:/etc/localtime -v /etc
|
||||
docker run -itd --name=das -p 8083:9099 -v /etc/localtime:/etc/localtime -v /etc/timezone:/etc/timezone -v /root/das.jar:/opt/oms -w /opt --link es1 --link activemq --link oms-mysql --link eureka-server jre:v1 java -jar das.jar
|
||||
```
|
||||
|
||||
  本篇只是记录了如何使用`一容器一进程`的方式来部署 java 应用,后续可能会继续学习容器编排和容器管理技术。
|
||||
  本篇只是记录了如何使用`一容器一进程`的方式来部署 java 应用.
|
||||
|
||||
**PS:不推荐这么直接手撸命令,建议使用 docker-compose**
|
||||
|
||||
**本篇原创发布于 Flex 的个人博客**:[点击跳转](http://tapme.top/blog/detail/2019-02-01-14-05)
|
||||
|
62
linux/软件安装/linux搭建nextcloud个人网盘.md
Normal file
62
linux/软件安装/linux搭建nextcloud个人网盘.md
Normal file
@ -0,0 +1,62 @@
|
||||
---
|
||||
id: "20190516"
|
||||
date: "2019/05/16 10:38:05"
|
||||
title: "Linux下使用nextcloud搭建个人网盘"
|
||||
tags: ["linux", "nextcloud", "个人网盘"]
|
||||
categories:
|
||||
- "linux"
|
||||
- "软件安装"
|
||||
---
|
||||
|
||||
市面上有那么多的网盘服务提供商,为什么还要自己搭建网盘呢?主要有以下原因:
|
||||
|
||||
- 免费的网盘都有种种限制,要么不限速容量小(onedriver,google driver),要么容量大限速(百度云)
|
||||
- 付费网盘服务又太贵,穷逼用不起
|
||||
- 数据放在别人的服务器不安全,说不定就变成 8s 了
|
||||
- 瞎折腾有趣
|
||||
|
||||
两三个月前,矿难无情人友情,三百块入手了一台 4 盘位的 nas 主机,装上 ubuntu,就开始了折腾。
|
||||
|
||||
![主界面](https://raw.githubusercontent.com/FleyX/files/master/blogImg/20190516134611.png)
|
||||
|
||||
为什么要选择 nextcloud 呢?
|
||||
|
||||
- 开源
|
||||
- 各个平台都有客户端,方便管理
|
||||
- 功能很完善
|
||||
|
||||
下面开始正文,搭建 nextcloud。
|
||||
|
||||
推荐使用 docker 来搭建环境,非常方便。
|
||||
|
||||
1. 首先安装 docker 环境,参考这篇:[docker 安装](https://www.tapme.top/blog/detail/1.linux下mongodb的配置与安装)
|
||||
|
||||
2. 安装 docker-compose
|
||||
|
||||
```bash
|
||||
sudo apt-get install docker-compose
|
||||
```
|
||||
|
||||
3. 编写 docker-compose.yml
|
||||
|
||||
```yaml
|
||||
version: "2"
|
||||
services:
|
||||
nextcloud:
|
||||
image: nextcloud
|
||||
container_name: nextcloud
|
||||
volumes:
|
||||
- /home/nextcloud:/var/www/html
|
||||
ports:
|
||||
- 8080:80
|
||||
```
|
||||
|
||||
4. 启动
|
||||
|
||||
docker-compose.yml 文件所在目录执行`docker-compose up -d`。便能够通过访问 ip+端口,进入 web 端界面。在设置界面可以调成中文。默认进入是英文。
|
||||
|
||||
提供一个测试账号:ali.tapme.top:8007 test/testgggg
|
||||
|
||||
请勿恶意大量上传下载哦!
|
||||
|
||||
**本文原创发布于:**[https://www.tapme.top/blog/detail/20190516](https://www.tapme.top/blog/detail/20190516)
|
Loading…
x
Reference in New Issue
Block a user