CentOS7 安裝Firefly及測試

2021-09-23 02:22:19 字數 3254 閱讀 7746

本文記錄centos7安裝firefly的過程及遇到的錯誤

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

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

1 安裝第三方庫:

easy_install twisted

easy_install python-memcached

easy_install dbutils

easy_install zope.inte***ce

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: 乙個更具體的示例:多人聊天室

請移步:

centos7 安裝centos桌面

一 輸入命令 yum groupinstall gnome desktop graphical administration tools 二 設定系統啟動等級。systemctl get default 獲取當前系統執行形式,會顯示multi user.target 命令列終端 或者 graphic...

centos7安裝nginx(yum安裝)

感興趣的可以檢視用壓縮包安裝的過程 1 通過檢視當前linux核心以及版本號進行獲取nginx的rpm安裝源適配。uname a2 獲取nginx相關的rpm源 防止版本號不對應產生的各種問題 rpm uvh3 yum安裝nginx yum install nginx等待安裝完成。1 安裝完成後,n...

CentOS7安裝docker(yum安裝)

1.中文文件 2.檢視linux版本 cat etc redhat release3.是否聯網 這裡yun安裝,不聯網gg 4.解除安裝舊版本 sudo yum remove docker docker client docker client latest docker common docker...