{"action":"created","issue":{"url":"https://api.github.com/repos/nanshihui/Scan-T/issues/5","repository_url":"https://api.github.com/repos/nanshihui/Scan-T","labels_url":"https://api.github.com/repos/nanshihui/Scan-T/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/nanshihui/Scan-T/issues/5/comments","events_url":"https://api.github.com/repos/nanshihui/Scan-T/issues/5/events","html_url":"https://github.com/nanshihui/Scan-T/issues/5","id":157126868,"number":5,"title":"关于安装方面的问题汇总","user":{"login":"sadk","id":2968607,"avatar_url":"https://avatars.githubusercontent.com/u/2968607?v=3","gravatar_id":"","url":"https://api.github.com/users/sadk","html_url":"https://github.com/sadk","followers_url":"https://api.github.com/users/sadk/followers","following_url":"https://api.github.com/users/sadk/following{/other_user}","gists_url":"https://api.github.com/users/sadk/gists{/gist_id}","starred_url":"https://api.github.com/users/sadk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sadk/subscriptions","organizations_url":"https://api.github.com/users/sadk/orgs","repos_url":"https://api.github.com/users/sadk/repos","events_url":"https://api.github.com/users/sadk/events{/privacy}","received_events_url":"https://api.github.com/users/sadk/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nanshihui/Scan-T/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":34,"created_at":"2016-05-27T04:15:28Z","updated_at":"2016-10-01T11:27:58Z","closed_at":null,"body":"目前遇到的问题都是 ubuntu:latest 环境。\r\n\r\n## 相关程序的安装：\r\n\r\n```\r\napt-get update \r\napt-get install -y nmap\r\napt-get install -y libjson-c-dev libjson-c2  libjson0 libjson0-dev\r\napt-get install -y redis-server zmap libffi-dev libssl-dev python-pip libmysqlclient-dev\r\napt-get install -y wget unzip\r\n\r\n```\r\n获取代码\r\n\r\n```\r\nwget https://github.com/nanshihui/toolforspider/archive/master.zip\r\nunzip master.zip \r\ncd toolforspider-master/\r\n```\r\n\r\n安装相关的package\r\n\r\n```\r\npip install MySQL-python\r\npip install BeautifulSoup==3.2.1\r\npip install beautifulsoup4==4.4.1\r\npip install Django==1.9\r\npip install python-nmap==0.5.0.post1\r\npip install DBUtils==1.1\r\npip install paramiko==1.16.0\r\npip install ruamel.ordereddict==0.4.9\r\npip install scapy==2.3.2\r\npip install scapy-http==1.7\r\npip install objgraph==2.0.1\r\npip install pycrypto==2.6.1\r\npip install dozer\r\npip install faulthandler\r\npip install apscheduler\r\n```\r\n\r\n\r\n## 配置\r\n\r\n数据库配置位于 `spidermanage/spidertool/config.py`\r\n\r\n如果本机没有装mysql，可以按照如下方式进行安装。\r\n\r\n`apt-get install mysql-server`\r\n\r\n启动mysql服务\r\n\r\n /etc/init.d/mysql start\r\n\r\n建立数据库\r\n\r\nmysql -uroot -p -e 'create database datap'\r\n\r\n## 启动 \r\n\r\n先迁移下数据库 \r\n\r\n```\r\npython spidermanage/manage.py  migrate\r\nmysql -uroot -p datap -e 'source /toolforspider-master/spidermanage/sqldata/Dump20160331.sql'\r\n```\r\n注意：因为环境问题，我去掉了`/*!50100 WITH PARSER mysqlcft  */` 这段。\r\nmysqlcft 比较老旧，怕以后有兼容性问题，所以不打算继续折腾。\r\n\r\n添加网站账户\r\n\r\n` mysql -uroot -p datap -e \"insert INTO user_table set username = 'admin',password = 'admin'\"`\r\n\r\n正式启动\r\n\r\n`python spidermanage/manage.py runserver 0.0.0.0:80`\r\n\r\n## 登录后你会发现有些页面点击进去会发生错误，那是因为作者有些功能还没有完成。\r\n\r\n在  /toolforspider-master/spidermanage/common_static/nmaptool/css/bootstrap/ 下\r\n新建 lib 文件夹\r\n并且下载\r\nhttp://cine9deabril.com.br/fn/jquery/jquery-ui-1.10.2.custom/css/custom-theme/jquery-ui-1.10.2.custom.css\r\nhttps://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.css\r\n这两个文件到文件夹里"},"comment":{"url":"https://api.github.com/repos/nanshihui/Scan-T/issues/comments/250907394","html_url":"https://github.com/nanshihui/Scan-T/issues/5#issuecomment-250907394","issue_url":"https://api.github.com/repos/nanshihui/Scan-T/issues/5","id":250907394,"user":{"login":"zerokeeper","id":18204909,"avatar_url":"https://avatars.githubusercontent.com/u/18204909?v=3","gravatar_id":"","url":"https://api.github.com/users/zerokeeper","html_url":"https://github.com/zerokeeper","followers_url":"https://api.github.com/users/zerokeeper/followers","following_url":"https://api.github.com/users/zerokeeper/following{/other_user}","gists_url":"https://api.github.com/users/zerokeeper/gists{/gist_id}","starred_url":"https://api.github.com/users/zerokeeper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zerokeeper/subscriptions","organizations_url":"https://api.github.com/users/zerokeeper/orgs","repos_url":"https://api.github.com/users/zerokeeper/repos","events_url":"https://api.github.com/users/zerokeeper/events{/privacy}","received_events_url":"https://api.github.com/users/zerokeeper/received_events","type":"User","site_admin":false},"created_at":"2016-10-01T11:27:58Z","updated_at":"2016-10-01T11:27:58Z","body":"mysqlcft没有被定义：\r\nmysql -uroot -p datap -e 'source spidermanage/sqldata/Dump20160803.sql'\r\n\r\nERROR 1128 (HY000) at line 285 in file: 'spidermanage/sqldata/Dump20160803.sql': Function 'mysqlcft' is not defined\r\n"}}
{"actor":{"display_login":"zerokeeper"}}