亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊(cè) 查看新帖 |

Chinaunix

  平臺(tái) 論壇 博客 文庫(kù)
123下一頁(yè)
最近訪問(wèn)板塊 發(fā)新帖
查看: 53176 | 回復(fù): 23
打印 上一主題 下一主題

網(wǎng)絡(luò)監(jiān)控軟件Zabbix詳細(xì)安裝步驟(原創(chuàng)) [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2008-04-14 15:01 |只看該作者 |倒序?yàn)g覽
Zabbix是一套較為成熟的服務(wù)器監(jiān)控軟件


1.創(chuàng)建ZABBIX的系統(tǒng)賬號(hào)
為了安全起見(jiàn)建議創(chuàng)建使用zabbix用戶運(yùn)行ZABBIX.
useradd zabbix
2.解壓:
tar xvzf zabbix-1.1beta12.tar.gz
3.創(chuàng)建 ZABBIX 數(shù)據(jù)庫(kù)
mysql -u test -p
>create database zabbix;
>quit;
/* 1.1.6 cd create/mysql
cat schema.sql |mysql -u root -p zabbix
cd ../data
cat data.sql |mysql -u root -p zabbix */
1.4.1
cd create/schema
cat schema.sql |mysql -u root -p zabbix
cd ../data
cat data.sql |mysql -u root -p zabbix
cat images_mysql.sql |mysql -u root -p zabbix

4.編譯:
服務(wù)器端+客戶端的編譯:
./configure --with-mysql --with-net-snmp --enable-server --enable-agent --prefix=/usr/local/zabbix
客戶端只需執(zhí)行:
./configure --prefix=/usr/local/zabbix --enable-agent
make
make install
cd /usr/local/zabbix/bin
for i in * ; do ln -s /usr/local/zabbix/bin/$i /usr/bin/$i ; done

5.配置:
(1).vi /etc/services
該文件是zabbix建議操作,可忽略:
加入:
zabbix_agent 10050/tcp
zabbix_trap 10051/tcp
(2) WEB interface
回到zabbix的編譯目錄,
vi frontends/php/include/db.inc.php
更改數(shù)據(jù)庫(kù)相關(guān)內(nèi)容:
$DB_TYPE ="MYSQL";
$DB_SERVER ="localhost";
$DB_DATABASE ="zabbix";
$DB_USER ="root";
$DB_PWD ="";
cp -rf frontends/php /usr/local/www/html/zabbix -R
chown zabbix /usr/local/www/html/zabbix/ -R
(3) 生成配置文件:
mkdir /etc/zabbix
cp misc/conf/* /etc/zabbix/
配置相關(guān)內(nèi)容(以下內(nèi)容請(qǐng)根據(jù)大家具體服務(wù)器的IP/MYSQL的賬號(hào)情況做相應(yīng)修改):
zabbix_agent.conf
grep -v '^#' zabbix_agent.conf |grep -v '^$'
Server=10.5.21.46
Timeout=3
UserParameter=mysql.ping,/usr/local/mysql/bin/mysqladmin -uroot -p ping|grep alive|wc -l
UserParameter=mysql.uptime,/usr/local/mysql/bin/mysqladmin -uroot -p status|cut -f2 -d":"|cut -f1 -d"T"
UserParameter=mysql.threads,/usr/local/mysql/bin/mysqladmin -uroot -p status|cut -f3 -d":"|cut -f1 -d"Q"
UserParameter=mysql.questions,/usr/local/mysql/bin/mysqladmin -uroot -p status|cut -f4 -d":"|cut -f1 -d"S"
UserParameter=mysql.slowqueries,/usr/local/mysql/bin/mysqladmin -uroot -p status|cut -f5 -d":"|cut -f1 -d"O"
UserParameter=mysql.qps,/usr/local/mysql/bin/mysqladmin -uroot -p status|cut -f9 -d":"
UserParameter=mysql.version,/usr/local/mysql/bin/mysql -V

zabbix_agentd.conf
grep -v '^#' zabbix_agentd.conf |grep -v '^$'
Server=10.5.21.46
Hostname=localhost
ListenPort=10050
ListenIP=10.5.21.46
StartAgents=5
RefreshActiveChecks=120
DisableActive=1
DebugLevel=3
PidFile=/var/tmp/zabbix_agentd.pid
LogFile=/var/log/zabbix_agentd.log
Timeout=3
UserParameter=mysql.ping,/usr/local/mysql/bin/mysqladmin -uroot -p ping|grep alive|wc -l
UserParameter=mysql.uptime,/usr/local/mysql/bin/mysqladmin -uroot -p status|cut -f2 -d":"|cut -f1 -d"T"
UserParameter=mysql.threads,/usr/local/mysql/bin/mysqladmin -uroot -p status|cut -f3 -d":"|cut -f1 -d"Q"
UserParameter=mysql.questions,/usr/local/mysql/bin/mysqladmin -uroot -p status|cut -f4 -d":"|cut -f1 -d"S"
UserParameter=mysql.slowqueries,/usr/local/mysql/bin/mysqladmin -uroot -p status|cut -f5 -d":"|cut -f1 -d"O"
UserParameter=mysql.qps,/usr/local/mysql/bin/mysqladmin -uroot -p status|cut -f9 -d":"
UserParameter=mysql.version,/usr/local/mysql/bin/mysql -V

zabbix_server.conf
grep -v '^#' zabbix_server.conf |grep -v '^$'
Server=1
StartPollers=6
StartTrappers=5
ListenPort=10051
HousekeepingFrequency=1
SenderFrequency=30
DebugLevel=3
Timeout=5
UnreachablePeriod=45
UnavailableDelay=15
UnavailableDelay=60
PidFile=/var/tmp/zabbix_server.pid
LogFile=/var/log/zabbix_server.log
AlertScriptsPath=/home/zabbix/bin/
PingerFrequency=30
DBHost=localhost
DBName=zabbix
DBUser=root
DBPassword=
DBSocket=/usr/local/mysql/data/mysql.sock
zabbix_trapper.conf
grep -v '^#' zabbix_trapper.conf |grep -v '^$'
DebugLevel=2
Timeout=3
LogFile=/var/log/zabbix_trapper.log
DBHost=localhost
DBName=zabbix
DBUser=root
DBPassword=
DBSocket=/usr/local/mysql/data/mysql.sock
(4). 生成啟動(dòng)腳本
cp misc/init.d/redhat/zabbix_* /usr/local/zabbix/bin/
編輯zabbix_agentd_ctl 和 zabbix_suckerd_ctl
BASEDIR=/usr/local/zabbix 為指定的zabbix安裝目錄.
zabbix_suckerd_ctl文件中的
ZABBIX_SUCKERD=$BASEDIR/bin/zabbix_suckerd可能因?yàn)榘姹娟P(guān)系應(yīng)該改為
ZABBIX_SUCKERD=$BASEDIR/bin/zabbix_server
6.啟動(dòng)服務(wù):
服務(wù)器端
/usr/local/zabbix/bin/zabbix_suckerd_ctl start
客戶端
/usr/local/zabbix/bin/zabbix_agentd_ctl start
7.
--mysql
tar zxvf mysql-5.0.37.tar.gz
cd mysql-5.0.37
more INSTALL-SOURCE
groupadd mysql
useradd -g mysql mysql
passwd mysql
./configure --prefix=/usr/local/mysql --with-charset=gbk --with-extra-charsets=gb2312,latin1,utf8 --enable-largefile --with-big-tables --localstatedir=/usr/local/mysql/data --without-debug --with-max-indexes=64 --without-ndbcluster
make
make install
cp support-files/my-medium.cnf /etc/my.cnf
cp /root/mysql-5.0.37/support-files/mysql.server /usr/local/mysql/mysql
chmod +x /usr/local/mysql/mysql
cd /usr/local/mysql
bin/mysql_install_db --user=mysql
chown -R root  .
chown -R mysql .
chgrp -R mysql .
chown mysql.mysql -R data
bin/mysqld_safe --user=mysql &
./bin/mysqladmin -u root password ***** (密碼)
/usr/local/mysql/mysql restart
/usr/local/mysql/bin/mysql -uroot -p **** (密碼)   登入mysql控制臺(tái)看看是不是正常了

--apache
emerge gd
emerge jpeg
emerge zlib
emerge libpng
emerge freetype
tar zxvf httpd-2.2.4.tar.gz
cd httpd-2.2.4
./configure --prefix=/usr/local/httpd --enable-so --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr -with-zlib-dir=/usr --with-freetype-dir=/usr
make
make install
/usr/local/httpd/bin/apachectl start 如果沒(méi)起來(lái),看看日志:more /usr/local/httpd/logs/error_log,可能是這臺(tái)機(jī)器80端口被別的程序(如resin)占用了,修改一下配置文件:
vi /usr/local/httpd/conf/httpd.conf
  Listen 192.168.1.212:88
  修改一下#ServerName www.example.com:88 為ServerName www.test.com:80
/usr/local/httpd/bin/apachectl restart  試試,應(yīng)該就能訪問(wèn)了: http://192.168.1.212/ 能出來(lái) It works! 的頁(yè)面了
cd..
--php
emerge dev-libs/libxml
emerge dev-libs/libxml2  //如果沒(méi)裝libxml,則編譯會(huì)出現(xiàn)configure: error: xml2-config not found.
tar zxvf php-5.2.1.tar.gz
cd php-5.2.1
./configure --with-apxs2=/usr/local/httpd/bin/apxs --with-mysql-dir=/usr/local/mysql --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr -with-zlib-dir=/usr --with-freetype-dir=/usr

make
make install
cp php.ini-dist /usr/local/lib/php.ini
vi /usr/local/httpd/conf/httpd.conf  手動(dòng)添加:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps   
        #這兩行是讓apache知道php的文件類型
DirectoryIndex index.html       改成DirectoryIndex index.html index.php  ,讓apache默認(rèn)的首頁(yè)也支持index.php
echo '/usr/local/mysql/lib/mysql'>>/etc/ld.so.conf
ldconfig
8.打開(kāi)瀏覽器:
http://10.5.21.46/zabbix
用戶名admin,初始密碼為空.

論壇徽章:
0
2 [報(bào)告]
發(fā)表于 2008-04-14 18:22 |只看該作者
我安裝了幾遍,結(jié)果都是一樣,打開(kāi)網(wǎng)頁(yè)只看到一個(gè)sbin目錄;

查看安裝目錄也只有sbin一個(gè)目錄,不知為何;

[root@cacti zabbix-1.4.5]# ls /var/www/html/zabbix/
sbin


安裝步驟:
./configure --enable-server --enable-agent --with-mysql=/usr/bin/mysql_config --with-net-snmp=/usr/local/bin/net-snmp-config --prefix=/var/www/html/zabbix;


make install

論壇徽章:
0
3 [報(bào)告]
發(fā)表于 2008-04-16 19:29 |只看該作者
由于php對(duì)于我來(lái)說(shuō)非常陌生,我總是配不好db.inc.php,不知如何設(shè)置數(shù)據(jù)庫(kù);


#運(yùn)行zabbix_server總是提示錯(cuò)誤,似乎是庫(kù)沒(méi)有設(shè)好。。

[root@flow ~]# /usr/local/zabbix/sbin/zabbix_server
/usr/local/zabbix/sbin/zabbix_server: error while loading shared libraries: libnetsnmp.so.15: cannot open shared object file: No such file or directory


而且我搜了一下,目前我還沒(méi)有看到一篇真正完整的zabbix安裝教程,有幾篇英文的倒是比較全面一些;望賜教。謝謝。

論壇徽章:
0
4 [報(bào)告]
發(fā)表于 2008-04-21 12:14 |只看該作者
錯(cuò)誤提示如附件,無(wú)法繼續(xù)。。。

2008-04-21_12-10-58.jpg (147.18 KB, 下載次數(shù): 177)

2008-04-21_12-10-58.jpg

論壇徽章:
0
5 [報(bào)告]
發(fā)表于 2008-05-04 09:38 |只看該作者
樓上的朋友
安裝php-bcmath
yum -y install php-bcmath

修改時(shí)區(qū)
Vi  /etc/php.ini
date.timezone =Asia/Shanghai



還有一個(gè)經(jīng)常碰到的問(wèn)題:
php max execution time
vi /etc/php.ini
改為300就可以了

謝謝樓主的分享,版主加精吧,別這么吝嗇。
樓主來(lái)啊,繼續(xù)和大家交流。

[ 本帖最后由 deargentle 于 2008-5-4 09:48 編輯 ]

論壇徽章:
0
6 [報(bào)告]
發(fā)表于 2008-05-04 09:57 |只看該作者

這是官方文檔

ZABBIX SERVER

        1. Create the ZABBIX superuser account
This is the user the server will run as. For production use you should create a dedicated unprivileged account ('zabbix' is commonly used). Running ZABBIX as 'root','bin', or any other account with special rights is a security risk. Do not do it!
Note: ZABBIX server process (zabbix_server) is protected from being run under root account.
        2. Untar ZABBIX sources
shell> gunzip zabbix.tar.gz && tar -xvf zabbix.tar
        3. Create the ZABBIX database.
ZABBIX comes with SQL scripts used to create the required database schema and also to insert a default configuration. There are separate scripts for MySQL and PostgreSQL.
For MySQL:
shell> mysql -u<username> -p<password>
mysql> create database zabbix;
mysql> quit;
shell> cd create/mysql
shell> cat schema.sql |mysql -u<username> -p<password> zabbix
shell> cd ../data
shell> cat data.sql |mysql -u<username> -p<password> zabbix
shell> cat images.sql |mysql -u<username> -p<password> zabbix
For PostgreSQL:
shell> psql -U <username>
psql> create database zabbix;
psql> \q
shell> cd create/postgresql
shell> cat schema.sql|psql -U <username> zabbix
shell> cd ../data
shell> cat data.sql|psql -U <username> zabbix
shell> cat images_pgsql.sql |psql -U <username> zabbix
        4. Configure and compile the source code for your system
The sources must be compiled for both the server (monitoring machine) as well as the clients (monitored machines). To configure the source for the server, you must specify which database will be used.
shell> ./configure --enable-server --with-mysql --with-net-snmp # for MySQL
or
shell> ./configure --enable-server --with-pgsql --with-net-snmp # for PostgreSQL make
or
shell> ./configure --enable-server --with-oracle=/home/zabbix/sqlora8 --with-net-snmp # for Oracle make
Note: Use flag --with-oracle to specify location of sqlora8 library. The libary is required for Oracle support. The library can be found at libsqlora8 homepage
Note: Use flag --enable-static to statically link libraries. If you plan to distribute compiled binaries among different servers, you must use this flag to make these binaries work without required libraries. --enable-static does not work under Solaris. Flag --with-ucd-snmp can be used instead of --with-net-snmp. If no SNMP support required, both --with-net-snmp and --with-ucd-snmp may be skipped.
However, if you want to compile client binaries along with server binaries, run:
shell> ./configure  --enable-server --enable-agent --with-mysql --with-net-snmp
Parameter —enable-static may be used to force static linkage.
        5. Make and install everything:
shell> make install
By default,
make install
will install all the files in /usr/local/bin, /usr/local/lib etc. You can specify an installation prefix other than /usr/local using --prefix
        6. Configure /etc/services
The step is not real requirement. However, it is recommended. On the client (monitored) machines, add the following lines to /etc/services:
zabbix_agent 10050/tcp
zabbix_trap 10051/tcp
        7. Configure /etc/inetd.conf
If you plan to use zabbix_agent instead of the recommended zabbix_agentd, the following line must be added:
zabbix_agent stream tcp nowait.3600 zabbix /opt/zabbix/bin/zabbix_agent
Restart inetd
shell> killall -HUP inetd
Modify default settings in configuration files
        8. Configure /etc/zabbix/zabbix_agent.conf
You need to configure this file for every host having zabbix_agent installed. The file should contain IP address of ZABBIX server. Connections from other hosts will be denied. You may take misc/conf/zabbix_agent.conf as example.
        9. Configure /etc/zabbix/zabbix_agentd.conf
You need to configure this file for every host with zabbix_agentd installed. The file should contain the IP address of the ZABBIX server. Connectionsfrom other hosts will be denied. You may take misc/conf/zabbix_agentd.conf as example.
        10. Configure /etc/zabbix/zabbix_server.conf
For small installations (up to ten monitored hosts), default parameters are sufficient. However, you should change default parameters to maximize performance from ZABBIX. See section [Performance tuning] for more details.
You may take misc/conf/zabbix_server.conf as example.
        11. Run server processe
Run zabbix_server on server side.
shell> cd bin
shell> ./zabbix_server
        12. Run agents
Run zabbix_agentd where necessary.
shell> cd bin
shell> ./zabbix_agentd


Configure WEB interface
As user zabbix (or whatever you decided to name your dedicated ZABBIX account), do the following:
        1. Change these values in frontends/php/include/db.inc.php:
        $DB_TYPE =”POSTGRESQL”; /* Or “MYSQL” for MySQL */
        $DB_SERVER =”localhost”;
        $DB_DATABASE =”zabbix”;
        $DB_USER =””;
        $DB_PWD =””
        2. Copy the PHP source files to a place where your web server can get to it. Perhaps /home/zabbix/html or /home/zabbix/public_html or /var/www/html/zabbix, etc.
For example:
shell> mkdir /home/zabbix/html
shell> cp -R frontends/php/* /home/zabbix/html/

論壇徽章:
0
7 [報(bào)告]
發(fā)表于 2008-05-24 20:42 |只看該作者
[巳解決]

freebsd 下用 port 安裝發(fā)現(xiàn)不含 zabbiz_agent.conf.

是否用 tar ball 安裝較好 ?

(找到 /usr/ports/net-mgmt/zabbix-agent 了)

[ 本帖最后由 freesrc 于 2008-5-24 20:43 編輯 ]

論壇徽章:
0
8 [報(bào)告]
發(fā)表于 2008-07-11 13:41 |只看該作者
應(yīng)該來(lái)幾張比較全面的圖看看。哈哈

論壇徽章:
0
9 [報(bào)告]
發(fā)表于 2008-10-27 15:04 |只看該作者
官方文檔寫的非常的不全面。有沒(méi)有更全面詳細(xì)點(diǎn)的教程?

論壇徽章:
0
10 [報(bào)告]
發(fā)表于 2008-12-08 10:34 |只看該作者

回復(fù) #3 zenglingping 的帖子

libnetsnmp.so.15 無(wú)法找到的話,如下操作:
locate libnetsnmp.so.15 查找
/usr/lib/libnetsnmp.so.15  一般在這個(gè)目錄下。

ln -s /usr/lib/libnetsnmp.so.15 /lib

ln -s /usr/lib/libnetsnmp.so.15 /lib64 #64位機(jī)器的話。
完成。
您需要登錄后才可以回帖 登錄 | 注冊(cè)

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號(hào)-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號(hào):11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國(guó)互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過(guò)ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請(qǐng)注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP