Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
doc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
frank.chen
doc
Commits
2cc8391f
Commit
2cc8391f
authored
Apr 08, 2026
by
frank.chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vim 升级
parent
dffc31e6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
245 additions
and
9 deletions
+245
-9
settings.json
.vscode/settings.json
+2
-4
ssp-avro.typ
doc-code/日志格式/ssp-avro.typ
+175
-0
Linux 增加用户.md
通用/Linux 增加用户.md
+3
-1
sudo.md
通用/sudo.md
+6
-4
vim升级.md
通用/vim升级.md
+59
-0
No files found.
.vscode/settings.json
View file @
2cc8391f
...
@@ -3,9 +3,6 @@
...
@@ -3,9 +3,6 @@
"window.activeBorder"
:
"#6dad4fad"
,
"window.activeBorder"
:
"#6dad4fad"
,
"editor.lineHighlightBorder"
:
"#95363671"
,
"editor.lineHighlightBorder"
:
"#95363671"
,
"editor.selectionBackground"
:
"#1a2cce65"
,
"editor.selectionBackground"
:
"#1a2cce65"
,
"editor.selectionHighlightBackground"
:
"#1c2ed478"
,
"editor.selectionHighlightBackground"
:
"#1c2ed478"
"activityBar.background"
:
"#08323A"
,
"titleBar.activeBackground"
:
"#0B4751"
,
"titleBar.activeForeground"
:
"#F4FCFD"
}
}
}
}
\ No newline at end of file
doc-code/日志格式/ssp-avro.typ
0 → 100644
View file @
2cc8391f
#let sspAvroInfo = (
([appStoreLogId], [string], [广告匹配日志id], [157dd3ac-a26a-4ac8-a92c-d01376bf4cd5]),
([batchLogId], [string], [请求ID,标识一次请求], [239410ed-01b5-409a-9324-7211c0fcaa52]),
([referLogId], [string], [trace 日志ID], [239410ed-01b5-409a-9324-7211c0fcaa52]),
([originAdsourceId], [string], [URL中的参数 original,具体不明], []),
([matchOrder], [int], [原来有其他用途,后来改为当前服务器IP的整数形式], []),
([appId], [long], [appid], [19641]),
([sourcePorductId], [string], [广告 product id], [000000798071]),
([sourceAppId], [string], [包名], [com.Qunar]),
([creativeClickUrl], [string], [创意的点击跳转地址], [`samsungapps://PromotionDetail/1000000972`]),
([campaignId], [long], [活动 ID], [23354]),
([strategyId], [long], [策略 ID], [59192]),
([creativeId], [long], [创意 ID], [42386]),
([mediaId], [long], [流量媒体 ID], []),
([adPosId], [long], [], [351]),
([strategyPrice], [long], [竞价价格值], []),
([dealPrice], [long], [竞价价格值], [63000]),
([payPrice], [long], [广告匹配无值,广告通知才有值], [63000]),
([encodeAdsource], [string], [广告匹配的adsource], []),
([decodeAdsource], [string], [广告通知里记录的url参数中的adsource], []),
([logType], [int], [日志类型,1 匹配;2 展示;3 action(点击、下载或安装、等等其他类型)], []),
([matchType], [int], [广告匹配类型,1 普通;2 搜索。], []),
([isMatched], [int], [是否成功匹配到广告,1 成功;0 失败], []),
([isImpression], [int], [日志是否为展示通知], []),
([isClick], [int], [日志是否为点击通知], []),
([actionType], [int], [日志是否为其他事件通知,即url路径为 store/action], []),
([isHome], [int], [日志是否为进入主页通知], []),
([isDownload], [int], [日志是否为下载通知], []),
([isInstall], [int], [日志是否为安装通知], []),
([logTimestamp], [long], [时间戳], []),
([logDate], [string], [无值], []),
([logTime], [string], [无值], []),
([userIp], [string], [终端 IP], []),
([zoneCountry], [string], [由终端IP推算的国家名], []),
([zoneProvince], [string], [由终端IP推算的省份名], []),
([zoneCity], [string], [由终端IP推算的城市名], []),
([userId], [string], [用户ID], [Yjg0OWY1ZTgxYWY5OTc3MzQ0NzRlMjhkYmE0N2Y2MmMzMzIyOTQyZGY3MzM1N2I4NTljNjU5OTdkZmJhNjRiNA==]),
([userPhone], [string], [无值], []),
([userAgent], [string], [useragent,即 UA], []),
([userOs], [string], [操作系统, url 参数 dos], [33]),
([userDeviceBrand], [string], [品牌, 参数 db], [Samsung]),
([userDeviceModel], [string], [型号, 参数 dt], [SM-C9000]),
([userLanguage], [string], [参数vc], [4.5.26.2]),
([userDisplaySize], [string], [分辨率 参数 dis], []),
([usernetWork], [string], [网络链接方式, 参数 nt], []),
([deviceApps], [string], [用户手机上已经安装的app列表,url 参数 apps], []),
([searchKeyWords], [string], [用户搜索关键字,或url参数 pkgname], [赶走野蜂方法]),
([cheatType], [int], [匹配广告时,活动有没有匹配到请求时的搜索关键字], []),
([voucherFlag], [int], [是否优先消耗虚拟币(0为现金优先,1为优先虚拟币),取自共享内存里的广告策略], []),
([matchKeyWords], [string], [匹配到的平台设置的关键词], []),
([reserveInt], [int], [ctr class], []),
([reserveLong], [long], [无值], [0]),
([reserveString], [string], [切词匹配时候,记录切词信息], []),
([oaid], [string], [], [`9c7ba72d2f5ce06ac3fa46cd329cac2f957cb0552b505ead22a43e97e155fd58`]),
([imei], [string], [], []),
([cost_price], [double], [广告 app 配置的 CostRatio], []),
([from_mediaid], [int], [from_mediaid 当前广告位是详情页时,该参数指示,详情页由哪个前置广告位带来], []),
([dspEcpm], [long], [dsp返回的ecpm,单位做了转换,万分之一元], []),
([CPM2CPDRatio], [double], [我们配置的转换因子], []),
([ctr], [double], [预测时的转换率], [0.0045]),
([ctrFactor], [double], [配置的ctr提升因子], [90]),
([adIndex], [int], [同一个广告位中匹配到的创意次序], []),
([llmtags], [string], [url 参数 llmtags], [`野蜂驱赶*方法查询*生活技巧`]),
([llmapps], [string], [url 参数 llmapps], [`百度经验*知乎*豆丁网`]),
([cvr], [double], [预测时返回的 cvr], [0.000147]),
([ocpxstage], [int], [ocpx 阶段], [1]),
([ecpm], [double], [最初为zzy预测返回的ecpm,未来可能作它用,注意zzy返回的是单次展示价格,不是千次], [0.00257]),
([osv], [string], [操作系统版本号], [15]),
)
= 表格 ssp avro 说明
#{
show table.cell: cell => {
show regex("\b.+?\b"): it => it.text.codepoints().join(sym.zws)
cell
}
table(
stroke: 0.5pt,
columns: (20%, 10%, 35%, 35%),
align: (left, center, left, left),
[*字段名*], [*类型*], [*说明*], [*例子*],
..for (name, dataType, note, example) in sspAvroInfo {
(
name,
dataType,
note,
example
)
}
)
}
#pagebreak()
= 程序 schema
#let schema = [
```json
{
"name" : "appStoreLog", "type" : "record",
"fields" : [
{ "name" : "appStoreLogId", "type" : "string" },
{ "name" : "batchLogId", "type" : "string" },
{ "name" : "referLogId", "type" : "string" },
{ "name" : "originAdsourceId", "type" : "string" },
{ "name" : "matchOrder", "type" : "int" },
{ "name" : "appId", "type" : "long" },
{ "name" : "sourcePorductId", "type" : "string" },
{ "name" : "sourceAppId", "type" : "string" },
{ "name" : "creativeClickUrl", "type" : "string" },
{ "name" : "campaignId", "type" : "long" },
{ "name" : "strategyId", "type" : "long" },
{ "name" : "creativeId", "type" : "long" },
{ "name" : "mediaId", "type" : "long" },
{ "name" : "adPosId", "type" : "long" },
{ "name" : "strategyPrice", "type" : "long" },
{ "name" : "dealPrice", "type" : "long" },
{ "name" : "payPrice", "type" : "long" },
{ "name" : "encodeAdsource", "type" : "string" },
{ "name" : "decodeAdsource", "type" : "string" },
{ "name" : "logType", "type" : "int" },
{ "name" : "matchType", "type" : "int" },
{ "name" : "isMatched", "type" : "int" },
{ "name" : "isImpression", "type" : "int" },
{ "name" : "isClick", "type" : "int" },
{ "name" : "actionType", "type" : "int" },
{ "name" : "isHome", "type" : "int" },
{ "name" : "isDownload", "type" : "int" },
{ "name" : "isInstall", "type" : "int" },
{ "name" : "logTimestamp", "type" : "long" },
{ "name" : "logDate", "type" : "string" },
{ "name" : "logTime", "type" : "string" },
{ "name" : "userIp", "type" : "string" },
{ "name" : "zoneCountry", "type" : "string" },
{ "name" : "zoneProvince", "type" : "string" },
{ "name" : "zoneCity", "type" : "string" },
{ "name" : "userId", "type" : "string" },
{ "name" : "userPhone", "type" : "string" },
{ "name" : "userAgent", "type" : "string" },
{ "name" : "userOs", "type" : "string" },
{ "name" : "userDeviceBrand", "type" : "string" },
{ "name" : "userDeviceModel", "type" : "string" },
{ "name" : "userLanguage", "type" : "string" },
{ "name" : "userDisplaySize", "type" : "string" },
{ "name" : "usernetWork", "type" : "string" },
{ "name" : "deviceApps", "type" : "string" },
{ "name" : "searchKeyWords", "type" : "string" },
{ "name" : "cheatType", "type" : "int" },
{ "name" : "voucherFlag", "type" : "int" },
{ "name" : "matchKeyWords", "type" : "string" },
{ "name" : "reserveInt", "type" : "int" },
{ "name" : "reserveLong", "type" : "long" },
{ "name" : "reserveString", "type" : "string" },
{ "name" : "oaid", "type" : "string" },
{ "name" : "imei", "type" : "string" },
{ "name" : "cost_price", "type" : "double" },
{ "name" : "from_mediaid", "type" : "int" },
{ "name" : "dspEcpm", "type" : "long" },
{ "name" : "CPM2CPDRatio", "type" : "double" },
{ "name" : "ctr", "type" : "double" },
{ "name" : "ctrFactor", "type" : "double" },
{ "name" : "adIndex", "type" : "int" },
{ "name" : "llmtags", "type" : "string" },
{ "name" : "llmapps", "type" : "string" },
{ "name" : "cvr", "type" : "double" },
{ "name" : "ocpxstage", "type" : "int" },
{ "name" : "ecpm", "type" : "double" },
{ "name" : "osv", "type" : "string" }
]
}
```
]
#schema
通用/Linux 增加用户.md
View file @
2cc8391f
...
@@ -12,7 +12,9 @@ passwd adminuser
...
@@ -12,7 +12,9 @@ passwd adminuser
设置 密钥 .ssh
设置 密钥 .ssh
su adminuser
su adminuser
mkdir ~/.ssh && chmod 700 ~/.ssh && cd .ssh
vi authorized_keys 并 增加 adx-stg(或其他) 的 pub key
chmod 600 authorized_keys
```
```
## adx-user
## adx-user
...
...
通用/sudo.md
View file @
2cc8391f
...
@@ -26,6 +26,8 @@ chmod u-w /etc/sudoers
...
@@ -26,6 +26,8 @@ chmod u-w /etc/sudoers
```
```
### wheel 组
### wheel 组
-
一般将 用户 加入 wheel 组
-
一般将 用户 加入 wheel 组
-
也可以在 /etc/sudoers 里,单独加一行,比如:
-
root 下执行
`usermod -aG wheel adminuser`
-
adx-user ALL=(ALL) NOPASSWD: ALL
-
或者,也可以在 /etc/sudoers 里,单独加一行,比如:
\ No newline at end of file
-
adx-user ALL=(ALL) NOPASSWD: ALL
-
adminuser ALL=(ALL) NOPASSWD: ALL
\ No newline at end of file
通用/vim升级.md
0 → 100644
View file @
2cc8391f
## 纯 vim 升级流程
```
https://github.com/vim/vim/archive/refs/tags/v9.2.0321.tar.gz
sudo yum install -y ncurses-devel
./configure --with-features=huge \
--enable-multibyte \
--enable-python3interp=yes \
--prefix=/usr/local
make -j3 && sudo make install
sudo mv /usr/bin/vim /usr/bin/vim.bak && sudo ln -s /usr/local/bin/vim /usr/bin/vim && vim --version | grep IMproved
```
## 部署
-
使用 fabric 提升效率,程序化部署
-
在 nginx-stg 上执行部署
```
nginx-stg 和 adx-stg 的 ssh pub key
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQChvocXtJkSeKaX5Iv7kXoj9vsWA8i2w2bZmTek9Bb0TYQ6gSu3AQZ0brOcCcwVjNxfVVjCx0/S0dJvSBc2GwZcoyeflE3cx5yCosKWybLmZbTcbz38bNgmUfIlwANZ3lltbMY17Qh/+SxQUthf21Jxl8YhFTF4HV8Mt7uakX3bdwd2hfRwuORiMp0I+8o6aXCYvf0AVdzkSgAc0eeMu5bfQyqoUH92HdChquuslqB23398D/fXOPFLUKq0pvVFKNk/Ps3V/0fG0QI5uOCKyq5Lh8JqmzIc/wujFckETskywaw28Cq610xLWid8j9iS86TTE4HALMrLTXgFbmsjoX03 adminuser@appstore-nginx-test
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDEJzz5WZCVc/3McT+QJwpAO8fHI7YFcDjtFpi+5wOTwwDLlT5rc27GEVR7GRqPhWLFYoi4OWddJnYYTFTEWUVLyvzKmzf1bbsdn74zac4O6qRAEO5wH3rUoMDssseoKW3bj4j9vUeNnoZXmF1T7buCv0wCjtPB9AdRST9+lfecGuDGifu3R9MCrncv/XN9ypyPUx6ax2qmPk/or9VbygdBjjExfpt7LupASYyQFbJgqnCaKnglI8JlvgRBnRTsP+4+ah23TYYhJ1SoCm2nBFFDdAVkKQOA998BlkA2YjG3+NEqZdL5IZNiV/ger+K4h+V+dI7r+4OhCLePOPRx4x5N adx-user@instance-wg2fujgd-3
```
## 升级的服务器
-
手动升级:跳转机 jump,nginx-stg,sync,api
-
fabric 程序升级:nginx-1~8, adx-stg, adx-1, adx-2, proxy1, proxy2, trace-1, trace-2, log, tools
## vim 升级
| IP | EIP | Name | Desc |
| ------------- | -------------- | --------- | --------- |
| 192.168.20.30 | 180.184.56.133 | 跳转机 | |
| 192.168.2.2 | 180.184.61.244 | nginx-stg | |
| 192.168.2.5 | 180.184.61.206 | nginx-1 | |
| 192.168.2.15 | 180.184.61.109 | nginx-2 | |
| 192.168.2.16 | 180.184.61.174 | nginx-3 | |
| 192.168.2.17 | 180.184.61.155 | nginx-4 | |
| 192.168.2.18 | 180.184.61.51 | nginx-5 | |
| 192.168.2.19 | 180.184.61.225 | nginx-6 | |
| 192.168.2.20 | 180.184.61.251 | nginx-7 | |
| 192.168.2.21 | 180.184.61.209 | nginx-8 | |
| 192.168.20.26 | 180.184.56.136 | adx-stg | |
| 192.168.10.77 | 115.190.164.21 | adx-1 | |
| 192.168.10.75 | | adx-2 | |
| 192.168.20.41 | 180.184.26.122 | traceEx-1 | |
| 192.168.1.3 | 180.184.26.107 | traceEx-2 | |
| 192.168.20.36 | 180.184.26.71 | proxyEx-1 | |
| 192.168.20.37 | 180.184.26.17 | proxyEx-2 | |
| 192.168.20.5 | 180.184.56.143 | log 落盘 | |
| 192.168.2.4 | 180.184.61.34 | api | 安装卸载 |
| 192.168.30.98 | 180.184.61.83 | sync | 自然量 |
| 192.168.30.66 | 180.184.61.54 | tools | 发邮件 |
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment