1 Star 0 Fork 0

nianzong/kvm

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
install_tools.sh 1.79 KB
一键复制 编辑 原始数据 按行查看 历史
nianzong 提交于 2020-05-30 13:43 . update install_tools.sh.
#!/bin/bash
# Install software for kvm instance.
# Athor: daihaijun
WORK_DIR=/root/tools
mkdir -p /home/{app,web}
cd $WORK_DIR;
# JAVA
if [ -d /usr/local/java ];then
echo "Java already exist"
break
else
tar zxf jdk1.8.0_92.tar.gz
mv jdk1.8.0_92 /usr/local/
ln -s /usr/local/jdk1.8.0_92 /usr/local/java
ln -s /usr/local/bin/java /bin/java
cat >>/etc/profile <<-EOF
JAVA_HOME=/usr/local/java
PATH=\$PATH:\$JAVA_HOME/bin
EOF
fi
# Tomcat
[ -d /home/web/tomcat7 ] && echo "Tomcat already exist." || {
tar zxf tomcat7.tar.gz && mv tomcat7 /home/web/
}
# GIT
[ -f /usr/local/bin/git ] && echo "git already exist." || {
unzip git.zip && cd git-master
autoconf
./configure --prefix=/usr/local && make && make install
/usr/local/bin/git --version && ln -s /usr/local/bin/git /usr/bin/git
}
cd $WORK_DIR;
#maven
[ -d /usr/local/apache-maven ] && echo "maven already exist." || {
M2_HOME=/usr/local/apache-maven
tar zxf apache-maven-3.3.9-bin.tar.gz
mv apache-maven-3.3.9 /usr/local/
ln -s /usr/local/apache-maven-3.3.9 /usr/local/apache-maven
mv $M2_HOME/conf/settings.xml $M2_HOME/conf/settings.xml.bak
mv settings.xml settings.xml_bak
cat >>/etc/profile <<\EOF
M2_HOME=/usr/local/apache-maven
PATH=$PATH:$M2_HOME/bin
EOF
}
# Atop
[ -f /usr/bin/atop ] && echo "atop already exist." || {
yum install -y ncurses-devel
tar zxf atop-2.3.0.tar.gz && cd atop-2.3.0
make sysvinstall
cd ../
atop -V 1>/dev/null && echo "atop was successfully installed"
}
# ifstat
[ -f /usr/local/bin/ifstat ] && echo "ifstat already exist." || {
tar xzf ifstat-1.1.tar.gz
cd ifstat-1.1
./configure
make && make install
cd ../
ifstat -v 1>/dev/null && echo "ifstat was successfully installed"
}
# tsar
[ -d /usr/local/tsar ] && echo "tsar already exist." || {
unzip tsar.zip && cd tsar-master && make && make install
cd ../
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Shell
1
https://gitee.com/nianzong/kvm.git
[email protected]:nianzong/kvm.git
nianzong
kvm
kvm
master

搜索帮助