王果子 发表于 2015-9-9 11:46:05

zabbix server搭建遇到的问题

环境
  CentOS 6.3 server
  nginx-1.6.3
  MySQL-5.6.25
  
  

安装nginx遇到的问题
  启动nginx时候提示错误“/usr/local/nginx/sbin/nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory ”
  从错误看出是缺少lib文件导致,进一步查看下



ldd $(which /usr/local/nginx/sbin/nginx)

linux-vdso.so.1 =>(0x00007fff2cbff000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f6a5758a000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f6a57353000)
libpcre.so.1 => not found
libz.so.1 => /lib64/libz.so.1 (0x00007f6a56f1f000)
libc.so.6 => /lib64/libc.so.6 (0x00007f6a56b8b000)
/lib64/ld-linux-x86-64.so.2 (0x00007f6a577af000)
libfreebl3.so => /lib64/libfreebl3.so (0x00007f6a56928000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f6a56724000)
  可以看出 libpcre.so.1 => not found 并没有找到,进入/lib64目录中手动链接下



cd /lib64/
ln -s /usr/local/lib/libpcre.so.1 /lib64/
  
  
  nginx启动成功,但是无法访问,关闭防火墙依然无效,
  netstat -ntpl 命令查看已经存在nginx进程
  kill -9 进程号杀掉,重新启动,成功
  
  
  

安装MySQL时候遇到的问题
  提示错误“error: Failed dependencies:
           /usr/bin/perl is needed by MySQL-server-5.6.25-1.linux_glibc2.5.x86_64
           libaio.so.1()(64bit) is needed by MySQL-server-5.6.25-1.linux_glibc2.5.x86_64
           libaio.so.1(LIBAIO_0.1)(64bit) is needed by MySQL-server-5.6.25-1.linux_glibc2.5.x86_64
           libaio.so.1(LIBAIO_0.4)(64bit) is needed by MySQL-server-5.6.25-1.linux_glibc2.5.x86_64”
  可以看到缺少libaio库,安装之         



yum install libaio
           
      再次安装,提示“error: Failed dependencies:
           /usr/bin/perl is needed by MySQL-server-5.6.25-1.linux_glibc2.5.x86_64”
  缺少perl环境,安装之         



yum install perl
        

安装PHP遇到的问题
  错误提示:“Configure: error: xml2-config not found. Please check your libxml2 installation.”
  安装libxml2         



yum install libxml2 libxml2-devel
     
  错误提示“configure: error: Please reinstall the libcurl distribution -
  easy.h should be in <curl-dir>/include/curl/”
  安装curl



yum install curl curl-devel
           
  错误提示:“configure: error: jpeglib.h not found.”
  安装libjpeg



yum install libjpeg-devel
        
  错误提示:“configure: error: png.h not found.”
  安装libpng



yum install libpng-devel
  
  

zabbix
  登录之后,提示“zabbix server is not running: the information displayed may not be current.”
  先去查看日志,根据日志判断是什么问题
  如果没有日志,那么试着启动一下
  /etc/init.d/zabbix_server start
  根据启动提示判断,我遇到的情况是提示“Starting zabbix_server:/etc/init.d/functions: line 536: /usr/local/sbin/zabbix_server: 没有那个文件或目录”
  查看启动脚本发现zabbix_server中的BASEDIR不是zabbix安装路径,改之,解决,可以启动,但还是有问题,但是这时候有日志了,查看日志发现“10950:20150629:160204.156 connection to database 'zabbix' failed: Access denied for user 'root'@'localhost' (using password: NO)
  10950:20150629:160204.156 database is down: reconnecting in 10 seconds”
  查看/usr/local/zabbix/etc/zabbix_server.conf配置文件中数据库信息是否正确,改之,正常
  
  启动zabbix时候提示“user zabbix does not exist”
  添加zabbix用户
  useradd zabbix
  
页: [1]
查看完整版本: zabbix server搭建遇到的问题