🦋
Butterfly 用户手册
  • Introduction
  • 一 前言
  • 二 开始
    • 安装部署
    • 五分钟体验指南
    • 单机使用手册
    • 应用规范
      • handler specs
      • middleware specs
      • xingqiao_plugin specs
      • yiqiu_program specs
  • 三 客户端功能
    • MySQL 原生协议
    • MySQL ORM
    • Redis 原生协议
      • redis_config
      • redis_tls
    • Redis ORM
    • Redis mcpack
    • Localcache
    • Kazoo
  • 四 应用(通用服务)
    • API JSON 规范
    • 异步任务 BaiChuan(百川)
    • 任务调度 RuQi(如期)
    • 任务编排 XingQiao(星桥)
    • 配置管理 WuXing(五行)
    • 运筹决策 BaiCe(百策)
  • 五 部署运维
    • 单机容器化部署
    • 监控
    • 异常排查
      • CPU Load spike every 7 hours
    • 升级
    • 安全
    • 其他
  • 六 前端
    • butterfly_template
    • butterfly_fe
    • butterfly-admin(json2web)
      • amis
      • sso
      • pangu
    • NoahV
    • PyWebIO
  • 七 潘多拉魔盒
    • 装饰器
      • localcache_decorator
      • retry_decorator
      • custom_decorator
      • command2http_decorator
    • 算法
      • 算法-分位数
      • 算法-变异系数
    • 实用工具
      • host_util
      • shell_util
      • http_util
      • time_util
      • random_util
      • concurrent
      • jsonschema
      • blinker
      • toml
      • command_util
      • config_util
      • picobox
      • 对称加密
        • des
        • aes
      • ascii_art
        • ttable
        • chart
      • business_rules
      • python-mysql-replication
      • dict_util
    • 中间件
      • middleware_status
      • middleware_whitelist
    • test_handler.py
  • 八 最佳实践
    • 分布式架构
    • Code practice
    • Log practice
    • Daemon process
  • 附录
Powered by GitBook
On this page
  • 1 环境
  • 2 部署
  • 2.1 安装
  • 2.2 启动
  • 3 其他
  • 3.1 安装 python 2.7.3
  1. 二 开始

安装部署

1 环境

env:Python 2.7

2 部署

2.1 安装

安装 Python2.7(若有,则跳过)

// 下载
$ curl -O https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz

// 安装
./configure --prefix=/home/work/opdir/wangbin34/python2.7.18
make
make install
$ wget https://github.com/meetbill/butterfly/archive/master.zip -O butterfly.zip
$ unzip butterfly.zip
$ cd butterfly-master/butterfly

2.2 启动

配置端口 --- 默认 8585 端口,若无需修改可进入下一项启动

conf/config.py

启动

$ bash run.sh start

访问

$ curl "http://127.0.0.1:8585/demo_api/hello?str_info=meetbill" 
$ {"stat": "OK", "str_info": "meetbill"}

3 其他

3.1 安装 python 2.7.3

$ tar -zxvf Python-2.7.3.tgz
$ ./configure --prefix=/home/work/opdir/wangbin34/python2.7.3
$ make
$ make install
/home/work/opdir/wangbin34/python2.7.3
├── bin
│   ├── 2to3
│   ├── idle
│   ├── pydoc
│   ├── python -> python2
│   ├── python2 -> python2.7
│   ├── python2.7
│   ├── python2.7-config
│   ├── python2-config -> python2.7-config
│   ├── python-config -> python2-config
│   └── smtpd.py
├── include
│   └── python2.7
├── lib
│   ├── libpython2.7.a
│   ├── pkgconfig
│   └── python2.7
│        ├── xxx           // 系统包
│        └── site-packages // 第三方包
└── share
    └── man
Previous二 开始Next五分钟体验指南

Last updated 6 months ago

Index of /ftp/python/2.7.3/
Logo