#!/bin/bash
if [ whoami
!= root ]
then
echo "Please login as root to continue :)"
exit 1
fi
if [ ! -d /home/tools/ ];then
mkdir -p /home/tools
else
rm -rf /home/tools && mkdir -p /home/tools
fi
#Install python3
yum -y install epel-release wget && sudo yum -y groupinstall 'Development Tools' && sudo yum -y install the_silver_searcher
sudo yum -y update
sudo yum -y install yum-utils
sudo rpm -Uvh https://repo.ius.io/ius-release-el7.rpm
sudo yum install python36u -y
sudo yum -y install python36u-pip python36u-devel
#config env
mkdir -p /data
cd /data
python3.6 -m venv venv
#Install golang
wget -c http://download.cashalo.com/schema/auto_install_go.sh
source auto_install_go.sh
#Install vim8.2
cd /home/tools
sudo git clone https://github.com/vim/vim.git
yum -y install ncurses-devel
cd /home/tools/vim
./configure --prefix=/usr/local/vim/ --enable-fail-if-missing --enable-python3interp --enable-multibyte --enable-fontset --with-features=huge && \
make && make install
rm -rf /usr/bin/vim
ln -s /usr/local/vim/bin/vim /usr/bin/
#Install ide
yum -y install ctags nodejs npm python-devel python-pip gcc gcc-c++ kernel-devel automake cmake git ncurses-devel
sudo npm install -g jslint
sudo npm install jshint -g
sudo npm install -g eslint eslint-plugin-standard \
eslint-plugin-promise eslint-config-standard eslint-plugin-import \
eslint-plugin-node eslint-plugin-html babel-eslint
curl -fLo ~/.vim/autoload/plug.vim --create-dirs http://download.cashalo.com/schema/plug.vim
git clone https://github.com/fatih/vim-go.git ~/.vim/plugged/vim-go
wget -c -P /home/tools/ http://download.cashalo.com/schema/jerry_vim.tgz && tar zxvf /home/tools/jerry_vim.tgz -C /root/
wget -c -P /home/tools/ http://download.cashalo.com/schema/.jerry_vimrc && \mv /home/tools/.jerry_vimrc /root/.vimrc
#再然后执行vim命令,然后在vim里输入如下命令安装vim-go的依赖,然后退出vim即可:
:GoInstallBinaries
有疑问加站长微信联系(非本文作者)