10 年前

linux 下 BT服务器搭建

bt   bt for linux搭建   系统服务  

   bt服务现在用的比较少,这是12年做客户端下载时留下的笔记。由于种种原因用到CDN所以需要自己搭建BT服务器 必须有python2.*以上的环境 1、安装bittorrent   BitTorrentg下载 tar zxvf BitTorrent-3.4.2.tar.gz cd BitTorrent-3.4.2 python setup.p…

10 年前

svn Linux下常用命令总结

svn linux常用命令   Shell/Python  

1、将文件checkout到本地目录 svn checkout http://192.168.0.10/svn/project project 简写:svn co 例: 如何导出SVN库文件不受本地SVN管理 svn export project /data/project 2、往版本库中添加新的文件 svn add file svn add *.txt 3、将改动的文件提交到版本库…

10 年前

sed 指定行后或行前插入

sed替换   sed用法   sed指定行插入   sed 删除指定行   Shell/Python  

sed 功能非常强大,这里主要列出一些工作中常用到的举例,以后再追加 示例文本 example.cfg Config = { a = 1, b = 1024, c = { ErrLevel = 4, LogLevel = 2, TraceLevel = 2, ProfLevel…

10 年前

Python 获取进程PID

Python 获取进程PID   python subprocess pid   python commands pid   Shell/Python  

一、使用subprocess模块通过查找关键字获取进程PID #!/usr/bin/python import subprocess import sys import logging import os gameproc = ["loginserver","gameserver","dbserver","logserver"] def getPid(process): cmd = "ps…

10 年前

heartbeate+mysql+drbd 高可用数据库配置

heartbeate   mysql   drbd   系统服务  

1、环境 系统:Centos 6.4 x64 主MYSQLA: 192.168.0.16 从MYSQLB: 192.168.0.17 VIP: 192.168.0.18 目录: /data 2、安装 基本安装 yum install heartbeat heartbeat-ldirectord heartbeat-pils heartbeat-stonith -y yum install mysq…