摘要: #!/usr/bin/env python # -*- coding:utf-8 -*- import sys,pprint pprint.pprint(sys.path) 阅读全文
posted @ 2017-03-28 11:17 DevOps_QXW 阅读(530) 评论(0) 推荐(0) 编辑
摘要: 1.把下面的代码保存为tomcat文件,并让它成为可执行文件 chmod 755 tomcat. #!/bin/bash # # /etc/rc.d/init.d/tomcat # init script for tomcat precesses # # processname: tomcat # 阅读全文
posted @ 2017-03-23 17:12 DevOps_QXW 阅读(202) 评论(0) 推荐(0) 编辑
摘要: MogileFS是一个开源的分布式文件存储系统,由LiveJournal旗下的Danga Interactive公司开发。Danga团队开发了包括 Memcached、MogileFS、Perlbal 等多个知名的开源项目。目前使用MogileFS 的公司非常多,如日本排名先前的几个互联公司及国内的 阅读全文
posted @ 2017-03-14 11:14 DevOps_QXW 阅读(571) 评论(0) 推荐(0) 编辑
摘要: 在使用 static 类型声明的方法时需要注意的是:如果在类中声明了一 static类型的属性,则此属性既可以在非 static 类型的方法中使用,也可以在 static类型的方法中使用。但用 static 类型的属性调用非 static 类型的属性时,则会出现错误。 代码如下: 阅读全文
posted @ 2017-03-04 21:22 DevOps_QXW 阅读(886) 评论(0) 推荐(0) 编辑
摘要: 1 class Person 2 { 3 private String name ; 4 private int age ; 5 public Person() 6 { 7 } 8 public Person(String n,int a) 9 { 10 name = n; 11 age = a; 阅读全文
posted @ 2017-03-04 16:30 DevOps_QXW 阅读(1508) 评论(1) 推荐(0) 编辑
摘要: 1 public void setName(String str) 2 { 3 name=str; 4 } 5 public void setAge(int a) //set方法需要在括号中定义数据类型 6 { 7 if(a>0) 8 age=a; 9 } 10 public String getN 阅读全文
posted @ 2017-03-03 21:25 DevOps_QXW 阅读(210) 评论(0) 推荐(0) 编辑
摘要: #/usr/bin/env python # -*- coding:utf-8 -*- import sys,os class WebServer(object): def __init__(self,host,port): self.host = host self.port = port def start(self): pri... 阅读全文
posted @ 2017-02-27 22:12 DevOps_QXW 阅读(620) 评论(0) 推荐(0) 编辑
摘要: #!/bin/sh # #chkconfig: 2345 80 90 #description: mongodb start() { /usr/local/yunshipei/enterplorer/mongodb/bin/mongod -f /usr/local/yunshipei/enterplorer/mongodb/etc/mongodb.conf } stop... 阅读全文
posted @ 2017-02-20 14:32 DevOps_QXW 阅读(2041) 评论(0) 推荐(0) 编辑
摘要: #nginx,keepalived安装略过 MASTER 节点配置文件(192.168.1.11) vi /etc/keepalived/keepalived.conf global_defs { ##keepalived自带的邮件提醒需要开启sendmail服务。建议用独立的监控或第三方SMTP 阅读全文
posted @ 2017-02-16 18:02 DevOps_QXW 阅读(163) 评论(0) 推荐(0) 编辑
摘要: dbpath=/home/mongodb/data logpath=/home/mongodb/log/mongodb.log logappend=true port=27017 fork=true noauth=true master=true oplogSize=2048 slave=true source=10.0.0.7 slavedelay=1 autoresync=true 阅读全文
posted @ 2017-02-09 14:08 DevOps_QXW 阅读(205) 评论(0) 推荐(0) 编辑