软件安装

Mysql

安装

tar xf mysql-5.7.13-1.el6.x86_64.rpm-bundle.tar -C mysql

rpm -e --nodeps  mysql-libs-5.1.73-7.el6.x86_64

rpm -vih mysql-community-*

service mysqld start

初始化root

grep 'temporary password' /var/log/mysqld.log

2017-05-05T11:50:26.980187Z 1 [Note] A temporary password is generated for root@localhost: rVVAzI+Qw7.A

mysql -uroot -p'rVVAzI+Qw7.A'

mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'LiMuGen@uce.com56.&';

mysql> \q

service mysqld restart

PHP

依赖包

devel

yum -y install gcc* libxslt-devel libicu-devel zlib-devel bzip2-devel  pcre-devel openssl-devel libxml2-devel mhash-devel gmp-devel libcurl-devel gd-devel libpng-devel libXpm-devel freetype-devel enchant-devel openjpeg-devel opencryptoki-devel libedit-devel readline-devel recode-devel net-snmp-devel unixODBC-devel aspell-devel

libwebp

tar xzf libwebp-0.6.0.tar.gz

cd libwebp-0.6.0

./configure --prefix=/usr/

make

make install

libmcrypt

tar xzf libmcrypt-2.5.8.tar.gz

cd libmcrypt-2.5.8

./configure --prefix=/usr/

make

make install

libgd

tar xzf libgd-2.2.4.tar.gz

cd libgd-2.2.4

./configure --prefix=/usr/

vim  src/gd_gd2.c

make

make install

PEAR

tar xzf PEAR-1.10.4.tgz

安装

./configure --prefix=/usr/local/php --with-mysqli=/usr/bin/mysql_config --enable-fpm --enable-bcmath  --with-bz2=/usr/ --enable-intl --enable-mbstring --enable-soap  --enable-sysvmsg --enable-sysvsem       --enable-calendar --with-curl=/usr/ --enable-exif  --enable-ftp  --with-gettext=/usr/ --with-gmp=/usr/ --with-iconv-dir=/usr/ --with-mhash=/usr/ --with-mysql-sock=/var/lib/mysql/mysql.sock --with-pcre-dir=/usr/ --enable-shmop  --enable-sockets  --enable-wddx  --with-xsl=/usr/ --enable-zip --with-zlib-dir=/usr --with-unixODBC=/usr --with-enchant=/usr --with-gd=/usr --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --with-mcrypt=/usr --with-pspell=/usr --with-libedit=/usr --with-readline=/usr --with-recode=/usr --with-snmp=/usr --enable-sysvshm --with-pear=../PEAR-1.10.4

make

make test

make install

cp /usr/local/src/php-7.1.4/php.ini-production /usr/local/php/etc/php.ini

cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf

cp /usr/local/php/etc/php-fpm.d/www.conf.default /usr/local/php/etc/php-fpm.d/www.conf

/usr/local/php/sbin/php-fpm -c /usr/local/php/etc/php.ini

JAVA

tar xzf jdk-7u79-linux-x64.gz -C /usr/local/

vim /etc/profile.d/jdk.sh

export JAVA_HOME=/usr/local/jdk1.7.0_79

export CLASSPATH=:.$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

export PATH=$JAVA_HOME/bin:$PATH

source /etc/profile.d/jdk.sh

zabbix

tar xzf zabbix-3.2.5.tar.gz

cd zabbix-3.2.5

yum -y install openldap-devel

./configure --prefix=/usr/local/zabbix --enable-server --enable-proxy --enable-agent --enable-java --with-mysql --with-libxml2 --with-unixodbc --with-net-snmp --with-openssl --with-libcurl --with-ldap

make && make install

groupadd zabbix

useradd -M -g zabbix -s /sbin/nologin zabbix

NGINX

tar xzf tengine-1.5.2.tar.gz

tar xf jemalloc-3.6.0.tar.bz2

cd tengine-1.5.2

./configure --prefix=/usr/local/nginx --user=nginx --group=nginx --with-http_realip_module --with-http_addition_module --with-http_xslt_module --with-http_image_filter_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_gzip_static_module --with-pcre --with-jemalloc=../jemalloc-3.6.0

make && make install

groupadd nginx

useradd -g nginx -M -s /sbin/nologin nginx

部署配置

NGINX

vim /usr/local/nginx/conf/nginx.conf

user  nginx;

worker_processes  8;

events {

worker_connections  10240;

}

http {

include       mime.types;

default_type  application/octet-stream;

log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '

'$status $body_bytes_sent "$http_referer" '

'"$http_user_agent" "$http_x_forwarded_for"';

access_log  logs/access.log  main;

sendfile        on;

keepalive_timeout  65;

server {

listen       80;

server_name  localhost;

access_log  logs/host.access.log  main;

location / {

root   zabbix;

index  index.html index.htm index.php;

}

error_page   500 502 503 504  /50x.html;

location = /50x.html {

root   html;

}

location ~ \.php$ {

root           zabbix;

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

MYSQL

创建zabbix数据库

mysql -uroot -p'LiMuGen@uce.com56.&'

mysql> create database zabbix character set utf8 collate utf8_bin;

mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'Zabbix@UC56.com(..)';

mysql> flush privileges;

mysql> \q

导入zabbix数据

cd /usr/local/src/zabbix-3.2.5/database/mysql

mysql -uzabbix -p zabbix <schema.sql

mysql -uzabbix -p zabbix <images.sql

mysql -uzabbix -p zabbix <data.sql

PHP

vim /usr/local/php/etc/php.ini

post_max_size = 16M

max_execution_time = 300

max_input_time = 300

date.timezone = Asia/ShangHai

ZABBIX

Web访问文件准备

cp -r /usr/local/src/zabbix-3.2.5/frontends/php/ /usr/local/nginx/

mv /usr/local/nginx/php/ /usr/local/nginx/zabbix

zabbix服务配置修改

vim /usr/local/zabbix/etc/zabbix_server.conf

DBName=zabbix

DBUser=zabbix

DBPassword=Zabbix@UC56.com(..)

PHP7报错修正

cp /usr/local/nginx/zabbix/include/func.inc.php /usr/local/nginx/zabbix/include/func.inc.php-bk20170505

sed -i '/$last = strtolower(substr($val, -1));/a$val = substr($val,0,-1);' /usr/local/nginx/zabbix/include/func.inc.php

lnmp源码编译安装zabbix的更多相关文章

  1. LNMP源码编译安装(centos7+nginx1.9+mysql5.6+php7)

    1.准备工作: 1)把所有的软件安装在/Data/apps/,源码包放在/Data/tgz/,数据放在/Data/data,日志文件放在/Data/logs,项目放在/Data/webapps, mk ...

  2. LNMP源码编译安装

    思路:根据Linux系统以及公司网站系统的信息,选择合适的安装包进行安装 一.查看系统信息 # uname -a                        # 查看内核/操作系统/CPU信息 # ...

  3. Lnmp 源码编译安装、常见错误整理

    简介: Lnmp 环境的搭建还是非常简单的,之前由于博客迁移等原因,导致丢失了好多博文,这次重新整理记录一下. Lnmp 即:Linux .Nginx .Mysql .PHP Lnmp 是一套 Web ...

  4. Zabbix 源码编译安装

    简介: Zabbix 分布式监控系统,源码编译安装记录 ( 记不得是第多少次了 ) 下载地址:http://jaist.dl.sourceforge.net/project/zabbix/ZABBIX ...

  5. CentOS 7上源码编译安装和配置LNMP Web+phpMyAdmin服务器环境

    CentOS 7上源码编译安装和配置LNMP Web+phpMyAdmin服务器环境 什么是LNMP? LNMP(别名LEMP)是指由Linux, Nginx, MySQL/MariaDB, PHP/ ...

  6. zabbix源码编译安装以及添加第一台host监控

    基础准备 硬件需求 数据库需求   软件需求 其他软件需求 安装 安装方式 source code 编译好的二进制包 rpm或者deb 源码编译安装部署zabbix以及附件 前提准备 最小化安装操作系 ...

  7. centos7源码编译安装lamp/lnmp

    centos7源码编译安装lamp/lnmp 进程:是包工头(相当于是个门,只管开门关门,不管门内的事儿) 线程:是各种工种(cpu调度的是线程) 进程 是一件事情, 线程 是 同一个时间范围内 同时 ...

  8. WordPress安装篇(5):源码编译安装LNMP并部署WordPress

    与YUM方式安装相比,源码编译安装方式更灵活,安装过程中能自定义功能和参数,特别是在批量部署服务器又要求软件版本及配置一致时,源码编译安装的优势很明显.本文介绍如何通过源码编译方式安装Nginx1.1 ...

  9. LNMP架构——源码编译安装

    LNMP架构--源码编译安装 1.编译安装nginx服务 2.编译安装mysql服务 3.编译安装php解析环境 1.编译安装nginx服务: systemctl stop firewalld sys ...

随机推荐

  1. Delphi: Class Static Methods

    在Delphi中,自Delphi 2007之后,支持static形式的class方法,样式比如: type TMyClass = class strict private class var FX: ...

  2. css浮动知识点(转)

    转自:http://www.cnblogs.com/iyangyuan/archive/2013/03/27/2983813.html 很早以前就接触过CSS,但对于浮动始终非常迷惑,可能是自身理解能 ...

  3. TableViewCell去除选中效果

    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ [tableV ...

  4. JFinal Web开发学习(六)验证码验证和注册细节

    效果: 实现了注册界面的验证码验证.确认密码.密码md5加盐加密.C3P0插件数据库操作.读取外部配置文件. 1.在注册页面添加了确认密码输入框,修改了字段名称 <!DOCTYPE html&g ...

  5. jwplayer使用方法

    网盘:https://pan.baidu.com/s/1mmtppZSFOni5tLI2TJWKrw <script type="text/javascript"> v ...

  6. .net中几个经常用到的字符串的截取

    string str="123abc456";int i=3;1 取字符串的前i个字符   str=str.Substring(0,i); // or  str=str.Remov ...

  7. poj 2528(线段树+离散化) 市长的海报

    http://poj.org/problem?id=2528 题目大意是市长竞选要贴海报,给出墙的长度和依次张贴的海报的长度区间(参考题目给的图),问最后你能看见的海报有几张 就是有的先贴的海报可能会 ...

  8. HDU 2255.奔小康赚大钱 最大权匹配

    奔小康赚大钱 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Subm ...

  9. Java Http协议处理类

    public class HttpRequest { public static String doGet(String url,String params) throws Exception{ re ...

  10. merge_节点

    (1)CREATE可以创建相同节点,merge若节点已存在,则不会重新添加. CREATE (gp1:GoogleProfile1 {Id: 201401, Name:"Apple" ...