基础组件
sudo yum -y install wget git vim zip unzip net-tools lrzsz lsof
开机启动脚本
# 开机启动配置
sudo mkdir -p /data/log
cd /etc/rc.d/init.d && touch autostart && chmod +x autostart
cat >> /etc/rc.d/init.d/autostart << EOF
#!/bin/bash
# chkconfig: 2345 08 92
# description: Description
exec 2> /data/log/autostart.log # send stderr from rc.local to a log file
exec 1>&2 # send stdout to the same log file
echo "atuostart started" # show start of execution
set -x # open log
EOF
chkconfig --add autostart && chkconfig autostart on
cat >> ~/.zshrc << EOF
alias vim-auto='vim /etc/rc.d/init.d/autostart'
EOF
source ~/.zshrc
echo "执行成功,输入vim-auto即可编辑开机启动的命令"
alias脚本
alias ll='ls -lh'
alias size='f(){ du -sh $1* | sort -hr; }; f'
alias gz='tar -zcvf'
alias ungz='tar -zxvf'
alias bz2='tar -jcvf'
alias unbz2='tar -jxvf'
alias now='date "+%Y-%m-%d %H:%M:%S"'
alias vimbashrc='vim ~/.bashrc'
alias reloadBashrc='source ~/.bashrc'