重新拷贝 新项目 发现不显示 原来是 paramiko 没有装
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
重新拷贝 新项目 发现不显示 原来是 paramiko 没有装的更多相关文章
- 在AndroidStudio v1.2.0中导入或增加新项目或工程(导入第三方类库或工程)
以下说明基于AndroidStdudio版本v1.2 由于AndroidStudio项目止录与Eclipse中的Worksapce在意义上的改变,所以导入新包或建立新项目时并不和以前那样了. 下面是我 ...
- 【Cocos2d-x for WP8 学习整理】(1)创建一个新项目
喜大普奔 10.1假期之前看到了一个很振奋的消息,就是随着Cocos2d-x 2.2的发布,WP8/WIN8有史以来第一次的合并到主版本了. 之前 V2 ...
- cocos2d-x3.2创建新项目失败的一种可能性(cygwin自带的python2.6被抢先执行)
之前一直使用cocos2d-x2.2写游戏,写了几个游戏后,想尝试下3.x版本的新功能,就下载了cocos2d-x3.2版本. 参照官方文档的说法,cocos2d-x3.x版本需要python2.7环 ...
- 复制新项目 ,tomcat部署时名字还是旧项目名
基于一个就项目 copy 成新项目 关于项目名注意点: 在工作空间下 copy一份新项目 1首先在目录将项目名字更改. 2.在新项目下 找到 [.project]文件 将里面的nama更改 3 ...
- 用Kotlin开发Android应用(II):创建新项目
这是关于Kotlin的第二篇.各位高手发现问题,请继续“拍砖”. 原文标题:Kotlin for Android(II): Create a new project 原文链接:http://anton ...
- cocos2d-x 3.2 创建新项目问题
cocos2d-x 3.2 执行cocos2d-x\tools\cocos2d-console\console下的cocos2d.py,输入相应的参数即可创建一个新的项目,具体参数网上介绍一大堆,就不 ...
- myeclipse下拷贝的项目,tomcat下部署名称和导出为war包的名称默认值修改
拷贝一个项目,作为一个新的项目,给它换了名字,这时候默认的部署名称等都是原来项目的,这时候要在属性里面修改一下.
- 如何向Openstack社区提交一个新项目
前几天有个朋友问我:自己有一个idea不错的项目,也把基本的框架写好了,想贡献到Openstack社区,却不知道应该怎么做.正好之前我有过类似的经历,那么来分享一下我是如何向Openstack社区提交 ...
- MyEclipse中拷贝J2EE项目,发布到tomcat中名字一样的解决办法
修改Eclipse工作空间下新拷贝项目下.settings文件夹中org.eclipse.wst.common.component的两个属性值. 为新项目名字: <?xml version=&q ...
随机推荐
- Wilddog - 野狗统计
根据业务需求提出的统计代码. <!DOCTYPE HTML> <html lang="en-US"> <head> <meta chars ...
- 【新产品发布】《GM1001 4~20mA 高精度电流采集模块》
一.主要特性 1.测量精度高达±0.01%FS±0.002mA: 2.采样电阻仅10欧姆(20mA时压降仅0.2V),对被测系统影响 微乎其微: 3.差分输入,可测量正反电流无需改动硬件,使用方便: ...
- 小红伞和virtualbox5.0.10冲突
win7 sp1 64bit 旗舰版:virtual box 5.0.10 提示 error in supr3hardNtChildWaitFor……Timed out after 60001 ms ...
- ThinkPHP的cookide保存二维数组的方法
ThinkPHP中的cookie是不支持二维数组的. 如果要保存二维数组.只能特殊处理 $data[263] = array('gid'=>263,'num'=>1); $data[266 ...
- PHP学习(五)----jQuery和JSON数据
对于jQuery: jQuery 是一个 JavaScript 库. jQuery 极大地简化了 JavaScript 编程.
- 医生工作台二期-bug总结
bug记录 1.视频问诊详情查看流,流里进入检查单详情上传图片后返回闪退 这块cell用的相同的id,开始创建的是第一个if里面的cell,后来创建的是else里面的cell,因为之前用TipCell ...
- PHP5 mysqli 教程
mysqli提供了面向对象和面向过程两种方式来与数据库交互,分别看一下这两种方式. 1.面向对象 在面向对象的方式中,mysqli被封装成一个类,它的构造方法如下: __construct ([ st ...
- javascript小实例,PC网页里的拖拽
几年前,我参与设计开发一个房产网的项目,我负责前端工作,由于项目经理要求比较高,参考了很多房产类网站比较优秀的功能,想把别人比较优秀的设计和想法集合到一起,那时的设计稿和功能实现,简直就是改了又改,今 ...
- Abstract Algebra chapter 7
7.7:Encrypt each of the following RSA messages x so that x is divided into blocks of integers of len ...
- android Textview动态设置大小
import android.app.Activity; //import com.travelzen.tdx.BaseActivity; //import com.travelzen.tdx.uti ...