這些不是必須都作的,只不過是我我的的習慣,在此記錄一下。html
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
yum clean all yum makecache yum update
# 臨時關閉防火牆 service iptables stop # 永久關閉防火牆 chkconfig iptables off
ssh免密登錄設置教程git
yum -y install man
注意:先安裝zsh後再執行,否則安裝zsh後又變回原來的樣子了github
# 方法一: # 在~/.bash_profile文件中添加LS_COLORS export LS_COLORS='no=00:fi=00:di=01;33:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=01;35:*.cmd=01;35:*.exe=01;35:*.com=01;35:*.btm=01;35:*.bat=01;35:*.sh=01;35:*.csh=01;35:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:' # 方法二: # 拷貝/etc/DIR_COLORS文件爲當前主目錄的 .dir_colors cp /etc/DIR_COLORS ~/.dir_colors # 修改~/.dir_colors中DIR對應的顏色 vim ~/.dir_colors # 把DIR 01;34(01:粗體,34:藍色)修改成 DIR 01;33(01:粗體,33:黃色) # eval `dircolors /etc/DIR_COLORS`
:set nu :noh set ignorecase set shortmess=atI syntax on autocmd InsertLeave * se nocul set ruler set showcmd set foldenable set foldmethod=manual set autowrite set cursorline set confirm set autoindent set cindent set tabstop=4 set softtabstop=4 set shiftwidth=4 set noexpandtab set smarttab set hlsearch set incsearch set enc=utf-8 set fencs=utf-8,ucs-bom,shift-jis,gb18030,gbk,gb2312,cp936 set langmenu=zh_CN.UTF-8 set showmatch set smartindent
# 刪除~/.zshrc文件中以#開頭的註釋行 sed -i -e '/#/d' ~/.zshrc # 刪除~/.zshrc文件中的空行 sed -i -e '/^\s*$/d' ~/.zshrc
# 安裝zsh yum install zsh # 下載oh-my-zsh sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" # 修改主題 vim ~/.zshrc # 修改第10行爲 ZSH_THEME="agnoster" # 保存退出後 source ~/.zshrc # !!若是出現亂碼的話,請自行安裝PowerLineII字體~
# 自動提示插件 git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions # 修改自動提示的顏色 vim ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh # 找到 ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=8' 修改成 ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=6' # 高亮插件 git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting # vim ~/.zshrc 並找到plugins plugins=(git zsh-autosuggestions zsh-syntax-highlighting) source ~/.zshrc