随笔分类 -  Centos7

linux自作java -jar xxx服务开机自启动脚本
摘要:1、java应用服务 [root@edge-01 services]# tree service-manage/ ├── bin │ ├── deamon.sh #启动脚本 │ └── service.pid #pid ├── conf #配置文件路径 │ ├── bootstrap.yml │ ├ 阅读全文

posted @ 2023-07-10 15:41 uestc2007 阅读(603) 评论(0) 推荐(0) 编辑

linux service服务自作开机自启动脚本
摘要:1、安装文件服务器 进入/root/httpd 下执行相关指令: 启动: ./CloudDiskWeb config.json 或 ./CloudDiskWeb -c config.json 2.自作启动脚本 #!/bin/sh #启动脚本 !/usr/bin/env bash !/bin/sh R 阅读全文

posted @ 2023-07-07 15:21 uestc2007 阅读(622) 评论(0) 推荐(0) 编辑

CentOS7防火墙(firewall)配置
摘要:1、Centos7和Centos6 防火墙的区别: 使用的工具不一样了。Centos6 使用的是iptables ,Centos7 使用的是filewall iptables 用于过滤数据包,属于网络层防火墙。 firewall 能够允许哪些服务可用,那些端口可用...属于更高一层的防火墙。 2、开 阅读全文

posted @ 2021-03-08 15:55 uestc2007 阅读(249) 评论(0) 推荐(0) 编辑

centos7 集群整体操作脚本
摘要:1、在/root/bin目录创建脚本xcall.sh 2、脚本本周编写内容 [root@wd ~]# vi xcall.sh !/bin/bash for i in wd1 wd2 wd3 do echo $i ssh $i "$*" done 3、修改脚本执行权限 [root@wd1 bin]# 阅读全文

posted @ 2021-03-04 15:51 uestc2007 阅读(152) 评论(0) 推荐(0) 编辑

用Shell判断字符串包含关系
摘要:方法一:利用grep查找 strA="long string" strB="string" result=$(echo $strA | grep "${strB}") if [[ "$result" != "" ]] then echo "包含" else echo "不包含" fi 先打印长字符串 阅读全文

posted @ 2021-02-08 14:18 uestc2007 阅读(88) 评论(0) 推荐(0) 编辑

shell命令调用http接口(curl方式)
摘要:样例 1、curl -H "Content-Length:0" -X GET "http://127.0.0.1:8080" 2、curl -H "Content-Type: application/json" -H "connection:Keep-Alive" -s -X POST -d '{" 阅读全文

posted @ 2021-02-08 14:14 uestc2007 阅读(7297) 评论(0) 推荐(0) 编辑

shell脚本实现发送信息到钉钉
摘要:操作步骤 1、钉钉创建群组 2、编写shell脚本 #!/bin/bash time=$(date "+%Y-%m-%d %H:%M:%S") RESULT1=`curl -H "Content-Type: application/json" -s -X POST -d '[{"optType":" 阅读全文

posted @ 2021-02-08 14:12 uestc2007 阅读(1212) 评论(0) 推荐(1) 编辑

CentOS7集群环境SSH免密访问
摘要:1.准备工作 1)通过克隆或者其他方式获得可互相通信的多台节点(本文为3台虚拟机:hadoop101、hadoop102、hadoop103) 2)配置节点的静态IP、hostname、hosts [root@hadoop101 jdk1.8.0_121]# vi /etc/hosts 127.0. 阅读全文

posted @ 2021-01-13 14:25 uestc2007 阅读(145) 评论(0) 推荐(0) 编辑

CentOS7搭建NTP服务器及客户端同步时间
摘要:一、服务器配置 1、查看服务器、客户端操作系统版本 [root@hadoop101 ~]# cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core) 2、查看服务器是否安装ntp,系统默认安装ntpdate; [root@hadoop1 阅读全文

posted @ 2021-01-13 14:13 uestc2007 阅读(420) 评论(0) 推荐(0) 编辑

CentOS7关闭SELINUX
摘要:安全增强型Linux(Security-Enhanced Linux)简称SELinux,它是一个 Linux 内核模块,也是Linux的一个安全子系统。为了避免安装过程出现各种错误,建议关闭,有如下两种关闭方法: 1)临时关闭(不建议使用) [root@hadoop101 ~]# setenfor 阅读全文

posted @ 2021-01-13 14:09 uestc2007 阅读(411) 评论(0) 推荐(0) 编辑

CentOS7设置hostname、hosts、静态IP地址、关闭防火墙
摘要:1. 设置hostname 方法1: centos7 里面修改hostname的方式有所改变,修改/etc/hosts和/etc/sysconfig/network两个文件已经不能生效。使用的新命令是: [root@hadoop101 mort]# hostnamectl set-hostname 阅读全文

posted @ 2021-01-13 14:05 uestc2007 阅读(644) 评论(0) 推荐(0) 编辑

CentOS7使用集群同步脚本对文件同步分发
摘要:1.介绍 使用集群同步脚本对文件同步分发 2.操作 1)安装rsync [root@hadoop101 ~]$ yum install rsync 2)在/root目录下创建bin目录,并在bin目录下创建文件xsync,文件内容如下: [root@hadoop101 ~]$ mkdir bin [ 阅读全文

posted @ 2021-01-13 13:55 uestc2007 阅读(411) 评论(0) 推荐(0) 编辑

CentOS7安装jdk1.8
摘要:1.卸载现有jdk 1)查询是否安装java软件: rpm –qa|grep jdk 2)如果安装的版本低于1.7,卸载该jdk: rpm –e 软件包 --nodeps 2.下载JDK wget https://download.oracle.com/otn/java/jdk/8u271-b09/ 阅读全文

posted @ 2021-01-13 11:32 uestc2007 阅读(1179) 评论(0) 推荐(0) 编辑

CentOS7+CDH5.12.1集群搭建
摘要:1.CM(Cloudera Manager)介绍 1.1 简介 Cloudera Manager是一个拥有集群自动化安装、中心化管理、集群监控、报警功能的一个工具,使得安装集群从几天的时间缩短在几个小时内,运维人员从数十人降低到几人以内,极大的提高集群管理的效率。 对比Apache / CDH / 阅读全文

posted @ 2021-01-13 10:00 uestc2007 阅读(395) 评论(0) 推荐(0) 编辑

导航

< 2025年2月 >
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 1
2 3 4 5 6 7 8
点击右上角即可分享
微信分享提示