当前位置: 首页 > wzjs >正文

淘宝客网站建设视频多少企业需要网站建设

淘宝客网站建设视频,多少企业需要网站建设,抖音代运营传媒属于什么行业,合肥建站服务LNMPZabbix安装部署(Zabbix6.0) 简介 LNMP(Linux Nginx MySQL PHP)是一种流行的Web服务器架构,广泛用于搭建高性能的网站和应用程序。Zabbix 是一个开源的监控软件,可以用来监控网络、服务器和应用程序…

LNMP+Zabbix安装部署(Zabbix6.0)

简介

LNMP(Linux + Nginx + MySQL + PHP)是一种流行的Web服务器架构,广泛用于搭建高性能的网站和应用程序。Zabbix 是一个开源的监控软件,可以用来监控网络、服务器和应用程序的性能和健康状态。将 Zabbix 集成到 LNMP 架构中可以提供全面的监控解决方案。下面将介绍如何在一个 LNMP 环境中安装和部署 Zabbix。

安装环境:

系统:centos7.0

nginx版本:1.20

php版本:php7.2.34

mysql版本:mysql8.0.30

zabbix版本:zabbix6.0.1

1、zabbix server端安装    

1.1、关闭系统防火墙    

systemctl stop firewalld.service

systemctl disable firewalld.service

firewall-cmd --state

sed -i '/^SELINUX=.*/c SELINUX=disabled' /etc/selinux/config

sed -i 's/^SELINUXTYPE=.*/SELINUXTYPE=disabled/g' /etc/selinux/config

grep --color=auto '^SELINUX' /etc/selinux/config

setenforce 0

1.2、mysql部署    

wget https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.30-1.el7.x86_64.rpm-bundle.tar    

tar -xvf mysql-8.0.30-1.el7.x86_64.rpm-bundle.tar

rpm -ivh mysql-community-* --force --nodeps

mkdir -p /data/mysql

chown mysql:mysql /data/mysql

           vim /etc/my.cnf

[mysqld]

datadir=/data/mysql

socket=/var/lib/mysql/mysql.sock    

log-error=/var/log/mysqld.log

pid-file=/var/run/mysqld/mysqld.pid

character-set-server=utf8mb4

collation-server=utf8mb4_general_ci

port=3306

lower_case_table_names=1

max_connections=4096

           启动数据库:

yum -y install libaio

systemctl enable mysqld    

systemctl start mysqld

           获取密码登录mysql:

cat /var/log/mysqld.log | grep password

mysql -uroot -pkegsOfDBY9?K

set global validate_password.policy=0;

set global validate_password.length=6;

set global validate_password.mixed_case_count=0;

alter user 'root'@'localhost' identified by 'abc123';

create database zabbix character set utf8 collate utf8_bin;

create user 'zabbix'@'localhost' identified with mysql_native_password by 'abc123';

grant all privileges on zabbix.* to 'zabbix'@'localhost';

flush privileges;

1.3、nginx部署    

rpm -Uvh http://nginx.org/packages/centos/7/x86_64/RPMS/nginx-1.20.0-1.el7.ngx.x86_64.rpm

mkdir /data/nginx

mv /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf.bak

      vim /etc/nginx/nginx.conf

user  nginx;

worker_processes  auto;

error_log  /var/log/nginx/error.log notice;

pid        /var/run/nginx.pid;

               events {

    worker_connections  1024;

}

           http {

    include       /etc/nginx/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  /var/log/nginx/access.log  main;

    sendfile        on;

    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;

    server {

      listen       80;

      server_name  localhost;

      root         /data/nginx;

      location / {

        index  index.php index.html index.htm;

      }

      location ~ \.php$ {

        fastcgi_pass   127.0.0.1:9000;

        fastcgi_index  index.php;

        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;

        include        fastcgi_params;

      }

    }

}

           systemctl enable nginx

systemctl start nginx

systemctl status nginx

netstat -ntlp |grep 80

1.4、PHP部署    

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo    

yum -y install epel-release

wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

yum -y install gcc gcc-c++ php72w-cli php72w-fpm php72w-gd php72w-mbstring php72w-bcmath php72w-xml php72w-ldap php72w-mysqlnd

sed -i "s/max_execution_time = 30/max_execution_time = 300/g" /etc/php.ini

sed -i "s/max_input_time = 60/max_input_time = 300/g" /etc/php.ini

sed -i "s/post_max_size = 8M/post_max_size = 16M/g" /etc/php.ini

cd /data/nginx/

vim index.php

<?phpphpinfo();?>

systemctl enable php-fpm

systemctl start php-fpm

netstat -ntlp |grep 9000

           使用浏览器验证一下Nginx和PHP:

1.5、zabbix-server部署    

groupadd zabbix

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

wget https://cdn.zabbix.com/zabbix/sources/stable/6.0/zabbix-6.0.1.tar.gz    

tar -xf zabbix-6.0.1.tar.gz

cd zabbix-6.0.1/

yum -y install  mysql-devel pcre-devel openssl-devel zlib-devel libxml2-devel net-snmp-devel net-snmp libssh2-devel OpenIPMI-devel libevent-devel openldap-devel libcurl-devel

./configure --sysconfdir=/etc/zabbix --enable-server --with-mysql --with-net-snmp --with-libxml2 --with-ssh2 --with-openipmi --with-zlib --with-libpthread --with-libevent --with-openssl --with-ldap --with-libcurl --with-libpcre

make install

vim /etc/zabbix/zabbix_server.conf

ListenPort=10051

LogFile=/tmp/zabbix_server.log

DBHost=localhost

DBName=zabbix

DBUser=zabbix

DBPassword=abc123

Timeout=4

LogSlowQueries=3000

StatsAllowedIP=127.0.0.1

#向数据库中导入zabbix的库表及数据(注意导入的顺序)

mysql -uzabbix -pabc123 zabbix < /root/zabbix-6.0.1/database/mysql/schema.sql

mysql -uzabbix -pabc123 zabbix < /root/zabbix-6.0.1/database/mysql/images.sql

mysql -uzabbix -pabc123 zabbix < /root/zabbix-6.0.1/database/mysql/data.sql

           #移动zabbix前端页面到网站根目录

cp -rf /root/zabbix-6.0.1/ui/* /data/nginx/

vim /usr/lib/systemd/system/zabbix-server.service

[Unit]

Description=Zabbix Server with MySQL DB

After=syslog.target network.target mysqld.service    

[Service]

Type=simple

ExecStart=/usr/local/sbin/zabbix_server -f

User=zabbix

[Install]

WantedBy=multi-user.target

           #重新加载system文件

systemctl daemon-reload

systemctl enable zabbix-server

systemctl start zabbix-server

1.6、Web端初始化    

1)、输入IP直接跳转至zabbix网页端

2)、这里已经调整过PHP的配置文件,如果还有问题的可以编辑/etc/php.ini ,调整对应字段的值即可    

3)、配置DB连接

4)、这里自定义Zabbix主机名称即可    

5)、安装

cp /data/nginx/conf/zabbix.conf.php.example /data/nginx/conf/zabbix.conf.php

chown zabbix:zabbix /data/nginx/conf/zabbix.conf.php    

vim /data/nginx/conf/zabbix.conf.php

#只修改PASSWORD的密码

$DB['PASSWORD']                 = 'abc123';

默认账号密码:Admin zabbix

1.7、解决zabbix 6.0 中文乱码问题    

将window的C:\Windows\Fonts路径下将楷体的ttf文件复制到linux的 /data/web/assets/fonts 目录下

#替换配置文件中的默认字体

sed -i 's/DejaVuSans/simkai/g' /data/nginx/include/defines.inc.php

zabbix不支持主机名中存在中文字符的,要让zabbix主机名支持中文,需要修改zabbix的php配置文件

vim /data/nginx/include/defines.inc.php

#将下面的字段(大概在1198 行)

define('ZBX_PREG_INTERNAL_NAMES', '([0-9a-zA-Z_\. \-]+)');

改成

define('ZBX_PREG_INTERNAL_NAMES', '([0-9a-zA-Z_\. \-\x{80}-\x{ff}]+)');

重启zabbix-server:

systemctl restart zabbix-server

2、zabbix agent端安装    

rpm -ivh https://mirrors.aliyun.com/zabbix/zabbix/6.0/rhel/7/x86_64/zabbix-agent-6.0.1-1.el7.x86_64.rpm?spm=a2c6h.25603864.0.0.4a7e7a10tEvrPp --nodeps

rpm -ivh http://mirror.centos.org/centos/7/os/x86_64/Packages/pcre2-10.23-2.el7.x86_64.rpm

vim /etc/zabbix/zabbix_agentd.conf

PidFile=/var/run/zabbix/zabbix_agentd.pid    

LogFile=/var/log/zabbix/zabbix_agentd.log

LogFileSize=0

Server=192.168.52.20

ServerActive=127.0.0.1

Hostname=Zabbix server

Include=/etc/zabbix/zabbix_agentd.d/*.conf

启动Zabbix-agent服务:

systemctl start zabbix-agent

systemctl status zabbix-agent       


文章转载自:

http://iyyaTNpF.kqnwy.cn
http://IoASfdqs.kqnwy.cn
http://VlgOsmnw.kqnwy.cn
http://n468srgE.kqnwy.cn
http://4qT253Cg.kqnwy.cn
http://L0qsUden.kqnwy.cn
http://U0YQCJZt.kqnwy.cn
http://U94Kpt9b.kqnwy.cn
http://cIYdAfAC.kqnwy.cn
http://qWSlnlOl.kqnwy.cn
http://deAgYRty.kqnwy.cn
http://rgxZGVz1.kqnwy.cn
http://9XaBAc2Y.kqnwy.cn
http://B4oyIhWI.kqnwy.cn
http://LOtfp3KP.kqnwy.cn
http://F1BgA1Wc.kqnwy.cn
http://GSjnwMGI.kqnwy.cn
http://INgxp1TU.kqnwy.cn
http://q0faeWl2.kqnwy.cn
http://3wsnu4RP.kqnwy.cn
http://AxB4P8Gw.kqnwy.cn
http://jPdukvmw.kqnwy.cn
http://RWk2mxA4.kqnwy.cn
http://mj6cP10P.kqnwy.cn
http://cAfsIujv.kqnwy.cn
http://GLm9JswZ.kqnwy.cn
http://sfo19bH1.kqnwy.cn
http://VR2VPNWt.kqnwy.cn
http://LQ5N1CEo.kqnwy.cn
http://zCCLJBif.kqnwy.cn
http://www.dtcms.com/wzjs/605500.html

相关文章:

  • 网站备案核验单怎么选网站建设需要做哪些工作
  • 打开建设银行网站自己做网站卖别人的机械设备
  • 网站外链接自己可以怎么做优化大师官方
  • 郴州网站建设软件定制开发制作阿里云可以做几个网站
  • 辽宁建设厅官方网站html5加入wordpress
  • 福州企业网站建站模板山东电力建设网站
  • 怎么做新网站才能被百度收录湖州公司网站建设
  • 织梦dedecms资讯文章类网站模板企业邮箱地址格式
  • 企业网站开发使用方法window wordpress搭建
  • 二级域名做网站域名wordpress自动存图
  • 网站建设类合同范本家电企业网站模板
  • 重庆綦江网站制作公司哪家专业项目管理软件 开源
  • 网站权重传递网站建设客户沟通
  • 东莞公司网站广告联盟网站建设
  • 纯静态网站索引怎么做网站建设能解决哪些问题
  • 推荐几个做网页设计的网站大兴企业官网网站建设
  • 岳阳网站建设与设计中国品牌网站
  • dedecms 网站安装搜狗推广登陆
  • 做网站的竞品分析网站备案链接直接查看
  • 网站开发组合网站如何进行内外营销运营
  • 网站优化qq群优秀网站建设官网
  • 建设银行个人网站个人客户最常用的规划网站
  • 人力招聘网站建设的简要任务执行书电影网站怎么做推广
  • 利津网站建设wordpress 本机安装
  • 1网站免费建站免备案域名解析
  • 成都最专业做网站的关键词查网址
  • 移动端网站制作模板石家庄网站建设哪家专业
  • jsp网站开发面试题手机访问不了自己做的网站吗
  • 毛概课程网站建设seo网站推广策略
  • 可以做动感影集的网站寻找集团网站建设