天天看点

RHEL5.5下安装mycheckpoint

RHEL5.5下安装mycheckpoint

以下是在RHEL5.5下安装mycheckpoint,需要安装python,并且版本大于2.4。需要安装Mysql-Python模块,版本必须大于或等于1.2.3,否则会出现bug。这个已经过查证。 官网及下载: http://code.openark.org/forge/mycheckpoint/documentation/quick-howto#Install mysql-python 1.2.3下载: wget http://sourceforge.net/projects/mysql-python/files/mysql-python/1.2.3/MySQL-python-1.2.3.tar.gz/download

rpm -qa|grep -i mysql-python  查看mysql-python版本,rhel5.5的的是1.2.2,需要将其卸载。 rpm -e --nodeps xxxxxx 欢迎转载,请注明作者、出处。 作者:张正 blog:http://space.itpub.net/26355921  QQ:176036317 如有疑问,欢迎联系。 (提前已经装好了mysql) [[email protected] ~]# python Python 2.4.3 (#1, Jun 11 2009, 14:09:58)  [GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> exit [[email protected] ~]# ls anaconda-ks.cfg  install.log.syslog         package2.sh  vmware-tools-distrib Desktop          mycheckpoint-231.tar.gz    package.sh install.log      MySQL-python-1.2.3.tar.gz  rlwrap [[email protected] ~]# tar -zxf mycheckpoint-231.tar.gz  [[email protected] ~]# rm mycheckpoint-231.tar.gz  rm: remove regular file `mycheckpoint-231.tar.gz'? y [[email protected] ~]# cd mycheckpoint-231/ [[email protected] mycheckpoint-231]# sudo python setup.py install /usr/lib/python2.4/distutils/dist.py:236: UserWarning: Unknown distribution option: 'requires'   warnings.warn(msg) running install running build running build_scripts creating build creating build/scripts-2.4 copying and adjusting scripts/mycheckpoint -> build/scripts-2.4 changing mode of build/scripts-2.4/mycheckpoint from 644 to 755 running install_scripts copying build/scripts-2.4/mycheckpoint -> /usr/bin changing mode of /usr/bin/mycheckpoint to 755 [[email protected] mycheckpoint-231]# cd .. [[email protected] ~]# tar -zxf MySQL-python-1.2.3.tar.gz  [[email protected] ~]# rm MySQL-python-1.2.3.tar.gz  rm: remove regular file `MySQL-python-1.2.3.tar.gz'? y [[email protected] ~]# ls anaconda-ks.cfg  install.log.syslog  package2.sh  vmware-tools-distrib Desktop          mycheckpoint-231    package.sh install.log      MySQL-python-1.2.3  rlwrap [[email protected] ~]# cd MySQL-python-1.2.3/ [[email protected] MySQL-python-1.2.3]# ls doc           _mysql.c               pymemcompat.h    setup.py ez_setup.py   MySQLdb                README           setup_windows.py HISTORY       _mysql_exceptions.py   setup.cfg        site.cfg MANIFEST.in   MySQL_python.egg-info  setup_common.py  tests metadata.cfg  PKG-INFO               setup_posix.py [[email protected] MySQL-python-1.2.3]# locate mysql_config /usr/local/bin/mysql_config [[email protected] MySQL-python-1.2.3]# vi site.cfg [options] # embedded: link against the embedded server library # threadsafe: use the threadsafe client # static: link against a static library (probably required for embedded)

embedded = False threadsafe = True static = False

# The path to mysql_config. # Only use this if mysql_config is not on your PATH, or you have some weird # setup that requires it. mysql_config = /usr/local/bin/mysql_config

# The Windows registry key for MySQL. # This has to be set for Windows builds to work. # Only change this if you have a different version. registry_key = SOFTWARE\MySQL AB\MySQL Server 5.0

[[email protected] MySQL-python-1.2.3]# python setup.py install Traceback (most recent call last):   File "setup.py", line 5, in ?     from setuptools import setup, Extension ImportError: No module named setuptools [[email protected] MySQL-python-1.2.3]# yum -y install python-setuptools [[email protected] MySQL-python-1.2.3]# python setup.py install running install ............. Installed /usr/lib/python2.4/site-packages/MySQL_python-1.2.3-py2.4-linux-i686.egg Processing dependencies for MySQL-python==1.2.3 [[email protected] MySQL-python-1.2.3]# yum -y install mysql-devel [[email protected] MySQL-python-1.2.3]# mysql Welcome to the MySQL monitor.  Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.5.2-m2-log MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create database mycheckpoint; Query OK, 1 row affected (0.00 sec)

mysql> grant all privileges on mycheckpoint.* to 'moni_user'@'%' identified by 'moni_passwd'; Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges; Query OK, 0 rows affected (0.00 sec)

mysql> exitr     -> Bye [[email protected] MySQL-python-1.2.3]# vi /etc/mycheckpoint.cnf [mycheckpoint] #smtp_host = mail.my-server-company.com #smtp_from = [email protected] #smtp_to = [email protected] monitored_port = 3306 purge_days = 60 #... Any command line option can go here; replace dash ("-") with underscored ("_")

[client] user=moni_user password=moni_passwd socket=/tmp/mysql.sock port=3306

[[email protected] MySQL-python-1.2.3]# mycheckpoint deploy Traceback (most recent call last):   File "/usr/bin/mycheckpoint", line 23, in ?     import MySQLdb   File "build/bdist.linux-i686/egg/MySQLdb/__init__.py", line 19, in ?   File "build/bdist.linux-i686/egg/_mysql.py", line 7, in ?   File "build/bdist.linux-i686/egg/_mysql.py", line 6, in __bootstrap__ ImportError: libmysqlclient_r.so.16: cannot open shared object file: No such file or directory [[email protected] MySQL-python-1.2.3]# updatedb [[email protected] MySQL-python-1.2.3]# locate libmysqlclient_r.so.16  /opt/mysql/lib/libmysqlclient_r.so.16 /opt/mysql/lib/libmysqlclient_r.so.16.0.0 [[email protected] MySQL-python-1.2.3]# vi /etc/ld.so.conf include ld.so.conf.d5 * * * * mycheckpoint --skip-check-replication [[email protected] MySQL-python-1.2.3]#service crond restart Stopping crond: [  OK  ] Starting crond: [  OK  ] [[email protected] MySQL-python-1.2.3]# mycheckpoint http read databases started httpserver on port 12306... 本地ip:192.168.83.130 用网页访问: http://192.168.83.130:12306/mycheckpoint

RHEL5.5下安装mycheckpoint
RHEL5.5下安装mycheckpoint

1.jpg

本文转自ITPUB博客84223932的博客,原文链接: RHEL5.5下安装mycheckpoint,如需转载请自行联系原博主。