shell
henry_韩
这个作者很懒,什么都没留下…
展开
-
Shell脚本 centOS7中自动安装JDK
#切换到root权限sudo su#create java dirjava_file="/usr/local/java"if [ ! -d "$java_file" ];then mkdir $java_fileficd /usr/local/javaif [ ! -f "jdk-8u131-linux-x64.tar.gz" ];then wget --no...原创 2017-07-24 13:27:24 · 4796 阅读 · 2 评论 -
Shell脚本 centOS7中自动安装Tomcat7
#切换sduo sutomcat_dir="/usr/local/tomcat"#创建tomcat文件夹if [ ! -d "$tomcat_dir" ];then mkdir $tomcat_dirficd $tomcat_dir#远程获取tomcatif [ ! -d "apache-tomcat-7.0.79.tar.gz" ];then wget https原创 2017-07-25 08:33:32 · 384 阅读 · 1 评论 -
centOS7 iptables防火墙配置脚本
#先检查是否安装了iptablesservice iptables statusif [ $? -eq 0 ];then echo "已安装了iptables"else #安装iptables yum install -y iptables #安装iptables-services yum install iptables-services #禁用/停止自带的firewall原创 2017-07-25 12:58:00 · 1040 阅读 · 0 评论 -
linux使用shell脚本安装redis 4.0.6
#!/bin/shsofeware_file="/home/sofeware"get_redis_url="http://download.redis.io/releases/redis-4.0.2.tar.gz"redis_dir="/usr/local/webserver/redis"if [ -n "$1" ];then get_redis_url=$1fiif [ -n "...原创 2018-03-15 15:55:25 · 572 阅读 · 0 评论 -
linux shell 安装webbench压测工具
#!/bin/shsofeware="/home/sofeware"zxFile="/usr/local/man/man1"if [ ! -d "${sofeware}" ];then mkdir -p ${sofeware}ficd /home/sofewarewget http://zyan.cc/soft/linux/webbench/webbench-1.5.tar.gz...原创 2018-03-15 16:02:09 · 216 阅读 · 0 评论 -
linux使用shell一键安装mysql
#!/bin/shgroup=mysqluser=mysql#create group if not existsegrep "^$group" /etc/group >& /dev/nullif [ $? -ne 0 ]then groupadd $groupfi#create user if not existsegrep "^$user" /etc/passwd >&a...原创 2018-03-16 10:30:43 · 1227 阅读 · 0 评论 -
linux使用shell一键安装jdk
#sudo su#create java dirjava -versionif [ $? -eq 0 ]; then read -p "The JDK already exists, do you need to continue to install it?(y/n) " name if [ "n" = "$name" ]; then exit 0 fifigetAZ_file=ht...原创 2018-03-16 11:04:23 · 1644 阅读 · 0 评论 -
linux使用shell一键安装tomcat 并更改访问端口为 80
#!/bin/shsduo susofeware_file="/home/sofeware"tomcat_dir="/usr/local/webserver/tomcat"get_tomcat_url=https://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-7/v7.0.79/bin/apache-tomcat-7.0.79.tar.gz...原创 2018-03-16 11:08:59 · 1547 阅读 · 0 评论