as4上安装apache,mysql,php,cacti,nagios
安装mysql:[url]www.mysql.org[/url]
下载了编译版本mysql-max-5.0.18-linux-i686-glibc23.tar.gz
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> gunzip < /PATH/TO/MYSQL-VERSION-OS.tar.gz | tar xvf -
shell> ln -s FULL-PATH-TO-MYSQL-VERSION-OS mysql
shell> cd mysql
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &
shell>cp support-files/my-medium.cnf /etc/my.cnf
shell> cp bin/* /usr/bin/
要开机自动运行mysql:
1、 mkdir /usr/local/etc/rc.d
vi /usr/local/
#! /bin/sh
/usr/local/mysql/bin/mysqld_safe &
chmod 755 /usr/local/etc/rc.d/mysql.sh
启动其他服务类似。
2、vi /etc/rc.local
/usr/local/mysql/bin/mysqld_safe &
如此操作,可以启动服务。rpm安装每次安装后启动不来,放弃。
启动:mysqld_safe &
停止:mysqladmin shudown 。
补充: ldconfig –v
cp support-files/mysql.server /etc/init.d/mysql
cd /etc/rc3.d/
ln -s ../init.d/mysql S85mysql
ln -s ../init.d/mysql K85mysql
cd /etc/rc5.d/
ln -s ../init.d/mysql S85mysql
ln -s ../init.d/mysql K85mysql
cd /etc/init.d/
chmod 755 mysql
安装APACHE: [url]www.apache.org[/url]
下载httpd-2.2.0.tar.gz
# tar zxvf httpd-2.2.0.tar.gz
# cd httpd-2.2.0
# ./configure --prefix=/usr/local/apache --enable-so
# make & make install
# cp /usr/local/apache/bin/* /usr/bin/
# cp /usr/local/apache/bin/apachectl /etc/init.d/httpd
安装gd2:[url]http://www.boutell.com/gd/[/url]
下载 gd-2.0.33.tar.gz
./configure make make install
Libraries have been installed in:
/usr/local/lib
安装php: [url]www.php.net[/url]
下载 php-5.1.2.tar.gz
./configure --prefix=/usr/local/php --with-gd-lib=/usr/local/lib --with-gd-inc=/usr/local/include --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --with-mysql-sock=/tmp/mysql.sock --with-mysqli=/usr/local/mysql/bin/mysql_config --with-xmlpc
cp /usr/local/php/bin/* /usr/bin
cp /soft/php-5.1.2/ php.ini-dist /usr/local/php/lib/php.ini
vi /usr/local/apach/conf/httpd.conf
添加如下2行:
AddType application/x-httpd-php .php .phtml .php3 .php4
AddType application/x-httpd-php-source .phps
安装phpmyadmin: [url]www.phpmyadmin.net[/url]
下载:phpMyAdmin-2.7.0-pl2.tar.gz
解压后mv到/usr/local/下,然后修改config.default.php 修改相应的用户名和密码即可。
$cfg['Servers'][$i]['auth_type'] = 'http'; // Authentication method (config, http or cookie based)
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user
$cfg['Servers'][$i]['password'] = ' '; // MySQL password (only needed with 'config' auth_type)
注:如红色部分,用config作为认证方式,则下面得user和password都必须添上,安全性较低
用http做为认证方式,则弹出用户认证对话框.
下载net-snmp-5.3.0.1-1.EL4.i386.rpm
安装mrtg:[url]www.mrtg.org[/url]
下载 mrtg-2.12.2.tar.gz
./configure --prefix=/usr/local/mrtg & make & make install cp /usr/local/mrtg/bin/* /usr/bin
安装rrdtool:[url]www.rrdtool.org[/url]
[url]http://people.ee.ethz.ch/~oetike[/url] ... oc/rrdbuild.en.html
(以下部分可以直接copy到linux shell下 自动安装,我是分段copy,整体copy未尝试)
BUILD_DIR=/tmp/rrdbuild
INSTALL_DIR=/usr/local/rrdtool
mkdir -p $BUILD_DIR
mkdir $BUILD_DIR/lb
cd $BUILD_DIR
#####zlib
wget [url]http://people.ee.ethz.ch/oetiker[/url] ... s/zlib-1.2.2.tar.gz
tar zxvf zlib-1.2.2.tar.gz
cd zlib-1.2.2
env CFLAGS="-O3 -fPIC" ./configure --prefix=$BUILD_DIR/lb
make
make install
cd ..
#####libpng
wget [url]http://people.ee.ethz.ch/oetiker[/url] ... 1.2.8-config.tar.gz
tar zxvf libpng-1.2.8-config.tar.gz
cd libpng-1.2.8-config
env CPPFLAGS="-I$BUILD_DIR/lb/include" LDFLAGS="-L$BUILD_DIR/lb/lib" \
CFLAGS="-O3 -fPIC" ./configure --disable-shared --prefix=$BUILD_DIR/lb
make
make install
cd ..
#########freetype
wget [url]http://people.ee.ethz.ch/oetiker[/url] ... eetype-2.1.9.tar.gz
tar zxvf freetype-2.1.9.tar.gz
cd freetype-2.1.9
env CPPFLAGS="-I$BUILD_DIR/lb/include" LDFLAGS="-L$BUILD_DIR/lb/lib" CFLAGS="-O3 -fPIC" ./configure --disable-shared --prefix=$BUILD_DIR/lb
make
make install
cd ..
####### libart_lgpl
wget [url]http://people.ee.ethz.ch/oetiker[/url] ... _lgpl-2.3.17.tar.gz
tar zxvf libart_lgpl-2.3.17.tar.gz
cd libart_lgpl-2.3.17
env CFLAGS="-O3 -fPIC" ./configure --disable-shared --prefix=$BUILD_DIR/lb
make
make install
cd ..
########cgilib
wget [url]http://people.ee.ethz.ch/~oetike[/url] ... s/cgilib-0.5.tar.gz
tar zxvf cgilib-0.5.tar.gz
cd cgilib-0.5
make CC=gcc CFLAGS="-O3 -fPIC -I."
mkdir -p $BUILD_DIR/lb/include
cp *.h $BUILD_DIR/lb/include
mkdir -p $BUILD_DIR/lb/lib
cp libcgi* $BUILD_DIR/lb/lib
cd ..
#########install rrdtool
ranlib $BUILD_DIR/lb/lib/*.a # 优化
IR=-I$BUILD_DIR/lb/include
CPPFLAGS="$IR $IR/libart-2.0 $IR/freetype2 $IR/libpng"
LDFLAGS="-L$BUILD_DIR/lb/lib"
CFLAGS=-O3
export CPPFLAGS LDFLAGS CFLAGS
cd $BUILD_DIR/
wget [url]http://people.ee.ethz.ch/~oetike[/url] ... dtool-1.2.12.tar.gz
tar zxvf rrdtool-1.2.12.tar.gz
cd rrdtool-1.2.12
./configure --prefix=$INSTALL_DIR --disable-python --disable-tcl
make
make install
cd ..
***********************RRDTOOL INSTALL SUCCESSFULLY**********************
安装CACTI:[url]www.cacti.net[/url]
cacti-0.8.6h.tar.gz
tar zxvf cacti-0.8.6h.tar.gz
cp –R cacti-0.8.6h /usr/local/cacti/
配置Mysql:
group-add cacti
useradd -g cacti cactiuser
/usr/local/mysql/bin/mysql – --user=root – --password=yanhannet
mysql> create database cactidb;
mysql> grant all on cactidb.* to root;
mysql> grant all on cactidb.* to root@localhost;
mysql> grant all on cactidb.* to cactiuser;
mysql> grant all on cactidb.* to cactiuser@localhost;
mysql> set password for cactiuser@localhost=password('yanhannet');
mysql> exit
# mysql --user=root --password=yanhannet cactidb < cacti.sql
# chown -R cactiuser rra/ log/
# chmod –R 777 rra/ log/
# vi cacti/include/config.php
$database_type = "mysql";
$database_default = "cactidb";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "yanhannet";
$database_port = "3306";
vi /etc/ctrontab (crontab -u cactiuser –e)
*/5 * * * * cactiuser php /usr/local/cacti/poller.php > /dev/null 2>&1
配置apache
vi /usr/local/apache/conf/conf.d/cacti.conf
Alias /cacti /usr/local/cacti
<Directory "/usr/local/cacti">
Options None
AllowOverride None
Order allow,deny
Allow from all
# AuthName "XXXXX"
# AuthType Basic
# AuthUserFile /XXX/htpasswd.users
# Require valid-user
</Directory>
******************CACTI INSTALL SUCCESSFULLY ***********************
安装nagios [url]www.nagios.org[/url]
useradd nagios
mkdir /usr/local/nagios
chown nagios.nagios /usr/local/nagios/
usermod -G nagcmd apache
usermod -G nagcmd nagios
./configure --prefix=/usr/local/nagios --with-gd-lib=/usr/lib --with-gd-inc=/usr/include
注:红色部分为gd库位置,如果不加,这会出现The statusmap, trends and histogram CGIs are missing or dont work!
查看3-D status map 需要在本机下载插件contvrml
[url]http://www.parallelgraphics.com/bin/cortvrml.exe[/url]
在apache配置文档目录下
vi nagios.conf
scriptalias /nagios/cgi-bin /usr/local/nagios/sbin
<Directory "/usr/local/nagios/sbin">
allowoverride authconfig
options execcgi
order allow,deny
allow from all
</directory>
alias /nagios /usr/local/nagios/share
<directory "/usr/local/nagios/share">
options none
allowoverride authconfig
order allow,deny
allow from all
</directory>
在nagiosroot目录下
vi .htaccess
authname "nagios access"
authtype basic
authuserfile /usr/local/nagios/etc/.nagios.users
require valid-user
生成用户文件
htpasswd -c /usr/local/nagios/etc/.nagios.users nagiosadmin
具体参数配置参考官方文档
工具插件:[url]www.nagiosexchange.org[/url]
fruity 要求php5以上
下载:[url]https://sourceforge.net/project/showfiles.php?group_id=136248[/url]
[url]http://pear.php.net/get/HTML_TreeMenu-1.2.0.tgz[/url]
[url]http://sourceforge.net/project/s[/url] ... p;release_id=387862
直接解压复制到fruity 下 分别改名为HTML 和adodb 其他不做修改
修改 fruity/includes下的config.ifg,需要更改的地方有,路径,mysql信息
mysql 添加fruity 数据库和user,password.
转载于:https://blog.51cto.com/gzmaster/60700
as4上安装apache,mysql,php,cacti,nagios相关推荐
- debian apache php mysql_Debian/在Debian上安装Apache Mysql PHP
安装Apache Mysql PHP 安装之前,保证你的版本是最新的.使用命令:("#"表示你应该以root的身份来运行). # aptitude update && ...
- Ubuntu上安装Apache、MySql和PHP
Ubuntu上安装Apache.MySql和PHP 1:首先安装apache:打开终端(ctrl+Alt+t), 输入命令:sudo apt-get install apache2即可安装, 安装完后 ...
- 记录在Ubuntu 18.04系统中安装Apache, MySQL和PHP环境
虽然我们在Linux VPS.服务器安装WEB环境比较方便,可以选择面板或者一键包,但是有些我们需要深入学习的网友不会选择一键安装,而是会尝试编译安装.这样可以学到一些内在的技术.一般我们较为习惯选择 ...
- php5+ssl,AS3上安装Apache2+MySQL+PHP5+Resin+SSL+GD以及webalizer(补
AS3上安装Apache2+MySQL+PHP5+Resin+SSL+GD以及webalizer(补充) 我们假设安装系统时没有选择任何系统自带的服务器程序,例如Apache,MySQL.如果已经安装 ...
- mysql在ibm上安装教程_在ibm服务器上安装配置MySQL集群的方法
在ibm服务器上安装配置MySQL集群的方法 2014-07-13 16:45来源:中国存储网 导读:本文只是介绍安装和配置,关于一些名词和原理,请参考MySQL手册.一.环境:IBM x3560Vm ...
- 64位系统上安装apache
查看系统是多少位: # getconf LONG_BIT 显示: # 64 如果在64位系统上安装apache 正常情况下会报一下错误 /usr/lib/libexpat.so: could no ...
- serv-u 数据备份_如何使用用户数据脚本在EC2实例上安装Apache Web Server
serv-u 数据备份 你好朋友, 在本教程中,我们将看到如何使用用户数据脚本在EC2实例上安装Apache Web Server. 在我以前的教程之一中,我已经解释了如何使用AWS控制台启动EC2实 ...
- 如何使用用户数据脚本在EC2实例上安装Apache Web Server
你好朋友, 在本教程中,我们将看到如何使用用户数据脚本在EC2实例上安装Apache Web Server. 在我以前的教程之一中,我已经解释了如何使用AWS控制台启动EC2实例.如果您还没有完成该操 ...
- 【转】如何在win10(64位系统)上安装apache服务器
如何在win10(64位系统)上安装apache服务器 今天装了Apache服务器,下面是我总结的方法: 一,准备软件 1.64位的apache版本 传送门:http://www.apacheloun ...
- hive的hql怎么运行_在Ubuntu上安装Apache Hive并运行HQL查询
hive的hql怎么运行 In this lesson, we will see how we can get started with Apache Hive by installing it on ...
最新文章
- JavaScript初学者编程题(19)
- 基于Composer Player 模型加载和相关属性设置
- ncnn tensorrt
- ROS知识【10】:ROS通信
- 《大道至简》第八章读后感
- 阿里SRE体系如何支撑24小时峰值压力、220+个国家“剁手党”?
- Hyper-V数据文件丢失解决方案(有图有真相)
- Qt文档阅读笔记-void QObject::deleteLater()解析
- 如何在下一个网页设计项目中使用Google字体
- fatal error C1010: 在查找预编译头时遇到意外的文件结尾
- 学生阅读作业三——对习而学教学方式的思考
- 机器人标准DH建模法
- 1厘米等于多少个像素
- pbkdf2sha256加密验证算法 | 密码加密
- win7、win10常用快捷键
- Verilog消除毛刺
- Eclipse Neon EGit Integration gives Exception 401 Authorization Required
- Process-wide API spying - an ultimate hack 摘要翻译(三)
- 设计图标(logo)
- matlab构建信道模型channel model, Rayleigh channel (NLoS), Rician channel (LoS)
热门文章
- [导入]如何调试你的C#程序
- Quartz时间配置(周期任务类)
- python模块分析之time和datetime模块
- 关于String s = new String(xyz); 创建几个对象的问题
- HTML5-坦克大战一画出敌人坦克并让自己的坦克可以发子弹的功能(二)
- 《文献管理与信息分析》速看提问
- 新人如何在职场中生存
- python爬虫:爬取医药数据库drugbank
- U盘美化(更换U盘logo和页面背景软件)
- spring catch了异常还是回滚了_干货:Spring 踩坑之@Transactional 神奇失效