首页 > 代码库 > LNMP+zabbix-3.2.1

LNMP+zabbix-3.2.1

LNMP+zabbix-3.2.1 一、zabbix服务端部署 1、解压 tar -xf nginx-1.10.1.tar.gz tar -xf php-5.6.22.tar.gz tar -xf freetype-2.4.0.tar.bz2 tar -xf mysql-5.6.30-linux-glibc2.5-x86_64.tar.gz tar -xf zabbix-3.2.1.tar.gz  2、安装Nginx yum -y install gcc openssl-devel pcre-devel     useradd -s /sbin/nologin nginx  cd ~/nginx-1.10.1/ ./configure >--prefix=/usr/local/nginx >--user=nginx >--group=nginx >--with-http_ssl_module make && make install vim /usr/local/nginx/conf/nginx.conf      location / {             root    html;             index    index.php        index.html        index.htm;     }     location ~ \.php$ {             root   html;             fastcgi_pass        127.0.0.1:9000;             fastcgi_index        index.php;             fastcgi_param        SCRIPT_FILENAME    $document_root$fastcgi_script_name;             include            fastcgi_params;     } /usr/local/nginx/sbin/nginx  3、安装MySQL useradd mysql mv mysql-5.6.30-linux-glibc2.5-x86_64/ /usr/local/mysql chown -R mysql.mysql /usr/local/mysql/ su - mysql     cd /usr/local/mysql/scripts/     ./mysql_install_db \     >--user=mysql \     >--basedir=/usr/local/mysql \     >--datadir=/usr/local/mysql/data     exit cd /usr/local/mysql/support-files/ cp my-default.cnf /etc/my.cnf cp mysql.server /etc/init.d/mysql vim /etc/init.d/mysql     basedir=/usr/local/mysql     datadir=/usr/local/mysql/data echo ‘export PATH=/usr/local/mysql/bin:$PATH‘ >> /etc/profile source /etc/profile chkconfig --add mysql chkconfig mysql on service mysql start /usr/local/mysql/bin/mysqladmin -u root password ‘123456‘ mysql -uroot -p123456     mysql> create database zabbix character set utf8;     mysql> grant all on zabbix.* to zabbix@localhost identified by ‘qwe123‘;  4、安装Freetype(可以使用系统自带的) cd ~/freetype-2.4.0 ./configure --prefix=/opt/freetype-2.4.0 make && make install yum  -y  install freetype  5、安装PHP yum -y install libjpeg-devel libxml2-devel libpng-devel cd ~/php-5.6.22/ ./configure >--prefix=/usr/local/php5/ >--enable-fpm >--enable-mbstring >--enable-bcmath >--enable-sockets >--with-config-file-path=/usr/local/php5/etc >--with-mysql=/usr/local/mysql/ >--with-mysqli=/usr/local/mysql/bin/mysql_config >--with-gd >--with-gettext >--with-jpeg-dir >--with-freetype-dir=/opt/freetype-2.4.0/  #使用系统自带的不用指安装目录 make && make install cp  php.ini-production /usr/local/php5/etc/php.ini vim /usr/local/php5/etc/php.ini     date.timezone = Asia/Shanghai     max_execution_time = 300     post_max_size = 32M     max_input_time = 300     memory_limit = 128M     always_populate_raw_post_data = http://www.mamicode.com/-1>

本文出自 “12336621” 博客,请务必保留此出处http://12346621.blog.51cto.com/12336621/1908286

LNMP+zabbix-3.2.1