centos 6安装zabbix server

原创 2017年09月14日 09:42:51

1:安装nginx

   1.1 检查依赖包

   [root@localhost software]# rpm -qa pcre pcre-devel openssl openssl-devel gcc-c++

   1.2 安装依赖包

   [root@localhost software]# yum install pcre pcre-devel openssl openssl-devel gcc-c++

2:添加nginx用户,禁止ssh登录

[root@localhost software]# useradd -s /sbin/nologin -M nginx

3:安装nginx

   3.1:解压nginx

   [root@localhost software]# tar xf nginx-1.10.1.tar.gz

   3.2:配置nginx

   [root@localhost nginx-1.10.1]# ./configure --user=nginx --group=nginx --prefix=/application/nginx-1.10.1 --with-http_stub_status_module --with-http_ssl_module

   3.3:编译&安装

   [root@localhost nginx-1.10.1]# make

   [root@localhost nginx-1.10.1]# make install

   3.4 做硬链接

   [root@localhost nginx-1.10.1]# ln -s /application/nginx-1.10.1/ /application/nginx

   3.5 启动nginx

    [root@localhost application]# /application/nginx/sbin/nginx

[root@localhost application]# ps -ef| grep nginx

Root      6592     1  0 13:17 ?        00:00:00 nginx: master process /application/nginx/sbin/nginx

nginx     6593  6592  0 13:17 ?        00:00:00 nginx: worker process        

root      6595  3957  0 13:17 pts/1    00:00:00 grep nginx

[root@localhost application]# ss -lntup|grep nginx

tcp    LISTEN     0      128                    *:80                    *:*      users:(("nginx",6592,6),("nginx",6593,6))

3.6  配置nginx

[root@localhost conf]# pwd

/application/nginx/conf

[root@localhost conf]# egrep -v "#|^$" nginx.conf.default > nginx.conf

[root@localhost conf]# more nginx.conf

worker_processes  1;

events {

    worker_connections  1024;

}

http {

    include       mime.types;

    default_type  application/octet-stream;

    sendfile        on;

    keepalive_timeout  65;

    server {

        listen       80;

        server_name  localhost;

        location / {

            root   html;

            index  index.html index.htm;

        }

        error_page   500 502 503 504  /50x.html;

        location = /50x.html {

            root   html;

        }

       location ~\.(php|php5)?$ {

           root /application/nginx/html;

           fastcgi_pass                  127.0.0.1:9000;

           fastcgi_index                 index.php;

           fastcgi_param SCRIPT_FILENAME /application/nginx/html$fastcgi_script_name;

           include                       fastcgi_params;

       }

    }

}

3.7 重启nginx

[root@localhost conf]# ps -ef|grep nginx

nginx     6633     1  0 13:26 ?        00:00:00 nginx: worker process        

root      6647  3957  0 13:28 pts/1    00:00:00 grep nginx

[root@localhost conf]# kill -9 6633

[root@localhost conf]# /application/nginx/sbin/nginx

 

4:安装依赖包

   4.1 安装依赖包

   [root@localhost ~]# yum install zlib-devel libxml2-devel libjpeg-devel libiconv-devel freetype-devel libpng-devel gd-devel curl-devel libxslt-devel mysql-devel

   4.2 安装libiconv

    [root@localhost software]# tar zxf libiconv-1.14.tar.gz

    [root@localhost software]# cd libiconv-1.14

    [root@localhost libiconv-1.14]# ./configure --prefix=/usr/local/libiconv

    [root@localhost libiconv-1.14]# make

    [root@localhost libiconv-1.14]# make install

   4.3 安装epel

    [root@localhost ~]# wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

    [root@localhost ~]# rpm -ivh epel-release-latest-6.noarch.rpm

    [root@localhost ~]# yum install libmcrypt-devel mhash mcrypt

 

5:安装PHP

   5.1 解压php

   [root@localhost software]# tar xf php-5.6.22.tar.gz

[root@localhost software]# cd php-5.6.22

5.2 编译&安装

    [root@localhost php-5.6.22]# ./configure \

--prefix=/application/php-5.6.22 \

--with-mysql \

--with-mysqli=mysqlnd \

--with-pdo-mysql=mysqlnd \

--with-iconv-dir=/usr/local/libiconv \

--with-freetype-dir \

--with-jpeg-dir \

--with-png-dir \

--with-zlib \

--with-libxml-dir=/usr \

--with-gettext \

--enable-xml \

--disable-rpath \

--enable-bcmath \

--enable-shmop \

--enable-sysvsem \

--enable-inline-optimization \

--with-curl \

--enable-mbregex \

--enable-fpm \

--enable-mbstring \

--with-mcrypt \

--with-gd \

--enable-gd-native-ttf \

--with-openssl \

--with-mhash \

--enable-pcntl \

--enable-sockets \

--with-xmlrpc \

--enable-soap \

--enable-short-tags \

--enable-static \

--with-xsl \

--with-fpm-user=nginx \

--with-fpm-group=nginx \

--enable-ftp \

--enable-opcache=no

      [root@localhost php-5.6.22]# make

      [root@localhost php-5.6.22]# make install

      [root@localhost php-5.6.22]# ln -s /application/php-5.6.22/ /application/php

      [root@localhost php-5.6.22]# cp php.ini-production /application/php/lib/php.ini

      [root@localhost php-5.6.22]#cd /application/php/etc/

[root@localhost etc]# cp php-fpm.conf.default php-fpm.conf

[root@localhost etc]# /application/php/sbin/php-fpm

5.3 查看是否已经启动php

[root@localhost php-5.6.22]#netstat -lntup|grep php-fpm

 

6 安装zabbix

      6.1 添加用户和组

      [root@localhost software]# tar zxvf zabbix-3.0.3.tar.gz

      [root@localhost software]# cd zabbix-3.0.3

      [root@localhost zabbix-3.0.3]# groupadd zabbix

[root@localhost zabbix-3.0.3]# useradd -g zabbix zabbix

6.2 安装依赖包

[root@localhost zabbix-3.0.3]# yum install net-snmp net-snmp-devel libssh2-devel OpenIPMI-devel

6.3 安装zabbix

[root@localhost zabbix-3.0.3]# ./configure --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2 --with-openipmi --with-ssh2

[root@localhost zabbix-3.0.3]# make

[root@localhost zabbix-3.0.3]# make install

6.4 配置server文件

[root@localhost zabbix-3.0.3]# egrep -v "#|^$" /usr/local/etc/zabbix_server.conf

6.5 拷贝启动脚本

cp misc/init.d/fedora/core/zabbix_* /etc/rc.d/init.d/

6.6 修改配置文件

vim /application/php/lib/php.ini

max_execution_time = 300

max_input_time = 300

post_max_size = 16M

always_populate_raw_post_data = -1

date.timezone = Asia/Shanghai

6.7 重启php

[root@localhost init.d]# pkill -9 php-fpm

[root@localhost init.d]# /application/php/sbin/php-fpm

6.8 把从zabbix源码包拷贝网站到nginx

[root@localhost software]# cd zabbix-3.0.3

[root@localhost zabbix-3.0.3]# cp -rf frontends/php /application/nginx/html/zabbix/

6.9 赋予权限

[root@localhost zabbix-3.0.3]# chown -R nginx.nginx /application/nginx/html/

 

Zabbix搭建完毕

 

 

版权声明:本文为博主原创文章,未经博主允许不得转载。 举报

相关文章推荐

Zabbix Server 3.0.7 Centos6.5编译安装

前言服务器上线对于云服务商来说已经做得非常的完成,各种主机的监控数据。直观的反应服务器的运行状态、负载等,如AWS、Aliyun等。有时候需要对具体的程序进行监控如JVM MySQL Redis等,尝...

centos7.3 zabbix3.2 安装server端

server端安装 安装yum源(这里我们使用的是阿里云提供的repo) # rpm -ivh http://mirrors.aliyun.com/zabbix/zabbix/3.2/rhel/7...

我是如何成为一名python大咖的?

人生苦短,都说必须python,那么我分享下我是如何从小白成为Python资深开发者的吧。2014年我大学刚毕业..

Zabbix Server CentOS6.8下安装部署详细步骤

所需要的环境:apache php mysql 这里apache和mysql已经预先装好了,具体安装请参见apache和mysql的安装方法 因为装php的时候遇到了很多问题 可能步骤会有些乱 ...

Centos6 安装zabbix-agent

1、操作系统版本 查看操作系统版本 cat /etc/issue CentOS release 6.6 (Final) Kernel \r on an \m 关闭防火墙和selinux sed ...

zabbix_server 在centos6.3中的安装过程记录

1. 安装相关依赖yum -y install net-snmp net-snmp-devel curl curl-devel perl-DBI2. 添加zabbix用户和组groupadd zabb...

centos 7编译安装部署zabbix-server端

CentOs7.0环境中编译安装部署zabbix-server端

centos6.4yum安装和配置zabbix_server

rpm -ivh  http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm yum i...

Centos7 安装zabbix-server

1、zabbix介绍2、系统配置及信息3、安装软件源rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/7/x86_64/zabbix-release-2....
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)