Skip to content

云服务器初始化

Published: at 02:29编辑该页面

更新系统

yum update

添加用户

adduser hmilyld
passwd hmilyld

安装 zsh 及 oh-my-zsh

yum install zsh
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

安装 zsh-autosuggestions

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

安装 nvm

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash

修改~/.zshrc 配置文件

export ZSH="/home/用户名/.oh-my-zsh"
ZSH_THEME="gentoo"
plugins=(git z zsh-autosuggestions)
source $ZSH/oh-my-zsh.sh

alias ll='ls -la'
alias python='python3'

export NVM_NODEJS_ORG_MIRROR=http://npm.taobao.org/mirrors/node

export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

刷新~/.zshrc 配置

source ~/.zshrc

安装 node 及 npm

nvm install stable

上一篇
LNMP VPS自动备份网站发送邮件
下一篇
flarum安装配置及一些常见问题