nginx 启动脚本 By duncan21Posted on 2021 年 10 月 22 日Posted in ShellTagged nginxNo Comments on nginx 启动脚本 完整的脚本: [root@li1079-183 html]# cat /etc/init.d/nginx #!/bin/bash # chkconfig: - 30 21 # descrip[......]阅读全文 Read More
centos7安装mailx By duncan21Posted on 2021 年 6 月 7 日2021 年 11 月 17 日Posted in ShellTagged mail, mailxNo Comments on centos7安装mailx 1.安装mailx yum install mailx -y 2.配置证书 mkdir -p /root/.certs echo -n | openssl s_client -[......]阅读全文 Read More
分享工作中shell脚本监控服务器负载并通过邮件报警 By duncan21Posted on 2016 年 11 月 22 日Posted in ShellTagged loadNo Comments on 分享工作中shell脚本监控服务器负载并通过邮件报警 因为最近公司的几台php的服务器,到晚上9-10点的时候负载有点偏高,所以boss要求当服务器的load,每5分钟负载的负载达到25的时候,发一份邮件 1.安装并配置mail #如果没有m[……] 阅读全文 Read More
开发haproxy启动脚本 By duncan21Posted on 2015 年 12 月 20 日Posted in ShellTagged haproxy [codesyntax lang=”python”] #!/bin/bash #created by teddylu on 2014-1-15 #used for h[......]阅读全文 Read More
分享一个简单的resin启动脚本 By duncan21Posted on 2015 年 12 月 1 日2021 年 4 月 15 日Posted in ShellTagged resin [root@client01 ~]# cat /etc/init.d/resind??? #!/bin/sh #created by teddylu at 2014[......]阅读全文 Read More
开发Tokyo Cabinet/Tyrant启动脚本 By duncan21Posted on 2015 年 10 月 20 日2015 年 10 月 20 日Posted in NoSQL, ShellTagged Tokyo Cabinet,TyrantNo Comments on 开发Tokyo Cabinet/Tyrant启动脚本 用过TT数据库的人都知道,启动tt服务的命令非常的复杂,一不小心可能出错,所以,自己编写了一个启动的脚本 [codesyntax lang=”text”] #!/bin/bas[......]阅读全文 Read More
开发squid启动脚本 By duncan21Posted on 2015 年 10 月 18 日2016 年 8 月 23 日Posted in ShellTagged squid 最近在弄squid,然后就用shell写了一个小小的squid的启动脚本 [codesyntax lang=”text”] [root@localhost ~]# cat /etc/rc.d/in[......]阅读全文 Read More
shell脚本实现检测暴力破解ssh By duncan21Posted on 2015 年 9 月 16 日2015 年 9 月 16 日Posted in ShellTagged ssh 在centos中,当有人尝试暴力破解ssh的时候,所有的信息都会记录到日志文件/var/log/secure中,注意secure是按照周轮询的。 我们可以通过过滤得到我们需要的信息: gr[……] 阅读全文 Read More
开发php环境搭建脚本一键部署php服务环境 By duncan21Posted on 2015 年 7 月 15 日2015 年 7 月 15 日Posted in ShellTagged php #!/bin/bash Soft_Dir=/soft Mysql_Install_Dir=/usr/local/mysql Php_Version=5.5.43 Apache_Ve[......]阅读全文 Read More
开发apache一键安装部署脚本 By duncan21Posted on 2015 年 7 月 15 日Posted in ShellTagged apache #!/bin/bash Apache_Soft_Dir=/soft Apache_Version=2.2.29 Apache_Install_Dir=/application[......]阅读全文 Read More
开发自动化脚本一键安装MySQL数据库 By duncan21Posted on 2015 年 7 月 13 日2016 年 5 月 24 日Posted in MySql, ShellTagged mysql 环境: [root@localhost ~]# cat /etc/redhat-release CentOS release 6.6 (Final) [root@localhos[……] 阅读全文 Read More
开发apache启动脚本 By duncan21Posted on 2015 年 6 月 8 日2016 年 5 月 24 日Posted in ShellTagged apache, 启动脚本 [root@NFS-Client-01 init.d]# pwd /etc/init.d [codesyntax lang=”text” lines=”[……] 阅读全文 Read More
简单脚本实现nginx日志轮询 By duncan21Posted on 2015 年 6 月 1 日2016 年 6 月 29 日Posted in ShellTagged nginx日志轮询 环境: [root@S1-Server logs]# cat /etc/redhat-release CentOS release 6.3 (Final) [root@S1-Server l[……] 阅读全文 Read More
Nginx启动脚本 By duncan21Posted on 2015 年 5 月 25 日2016 年 5 月 24 日Posted in ShellTagged nginx启动脚本 脚本: [codesyntax lang=”python” lines=”no”] #!/bin/sh RETVAL=0 path="/application/[......]阅读全文 Read More
linux系统产生随机数的几种方法 By duncan21Posted on 2015 年 5 月 23 日Posted in ShellTagged 随机数 方法一:通过系统的环境变量$RANDOM [root@M1-Server ~]# echo $RANDOM &nb[……] 阅读全文 Read More
批量创建10个系统账号teddy01-teddy10并设置密码(密码为随机9位字符串) By duncan21Posted on 2015 年 5 月 23 日2015 年 5 月 24 日Posted in ShellTagged 批量创建系统账号 脚本: [root@M1-Server ~]# cat useradd.sh #!/bin/bash . /etc/init.d/[……] 阅读全文 Read More
利用shell打印9*9乘法表 By duncan21Posted on 2015 年 5 月 23 日Posted in ShellTagged 9*9乘法表 [root@NFS ~]# cat 9\*9.sh #!/bin/bash for ((i=1;i<=9;i++)) [……] 阅读全文 Read More
[转]linux下批量修改文件名 By duncan21Posted on 2015 年 5 月 19 日Posted in ShellTagged 批量改文件名 [准备测试数据] mkdir /oldboy cd /oldboy touch stu_102999_1_finished.jpg [……] 阅读全文 Read More
如何利用sed取ip地址 By duncan21Posted on 2015 年 4 月 24 日2022 年 10 月 24 日Posted in ShellTagged cut, sedNo Comments on 如何利用sed取ip地址 考题:取ifocnfig eth0 的ip地址 目标:192.168.1.200 [root@NFS ~]# ifconfig eth0 eth0 Link encap:Ethernet[......]阅读全文 Read More
分享一个简单的mysql启动脚本 By duncan21Posted on 2014 年 11 月 4 日2015 年 1 月 4 日Posted in ShellTagged mysql #!/bin/sh ################################################ #Created by teddylu at 2012-12-12 #U[......]阅读全文 Read More