日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

firefly如何安装mysql_CentOS7 安装Firefly及测试

發布時間:2025/3/21 数据库 23 豆豆
生活随笔 收集整理的這篇文章主要介紹了 firefly如何安装mysql_CentOS7 安装Firefly及测试 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

本文記錄CentOS7安裝Firefly的過程及遇到的錯誤

安裝也可以同時參考社區提供的文章:

http://www.9miao.com/forum.php?mod=viewthread&tid=33009&fromuid=87

沒有安裝mysql的請先參考這篇文章,快速安裝:

http://blog.csdn.net/alex_my/article/details/44711139

1 安裝第三方庫:

easy_install twisted

easy_install python-memcached

easy_install DBUtils

easy_install zope.interface

easy_install affinity

easy_install MySQL-python

2 遇到的問題

-1: twisted

問題:twisted/runner/portmap.c:10:20: fatal error: Python.h: No such file or directory

解決方法:安裝python-dev

yum -y install python-devel.x86_64

-2: MySQL-python

問題:mysql_config not found

原因:mysql_config位置不對,而我是就沒有安裝mysql,安裝好后沒有遇到該問題。

解決方法:來自社區參考文章

方法1:

sudo ln -s /usr/local/mysql/bin/mysql_config /usr/local/bin/mysql_config

將mysql_confi從你的安裝目錄鏈接到/usr/local/bin目錄下,這樣就可以在任意目錄下訪問了(也可以放到/usr/bin)

方法2:

編輯源碼文件夾的site.cfg文件,去掉#mysql_config =? /usr/local/bin/mysql_config前的注釋#,修改后面的路徑為你的mysql_config真正的目錄就可以了。(如果不知道 mysql_config在哪里,運行命令:whereis mysql_config)

3 檢測是否正常安裝

-1:創建一個新的工程

firefly-admin.py createproject Test

cd Test

-2: 修改config.json配置

--1:普通用戶無法使用1000端口號,所以,netport使用的1000請修改為其它值,比如10000

--2:db-passwd請修改為自己所使用的mysql密碼,比如123456

-3:運行

python startmaster.py

輸出:

2015-03-29 00:04:01+0800 [-] Log opened.

2015-03-29 00:04:01+0800 [-] DelaySite starting on 9998

2015-03-29 00:04:01+0800 [-] Starting factory

2015-03-29 00:04:01+0800 [-] BilateralFactory starting on 9999

2015-03-29 00:04:01+0800 [-] Starting factory

/usr/lib/python2.7/site-packages/pkg_resources.py:1054: UserWarning: /home/alex-my/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the

PYTHON_EGG_CACHE environment variable).

warnings.warn(msg, UserWarning)

/usr/lib/python2.7/site-packages/pkg_resources.py:1054: UserWarning: /home/alex-my/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or

the PYTHON_EGG_CACHE environment variable).

warnings.warn(msg, UserWarning)

2015-03-29 00:04:01+0800 [-] Log opened.

2015-03-29 00:04:01+0800 [-] Log opened.

2015-03-29 00:04:01+0800 [-] Starting factory

2015-03-29 00:04:01+0800 [-] Starting factory

2015-03-29 00:04:01+0800 [-] gate start...

2015-03-29 00:04:01+0800 [-] gate pid: 3431

2015-03-29 00:04:01+0800 [-] net start...

2015-03-29 00:04:01+0800 [-] net pid: 3432

2015-03-29 00:04:01+0800 [BilateralBroker,0,127.0.0.1] node [gate] takeProxy ready

2015-03-29 00:04:01+0800 [BilateralBroker,1,127.0.0.1] node [net] takeProxy ready

2015-03-29 00:04:01+0800 [Broker,client] call method remote_connect on service[single]

2015-03-29 00:04:01+0800 [Broker,client] Starting factory

2015-03-29 00:04:01+0800 [BilateralBroker,0,127.0.0.1] node [net] takeProxy ready

-4: 修復警告

過程中出現一個大意是說~/.python-eggs不安全

解決方案:

chmod g-w ~/.python-eggs/??? # 將group的寫權限去除

chmod o-w ~/.python-eggs/?? ? # 將other的寫權限去除

-5: 一個更具體的示例:多人聊天室

請移步:http://www.9miao.com/forum.php?mod=viewthread&tid=43974&fromuid=87

總結

以上是生活随笔為你收集整理的firefly如何安装mysql_CentOS7 安装Firefly及测试的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。