date and time
从PHP 5.3开始,定义了一个date.timezone 设置,避免在时间/日期函数警告
; Defines the default timezone used by the date functions
; http://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone
date.timezone = "Europe/Berlin"中国还是用Asia/Shanghai
# Load config files from the config directory "/etc/httpd/conf.d".
Include conf.d/*.conf
现在请定位到PHP 的配置文件“/etc/httpd/conf.d/php.conf”
如果正在使用PHP 5,确保有以下几行:
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
LoadModule php5_module modules/libphp5.so
#
# Cause the PHP interpreter to handle files with a .php extension.
AddHandler php5-script .php
AddType text/html .php
#
# Add index.php to the list of files that will be served as directory
# indexes.
DirectoryIndex index.php
# Cacti - the complete rrdtool-based graphing solution
#
# Allows only localhost by default
#
# Allowing cacti to anyone other than localhost should be considered
# dangerous unless properly secured by SSL
# Make sure, that httpd can read your cacti directories.
# At minimum, you need
# chmod ugo+r -R /your/cacti/dir
# Make sure to replace with your directories
# When using SELinux, set the following:
# chcon -R -h -t httpd_sys_content_t /your/cacti/dir
# when using SELinux and you private homedir, enable
# setsebool -P httpd_enable_homedirs 1
# setsebool -P httpd_read_user_content 1
Alias /cacti /your/cacti/dir
AllowOverride None
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from ::1
Options Indexes Includes FollowSymLinks
# These directories do not require access over HTTP
#
Order Deny,Allow
Deny from All
Allow from None
apache 2.4.x 拒绝和允许的规则要求略有不同
# Cacti - the complete rrdtool-based graphing solution
#
# Allows only localhost by default
#
# Allowing cacti to anyone other than localhost should be considered
# dangerous unless properly secured by SSL
# Make sure, that httpd can read your cacti directories.
# At minimum, you need
# chmod ugo+r -R /home/reinhard/workspace
# Make sure to replace with your directories
# When using SELinux, set the following:
# chcon -R -h -t httpd_sys_content_t /home/reinhard/workspace
# when using SELinux and you private homedir, enable
# setsebool -P httpd_enable_homedirs 1
# setsebool -P httpd_read_user_content 1
Alias /workspace /home/reinhard/workspace
# AuthType Basic
# AuthName "Cacti Pro's only"
# AuthUserFile /var/www/passwd/passwords
# Require valid-user
AllowOverride None
# new stuff for apache 2.4
Require ip 127.0.0.1
Require host ::1
Options Indexes Includes FollowSymLinks
# These directories do not require access over HTTP
#
Require all denied
在启动 cacti 前,确认 httpd web服务已经启动
配置mysql
在启动 cacti 前,确认 mysql服务已经启动
默认地,mysql root 密码是没有设置的。鉴于安全原因,要求设置为 mysql root 用户设置密码
Depending on how you've installed Net-SNMP, the main configuration file (snmpd.conf) is located in /etc/snmp (installation from package) or /usr/local/share/snmp (installation from tarball).
Please note that you need to restart (or send the HUP signal) the snmpd daemon whenever you modify snmpd.conf
The minimum configuration is this one:
[root@localhost cacti]# useradd cactiuser
[root@localhost cacti]# passwd cactiuser
Changing password for user cactiuser.
New password:
BAD PASSWORD: it is too simplistic/systematic
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated successfully.