centos开机优化脚本

时间: 2024-08-07 20:56:04

centos开机优化脚本的相关文章

Centos开机自启动脚本的制作

我的一个Centos开机自启动脚本的制作 一.切换到/etc/init.d/ 二.制作sh脚本 vi andy.sh [plain] #!/bin/sh #add for chkconfig #chkconfig: 2345 70 30 #description: the description of the shell   #关于脚本的简短描述 #processname: andyStart                    #第一个进程名,后边设置自启动的时候会用到 #下面要启动服务的命

[转]CentOS开机启动脚本

转载自http://www.2cto.com/os/201306/220559.html 我的一个Centos开机自启动脚本的制作 一.切换到/etc/init.d/ 二.制作sh脚本 vi andy.sh [plain] #!/bin/sh #add for chkconfig #chkconfig: 2345 70 30 #description: the description of the shell   #关于脚本的简短描述 #processname: andyStart      

centos一键优化脚本

centos一键优化脚本:细节:http://oldboy.blog.51cto.com/2561410/1336488网络状态优化:http://oldboy.blog.51cto.com/2561410/1184228定时任务优化:http://oldboy.blog.51cto.com/2561410/1216730一键脚本:较简单: http://mofansheng.blog.51cto.com/8792265/1710247较健全: http://chocolee.blog.51ct

CentOS 7 优化脚本

CentOS 7 优化脚本 #!/bin/bash #this script is only for CentOS 7.x platform=`uname -i` if [ $platform != "x86_64" ];then echo "脚本仅适合64位CentOS 7系统" exit 1 fi echo "----------CentOS 7 64位系统,开始优化----------" #添加公网DNS地址 cat >> /e

CentOS6开机优化脚本

最近看了下公司之前的CentOS6的开机配置脚本,简单调整了下: #!/bin/bash #created by molewan #set env export PATH=$PATH:/bin:/sbin:/usr/sbin hostname=$1 if [ $UID != "0" ];then echo "Please run as root" exit 1 fi Usage(){ echo $"USAGRE:/bin/bash $0 hostname&

CentOS 6.5初始化优化脚本

#!/bin/bash echo "这个是系统初始化脚本,请慎重运行!" input_fun() {     OUTPUT_VAR=$1     INPUT_VAR=""     while [ -z $INPUT_VAR ];do         read -p "$OUTPUT_VAR" INPUT_VAR     done     echo $INPUT_VAR } input_again() { MYHOSTNAME=$(input_fu

Linux学习篇之---centos中的开机自启动脚本

centos中的开机自启动脚本 在cenos环境下,安装jdk,需要配置环境变量,网上有人说: 1.直接将语句写入/etc/profile中 2.将语句写入一个java.sh文件,然后将文件放到/etc/profile.d/目录下 现在看一下/etc/profile文件中内容: 其实这两种效果是一样的,/etc/profile文件执行的时候会遍历/etc/profile.d/目录下的所有*.sh文件,并依次执行. 但是个人认为还是使用后者比较好: 因为如果用得着,就新建一个.sh文件,如果用不着

centOS 开机自启动自己的脚本

centOS 开机自启动自己的脚本 1. 自己脚本 myservice 如下: #!/bin/bash # chkconfig: 2345 10 90 # description: myservice .... echo "hello world" > /tmp/hello.log 2. 将自己写的脚本move到 /etc/rc.d/init.d/ 下面并修改权限 mv myservice /etc/rc.d/init.d/ chmod +x myservice 3. 将脚本加入

Centos 配置开机启动脚本启动 docker 容器

原文:Centos 配置开机启动脚本启动 docker 容器 Centos 配置开机启动脚本启动 docker 容器 Intro 我们的 Centos 服务器上部署了好多个 docker 容器,因故重启的时候就会导致还得手动去手动重启这些 docker 容器,为什么不写个脚本自动重启呢,于是就有了这篇文章. 批量启动 Docker 容器 之前我们有提到过关于 docker 的一些骚操作 ,可以直接使用 docker start $(docker ps -aq) # 启动所有容器 docker s