Windows system >> Windowsの知識 >  >> Linuxシステムチュートリアル >> Linuxチュートリアル >> Linux Apache + php + Mysql + cactiインストール

Linux Apache + php + Mysql + cactiインストール

  

yum -yインストールgcc gcc-c ++ autoconf libjpeg libjpeg-devel libpng libpng-develフリータイプfreetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-gl2-devel decur bzip 2 bzip 2 -devel ncurses ncurses-develカールcurl-devel

2インストール

1. mysqlのインストール

tar zxvf mysql-5.0.92.tar.gz

cd mysql-5.0.92

./configure --prefix = /usr /local /mysql --sysconfdir = /etc --with-unix-socket-path = /usr /local /mysql /var /mysql /mysql.sock --without-debug --enable-isam --with-mysqld-user = mysql --with-mysqld-ldflags = -all-static --with-client-ldflags = -all -staticmake&& mysql /usr /local /mysql /bin /mysql_install_dbcpサポートファイル/my-medium.cnf /etc/my.cnfcpサポートファイル/mysql.server /etc/rc.d/init.d/mysqldchmod 755 /etcにインストールします。 /rc.d/init.d/mysqldchown -R mysql.mysql /usr/local/mysql/var/etc/rc.d/init.d/mysqld startcd ..

2.インストールapache

tar zxvf httpd-2.2.17.tar.gz

cd httpd-2.2.17

./configure --prefix = /usr /local /http --enable- so --enable-mods-shared = all --enable-vhost-alias --enable-deflate --enable-expires --enable-rewrite --enable-authn-dbm = shared --enable-ssl --with- sslmake&& installcp /usr /local /http /bin /apachectl /etc/rc.d/init.d/httpdchmod 755 /etc/rc.d/init.d/httpd/etc/rc.d/init.d/httpd startにします。 IPアドレスを入力すると、ITが動作することがわかります。apache正常に起動します。

3. phptarをインストールするzxvf php-5.2.17.tar.gzcd php-5.2.17./configure --prefix = /usr /local /php --with-apxs2 = /usr /local /http /bin /apxs --with-configファイルパス= /usr /local /php /etc --with-mysql = /usr /local /mysql - -with-mysqli = /usr /local /mysql /bin /mysql_config --with-mcrypt --with-configファイルのパス= /usr /local /php5 - enable-safe-mode --enable-zip - with-bz2 --with-jpeg-dir --with-png-dir --with-freetype-dir --without-iconv --with-libxml-dir --with-zlib-dir --with-xmlrpc - with-gd --with-curl --enable-mbstring --with-curlwrappers --with-xsl --enable-sockets --disable-rpath - 無効なdebugmake&& installcp php.ini-production /usr/local/php/etc/php.inivi /usr/local/http/conf/httpd.confを作成します。

AddType application /x-gzip .gz .tgz AddTypeアプリケーション/x-httpd-php .phpAddTypeアプリケーション/x-httpd-php-source .phps index.html最後に空白、index.phpを追加します。

PHP
テストvi /usr/http/htdocs/index.php

5. Apacheサービスservice httpd restartを再起動します。 ip:/index.phpを入力して、PHPの通常の起動方法を説明してください

。 cactiのインストール:tar -xzvf cacti-0.8.7g.tar.gz

cd cacti-0.8.7g

mv cacti-0.8.7g /usr /local /http /htdocs /cacti(Apache Apache www目録)

cd /usr /local /http /htdocs /cacti

chmod 777 rrachmod 777 logchmod 777 poller.php

vi /usr/local/http/htdocs/include/config.php修正$ database_type =" mysql"を設定します。 $ database_default =" cacti"; #(接続サーバー)$ database_hostname =" 127.0.0.1" #(各アドレスに接続)$ database_username =" cacti"; #(使用しているデータベース名)$ database_password ="" #(密符)$ database_port =" 3306";

データベース; mysql>データベースを作成するcacti; mysql> mysqlを使用してください; mysql> cacti。*に対するすべての権限を、 'cacti'で識別されるcacti @ localhostにgrantオプション付きで付与します。 'cacti'で識別される[email protected]に、grantオプションを付けてcacti。*に対するすべての権限を付与します。ユーザー設定の更新パスワード= password( "")user = "cacti"; MySQL>フラッシュ権限; mysql> cactiを使用してください; mysql> source /usr/local/http/htdocs/cacti.sql; #(导入资料)

6。 http://ip /cactiを開くと、cactiのインストールの指示が表示され、新しいインストールも使用できなくなります。 '#rrdtool、php、snmpツールのバイナリファイルパスを指定し、すべてのパスを表示します。' #Cacti認証のユーザー名とパスワードを入力してください。ログインパスワードを変更してください/phpパス名変更/usr /local /php /bin /php (phpの設定が上手く設定されている場合)#安全のため、最初の登録が成功した後、cacti会議のパスワードを変更し、新しいパスワードを入力し、cacti管理をクリックしてください。台界面:#グラフを見て、cactiを見ながら本機を見た図:

crontab -e * /5 * * * *ルート/usr /local /php /bin /php /usr/local/http/htdocs/cacti/poller.php> /dev /null 2>& 1

8。 vi /etc /crontab * /5 * * *ルート/usr /local /php /bin /php /usr/local/http/htdocs/cacti/poller.php> /dev /null 2>& 1

インストールrrdtoolパッケージ:yl install perl-rrdtool-1.2.30-1.el5.rf.i386.rpm rrdtool-1.2.30-1.el5.rf。 i386.rpm rrdtool-devel-1.2.30-1.el5.rf.i386.rpm#(この3つのパッケージが同時に取り付けられている、間違いなく報告されている。)

snmp取り付け配置:

Copyright © Windowsの知識 All Rights Reserved