Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
WTIFS committed Jan 31, 2024
1 parent 3a481a1 commit 7f5ffc3
Show file tree
Hide file tree
Showing 5 changed files with 114 additions and 6 deletions.
34 changes: 30 additions & 4 deletions Work/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ docker run -it --name 容器名称 -v 容器外目录:容器内目录 镜像名
```
docker run -it --name golang -v /Users/chris/Projects/go/src:/workspace -v /Users/chris:/root golang:latest /bin/bash
docker run -it --name golang1.17-amd64 -v /Users/chris/Projects/go/src:/workspace -v /Users/chris:/root --platform linux/amd64 golang:1.17 /bin/bash
docker run -it --name golang1.17-amd64 -v /Users/chris/Projects/go/src:/workspace -v /Users/chris:/root -v /usr/local/include:/usr/local/include --platform linux/amd64 golang:1.17 /bin/bash
docker run -it --name golang1.21-amd64 -v /Users/chris/Projects/go/src:/workspace -v /Users/chris:/root --platform linux/amd64 golang:1.21 /bin/bash
docker run -it --name golang1.21-amd64 -v /Users/chris/Projects/go/src:/workspace -v /Users/chris:/root -v /usr/local/include:/usr/local/include --platform linux/amd64 golang:1.21 /bin/bash
docker run -it --name gcc -v /Users/chris/Projects/go/src:/workspace -v /Users/chris:/root gcc /bin/bash
Expand Down Expand Up @@ -62,7 +62,9 @@ docker restart {containerID}
##### 启动北极星
```bash
docker run -d --name polaris-server -p 8190:8090 -p 8191:8091 polarismesh/polaris-server
docker run -d --name polaris-console -p 8180:8080 --link polaris-server
docker run -d --name polaris-console -p 8180:8080 --link polaris-server polarismesh/polaris-console

docker run -d --name polaris-console --net=host polarismesh/polaris-console

docker run -d --name polaris-server -p 8090:8090 -p 8091:8091 polarismesh/polaris-server
```
Expand All @@ -72,5 +74,29 @@ docker run -d --name polaris-server -p 8090:8090 -p 8091:8091 polarismesh/polari
# 16686: jaeger UI 端口
# 14268: jaeger API 端口
# 6831 jaeger agent 端口
docker run -d -e COLLECTOR_ZIPKIN_HTTP_PORT=9411 -p 16686:16686 -p 14268:14268 -p 14269:14269 -p 9411:9411 -p 6831:6831/udp jaegertracing/all-in-one:latest
docker run -d -e COLLECTOR_ZIPKIN_HTTP_PORT=9411 --net=host jaegertracing/all-in-one:latest

docker run -d -e COLLECTOR_ZIPKIN_HTTP_PORT=9411 -p 16686:16686 -p 14268:14268 -p 14269:14269 -p 9411:9411 -p 6831:6831/udp jaegertracing/all-in-one:latest
```

**启动 apollo**

```bash
git clone apollo-quick-start
docker-compose up
```

**启动mongo**

```bash
docker run -d --name mongo -p 27017:27017 mongo
```



编译

```
docker build -t harbor-v2.mobvista.com/dsp/mongo_checker:t0.0.7 -f docker/Dockerfile .
```

47 changes: 47 additions & 0 deletions Work/git.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ git config --global --get user.email
insteadOf = https://gitlab.xxx.com/
[url "[email protected]:"]
insteadOf = http://gitlab.xxx.com
// 或者执行
git config --global url."[email protected]:".insteadOf http://gitlab.xxx.com/
```


Expand Down Expand Up @@ -116,3 +119,47 @@ git rebase -i hash
git config --global credential.helper 'cache –timeout=3600' #保存一小时
```



##### centOS升级git版本

```go
1. 卸载旧版git
yum remove git

2.安装必要的依赖
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker

3.切换到路径
mkdir -p /data/lib
cd /data/lib

4.下载源码
wget https://www.kernel.org/pub/software/scm/git/git-2.17.1.tar.xz

5.解包
tar -vxf git-2.17.1.tar.xz

6.切换路径
mv git-2.17.1 git2.17.1
cd git2.17.1

7.编译安装
./configure --with-openssl=/usr/local/openssl

8.编译 (如果这一步出错可能是openssl版本太低,1.0版本)这时候需要先升级到1.1.x版本
make

9.安装
make install

10.检查(有输出证明好了)
./git --version

11.打开环境变量配置文件,修改环境变量
vim /etc/profile.d/sh.local

#在底部加上git相关配置
export PATH=/data/lib/git2.17.1:$PATH
```

4 changes: 2 additions & 2 deletions Work/gitlab-runner.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@



1. 添加源
1. 添加源(CentOS)

```bash
curl -L "https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh" | sudo bash
Expand Down Expand Up @@ -56,7 +56,7 @@ stages:
build-job:
stage: build
tags:
- xxx
- xxx # 使用的 gitlab-runner 的 tag 名称
only:
- merge_requests
script:
Expand Down
6 changes: 6 additions & 0 deletions Work/golang.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ gomonkey 不支持 Mac M2 芯片:使用如下方法运行测试:
##### gomod graph

绘制依赖图



**安装**

wget
29 changes: 29 additions & 0 deletions Work/ssh.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,32 @@ ClientAliveInterval 60
ClientAliveCountMax 5
```



##### 创建用户

```bash
useradd 用户名
```



##### 清除用户密码

```bash
passwd -d 用户名
```



##### 授予用户root权限

```
vim /etc/sudoers
## Allow root to run any commands anywhere
用户名 ALL=(ALL) ALL
```



0 comments on commit 7f5ffc3

Please sign in to comment.