站点更新:2018-11-20 17:14:42

This commit is contained in:
ehlxr 2018-11-20 17:14:42 +08:00
parent 0d7afef43d
commit 43d1b9faec
2 changed files with 10 additions and 5 deletions

13
Vagrantfile vendored
View File

@ -43,20 +43,25 @@ Vagrant.configure("2") do |config|
cfg.ssh.insert_key = "true"
# do NOT check the correct additions version when booting this machine插件安装vagrant plugin install vagrant-vbguest
# cfg.vbguest.auto_update = false
cfg.vbguest.auto_update = false
cfg.vm.synced_folder "/Users/ehlxr/works/Vagrant/vm_share", "/root/", type: "virtualbox"
# cfg.vm.synced_folder "/Users/ehlxr/works/Vagrant/vm_share", "/root/", type: "virtualbox"
cfg.vm.synced_folder "/Users/ehlxr/works/Vagrant", "/vagrant", disabled: true
cfg.vm.synced_folder "/Users/ehlxr/works/Vagrant", "/root/share", type: "virtualbox"
# 开机运行命令
cfg.vm.provision "shell", run: "always", inline: <<-SHELL
echo -e "\033[1;33mConfig ssh...\033[0m"
mkdir -p ~/.ssh && cat /root/config/authorized.key >> ~/.ssh/authorized_keys
mkdir -p ~/.ssh && cat /root/share/config/authorized.key >> ~/.ssh/authorized_keys
sed -i 's/^#RSAAuthentication.*/RSAAuthentication\ yes/g' /etc/ssh/sshd_config
sed -i 's/^#PubkeyAuthentication.*/PubkeyAuthentication\ yes/g' /etc/ssh/sshd_config
sed -i 's/^PasswordAuthentication.*/PasswordAuthentication\ yes/g' /etc/ssh/sshd_config
echo -e "\033[1;33mConfig dns...\033[0m"
cp /root/config/resolv.conf /etc/
cp /root/share/config/resolv.conf /etc/
echo -e "\033[1;33mConfig oh-my-zsh...\033[0m"
cp -f /root/share/config/zshrc ~/.zshrc
cp -f /root/share/config/my.zsh ~/.oh-my-zsh/custom/
cp -f /root/share/config/ehlxr2.zsh-theme ~/.oh-my-zsh/custom/themes/
SHELL
# 自定义初始化执行脚本

View File

@ -1,6 +1,6 @@
export ZSH=~/.oh-my-zsh
ZSH_THEME="gnzh"
ZSH_THEME="ehlxr2"
plugins=(git wd sudo zsh-syntax-highlighting zsh-autosuggestions extract history-substring-search)