eumji025 / common-resource

记录公共资源的仓库
MIT License
0 stars 0 forks source link

rebuild linux workspace #4

Open eumji025 opened 5 years ago

eumji025 commented 5 years ago

question

openresty

./configure: error: the HTTP rewrite module requires the PCRE library.

centos: yum -y install pcre-devel

ubuntu:

apt-get install libpcre3-dev \ libssl-dev perl make build-essential curl

sudo apt-get install zlib1g-dev

link

https://blog.csdn.net/z920954494/article/details/52132125

语法高亮

1.vim语法高亮 首先下载nginx的源文件

cd nginx-home-path/ sudo cp contrib/* -R ~/.vim/

2.vs code 在vs code的商店安装nginx support插件

3.jetrain soft

learning artcle

https://www.centos.bz/2017/03/using-nginx-limit_req-limit-user-request-rate/ http://www.ttlsa.com/nginx/nginx-limited-connection-number-ngx_http_limit_conn_module-module/

eumji025 commented 5 years ago

gnome

1.change source.list sudo apt vim /etc/apt/source.list

deb http://mirrors.aliyun.com/ubuntu/ eoan main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ eoan-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ eoan-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ eoan-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ eoan-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ eoan main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ eoan-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ eoan-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ eoan-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ eoan-backports main restricted universe multiverse

# deb http://mirrors.163.com/ubuntu/ eoan main restricted universe multiverse
# deb http://mirrors.163.com/ubuntu/ eoan-security main restricted universe multiverse
# deb http://mirrors.163.com/ubuntu/ eoan-updates main restricted universe multiverse
# deb http://mirrors.163.com/ubuntu/ eoan-proposed main restricted universe multiverse
# deb http://mirrors.163.com/ubuntu/ eoan-backports main restricted universe multiverse
# deb-src http://mirrors.163.com/ubuntu/ eoan main restricted universe multiverse
# deb-src http://mirrors.163.com/ubuntu/ eoan-security main restricted universe multiverse
# deb-src http://mirrors.163.com/ubuntu/ eoan-updates main restricted universe multiverse
# deb-src http://mirrors.163.com/ubuntu/ eoan-proposed main restricted universe multiverse
# deb-src http://mirrors.163.com/ubuntu/ eoan-backports main restricted universe multiverse

# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

# deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
# deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
# deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
# deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
# deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb https://dl.winehq.org/wine-builds/ubuntu/ eoan main
# deb-src https://dl.winehq.org/wine-builds/ubuntu/ eoan main
# deb-src https://dl.winehq.org/wine-builds/ubuntu/ eoan main
eumji025 commented 5 years ago

winehq

ubuntu/ubuntukylin/mint(https://wiki.winehq.org/Ubuntu) sudo dpkg –add-architecture i386 wget -nc https://dl.winehq.org/wine-builds/winehq.key sudo apt-key add winehq.key

Ubuntu 19.04

sudo apt-add-repository ‘deb https://dl.winehq.org/wine-builds/ubuntu/ disco main’

Ubuntu 18.10

sudo apt-add-repository ‘deb https://dl.winehq.org/wine-builds/ubuntu/ cosmic main’

Ubuntu 18.04/Linux Mint 19.x

sudo apt-add-repository ‘deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main’

Ubuntu 16.04/Linux Mint 18.x

sudo apt-add-repository ‘deb https://dl.winehq.org/wine-builds/ubuntu/ xenial main’ sudo apt update sudo apt install –install-recommends winehq-develhttps://ph

wine qq install http://pcj.org/wineqq/

eumji025 commented 5 years ago

终端配置

查看现有的shell

cat /etc/shells

切换shell

chsh -s /usr/local/bin/fish

vim的配色和插件

1.install vim theme https://github.com/joshdick/onedark.vim

2.install vim package manager

https://github.com/sheerun/vim-polyglot https://github.com/junegunn/vim-plug

根据文档进行尝试就会成功,注意在ubuntu中默认vim是不会在~目录下创建.vim文件夹的,需要自己建立和配置

bash操作

使用zsh https://blog.csdn.net/weixin_38111667/article/details/86157841

2.修改zsh主题 参考 https://github.com/agnoster/agnoster-zsh-theme

fish

sudo apt install fish

git clone https://github.com/oh-my-fish/oh-my-fish

cd oh-my-fish

fish bin/install --offline

注意最后一步,必须按照我那样去使用否则安装不成功。 为什么安装fish之后还要从git拉去并进行编译,因为我们需要使用omf来管理fish的插件

omf intall agnoster ome theme agnoster 下载病使用agnoster主题

eumji025 commented 5 years ago

wps下载地址 https://wdl1.cache.wps.cn/wps/download/ep/Linux2019/8865/wps-office_11.1.0.8865_amd64.deb

eumji025 commented 5 years ago

参考资料 常用软件

正则表达式网址

eumji025 commented 5 years ago

linux常见问题

E: dpkg 被中断,您必须手工运行 ‘sudo dpkg --configure -a’ 解决此问题。

sudo rm /var/lib/dpkg/updates/*
sudo apt-get update
sudo apt-get upgrade
eumji025 commented 5 years ago

环境变量配置

etc/profile

export GOROOT=/opt/golang
export GOPATH=/home/eumji/workspace/golang
export PATH=$PATH:$GOROOT/bin
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:/opt/GoLand-2019.2.3/bin
export PATH=$PATH:/opt/openresty/nginx/sbin
export NODE_HOME=/opt/node-js
export PATH=$NODE_HOME/bin:$PATH

vimrc


syntax on
colorscheme onedark

call plug#begin('~/.vim/plugged')
Plug 'sheerun/vim-polyglot'
Plug 'mikelue/vim-maven-plugin'
Plug 'NLKNguyen/vim-maven-syntax'
Plug 'scrooloose/nerdtree'
Plug 'Valloric/YouCompleteMe'

call plug#end()
eumji025 commented 5 years ago

代理

命令行socket5转http代理

eumji025 commented 5 years ago

vim

基本操作

参考: vim选中复制粘贴

nerdtree

按键

NERDTree的常用快捷键:

h j k l移动光标定位
ctrl+w+w 光标在左右窗口切换
ctrl+w+r 切换当前窗口左右布局
ctrl+p 模糊搜索文件
gT 切换到前一个tab
g t 切换到后一个tab
o 打开关闭文件或者目录,如果是文件的话,光标出现在打开的文件中
O 打开结点下的所有目录
X 合拢当前结点的所有目录
x 合拢当前结点的父目录
i和s水平分割或纵向分割窗口打开文件
u 打开上层目录
t 在标签页中打开
T 在后台标签页中打开
p 到上层目录
P 到根目录
K 到同目录第一个节点
J 到同目录最后一个节点
m 显示文件系统菜单(添加、删除、移动操作)
? 帮助
:q 关闭
ma 新建文件或文件夹
md 删除

m 呼出NERDTree的操作菜单,有a m d c l 四种操作

参考文章

https://segmentfault.com/q/1010000000630879 https://yang3wei.github.io/blog/2013/01/29/nerdtree-kuai-jie-jian-ji-lu/

eumji025 commented 4 years ago

常用软件

charles

下载地址:https://www.charlesproxy.com/packages/apt/pool/main/c/charles-proxy/ 攻略: https://www.zzzmode.com/mytools/charles/

axel -> terminal下载

下载: sudo apt install axel axel url

kong

下载地址:https://bintray.com/kong/kong-deb/ubuntu

vmware

参考地址:http://beikeit.com/post-513.html

eumji025 commented 4 years ago

gnome extations

移除标题栏

eumji025 commented 4 years ago

locust

locust 相对于 ab、wrk 来说最大的优点是它不再只是测试一个 url,而是可以测试一个自定义的场景,其中可以包含多个有相互关联的 url,此外,它还是分布式可扩展的,可以模拟大量用户的访问,由此可以得到更贴近真实环境的测试数据。

源码: https://github.com/locustio/locust

安装

sudo apt install python3-pip pip3 intall locustio

使用

https://locust.io/