1 Star 0 Fork 34

Dkui / init_server

forked from Spring / init_server 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
init.sh 1.68 KB
一键复制 编辑 原始数据 按行查看 历史
廖师兄 提交于 2019-12-26 17:15 . update init.sh.
#!/bin/bash
yum update
yum -y install tmux git wget htop vim net-tools gcc g++
#配置git
cat > ~/.gitconfig<<EOF
[color]
ui = true
[alias]
st = status
co = checkout
lg = log --all --graph --abbrev-commit --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
br = branch -all
[core]
editor = vim
[push]
default = current
EOF
#配置tmux
cat > ~/.tmux.conf<<EOF
# remap prefix to Control + a
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf
# quick pane cycling
unbind ^A
bind ^A select-pane -t :.+
# split window
unbind '"'
bind - splitw -v # vertical split (prefix -)
unbind %
bind | splitw -h # horizontal split (prefix |)
#set -g default-terminal "screen-256color"
#set-option -g status-bg white
#set-option -g status-fg black
# color
set -g status-fg white
set -g status-bg black
setw -g window-status-fg cyan
setw -g window-status-bg default
#setw -g window-status-attr dim
setw -g window-status-current-fg white
setw -g window-status-current-bg cyan
#setw -g window-status-current-attr bright
set -g pane-border-fg white
#set -g pane-border-bg black
set -g pane-active-border-fg blue
#set -g pane-active-border-bg white
set -g message-fg white
set -g message-bg black
set -g message-attr bright
## status bar
set-option -g status-utf8 on
set -g status-interval 60
set -g status-left "#[fg=green]Session: #S #[fg=yellow]Window: #I #[fg=cyan]Pane: #P"
set -g status-left-length 30
set-option -g status-right "#[fg=cyan]#(date +%H:%M' ')" # right part: time lisk 23:59
set-option -g status-right-length 10 # more space left for center part (window names)
set -g status-justify centre
EOF
Shell
1
https://gitee.com/Dkui97/init_server.git
git@gitee.com:Dkui97/init_server.git
Dkui97
init_server
init_server
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891