環境
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 [Z3001] connection to database 'zabbix' failed: [1045] 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