freebsd7.0安裝cacti手冊
[背景]公司的監控平臺大部分都是freebsd,為了以後安裝方便寫了個這個手冊,供以後用.
[內容]
注意:在安裝apache後,就開一個測試頁,裝了php,就一直用phpinfo來檢測改變! 記住要用apachectl graceful
注意:在安裝apache後,就開一個測試頁,裝了php,就一直用phpinfo來檢測改變! 記住要用apachectl graceful
(1)安裝apache
cd /usr/ports/www/apache22
make config
選擇mysql
make install clean
ee rc.conf
apache22_enable=”YES”
cd /usr/ports/www/apache22
make config
選擇mysql
make install clean
ee rc.conf
apache22_enable=”YES”
(2)安裝php
cd /usr/ports/lang/php5
make config
選擇apache
make install clean
修改httpd.conf
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
cd /usr/ports/lang/php5
make config
選擇apache
make install clean
修改httpd.conf
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
cp /usr/local/etc/php.ini-recommended /usr/local/etc/php.ini
(3)安裝mysql
cd /usr/ports/database/mysql50-server
make install clean
/usr/local/bin/mysql_install_db –user=mysql
/usr/local/bin/mysqld_safe –user=mysql&
ee rc.conf
mysql_enable=”YES”
cd /usr/ports/database/mysql50-server
make install clean
/usr/local/bin/mysql_install_db –user=mysql
/usr/local/bin/mysqld_safe –user=mysql&
ee rc.conf
mysql_enable=”YES”
(4)安裝php-extensions
cd /usr/ports/lang/php5-extensions
make config
選擇mysql
make install clean
[測試php連線mysql]
db.inc
<?php
$host=”localhost”;
$user=”root”;
$pwd=”badboy”;
?>
index.php
<?php
require_once “db.inc”;
$db=mysql_pconnect($host,$user,$pwd);
if ($db){
echo “connect!”;
}
?>
cd /usr/ports/lang/php5-extensions
make config
選擇mysql
make install clean
[測試php連線mysql]
db.inc
<?php
$host=”localhost”;
$user=”root”;
$pwd=”badboy”;
?>
index.php
<?php
require_once “db.inc”;
$db=mysql_pconnect($host,$user,$pwd);
if ($db){
echo “connect!”;
}
?>
(5)安裝zend
cd /usr/local/devel/ZendOptimizer
make install clean
add
[Zend]
zend_optimizer.optimization_level=15
zend_extension_manager.optimizer=”/usr/local/lib/php/20060613/Optimizer”
zend_extension_manager.optimizer_ts=”/usr/local/lib/php/20060613/Optimizer_TS”
zend_extension=”/usr/local/lib/php/20060613/ZendExtensionManager.so”
zend_extension_ts=”/usr/local/lib/php/20060613/ZendExtensionManager_TS.so”
cd /usr/local/devel/ZendOptimizer
make install clean
add
[Zend]
zend_optimizer.optimization_level=15
zend_extension_manager.optimizer=”/usr/local/lib/php/20060613/Optimizer”
zend_extension_manager.optimizer_ts=”/usr/local/lib/php/20060613/Optimizer_TS”
zend_extension=”/usr/local/lib/php/20060613/ZendExtensionManager.so”
zend_extension_ts=”/usr/local/lib/php/20060613/ZendExtensionManager_TS.so”
[注意]
上面的路徑中”20060613″這個是變數,不是固定的.
上面的路徑中”20060613″這個是變數,不是固定的.
解決一個[問題]
Failed loading /usr/local/lib/php/20060613/ZendExtensionManager.so: Shared object “libm.so.4” not found, required by “ZendExtensionManager.so”
報錯
解決辦法:ln -s /lib/libm.so.5 /usr/lib/libm.so.4即可。
Failed loading /usr/local/lib/php/20060613/ZendExtensionManager.so: Shared object “libm.so.4” not found, required by “ZendExtensionManager.so”
報錯
解決辦法:ln -s /lib/libm.so.5 /usr/lib/libm.so.4即可。
(6)安裝rrdtool
cd /usr/ports/database/rrdtool
make install clean
(7)安裝net-snmp
cd /usr/ports/net-mgmt/net-snmp
make install clean
自動的會將snmp support加入到php的擴充套件功能中,所以在php擴充套件模組選擇上面沒有選擇snmp
ee /etc/snmpd.conf
###################################################################
# First, map the community name (COMMUNITY) into a security name
# (local and mynetwork, depending on where the request is coming
# from):
cd /usr/ports/database/rrdtool
make install clean
(7)安裝net-snmp
cd /usr/ports/net-mgmt/net-snmp
make install clean
自動的會將snmp support加入到php的擴充套件功能中,所以在php擴充套件模組選擇上面沒有選擇snmp
ee /etc/snmpd.conf
###################################################################
# First, map the community name (COMMUNITY) into a security name
# (local and mynetwork, depending on where the request is coming
# from):
# sec.name source community
com2sec notConfigUser default passwd
com2sec notConfigUser default passwd
####
# Second, map the security names into group names:
# sec.model sec.name
group notConfigGroup v1 notConfigUser
group notConfigGroup v1 notConfigUser
group notConfigGroup v2c notConfigUser
####
# Third, create a view for us to let the groups have rights to:
# Third, create a view for us to let the groups have rights to:
# incl/excl subtree mask
view all included .1 80
view all included .1 80
####
# Finally, grant the 2 groups access to the 1 view with different
# write permissions:
# Finally, grant the 2 groups access to the 1 view with different
# write permissions:
# context sec.model sec.level match read write notif
access notConfigGroup “” any noauth exact all none none
access notConfigGroup “” any noauth exact all none none
#############################################################################
(8)安裝cacti
cd /usr/ports/net-mgmt/cacti
make config
選擇擴充套件外掛
make install clean
cd /usr/ports/net-mgmt/cacti
make config
選擇擴充套件外掛
make install clean
[注意]
每一款軟體安裝最後,都會有相應的提示,如snmp安裝後,cacti安裝後……有些可能是配置說明文件
本文轉自hahazhu0634 51CTO部落格,原文連結:http://blog.51cto.com/5ydycm/113305,如需轉載請自行聯絡原作者
相關文章
- Hbase安裝手冊
- Hive安裝手冊Hive
- RAC安裝手冊
- cacti安裝紀實
- Erlang安裝手冊-windowsWindows
- GP完整安裝手冊
- 整理了cacti安裝和plugin安裝Plugin
- Cacti的安裝之CentOSCentOS
- Ubuntu安裝cacti步驟Ubuntu
- ubuntu下cacti安裝配置Ubuntu
- Discoverer Desktop安裝手冊
- Oracle VM Server安裝手冊OracleServer
- 求petstore的安裝手冊?
- FVWM安裝完全手冊(轉)
- ORACLE FOR SUN SOLARIS 安裝手冊Oracle
- Rational ClearCase Windows安裝手冊Windows
- PHPNuke完全安裝手冊(轉)PHP
- cacti安裝thold外掛
- Cacti安裝磁碟IO監控
- Go語言快速安裝手冊Go
- gitlab服務安裝手冊Gitlab
- MySql安裝及整合Hive手冊MySqlHive
- GOLDENGATE安裝和配置手冊Go
- RH9安裝手冊,很好!
- cacti監控(2)正式安裝rrdtoolcacti
- cacti+nagios 之cacti外掛安裝monitor和ntop(五)iOS
- Frida官方手冊 - 安裝Frida
- AIX平臺Oracle ODBC安裝手冊AIOracle
- EBS R12 安裝完全手冊
- 轉載 使用Cacti監控你的網路(二)- Cacti的安裝
- cacti監控(1)基礎安裝apachemysqlphpApacheMySqlPHP
- CentOS7安裝cacti1.1.xCentOS
- Nagios Plugin for Cacti 安裝使用篇(zt)iOSPlugin
- Cloudfoundry(v2) with Openstack(Folsom)安裝手冊Cloud
- Puppet+foreman 本地yum安裝手冊REM
- GOLDENGATE安裝和配置手冊總結Go
- Oracle10g RAC安裝手冊 (zt)Oracle
- AIX+ORACLE10G安裝手冊(zt)AIOracle