proxy pass 端口换成 另一个 跟原来的不冲突

[root@ayibang-server soft_ware]# cp s10day11/demo.* s10ops/
[root@ayibang-server soft_ware]# cd s10ops/
[root@ayibang-server s10ops]# ls
aa.py db.sqlite3 demo.ini demo.py demo.pyc hosts manage.py s10ops statics templates uploads ????????
[root@ayibang-server s10ops]# vim demo.ini

[uwsgi]
socket = 0.0.0.0:9999
processes = 30
chdir = /data/soft_ware/s10ops/
pythonpath = /usr/local/bin/python
env = DJANGO_SETTINGS_MODULE=s10ops.settings
module = django.core.wsgi:get_wsgi_application()

[root@ayibang-server s10ops]# vim demo.py

#!/usr/bin/env python
#coding:utf-8
import os
from django.core.wsgi import get_wsgi_application
os.environ['DJANGO_SETTINGS_MODULE']='s10ops.settings'
application = get_wsgi_application()

[root@ayibang-server s10ops]# cd /etc/nginx/conf.d/
[root@ayibang-server conf.d]# ls
admin.conf api.conf.bak cms.conf default.conf django.conf img.conf.bak redmine.conf ssl.conf virtual.conf www.conf.bak
[root@ayibang-server conf.d]# cp django.conf office_djaong_uvpv.conf
[root@ayibang-server conf.d]# vim office_djaong_uvpv.conf

server {
listen 8888;
server_name 192.168.1.200;
location / {
include uwsgi_params;
uwsgi_pass 0.0.0.0:9999;
}
location /static {
alias /data/soft_ware/s10ops/statics;
}
}

平滑重启 nginx

[root@ayibang-server conf.d]# /etc/init.d/nginx reload
Reloading nginx: [ OK ]

报错

/data/soft_ware/s10ops/hosts/backends
[pid: 5418|app: 0|req: 4/33] 192.168.1.19 () {50 vars in 949 bytes} [Thu Dec 3 08:21:22 2015] POST /hosts/submit_task/ => generated 16 bytes in 109 msecs (HTTP/1.1 200) 3 headers in 102 bytes (1 switches on core 0)
Traceback (most recent call last):
File "/data/soft_ware/s10ops/hosts/backends/multi_task.py", line 26, in <module>
import paramiko_handle #多进程 批量处理脚本 文件
File "/data/soft_ware/s10ops/hosts/backends/paramiko_handle.py", line 4, in <module>
import paramiko,json #
ImportError: No module named paramiko
179
--res--task-- [{'bind_host__host__ip_addr': u'124.205.209.42', 'bind_host__host_user__username': u'root', 'event_log': u'N/A', 'bind_host__host__hostname': u'ubantu-1', 'result': u'unknown', 'date': datetime.datetime(2015, 12, 3, 8, 21, 22, 498018, tzinfo=<UTC>), 'id': 224}]
[pid: 5414|app: 0|req: 3/34] 192.168.1.19 () {42 vars in 819 bytes} [Thu Dec 3 08:21:22 2015] GET /hosts/gettaskresult/?task_id=179 => generated 214 bytes in 8 msecs (HTTP/1.1 200) 3 headers in 102 bytes (1 switches on core 0)
179
--res--task-- [{'bind_host__host__ip_addr': u'124.205.209.42', 'bind_host__host_user__username': u'root', 'event_log': u'N/A', 'bind_host__host__hostname': u'ubantu-1', 'result': u'unknown',‘

centos 安装 paramiko

[root@ayibang-server conf.d]# pip install paramiko
Collecting paramiko
Downloading paramiko-1.16.0-py2.py3-none-any.whl (169kB)
100% |################################| 172kB 6.5MB/s
Collecting ecdsa>=0.11 (from paramiko)
Downloading ecdsa-0.13-py2.py3-none-any.whl (86kB)
100% |################################| 90kB 58kB/s
Collecting pycrypto!=2.4,>=2.1 (from paramiko)
Downloading pycrypto-2.6.1.tar.gz (446kB)
100% |################################| 446kB 88kB/s
Installing collected packages: pycrypto, ecdsa, paramiko
Running setup.py install for pycrypto
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for __gmpz_init in -lgmp... no
checking for __gmpz_init in -lmpir... no
checking whether mpz_powm is declared... no
checking whether mpz_powm_sec is declared... no
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for inttypes.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking for inline... inline
checking for int16_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for int8_t... yes
checking for size_t... yes

最新文章

  1. View手动切换焦点注意事项
  2. 逻辑思维面试题-java后端面试-遁地龙卷风
  3. UE4 Android打包 问题 记录笔记
  4. poj1113
  5. Java使用正则表达式解析LRC歌词文件
  6. 25Mybatis_查询缓存的基本知识
  7. Android百度地图开发(二)地图覆盖物
  8. Android 百度地图定位(手动+自动) 安卓开发教程
  9. Cacti监控Linux主机
  10. Android 调用系统通讯录
  11. 求模和求余(附加C语言实现)
  12. 关于textarea的应用--onchage,onpropertychange,oninput
  13. BDD敏捷开发入门与实战
  14. angular 实现 echarts 拖动区域进行放大 方法
  15. 如何确定一台linux主机是Linux (i386/i686)还是Linux (x86_64)
  16. Authorization Security for Mongodb
  17. js获取客户端time,cookie,url,ip,refer,user_agent信息:
  18. SpringMVC 注解详解
  19. CentOS7添加入windows2008的AD域
  20. .NET MVC中登陆授权过滤器的使用

热门文章

  1. mybatis配置oracle的主键自增长
  2. Scrum会议2
  3. JavaWEB中读取配置信息
  4. Git学习记录
  5. PHP 查询时区与设置时区
  6. centos时间同步方法
  7. 【MySql】赶集网mysql开发36条军规
  8. MVC @functions
  9. egrep 查找IP
  10. Checklist For Choosing The Right Database Engine