查看“运维规划2018-2024”的源代码
←
运维规划2018-2024
跳到导航
跳到搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
=2020= ==english== ==lua== [[Lua基础]] ==golang== =k8s= [[2018k8s]] =服务器费用= 自动续费 ? =cmdb= 搞在xk intra 然后 frp到外面 [https://www.linuxprobe.com/cmdb-things.html 前聚美优品运维负责人谈CMDB] [https://www.jianshu.com/p/f3a70cddccc5 CMDB和运维自动化] [http://www.yunweipai.com/archives/6856.html (深度好文)重构CMDB,避免运维之耻] [https://segmentfault.com/q/1010000003838760 开源CMDB] =运维自动化= [http://os.51cto.com/art/201806/576802.htm 小团队如何从零搭建一个自动化运维体系] [http://os.51cto.com/art/201806/576888.htm 如何做好自动化运维?自动化运维必备技能有哪些] [[category:ops]] [[category:生活与情感]] ==python 自动化 == [https://blog.csdn.net/aeolus_pu/article/details/52605109 利用python实现批量自动化运维脚本案例] 早下班时回家记得看书和动手例子 =监控= ==zabbix== [[Zabbix报警]] [https://blog.csdn.net/wyl9527/article/details/73928853 action_email 还有报警前执行脚本] email 报警 短信报警 wechat 报警 zabbix new server docker 化 [https://blog.csdn.net/heyongluoyao8/article/details/51413668 服务器监控(包括性能指标与web应用程序)] pinpoint =python= [https://blog.csdn.net/chengxuyuanyonghu/article/details/59486631 python常用运维脚本实例] [https://blog.csdn.net/hardywang/article/details/51536510 python用于系统运维管理和灰度发布部署] [http://www.voidcn.com/article/p-poyppygk-ng.html 基于python的一个运维自动化的项目(进度更新)【已开源】] =django= Gunicorn =tomcat= [http://blog.51cto.com/jowin/1739400 Linux运维 第三阶段 (十九) tomcat] [https://blog.csdn.net/lifetragedy/article/details/7708724 通向架构师的道路(第四天)之Tomcat性能调优] [https://www.jianshu.com/p/d45e12241af4 Tomcat性能调优-JVM监控与调优] [https://blog.csdn.net/xyang81/article/details/51530979 Tomcat配置与优化(内存、并发、管理)] [https://www.centos.bz/2017/08/tomcat-jvm-performance-tuning/ Tomcat和JVM的性能调优总结] [https://www.oschina.net/translate/tomcat-performance-tuning Tomcat 生产服务器性能优化 【已翻译100%】] [http://yunzhu.iteye.com/blog/953387 监控Tomcat解决方案(监控应用服务器系列文章)] ==tomcat优化== [https://blog.csdn.net/coolwzjcool/article/details/2544448 TOMCAT内存大小调整] [http://elf8848.iteye.com/blog/378805 Tomcat内存设置详解] [https://blog.csdn.net/xyang81/article/details/51530979 Tomcat配置与优化(内存、并发、管理)] [https://blog.csdn.net/lifetragedy/article/details/7708724 通向架构师的道路(第四天)之Tomcat性能调优-让小猫飞奔] ==tomcat 启动脚本== <pre> #!/bin/bash #cat /etc/init.d/pp-col 在centos7上试过 可运行 # chkconfig: 345 99 28 # description: Starts/Stops Apache Tomcat #by evan #修改几个目录 ##export JAVA_HOME=/usr/java/jdk1.8.0_121/ #sed -i "s/JAVA_HOME=\/usr\/java\/default\//JAVA_HOME=\/usr\/java\/jdk1.8.0_121\//g" pp-collector.init #sed -i "s/CATALINA_HOME=\/data\/service\/pinpoint-collector\//CATALINA_HOME=\/data\/pp-col\//g" pp-collector.init #sed -i "s/CATALINA_BASE=\/data\/service\/pinpoint-collector\//CATALINA_BASE=\/data\/pp-col\//g" pp-collector.init #by evan # Tomcat start/stop/status script # Forked from: https://gist.github.com/valotas/1000094 # @author: Miglen Evlogiev <bash@miglen.com> # # Release updates: # Updated method for gathering pid of the current proccess # Added usage of CATALINA_BASE # Added coloring and additional status # Added check for existence of the tomcat user # #Location of JAVA_HOME (bin files) export JAVA_HOME=/usr/java/jdk1.8.0_121/ #Add Java binary files to PATH export PATH=$JAVA_HOME/bin:$PATH #CATALINA_HOME is the location of the bin files of Tomcat export CATALINA_HOME=/data/pp-col/ #CATALINA_BASE is the location of the configuration files of this instance of Tomcat export CATALINA_BASE=/data/pp-col/ #TOMCAT_USER is the default user of tomcat export TOMCAT_USER=root #TOMCAT_USAGE is the message if this script is called without any options TOMCAT_USAGE="Usage: $0 {\e[00;32mstart\e[00m|\e[00;31mstop\e[00m|\e[00;32mstatus\e[00m|\e[00;31mrestart\e[00m}" #SHUTDOWN_WAIT is wait time in seconds for java proccess to stop SHUTDOWN_WAIT=3 tomcat_pid() { echo `ps -fe | grep $CATALINA_BASE | grep -v grep | tr -s " "|cut -d" " -f2` } start() { pid=$(tomcat_pid) if [ -n "$pid" ] then echo -e "\e[00;31mTomcat is already running (pid: $pid)\e[00m" else # Start tomcat echo -e "\e[00;32mStarting tomcat\e[00m" #ulimit -n 100000 #umask 007 #/bin/su -p -s /bin/sh tomcat if [ `user_exists $TOMCAT_USER` = "1" ] then su $TOMCAT_USER -c $CATALINA_HOME/bin/startup.sh else sh $CATALINA_HOME/bin/startup.sh fi status fi return 0 } status(){ pid=$(tomcat_pid) if [ -n "$pid" ]; then echo -e "\e[00;32mTomcat is running with pid: $pid\e[00m" else echo -e "\e[00;31mTomcat is not running\e[00m" fi } stop() { pid=$(tomcat_pid) if [ -n "$pid" ] then echo -e "\e[00;31mStoping Tomcat\e[00m" #/bin/su -p -s /bin/sh tomcat sh $CATALINA_HOME/bin/shutdown.sh let kwait=$SHUTDOWN_WAIT count=0; until [ `ps -p $pid | grep -c $pid` = '0' ] || [ $count -gt $kwait ] do echo -n -e "\n\e[00;31mwaiting for processes to exit\e[00m"; sleep 1 let count=$count+1; done if [ $count -gt $kwait ]; then echo -n -e "\n\e[00;31mkilling processes which didn't stop after $SHUTDOWN_WAIT seconds\e[00m" kill -9 $pid fi else echo -e "\e[00;31mTomcat is not running\e[00m" fi return 0 } user_exists(){ if id -u $1 >/dev/null 2>&1; then echo "1" else echo "0" fi } case $1 in start) start ;; stop) stop ;; restart) stop start ;; status) status ;; *) echo -e $TOMCAT_USAGE ;; esac exit 0 </pre> <pre>[root@node2 tomcat]# vim /etc/init.d/tomcat(tomcat启动脚本) ------------script start-------------- #!/bin/sh # Tomcat init script for Linux. # # chkconfig: 2345 96 14 # description: The Apache Tomcatservlet/JSP container. export JAVA_HOME=/usr/java/latest export CATALINA_HOME=/usr/local/tomcat exec $CATALINA_HOME/bin/catalina.sh $* --------------script end--------------- [root@node2 tomcat]# chmod +x !$ chmod +x /etc/init.d/tomcat [root@node2 tomcat]# chkconfig --add tomcat [root@node2 tomcat]# chkconfig tomcat on [root@node2 tomcat]# chkconfig --list tomcat tomcat 0:关闭 1:关闭 2:启用 3:启用 4:启用 5:启用 6:关闭 [root@node2 tomcat]# service tomcat stop …… [root@node2 tomcat]# service tomcat start</pre> =safe= [https://blog.linuxeye.cn/454.html fail2ban阻止SSH暴力破解] == safe dns== http://www.freenom.world/zh/index.html?lang=zh Freenom是世界上第一个也是唯一的免费域名提供商。 我们的使命是把互联网带给世界人民,帮助各国发展自己的数字经济。 通过打破壁垒、整合免费域名与最新网站建设和托管技术,Freenom让企业或个人建立网站和管理内容很容易,没有任何成本。 =docker k8s= =intra= ==内网穿透打洞== [[内网穿透打洞]] ==内网环境== oracle 17 nginx other 11 frp 但是没有开机自启动呢 =apps= ==7.1redis== 公司的redis要 HA [https://my.oschina.net/u/2600078/blog/1923696 redis架构演变与redis-cluster群集读写方案 ] ==7.2 nginx== redis lua+ cc [[Nginx Lua Redis防止CC攻击]] ==7.3 mysql== mysql gpt ==7.4 dns== [http://blog.51cto.com/sweetpotato/1596973 Linux运维实战之DNS基础] ==7.5 CI jenkins== ==备份== ==关键文件备份== passwd etc == 更新== 包 mysql 文件 这个尽量做成自动化 接下何焱的活 ==db备份== =on = # 内网开发环境 # jenkins 自动化更新 (dev test) # zabbix 报警 # pinpoint # # # # 有序列表项 # # 有序列表项 # # 有序列表项 # # 有序列表项 # # 有序列表项 # # 有序列表项 # # 有序列表项 # 有序列表项
返回至
运维规划2018-2024
。
导航菜单
个人工具
登录
名字空间
页面
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
导航
首页
我的导航
关于我
shell
python
ops
linuxchina.net
blog.linuxchina
最近更改
随机页面
帮助
工具
链入页面
相关更改
特殊页面
页面信息