groundwork opensurce的安装2在linux下安装rpm的Mysql——justlg_我们的Nagios
1.禁用防火墙(对mysql不必要,但是对groundwork是必要的)
对/etc/selinux/config 文件进行如下编辑:
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
# SELINUXTYPE=targeted
保存后重启linux,开始准备安装mysql
2.安装perl-DBI
下载地址:http://rpmfind.net/linux/RPM/fedora/3/i386/perl-DBI-1.40-5.i386.html.
#rpm –Uvh perl-DBI-1.40-5.i386.rpm
3.安装Mysql,下载地址:http://dev.mysql.com/downloads/.
对于rpm格式的文件我们只需要
MySQL-server
?? MySQL-client
?? MySQL-shared
?? MySQL-shared-compact
#rpm -Uvh MySQL*.rpm
如果按这种一起安装的方式会报错的话,你可以尝试按照上述从上到下的顺序分开安装;安装之后记着给mysql的root用户设置密码(默认密码为空):
#mysql -u root mysql
这时屏幕上会出现一些信息,最后一行是:mysql>
在其后输入SET PASSWORD FOR root@localhost=PASSWORD('************')
为你的mysql设置环境变量
export MYSQL_ROOT=password ,此处password即为你上面设置的密码。