首页
金蝶系列
用友系列
鼎捷系列
OA协同办公
注册/登录
登录
注册
Search
1
Python 3.8 - ModuleNotFoundError: No module named 'flask._compat'
259 阅读
2
CentOS 7 - 安装iredMail 邮件服务器
252 阅读
3
Zabbix 4.0 源码安装
221 阅读
4
Kingdee-采购管理-T_PUR_CATALOGENTRY_R-采购目录_关联信息表
189 阅读
5
Python循环语句- for
179 阅读
默认分类
Windows
金蝶
OA
ERP
帆软
用友
Linux
数据库
/
Search
标签搜索
金蝶
管理
美萍
OA
Linux
qq
泛微
获取
破解
监控
用友
IPguard
KIS
Zabbix
python
帆软
活字格
MySQL
FineReport
k3cloud
SOSO
累计撰写
299
篇文章
累计收到
5
条评论
首页
栏目
默认分类
Windows
金蝶
OA
ERP
帆软
用友
Linux
数据库
页面
金蝶系列
用友系列
鼎捷系列
OA协同办公
推荐
登录
注册
搜索到
299
篇与
的结果
2021-09-19
Zabbix 4.0 源码安装
一 、系统环境CentOS 7.9zabbix-4.0.33.tar.gz模板下载:https://share.zabbix.com/1.1 源码安装下载源码包:wget https://cdn.zabbix.com/zabbix/sources/stable/4.0/zabbix-4.0.33.tar.gz添加zabbix用户groupadd --system zabbix useradd --system -g zabbix -s /sbin/nologin -c "Zabbix Monitoring System" zabbix or groupadd --system zabbix useradd --system -g zabbix -d /usr/lib/zabbix -s /sbin/nologin -c "Zabbix Monitoring System" zabbix 安装依赖:yum -y install telnet net-tools python-paramiko dejavu-sans-fonts python-setuptools python-devel sendmail mailx net-snmp net-snmp-devel net-snmp-utils freetype-devel libpng-devel perl unbound libtasnl-devel pll-kit-devel OpenIPMI unixODBC libevent-devel mysql-devel libxml2-devel libssh2-devel OpenIPMI-devel openldap-devel curl-devel unixODBC-devel wget gcc gcc-c++ go编译安装:agent./configure --prefix=/usr/local/zabbix \ --enable-server --enable-agent --enable-agent2 \ --with-mysql --with-net-snmp \ --with-libcurl --with-openipmi\ --with-libxml2 --enable-proxy编译安装enable-agent2go: github.com/dustin/
[email protected]
: Get "https://proxy.golang.org/github.com/dustin/gomemcached/@v/v0.0.0-20160817010731-a2284a01c143.mod": dial tcp 172.217.160.113:443: connect: connection refused make[2]: *** [build] Error 1 make[2]: Leaving directory `/root/zabbix-5.0.24/src/go' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/root/zabbix-5.0.24/src' make: *** [all-recursive] Error 1解决方法 配置GO国内代理go env -w GOPROXY=https://goproxy.cn输出Configuration: Detected OS: linux-gnu Install path: /usr/local/zabbix Compilation arch: linux Compiler: cc Compiler flags: -g -O2 Library-specific flags: database: -I/usr/local/mariadb/include/mysql -I/usr/local/mariadb/include/mysql/mysql libXML2: -I/usr/include/libxml2 unixODBC: -I/usr/include Net-SNMP: -I/usr/local/include -I/usr/lib64/perl5/CORE -I. -I/usr/include OpenIPMI: -I/usr/include libssh2: -I/usr/include LDAP: -I/usr/include iconv: -I/usr/include Enable server: yes Server details: With database: MySQL WEB Monitoring: cURL SSL certificates: /usr/local/zabbix/share/zabbix/ssl/certs SSL keys: /usr/local/zabbix/share/zabbix/ssl/keys Native Jabber: no SNMP: yes IPMI: yes SSH: yes (libssh2) TLS: no ODBC: yes Linker flags: -L/usr/local/mariadb/lib/ -L/usr/lib64 -L/usr/lib64 -L/usr/lib -L/usr/lib -L/usr/lib -rdynamic -L/usr/lib Libraries: -lmariadb -lxml2 -lodbc -lnetsnmp -lssh2 -lOpenIPMI -lOpenIPMIposix -lz -lpthread -levent -lldap -llber -lcurl -lm -ldl -lresolv -lpcre Configuration file: /usr/local/zabbix/etc/zabbix_server.conf External scripts: /usr/local/zabbix/share/zabbix/externalscripts Alert scripts: /usr/local/zabbix/share/zabbix/alertscripts Modules: /usr/local/zabbix/lib/modules Enable proxy: yes Proxy details: With database: MySQL WEB Monitoring: cURL SSL certificates: /usr/local/zabbix/share/zabbix/ssl/certs SSL keys: /usr/local/zabbix/share/zabbix/ssl/keys SNMP: yes IPMI: yes SSH: yes (libssh2) TLS: no ODBC: yes Linker flags: -L/usr/local/mariadb/lib/ -L/usr/lib64 -L/usr/lib64 -L/usr/lib -L/usr/lib -L/usr/lib -rdynamic -L/usr/lib Libraries: -lmariadb -lxml2 -lodbc -lnetsnmp -lssh2 -lOpenIPMI -lOpenIPMIposix -lz -lpthread -levent -lldap -llber -lcurl -lm -ldl -lresolv -lpcre Configuration file: /usr/local/zabbix/etc/zabbix_proxy.conf External scripts: /usr/local/zabbix/share/zabbix/externalscripts Modules: /usr/local/zabbix/lib/modules Enable agent: yes Agent details: TLS: no Linker flags: -L/usr/lib -rdynamic -L/usr/lib Libraries: -lz -lpthread -lldap -llber -lcurl -lm -ldl -lresolv -lpcre Configuration file: /usr/local/zabbix/etc/zabbix_agentd.conf Modules: /usr/local/zabbix/lib/modules Enable Java gateway: yes Java gateway details: Java compiler: javac Java archiver: jar LDAP support: yes IPv6 support: no Now run 'make install' **Thank you for using Zabbix! *http://www.zabbix.com *安装make && make installzabbix 目录[root@C20210910156669 zabbix-4.0.33]# tree /usr/local/zabbix/ /usr/local/zabbix/ ├── bin │ ├── zabbix_get │ └── zabbix_sender ├── etc │ ├── zabbix_agentd.conf │ ├── zabbix_agentd.conf.d │ ├── zabbix_proxy.conf │ ├── zabbix_proxy.conf.d │ ├── zabbix_server.conf │ └── zabbix_server.conf.d ├── lib │ └── modules ├── sbin │ ├── zabbix_agentd │ ├── zabbix_java │ │ ├── bin │ │ │ └── zabbix-java-gateway-4.0.33.jar │ │ ├── lib │ │ │ ├── android-json-4.3_r3.1.jar │ │ │ ├── logback-classic-1.2.3.jar │ │ │ ├── logback-console.xml │ │ │ ├── logback-core-1.2.3.jar │ │ │ ├── logback.xml │ │ │ └── slf4j-api-1.7.30.jar │ │ ├── settings.sh │ │ ├── shutdown.sh │ │ └── startup.sh │ ├── zabbix_proxy │ └── zabbix_server └── share ├── man │ ├── man1 │ │ ├── zabbix_get.1 │ │ └── zabbix_sender.1 │ └── man8 │ ├── zabbix_agentd.8 │ ├── zabbix_proxy.8 │ └── zabbix_server.8 └── zabbix ├── alertscripts └── externalscripts二、数据库:安装数据库yum install -y mariadb-server启动数据库systemctl start mariadb.service数据库启动状态systemctl status mariadb.service输出● mariadb.service - LSB: start and stop MariaDB Loaded: loaded (/etc/rc.d/init.d/mysqld; bad; vendor preset: disabled) Active: active (exited) since Fri 2021-09-17 03:14:03 CST; 2 days ago Docs: man:systemd-sysv-generator(8) Sep 17 03:14:01 C20210910156669 systemd[1]: Starting LSB: start and stop MariaDB... Sep 17 03:14:02 C20210910156669 mysqld[817]: Starting MariaDB.210917 03:14:02 mysqld_safe Loggin...g'. Sep 17 03:14:02 C20210910156669 mysqld[817]: 210917 03:14:02 mysqld_safe Starting mariadbd daemo...adb Sep 17 03:14:03 C20210910156669 mysqld[817]: [ OK ] Sep 17 03:14:03 C20210910156669 systemd[1]: Started LSB: start and stop MariaDB. Hint: Some lines were ellipsized, use -l to show in full.创建数据库MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin; Query OK, 1 row affected (0.002 sec)用户授权MariaDB [(none)]> GRANT ALL PRIVILEGES ON zabbix.* TO 'zabbix'@'localhost' IDENTIFIED BY 'zabbix'; Query OK, 0 rows affected (0.009 sec) or mysql -uroot -p<password> create database zabbix character set utf8 collate utf8_bin; create user 'zabbix'@'localhost' identified by '<password>'; grant all privileges on zabbix.* to 'zabbix'@'localhost';导入zabbix表结构mysql -uzaUser -ppassword zabbix < schema.sql mysql -uzaUser -ppassword zabbix < image.sql mysql -uzaUser -ppassword zabbix < data.sqlMariadb 10 导入报错mysql -uzaUser -ppassword zabbix < schema.sql ERROR 1118 (42000) at line 1278: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.编辑 my.cnfinnodb_strict_mode = 0 添加到 [mysqld]中,后重启mariadb编辑 zabbix_server.conf[root@C20210910156669 etc]# grep -Ev "^#|^$" zabbix_server.conf LogFile=/tmp/zabbix_server.log DBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=zabbix DBSocket=/tmp/mysql.sock DBPort=3306 Timeout=4 LogSlowQueries=3000 AlertScriptsPath=/usr/local/zabbix/share/zabbix/alertscripts编辑 php.ini文件先决条件最低要求描述PHP 版本5.4.0-PHP memory_limit 选项128MB位于 php.ini:memory_limit = 128MPHP post_max_size 选项16MB位于 php.ini:post_max_size = 16MPHP upload_max_filesize 选项2MB位于 php.ini:upload_max_filesize = 2MPHP max_execution_time 选项300 seconds (此值允许为 0 和 -1 )位于 php.ini:max_execution_time = 300PHP max_input_time 选项300 seconds (此值允许为 0 和 -1)位于 php.ini:max_input_time = 300PHP session.auto_start 选项必须禁用此值In php.ini:session.auto_start = 0数据库支持其中之一: MySQL,、Oracle、PostgreSQL、IBM DB2必须安装下列模块中的一种:mysql、oci8、pgsql、ibm_db2bcmathphp-bcmath-mbstringphp-mbstring-PHP mbstring.func_overload选项必须禁用此值位于 php.ini:mbstring.func_overload = 0PHP always_populate_raw_post_data option必须禁用此值只适用于 PHP 5.6.0 或更高的版本。位于 php.ini:always_populate_raw_post_data = -1sockets-php-net-socket 用于支持用户脚本。gd2.0 或更高php-gd. PHP GD 扩展必须支持 PNG 图像 (--with-png-dir),、JPEG (--with-jpeg-dir) 图像和 FreeType 2 (--with-freetype-dir).libxml2.6.15php-xml or php5-domxmlwriter-php-xmlwriterxmlreader-php-xmlreaderctype-php-ctypesession-php-sessiongettextphp-gettext从 Zabbix 2.2.1 起,PHP gettext 扩展不是安装 Zabbix 的强制性要求。如果 gettext 没有安装,前端也可以照常运行,但翻译将不可用。三、zabbix登录异常[Tips] 解决方法修改 php.inicgi.fix_pathinfo=0 修改为: cgi.fix_pathinfo=1四、获取Windows 监控资源C:\>typeperf缺少参数: 缺少参数: -cf 缺少参数: -q [object]缺少参数: -qx [object]typeperf -qx > typeperf.txt五、监控Windows Server编辑zabbix_agent.conf 添加自定义监控项# Mandatory: no # Default: # UserParameter= PerfCounter=UserPerfCounterdiskBytesRead,"\LogicalDisk(C:)\Disk Read Bytes/sec",3 PerfCounter=UserPerfCounterdiskBytesWrite,"\LogicalDisk(C:)\Disk Write Bytes/sec",3
2021年09月19日
221 阅读
1 评论
0 点赞
2021-09-17
MySQL 批量删除 表
通过mysql语法组装批量删除的命令 select concat("drop table pre_",group_concat(table_name),";") as statement from information_schema.tables where table_schema="bbs" and table_name like "pre%";输出:MariaDB [pbbs]> select concat("drop table pre_",group_concat(table_name),";") as statement from information_schema.tables where table_schema="pbbs" and table_name like "pre%"\G *************************** 1. row *************************** statement: drop table pw_pre_common_member_profile,pre_common_devicetoken,pre_ucenter_pm_messages_9,pre_portal_article_trash,pre_forum_statlog,pre_forum_pollvoter,pre_common_plugin,pre_common_smiley,pre_common_member_magic,pre_forum_postcomment,pre_forum_threadclass,pre_ucenter_members,pre_forum_threadlog,pre_home_share,pre_forum_attachment,pre_common_card_type,pre_common_member_validate,pre_ucenter_badwords,pre_forum_hotreply_member,pre_common_member_action_log,pre_forum_post_moderate,pre_ucenter_memberfields,pre_connect_disktask,pre_home_appcreditlog,pre_forum_faq,pre_mobile_setting,pre_common_card_log,pre_portal_topic_pic,pre_ucenter_pm_messages_2,pre_ucenter_notelist,pre_common_searchindex,pre_forum_collectionteamworker,pre_ucenter_feeds,pre_home_blog_category,pre_forum_attachment_6,pre_forum_relatedthread,pre_common_credit_log_field,pre_forum_threadmod,pre_home_pic,pre_common_credit_rule_log_field,pre_common_advertisement,pre_common_member_status,pre_forum_modwork,pre_forum_attachment_unused,pre_forum_collectionrelated,pre_home_userapp,pre_portal_topic,pre_forum_groupfield; 1 row in set (0.002 sec)执行drop语句drop table pw_pre_common_member_profile,pre_common_devicetoken,pre_ucenter_pm_messages_9,pre_portal_article_trash,pre_forum_statlog,pre_forum_pollvoter,pre_common_plugin,pre_common_smiley,pre_common_member_magic,pre_forum_postcomment;
2021年09月17日
82 阅读
0 评论
0 点赞
2021-09-17
Discuz 安装完成后,后台打开Ucenter出现404
1. Discuz 安装完成后,后台打开Ucenter出现404:这是由于Ucenter获取UC_API参数不正确请求路径出错出现404的原因。 解决方法: 进入uc_server目录,分别编辑admin.php、avatar.php、index.php 注释下面一行代码、重新定义UC_API地址。//define('UC_API', strtolower((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'].substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], '/')))); define('UC_API', 'https://domain.com/bbs/uc_server');2. Ucenter打开后空白这是由于uc_server/data没有读取模板&数据权限的原因。解决方法: 进入uc_server目录,执行chmod -R 777 data;3.后台管理面板被锁解决方法:删除pre_common_admincp_session表中对应的UIDdelete from pre_common_admincp_session where uid = 1;
2021年09月17日
98 阅读
0 评论
0 点赞
2021-09-17
Prometheus监控
一、 Prometheus安装1.1 安装环境: 二进制安装 系统环境:CentOS 7 监控系统:Prometheus 2.30 下载:https://github.com/prometheus/prometheus/releases/download/v2.30.0-rc.0/prometheus-2.30.0-rc.0.linux-amd64.tar.gz 1.2 创建安装目录mkdir -p /usr/local/prometheus下载二进制包wget https://github.com/prometheus/prometheus/releases/download/v2.30.0-rc.0/prometheus-2.30.0-rc.0.linux-amd64.tar.gz解压tar zxf prometheus-2.30.0-rc.0.linux-amd64.tar.gz mv prometheus-2.30.0-rc.0.linux-amd64/* /usr/local/prometheus1.3 检查安装环境[root@C20210910156669 prometheus]# /usr/local/prometheus/prometheus --version prometheus, version 2.30.0-rc.0 (branch: HEAD, revision: 05a816bfb739b3841acd82bd285bfb5dfec7bfd7) build user: root@438506e6c112 build date: 20210909-13:31:07 go version: go1.17 platform: linux/amd641.4 启动 Prometheus[root@C20210910156669 prometheus]# ./prometheus level=info ts=2021-09-14T04:02:42.295Z caller=main.go:400 msg="No time or size retention was set so using the default time retention" duration=15d level=info ts=2021-09-14T04:02:42.295Z caller=main.go:438 msg="Starting Prometheus" version="(version=2.30.0-rc.0, branch=HEAD, revision=05a816bfb739b3841acd82bd285bfb5dfec7bfd7)" level=info ts=2021-09-14T04:02:42.296Z caller=main.go:443 build_context="(go=go1.17, user=root@438506e6c112, date=20210909-13:31:07)" level=info ts=2021-09-14T04:02:42.296Z caller=main.go:444 host_details="(Linux 3.10.0-123.el7.x86_64 #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 C20210910156669 (none))" level=info ts=2021-09-14T04:02:42.296Z caller=main.go:445 fd_limits="(soft=65535, hard=65535)" level=info ts=2021-09-14T04:02:42.296Z caller=main.go:446 vm_limits="(soft=unlimited, hard=unlimited)" level=info ts=2021-09-14T04:02:42.302Z caller=web.go:541 component=web msg="Start listening for connections" address=0.0.0.0:9090 level=info ts=2021-09-14T04:02:42.303Z caller=main.go:822 msg="Starting TSDB ..." level=info ts=2021-09-14T04:02:42.304Z caller=tls_config.go:191 component=web msg="TLS is disabled." http2=false level=info ts=2021-09-14T04:02:42.308Z caller=head.go:466 component=tsdb msg="Replaying on-disk memory mappable chunks if any" level=info ts=2021-09-14T04:02:42.308Z caller=head.go:500 component=tsdb msg="On-disk memory mappable chunks replay completed" duration=19.586µs level=info ts=2021-09-14T04:02:42.308Z caller=head.go:506 component=tsdb msg="Replaying WAL, this may take a while" level=info ts=2021-09-14T04:02:42.310Z caller=head.go:577 component=tsdb msg="WAL segment loaded" segment=0 maxSegment=0 level=info ts=2021-09-14T04:02:42.310Z caller=head.go:583 component=tsdb msg="WAL replay completed" checkpoint_replay_duration=39.16µs wal_replay_duration=1.546855ms total_replay_duration=1.628504ms level=info ts=2021-09-14T04:02:42.312Z caller=main.go:849 fs_type=EXT4_SUPER_MAGIC level=info ts=2021-09-14T04:02:42.312Z caller=main.go:852 msg="TSDB started" level=info ts=2021-09-14T04:02:42.312Z caller=main.go:979 msg="Loading configuration file" filename=prometheus.yml level=info ts=2021-09-14T04:02:42.343Z caller=main.go:1016 msg="Completed loading of configuration file" filename=prometheus.yml totalDuration=31.086878ms db_storage=1.055µs remote_storage=17.593µs web_handler=1.1µs query_engine=1.225µs scrape=30.125909ms scrape_sd=210.09µs notify=114.766µs notify_sd=42.267µs rules=19.947µs level=info ts=2021-09-14T04:02:42.343Z caller=main.go:794 msg="Server is ready to receive web requests."1.5 Prometheus默认端口: 9090http://IP:9090
2021年09月17日
161 阅读
1 评论
0 点赞
1
...
59
60