Openwebsa開源運(yùn)維平臺(tái)編譯安裝
OWS是免費(fèi)開源的運(yùn)維管理平臺(tái),今天拿一臺(tái)機(jī)器安裝測試了下,功能上做的不錯(cuò),只是還不夠成熟。感興趣的可以安裝體驗(yàn)下,安裝OWS的前提是你已經(jīng)安裝編譯好了PHP+MYSQL環(huán)境。
一、下載源碼文件
wget http://damo.openwebsa.org/down/ows_damo_v1.0.2_3.tar.gz
wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c10.tar.gz#md5=30f822f19b02c3082cb1ba1d69be35dd
wget http://cdnetworks-kr-1.dl.sourceforge.net/project/mysql-python/mysql-python/1.2.3/MySQL-python-1.2.3.tar.gz
wget http://www.python.org/ftp/python/2.7.2/Python-2.7.2.tar.bz2
二、編譯安裝
解壓OWS文件并移到/usr/local/ows目錄
# tar xvf ows_damo_v1.0.2_3.tar.gz
#mv ows /usr/local/ows
#chown -R nobody:nobody /usr/local/ows
#chmod 755 -R /usr/local/ows/unctrlsh/*
安裝Python
#tar xvf Python-2.7.2.tgz
#cd Python-2.7.2
#./configure --prefix=/usr/local/ows/python
#make && make install
#/usr/local/ows/python/bin/python -V
Python 2.7.2
安裝setuptools
#tar xzvf setuptools-0.6c10.tar.gz
#cd setuptools-0.6c10
#/usr/local/ows/python/bin/python setup.py build
#/usr/local/ows/python/bin/python setup.py install
安裝MySQL-python
#which mysql_config
#tar xvf MySQL-python-1.2.3.tar.gz
#cd MySQL-python-1.2.3
#/usr/local/ows/python/bin/python setup.py build
#/usr/local/ows/python/bin/python setup.py install
三、創(chuàng)建數(shù)據(jù)庫和導(dǎo)入數(shù)據(jù)庫表
mysql>create database 數(shù)據(jù)庫名 default charset utf8;
mysql>grant all privileges on 數(shù)據(jù)庫名.* to 數(shù)據(jù)庫用戶名@127.0.0.1 identified by '數(shù)據(jù)庫用戶密碼';
mysql>flush privileges;
數(shù)據(jù)庫用戶的權(quán)限可以只給:create,drop,delete,insert,update,select,lock tables。
然后導(dǎo)入數(shù)據(jù)庫
#mysql -u數(shù)據(jù)庫用戶名 -p數(shù)據(jù)庫用戶密碼 數(shù)據(jù)庫名 < /usr/local/ows/openwebsa.sql
數(shù)據(jù)庫導(dǎo)入之后需要修改ows數(shù)據(jù)庫配置文件,一共需要修改兩處
/usr/local/ows/ctrlphp/etc/ows_config.inc.php
/usr/local/ows/ctrlpy/etc/config.py
四、配置WEB頁面
不管你用的是哪種支持PHP的WEB服務(wù)器軟件,指定網(wǎng)站的目錄為/usr/local/ows/ctrlphp就可以了,下面以APACHE別名的方式為例,打開apache的httpd.conf配置文件,添加如下內(nèi)容:
Alias /ows /usr/local/ows/ctrlphp
<Directory "/usr/local/ows/ctrlphp">
Options +SymLinksIfOwnerMatch
AllowOverride All
Order allow,deny
Allow from all
</Directory>
保存之后,重新啟動(dòng)apache
五、啟動(dòng)相關(guān)服務(wù)
啟動(dòng)服務(wù)端
#cd /usr/local/ows/ctrlpy/
#chmod 755 ows_service.sh
#./ows_service.sh start
啟動(dòng)客戶端
#cd /usr/local/ows/unctrlpy/
#chmod 755 ows_service.sh
#./ows_service.sh start
查看進(jìn)程是否運(yùn)行
# ps aux | grep py
查看監(jiān)聽端口
# netstat -tulnp | grep py
使用瀏覽器打開 http://ip/ows 登陸web管理平臺(tái)
默認(rèn)的賬號(hào):openwebsa 密碼:openwebsa
進(jìn)去之后別忘記修改密碼,官方的演示地址是:http://damo.openwebsa.org 感興趣的朋友可以進(jìn)去看看,此管理平臺(tái)目前來看還不是很完善,大家測出問題可以向官方反饋,以便程序盡快完善。