站点更新:2018-11-01 18:19:14
This commit is contained in:
parent
e3dcbdb4a6
commit
f475357ddb
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
*.key
|
*.key
|
||||||
*.box
|
*.box
|
||||||
.vagrant
|
.vagrant
|
||||||
|
vm_share
|
18
Vagrantfile
vendored
18
Vagrantfile
vendored
@ -45,17 +45,17 @@ Vagrant.configure("2") do |config|
|
|||||||
# do NOT check the correct additions version when booting this machine(插件安装:vagrant plugin install vagrant-vbguest)
|
# 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", "/vagrant"
|
cfg.vm.synced_folder "/Users/ehlxr/works/Vagrant/vm_share", "/share"
|
||||||
|
|
||||||
# 开机运行命令
|
# 开机运行命令
|
||||||
cfg.vm.provision "shell", run: "always", inline: <<-SHELL
|
# cfg.vm.provision "shell", run: "always", inline: <<-SHELL
|
||||||
echo -e "\033[1;33mInit cmd...\033[0m"
|
# echo -e "\033[1;33mInit cmd...\033[0m"
|
||||||
echo -e "\033[1;33mConfig ssh...\033[0m"
|
# echo -e "\033[1;33mConfig ssh...\033[0m"
|
||||||
mkdir -p ~/.ssh && cat /vagrant/config/authorized_keys >> ~/.ssh/authorized_keys
|
# mkdir -p ~/.ssh && cat /vagrant/config/authorized.key >> ~/.ssh/authorized_keys
|
||||||
sed -i 's/^#RSAAuthentication.*/RSAAuthentication\ yes/g' /etc/ssh/sshd_config
|
# 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/^#PubkeyAuthentication.*/PubkeyAuthentication\ yes/g' /etc/ssh/sshd_config
|
||||||
sed -i 's/^PasswordAuthentication.*/PasswordAuthentication\ yes/g' /etc/ssh/sshd_config
|
# sed -i 's/^PasswordAuthentication.*/PasswordAuthentication\ yes/g' /etc/ssh/sshd_config
|
||||||
SHELL
|
# SHELL
|
||||||
|
|
||||||
# 自定义初始化执行脚本
|
# 自定义初始化执行脚本
|
||||||
# cfg.vm.provision "shell", path: "config/init.sh"
|
# cfg.vm.provision "shell", path: "config/init.sh"
|
||||||
|
@ -27,6 +27,7 @@ git clone https://github.com/zsh-users/zsh-history-substring-search.git /root/.o
|
|||||||
|
|
||||||
echo -e "\033[1;33mConfig oh-my-zsh...\033[0m"
|
echo -e "\033[1;33mConfig oh-my-zsh...\033[0m"
|
||||||
cp -f /vagrant/config/zshrc ~/.zshrc
|
cp -f /vagrant/config/zshrc ~/.zshrc
|
||||||
|
cp -f /vagrant/config/my.zsh ~/.oh-my-zsh/custom/
|
||||||
|
|
||||||
echo -e "\033[1;33mConfig ssh...\033[0m"
|
echo -e "\033[1;33mConfig ssh...\033[0m"
|
||||||
mkdir -p ~/.ssh && cat /vagrant/config/authorized.key >> ~/.ssh/authorized_keys
|
mkdir -p ~/.ssh && cat /vagrant/config/authorized.key >> ~/.ssh/authorized_keys
|
||||||
@ -51,6 +52,6 @@ echo -e "\033[1;33mStart and enable Docker...\033[0m"
|
|||||||
systemctl enable docker
|
systemctl enable docker
|
||||||
systemctl start docker
|
systemctl start docker
|
||||||
|
|
||||||
echo -e "\033[1;33mVboxadd setup...\033[0m"
|
# echo -e "\033[1;33mVboxadd setup...\033[0m"
|
||||||
cd /opt/VBoxGuestAdditions-*/init
|
# cd /opt/VBoxGuestAdditions-*/init
|
||||||
./vboxadd setup
|
# ./vboxadd setup
|
3
config/my.zsh
Normal file
3
config/my.zsh
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
bindkey '^]' forward-word
|
||||||
|
bindkey '^f' vi-forward-blank-word
|
||||||
|
#ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=blue,underline'
|
Loading…
Reference in New Issue
Block a user