-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.sh
67 lines (52 loc) · 1.86 KB
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/sh
echo "yourhostname" > /etc/hostname
yum -y install epel-release
yum -y install vim git ntp mlocate net-tools iptables-services
yum -y install gcc fortune-mod python-pip
pip install cpplint
pip install Pygments
mv /etc/localtime /etc/localtime.bak
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config
sed -i "s/#Port 22/Port 60022/g" /etc/ssh/sshd_config
sed -i "s/#UseDNS yes/UseDNS no/g" /etc/ssh/sshd_config
sed -i "s/--dport 22/--dport 60022/g" /etc/sysconfig/iptables
service sshd restart
service iptables start
service ntpd start
chkconfig iptables on
chkconfig ntpd on
mkdir -p /opt/git/
cd /opt/git/
git clone [email protected]:wanglf/dotfiles.git dotfiles.git
git clone [email protected]:robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
ln -s /opt/git/dotfiles.git/ohmyzsh/.zshrc ~/.zshrc
chsh -s /bin/zsh
rm -rf ~/.vimrc
ln -s /opt/git/dotfiles.git/vim/.vimrc ~/.vimrc
mkdir -p ~/.vim/bundle && cd ~/.vim/bundle
git clone [email protected]:gmarik/Vundle.vim.git
#open vim, issue command :PluginInstall
rm -rf ~/.tmux.conf
ln -s /opt/git/dotfiles.git/tmux/.tmux.conf ~/.tmux.conf
rm -rf ~/.gitconfig
ln -s /opt/git/dotfiles.git/git/.gitconfig ~/.gitconfig
rm -rf ~/.emacs.d
rm -rf ~/.emacs
ln -s /opt/git/dotfiles.git/emacs.d ~/.emacs.d
rm -rf ~/.ssh/config
mkdir -p ~/.ssh
ln -s /opt/git/dotfiles.git/ssh/config ~/.ssh/
ln -s /opt/git/dotfiles.git/fortune/vocabulary /usr/share/games/fortune/
crontab -l > ~/mycron
echo "0 * * * * cd /usr/share/games/fortune && /usr/sbin/strfile vocabulary vocabulary.dat > /dev/null 2>&1" >> ~/mycron
crontab ~/mycron
rm ~/mycron
# adobe fonts for texlive
#mkdir -p /usr/share/fonts/adobe
#cp /opt/download/Adobe*.otf /usr/share/fonts/adobe
#fc-cache -f -v
# adobe font for texlive
#sudo mkdir -p /usr/share/fonts/adobe
#sudo mv *.otf /usr/share/fonts/adobe
#sudo fc-cache -fsv