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

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

【RedHat、CentOS Cacti安装配置】

發(fā)布時(shí)間:2025/3/20 编程问答 26 豆豆
生活随笔 收集整理的這篇文章主要介紹了 【RedHat、CentOS Cacti安装配置】 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

1.?安裝環(huán)境:RedHat AS 5.3企業(yè)版(注意使用apache、MySQL、php版本,有時(shí)候可能不相容:我用的是httpd-2.2.13.tar.bz2、 MySQL-5.0.75.tar.gz、php-5.2.10.tar.bz2)

下載地址:http://down1.chinaunix.net/distfiles/httpd-2.2.13.tar.bz2(其他給包給包名稱改了就行了) 2.?安裝ApacheMySQLPHP 1.安裝MySQL # tar –zxvf mysql-5.0.75.tar.gz # ./configure --prefix=/usr/local/mysql && make && make install //添加用于啟動(dòng)MySQL?的用戶及用戶組 # useradd mysql # cd /usr/local/mysql //修改MySQl?目錄的所有權(quán) # chown –R mysql.mysql /usr/local/mysql # bin/mysql_install_db --user=mysql 修改數(shù)據(jù)庫(kù)屬主 Chown mysql var Bin/mysqld_safe –user=mysql & Echo ‘/usr/local/mysql/bin/mysqld_safe --user=mysql &’&gt;&gt;/etc/rc.local # ln –s /usr/local/mysql/bin/* /usr/local/bin/ 2.安裝Apache 下載地址:http://httpd.apache.org/ # tar –zxvf httpd-2.2.13.tar.gz # cd httpd-2.2.13 # ./configure --prefix=/usr/local/apache --enable-so //編譯時(shí)加上加載模塊參數(shù)--enable-so # make # make install # vi /etc/rc.d/rc.local //?rc.local?上加入一行/usr/local/apache/bin/apachectl start,?系統(tǒng)啟動(dòng)時(shí)啟動(dòng) Apache?服務(wù)。 3.安裝PHP 先安裝zlib,freetype,libpng,jpeg?以便于讓PHP?支持GD?庫(kù)(?Cacti?WeatherMap 插件必須要GD?庫(kù)的支持) 1.安裝zlib tar zlib-1.2.3.tar.gz cd zlib-1.2.3 ./configure --prefix=/usr/local/zlib make make install 2.安裝libpng tar zxvf libpng-1.2.16.tar.tar cd libpng-1.2.16 cd scripts/ mv makefile.linux ../makefile cd .. make make install 注意,這里的makefile?不是用./configure?生成,而是直接從scripts/里拷一個(gè) 3.安裝freetype tar zxvf freetype-2.3.4?.tar.gz cd freetype-2.3.4 ./configure --prefix=/usr/local/freetype make make install 4.安裝Jpeg tar -zxf jpegsrc-1.v6b.tar.gz cd jpeg-6b/ mkdir /usr/local/libjpeg mkdir /usr/local/libjpeg/include mkdir /usr/local/libjpeg/bin mkdir /usr/local/libjpeg/lib mkdir /usr/local/libjpeg/man mkdir /usr/local/libjpeg/man/man1 //可以用mkdir -p /usr/local/libjpeg/man/man1?一步創(chuàng)建多層目錄 ./configure --prefix=/usr/local/libjpeg --enable-shared --enable-static make && make install 注意,這里configure?一定要帶--enable-shared?參數(shù),不然,不會(huì)生成共享庫(kù) 需要安裝安裝libxml?包,但版本太低,PHP5?需要更高 版本的libxml?包。 # tar –zxvf libxml2-2.6.25.tar.gz libxml2-devel也要裝(RPM # cd libxml2-2.6.25 # ./configure # make # make install 6.安裝Fontconfig (RPM安裝,灰字忽略)擴(kuò)展包和關(guān)聯(lián)包也裝上 tar -zxvf fontconfig-2.4.2.tar.gz cd fontconfig-2.4.2 ./configure --prefix=/usr/local/fontconfig --with-freetype-config=/usr/local/freetype/bin/freetype-config make make install 7.安裝GD tar -zxvf gd-2.0.34.tar.gz cd gd-2.0.34 ./configure --prefix=/usr/local/libgd --with-png --with-freetype=/usr/local/freetype --with-jpeg=/usr/local/libjpeg make make install 編譯時(shí)顯示以下信息: ** Configuration summary for gd?2.0.34: Support for PNG library: yes Support for JPEG library: yes Support for Freetype 2.x library: yes Support for Fontconfig library: yes Support for Xpm library: no Support for pthreads: yes 8.編輯/etc/ld.so.conf,添加以下幾行到此文件中。 /usr/local/zlib/lib /usr/local/freetype/lib /usr/local/libjpeg/lib /usr/local/libgd/lib 并執(zhí)行ldconfig?命令,使用動(dòng)態(tài)裝入器裝載找到共享庫(kù) 9.安裝PHP tar -zxvf php-5.2.10.tar.gz cd php-5.2.10 # ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --with-gd=/usr/local/libgd --enable-gd-native-ttf --with-ttf --with-freetype-dir=/usr/local/freetype --with-jpeg-dir=/usr/local/libjpeg --with-png-dir=/usr --with-zlib-dir=/usr/local/zlib --enable-xml --enable-mbstring --enable-sockets #注:如果出現(xiàn)configure: error: cannot find output from lex; giving up,從光盤安裝flex包即可解決。-_-!! # make # make install # ln –s /usr/local/php/bin/* /usr/local/bin/ # vi /usr/local/apache/conf/httpd.conf AddType application/x-httpd-php .php 修改DirectoryIndex?行,添加index.php 修改為DirectoryIndex index.php index.html index.html.var # vi /usr/local/apache/htdocs/index.php 添加以下行: <?php Phpinfo(); ?> wq?保存退出。 # /usr/local/apache/bin/apachectl restart 在瀏覽器中輸入:http://ip/index.php?進(jìn)行測(cè)試。 對(duì)php?編譯選項(xiàng)的解釋: --prefix=/usr/local/php //指定PHP?的安裝目錄 --with-apxs2=/usr/local/apache2/bin/apxs //支持Apache?模塊 --with-mysql=/usr/local/mysql //支持MySQl --with-gd=/usr/local/libgd //支持GD?庫(kù) --enable-gd-native-ttf //激活對(duì)本地TrueType?字符串函數(shù)的支持 --with-ttf //激活對(duì)FreeType 1.x?的支持 --with-freetype-dir=/usr/local/freetype //激活對(duì)FreeType 2.x?的支持 --with-jpeg-dir=/usr/local/libjpeg //激活對(duì)jpeg-6b?的支持 --with-png-dir //激活對(duì)png?的支持 --with-zlib-dir=/usr/local/zlib//激活對(duì)zlib?的支持 --enable-mbstring //激活mbstring?模塊 --with-mail //支持Mail?函數(shù) --enable-xml //支持XML --enable-sockets //支持套接字 3.?安裝RRDTool 由于rrdtool-1.2.23?需要一些庫(kù)文件支持,故需先安裝配置支持的環(huán)境,然后編譯安 裝。 需要的包:cgilib-0.5.tar.gzzlib-1.2.3.tar.gzlibpng-1.2.18.tar.gzfreetype- 2.3.5.tar.gzlibart_lgpl-2.3.17.tar.gzrrdtool-1.2.23.tar.gz tar zxf cgilib-0.5.tar.gz (1)cd cgilib-0.5 對(duì)于0.5版本的cgilib源碼部分需做一定的修改: ?cgi.c?里尋找?#include <malloc.h>?,把那行刪掉 修改cgitest.c116行的錯(cuò)誤 116行的代碼如下: printf ("<h3>Cookie "Library" set</h3>\n"; 應(yīng)為代碼出錯(cuò),正確的應(yīng)是 printf ("<h3>Cookie \"Library\" set</h3>\n"; make make install mkdir -p /usr/local/rrdtool/lb/include cp cgi.h /usr/local/rrdtool/lb/include mkdir -p /usr/local/rrdtool/lb/lib cp libcgi.a /usr/local/rrdtool/lb/lib (2)tar zxf zlib-1.2.3.tar.gz cd zlib-1.2.3 ./configure --prefix=/usr/local/rrdtool/lb make make install tar zxvf libpng-1.2.18.tar.gz (3)cd libpng-1.2.18 ./configure --disable-shared --prefix=/usr/local/rrdtool/lb make make install tar zxvf freetype-2.3.5.tar.gz (4)cd freetype-2.2.5 ./configure --disable-shared --prefix=/usr/local/rrdtool/lb make make install (5)tar zxvf libart_lgpl-2.3.17.tar.gz?RPM把開發(fā)包也裝上libart_lgpl-devel.... cd libart_lgpl-2.3.17 ./configure --disable-shared --prefix=/usr/local/rrdtool/lb make;make install (6)tar xjf intltool-0.40.6.tar.bz2 Cd intltool-0.40.6 ./configure Make;make install (7)tar zxf rrdtool-1.2.23.tar.gz cd rrdtool-1.2.23 ./configure --prefix=/usr/local/rrdtool --disable-tcl (編譯這一步花了好長(zhǎng)時(shí)間?呵呵?總是報(bào)下面這個(gè)錯(cuò)??太郁悶啦?呵呵 最后沒(méi)辦法了,在網(wǎng)上找了好多資料都不行,幾乎快絕望了,最后一個(gè)終于解決了問(wèn)題把最下面那兩個(gè)包裝上ok (這樣一般就可以了,如果還出現(xiàn)上面?try again?那個(gè)錯(cuò)誤,嘗試下面的幾個(gè)方法
?? 1. configure: error: Please fix the library issues listed above and try again.

安裝libart_lgpl-devel這個(gè)包
rpm?
包或者源碼包都可以

還是報(bào)錯(cuò)
configure: error: Please fix the library issues listed above and try again.
無(wú)語(yǔ)了!有可能是找不到FreeType
/usr/local/freetype2/lib/pkgconfig下的.pc文件拷貝到/usr/lib/pkgconfig下即可
還不行?就把這兩個(gè)包裝上?pango-devel? cairo-devel make && make install //完成后建立符號(hào)連接 ln –s /usr/local/rrdtool/bin/* /usr/local/bin/ cp /usr/local/lib/libpng.so.0 /usr/lib/?這步必須有,否則報(bào)錯(cuò)找不到此文件。(libpng.so.0根據(jù)版本不同這個(gè)文件也不同) //執(zhí)行rrdtool?看是否安裝正確 下面超過(guò)了8萬(wàn)字:呵呵

這個(gè)配置太復(fù)雜了 簡(jiǎn)單的安裝配置地址:http://blog.mgcrazy.com/thread-1140-1.html



本文轉(zhuǎn)自 wgkgood 51CTO博客,原文鏈接:http://blog.51cto.com/wgkgood/269467

總結(jié)

以上是生活随笔為你收集整理的【RedHat、CentOS Cacti安装配置】的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。