0%

装机

安装宝塔

安装LNMP

安装zsh

  1. 安装zsh

    1
    apt-get install zsh 
  2. 切换默认shell

    1
    chsh -s /bin/zsh

    重新连接ssh

  3. 安装zinit(作者跑路了 有人维护了)

    https://www.dazhuanlan.com/2020/04/01/5e83ef650bc49/

    1
    sh -c "$(curl -fsSL https://git.io/zinit-install)"

    在.zshrc最下方添加如下内容

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33

    # 快速目录跳转
    zinit ice lucid wait='1'
    zinit light skywind3000/z.lua

    # 语法高亮
    zinit ice lucid wait='0' atinit='zpcompinit'
    zinit light zdharma-continuum/fast-syntax-highlighting

    # 自动建议
    zinit ice lucid wait="0" atload='_zsh_autosuggest_start'
    zinit light zsh-users/zsh-autosuggestions

    # 补全
    zinit ice lucid wait='0'
    zinit light zsh-users/zsh-completions

    # 加载 OMZ 框架及部分插件
    zinit snippet OMZ::lib/completion.zsh
    zinit snippet OMZ::lib/history.zsh
    zinit snippet OMZ::lib/key-bindings.zsh
    zinit snippet OMZ::lib/theme-and-appearance.zsh
    zinit snippet OMZ::plugins/colored-man-pages/colored-man-pages.plugin.zsh
    zinit snippet OMZ::plugins/sudo/sudo.plugin.zsh

    zinit snippet OMZ::plugins/extract

    zinit ice lucid wait='1'
    zinit snippet OMZ::plugins/git/git.plugin.zsh

    # 加载 pure 主题
    zinit ice pick"async.zsh" src"pure.zsh"
    zinit light sindresorhus/pure
  4. 应用修改

    1
    source .zshrc

    shopt错误解决

    https://blog.csdn.net/supertree_l/article/details/88299206

宝塔安装node+pm2

添加非root用户

  1. 命令

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    groupadd abc
    useradd -m abc -g abc -s /bin/bash -d /home/abc
    passwd abc

    # 关于useradd命令的参数意义如下,供参考:
    # -c<备注>:加上备注文字。备注文字会保存在passwd的备注栏位中;
    # -d<登入目录>:指定用户登入时的启始目录; -D:变更预设值;
    # -e<有效期限>:指定帐号的有效期限;
    # -f<缓冲天数>:指定在密码过期后多少天即关闭该帐号;
    # -g<群组>:指定用户所属的群组;
    # -G<群组>:指定用户所属的附加群组;
    # -m:自动建立用户的登入目录;
    # -M:不要自动建立用户的登入目录;
    # -n:取消建立以用户名称为名的群组;
    # -r:建立系统帐号;
    # -s:指定用户登入后所使用的shell;
    # -u:指定用户id。
  2. 修改sudoers后,用wq!保存

安装anaconda3

  1. https://cloud.tencent.com/developer/article/1360739
  2. 下载地址https://repo.anaconda.com/archive
  3. 安装完source ~/.zshrc
阅读全文 »

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate
阅读全文 »