Burnchi

Burnchi

欢迎来到我的安全屋~
github
bilibili

Linux基础配置

bash

alias dcup='docker-compose up -d'
alias dcdown='docker-compose down'
alias dcps='docker ps -a'
alias dcit='docker exec -it'
alias dcstop='docker stop'
alias dcstart='docker start'
alias dcrm='docker rm'
alias l='ls'
alias port='netstat -tanpl'

常用工具

yum -y install vim curl wget lsof unzip git net-tools zsh
yum -y install epel-release (安装neofetch)
chsh -s /bin/zsh

/etc/vimrc

imap jk <ESC>
map :e! <F5>

ohmyzsh 框架

sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

手动下载 ohmyzsh

1. Clone the repository
git clone https://github.com/ohmyzsh/ohmyzsh.git ~/.oh-my-zsh
2. Optionally, backup your existing ~/.zshrc file
cp ~/.zshrc ~/.zshrc.orig
3. Create a new zsh configuration file
You can create a new zsh config file by copying the template that we have included for you.

cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
4. Change your default shell
chsh -s $(which zsh)
You must log out from your user session and log back in to see this change.

5. Initialize your new zsh configuration(重启)
Once you open up a new terminal window, it should load zsh with Oh My Zsh's configuration.

zsh 插件

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

主题

git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
vim ~/.zshrc
ZSH_THEME="powerlevel10k/powerlevel10k"
source ~/.zshrc

设置内存

wget -O box.sh https://raw.githubusercontent.com/BlueSkyXN/SKY-BOX/main/box.sh && chmod +x box.sh && clear && ./box.sh
yum -y update
yum -y install vim curl wget lsof unzip git net-tools zsh

下载 docker

sudo yum install -y yum-utils
sudo yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo
    
sudo yum -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
systemctl start docker
systemctl enable docker

docker-compose

sudo wget https://github.com/docker/compose/releases/download/v2.6.1/docker-compose-linux-x86_64 -O /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.