ȦȦԲԲȦȦ / zh-CN Just So So ... Fri, 19 Feb 2021 15:45:00 +0800 Fri, 19 Feb 2021 15:45:00 +0800 zabbix֮MySQL /index.php/archives/22/ /index.php/archives/22/ Fri, 19 Feb 2021 15:45:00 +0800 admin zabbixͨperconamysql

percona zabbix mysql-pluginperconaһʹzabbixmysqlݿĹߣ߱zabbixԴļģҪǿĶ࣬ϾperconaMysqlһҪ֧רҵݿģԣɼݱȽȫ档percona Monitoring PluginsһΪMySQLݿҵļغͼܡűʹPHPʵ֣ʶZabbix-AgentҪװphp

1.1 װphp php-mysql

[root@zabbix ~]#  yum install php php-mysql -y 

1.2 ذװpercona-zabbix-templates

[root@zabbix ~]#  rpm -ivh https://www.percona.com/downloads/percona-monitoring-plugins/percona-monitoring-plugins-1.1.8/binary/redhat/7/x86_64/percona-zabbix-templates-1.1.8-1.noarch.rpm 

##װɻʾűģλ 
Scripts are installed to /var/lib/zabbix/percona/scripts 
Templates are installed to /var/lib/zabbix/percona/templates 

űĿ¼´ŵĽűڻȡݿϢ

[root@zabbix ~]#  pwd 
/var/lib/zabbix/percona/scripts 
[root@zabbix scripts]# ls 
get_mysql_stats_wrapper.sh ss_get_mysql_stats.php 

1.3 ޸get_mysql_stats_wrapper.sh

[root@zabbbix scripts]# vim get_mysql_stats_wrapper.sh 
19 RES=`HOME=~zabbix mysql -uroot -p123456 -e 'SHOW SLAVE STATUS\G' | egrep '(Slave_IO_Running|Slave _SQL_Running):' | awk -F: '{print $2}' | tr '\n' ','`    #19мݿû 

1.4 ޸ss_get_mysql_stats.php

[root@zabbix scripts]# vim ss_get_mysql_stats.php 
30 $mysql_user = 'root';        #3031޸Ϊݿû 
31 $mysql_pass = '123456'; 
  • Զļ/etc/zabbix/zabbix_agentd.d/Ŀ¼
[root@zabbix scripts]# cp userparameter_percona_mysql.conf /etc/zabbix/zabbix_agentd.d/ 
[root@zabbix scripts]# ls /etc/zabbix/zabbix_agentd.d/ 
userparameter_mysql.conf userparameter_percona_mysql.conf 

ļԶ˺ܶkey

1.5 zabbix agent

[root@zabbix scripts]# systemctl restart zabbix-agent.service 

zabbix serverвԻȡijkeyֵ

[root@server ~]# zabbix_get -s 192.168.1.51 -k MySQL.Sort-scan 
23 
[root@server ~]# ls /tmp/        #ȡֵɹ/tmp/Ŀ¼һ־ļ 
localhost-mysql_cacti_stats.txt systemd-private-c570caeba5d44f268cad220a4ab53d7f-mariadb.service-lgHRlT
]]>
0 /index.php/archives/22/#comments /index.php/feed/archives/22/
shellƪ01 /index.php/archives/21/ /index.php/archives/21/ Fri, 19 Feb 2021 13:36:05 +0800 admin һShellʲô
shellǵ˼DzϵͳǡǿͨshellͿƲϵͳLinuxеShellͰlscdpwdȵȡܽ˵ShellһͨûShellֹͣͣлԼпơ

ʲôShellű

űShellɵļЩǿִг֣űñ뼴СͨУٶ˵Ƚ

õShell

Shell shbashcshtcshash ȡ

  • sh
    shUNIXϵı׼Shell,shǵһеShell
  • bash
    bash shell Linux Ĭ shell
  • csh
    cshɰؿѧBill JoyƵģShell﷨еCԣԲŵΪ C shell Ϊ csh
  • tcsh
    tcshcshǿ棬ȫcshcshȫܣб༭ƴдУɱַʷ¼ҵƵȹܣԼCԷ﷨ṹ
  • ash
    һ򵥵ShellռԴ٣ʺڵڴ滷

ġ鿴LinuxϵͳShell

dashbash֣dashûbashȫ棬ͨʹbash
ͨ鿴ϵͳеĽű ll /bin/*sh

[root@mongo-test ~]# ll  /bin/*sh
-rwxr-xr-x. 1 root root 964600 8   8 2019 /bin/bash
-rws--x--x  1 root root  23880 4   1 2020 /bin/chsh
-rwxr-xr-x. 1 root root   4629 8   3 2017 /bin/gettext.sh
-rwxr-xr-x  1 root root   4247 6  10 2014 /bin/instmodsh
lrwxrwxrwx  1 root root     10 7  13 2020 /bin/ipmish -> openipmish
-rwxr-xr-x  1 root root    444 12 28 2013 /bin/javacc.sh
-rwxr-xr-x. 1 root root  15864 4  13 2018 /bin/lchsh
-rwxr-xr-x. 1 root root   2291 7  31 2015 /bin/lesspipe.sh
-rwxr-xr-x  1 root root  33024 8   9 2019 /bin/openipmish
-rwxr-xr-x  1 root root  18652 6  10 2014 /bin/ptksh
-rwxr-xr-x. 1 root root  34620 8   9 2019 /bin/rescan-scsi-bus.sh
-rwxr-xr-x. 1 root root   1539 8  12 2019 /bin/setup-nsssysinit.sh
lrwxrwxrwx. 1 root root      4 3  12 2020 /bin/sh -> bash
-rwxr-xr-x. 1 root root 774568 8   9 2019 /bin/ssh

## 鿴ǰϵͳĬShell
[root@mongo-test ~]# echo $SHELL
/bin/bash
#ǰĬShellΪbash

塢shellűܸɶ

ظԡԹٹϵļʡ

]]>
0 /index.php/archives/21/#comments /index.php/feed/archives/21/
<<>>Ѧ֮ǫ /index.php/archives/20/ /index.php/archives/20/ Mon, 04 Jan 2021 14:40:00 +0800 admin [hplayer media="tencent" id="Array" type="" size="large" auto="false" /]

<<>>

峿·
˭
ҹ
˭
ϵƾ
ղضټǿ
ȫ
Ǵ
֪һ
ҪҪ
֪һ˺

Ӱ뿪
ʲôֵøп
羰Ѷ
˭





峿·
˭
ҹ
˭
ϵƾ
ղضټǿ
ȫ
Ǵ
֪һ
ҪҪ
֪һ˺

Ӱ뿪
ʲôֵøп
羰Ѷ
˭
֪һ
ҪҪ
֪һ˺

Ӱ뿪
ʲôֵøп
羰Ѷ
˭
˭

]]>
0 /index.php/archives/20/#comments /index.php/feed/archives/20/
۶¼֮-zabbixø澯ý鱨mediaidظ /index.php/archives/19/ /index.php/archives/19/ Mon, 21 Dec 2020 15:43:00 +0800 admin
  • ֱӿƪð
  • zabbixһʱӱýͺռϢ󱣴汨޸֮ǰûıýҲһı

    һ

    • ݣ

    Error in query [INSERT INTO media (userid,mediatypeid,sendto,active,severity,period,mediaid) VALUES ('7','4','18888888888','0','63','1-7,00:00-24:00','183')] [Duplicate entry '183' for key 'PRIMARY']
    SQLʽִʧ: "INSERT INTO media (userid,mediatypeid,sendto,active,severity,period,mediaid) VALUES ('7','4','18888888888','0','63','1-7,00:00-24:00','183')".

    • ͼ

    Ӻ󱨴

    ˼⣬ٶҲȲʲôdeleteֲȡֻݿ鿴

    mysql> use zabbix
    select *  from media where mediaid=183;
    +---------+--------+-------------+-------------+--------+----------+-----------------+
    | mediaid | userid | mediatypeid | sendto      | active | severity | period          |
    +---------+--------+-------------+-------------+--------+----------+-----------------+
    |     183 |    178 |           5 | 13333333333 |      0 |       63 | 1-7,00:00-24:00 |
    +---------+--------+-------------+-------------+--------+----------+-----------------+
    

    һ뵽ҲĽ

    1. ȻDZmediaid=183ˣ˳ useridҵӦûıýɾ´a.Dz⣬ûȨ޶b.ȷ᲻ֱmediaidظϾܾ
    2. ֱݿݣָmediaidֻҪеظСα겻α
     mysql> INSERT INTO media (userid,mediatypeid,sendto,active,severity,period,mediaid) VALUES ('7','13','18888888888','0','63','1-7,00:00-24:00','288');
    ]]>
    0 /index.php/archives/19/#comments /index.php/feed/archives/19/
    1. python͵÷ /index.php/archives/18/ /index.php/archives/18/ Fri, 13 Nov 2020 18:09:47 +0800 admin һַ
    • ȡֵ
    >>> str = 'hello word!'
    >>> print (str[6])
    w
    >>> print (str[0])
    h
    >>> print (str[10])
    !
    • Ƭ
    >>> print (str[0:6])
    hello 
    >>> print (str[0:9])
    hello wor
    >>> print (str[4:9])
    o wor
    • len
    >>> print (len(str))
    11
    >>> 
    • Աin | not in
    >>> print ('he' in str)
    True
    >>> print ('he' not in str)
    False
    >>> print ('ho' not in str)
    True
    >>> print ('ho'  in str)
    False
    >>> print ('hh'  in str)
    False
    • Ƴstrip

    stripƳַͷβַָУƳո

    >>> str = 'hello word!'
    >>> print(str.strip())
    hello word!
    >>> text = '  pig  '
    >>> print(text.strip())
    pig
    >>> text = '  pig'
    >>> print(text.strip())
    pig
    >>> text = '***pig*****'
    >>> print(text.strip('*'))
    pig
    >>> 
    • зsplit
    >>> print(text.split(','))
    ['aaa', 'bbb:cdcd!']
    >>> 
    ]]>
    0 /index.php/archives/18/#comments /index.php/feed/archives/18/
    zabbix 4.XOracleorabbix /index.php/archives/17/ /index.php/archives/17/ Thu, 29 Oct 2020 12:06:00 +0800 admin һorabbix1.2.3
    Orabbix һ Oracle ݿʵ Zabbix ,zabbix4汾Уorabbix1.2.3֧֣Ҳṩ˽
    ӣhttps://github.com/snickerjp/orabbix
    orabbix1.2.3صַhttps: //sourceforge.net/projects/orabbix/

    jkd1.8װ

    ##1. ѹ
    # tar zvxf jdk1.8.tar.gz -C /data
    # mv /data/jdk1.8.0_171/ /data/jdk1.8
    ##2. ӻ
    # vim /etc/profile.d/java.sh
    export JAVA_HOME=/data/jdk1.8
    export JRE_HOME=/data/jdk1.8/jre
    export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
    export CLASSPATH=./:$JAVA_HOME/lib:$JRE_HOME/lib
    ##3. Ч
    # source /etc/profile.d/java.sh
    # java -version
    # javac -version
    

    װorabbix

    3.1װ

    # mkdir /data/orabbix
    # cd /data/orabbix
    # git clone https://github.com/snickerjp/orabbix.git
    
    ##1.ѹorabbix-1.2.3.zip
    # unzip /data/orabbix/orabbix-1.2.3.zip
    ##
    # javac -cp "orabbix/orabbix-1.2.3.jar:orabbix/lib/* " com/smartmarmot/orabbix/Sender.java
    # mkdir build
    # cd build
    # jar -xvf orabbix-1.2.3.jar com
    # cp ../com/smartmarmot/orabbix/Sender.class com/smartmarmot/orabbix/Sender.class
    ##ѡ񸲸
    # jar -uf orabbix-1.2.3.jar com

    3.2config.props

    # cp /data/orabbix/conf/config.props.sample /data/orabbix/conf/config.props
    # cd /data/orabbix/conf
    # vim config.props
    ZabbixServerList=ZabbixServer
    
    ZabbixServer.Address=zabbix ip
    ZabbixServer.Port=10051
    
    #pidFile
    OrabbixDaemon.PidFile=./logs/orabbix.pid
    #frequency of item's refresh
    OrabbixDaemon.Sleep=300
    #MaxThreadNumber should be >= than the number of your databases
    OrabbixDaemon.MaxThreadNumber=100
    
    #put here your databases in a comma separated list
    DatabaseList=192.168.1.138,192.168.1.133,192.168.1.135,192.168.1.122,192.168.1.142
    DatabaseList.MaxActive=10
    #The maximum number of milliseconds that the pool will wait
    #(when there are no available connections) for a connection to be returned
    #before throwing an exception, or <= 0 to wait indefinitely.
    DatabaseList.MaxWait=100
    DatabaseList.MaxIdle=1
    
    #define here your connection string for each database
    192.168.1.138.Url=jdbc:oracle:thin:@192.168.1.138:1521:PROD
    192.168.1.138.User=zabbix
    192.168.1.138.Password=zabbix
    ....
    ip.Url=jdbc:oracle:thin:@10.78.1.33:1521:BIP
    ip.User=zabbix
    ip.Password=zabbix
    ....
    192.168.1.142.Url=jdbc:oracle:thin:@192.168.1.142:1521:SBD
    192.168.1.142.User=zabbix
    192.168.1.142.Password=zabbix
    
    ###orabbix
    # chmod +x /data/orabbix/run.sh
    # sh /data/orabbix/run.sh
    #  ps -ef|grep orabbix
    root      46977  42534  0 14:01 pts/1    00:00:00 grep --color=auto orabbix
    root     115288      1  0 Oct28 ?        00:01:37 java -Duser.language=en -Duser.country=US -Dlog4j.configuration=./conf/log4j.properties -cp lib/commons-codec-1.4.jar:lib/commons-dbcp-1.4.jar:lib/commons-lang-2.5.jar:lib/commons-logging-1.1.1.jar:lib/commons-pool-1.5.4.jar:lib/hsqldb.jar:lib/log4j-1.2.15.jar:lib/ojdbc6.jar:.:./orabbix-1.2.3.jar com.smartmarmot.orabbix.bootstrap start ./conf/config.props
    
    DatabaseListָDZطƣҪzabbix serverеĻƱһ£ļкõ趨ԸΪ׼

    DB1.Url=jdbc:oracle:thin:@ 192.168.1.121:1521:powerdesָDZطϢjdbcӷʽַ192.168.1.121oracleĶ˿1521powerdesָݿʵƣ

    ġoracleʺţӦȨ

    ʹõoracle 11gACLķʿƣڼصĹв޷ʾ

    SQL> exec dbms_network_acl_admin.create_acl(acl => 'resolve.xml',description=> 'resolve acl', principal =>'ZABBIX', is_grant => true, privilege => 'resolve'); 
    PL/SQLprocedure successfully completed. 
    SQL> exec dbms_network_acl_admin.assign_acl(acl => 'resolve.xml', host =>'*'); 
    PL/SQLprocedure successfully completed. 
    SQL> commit; 
    Commit complete. 

    塢zabbixҳ浼ģ壬Ӧ

    5.1ģ

    wget www.hejingping.cn/1/zbx_orabbix_templates.xml

    5.2ģ

    ģ

    5.3ģ

    5.4鿴

    Oracleռ

    • Oracleϲ
      6.1 лOracleûӽű
    # cat /home/oracle/bin/check_tablespace.sh
    #!/bin/bash
    # tablespace usagep check
    source ~/.bash_profile
    function check {
    sqlplus -S "system/Oracle202012345" <<  EOF
    set linesize 200
    set pagesize 300
    spool /tmp/ora_tablespace.txt
    select a.tablespace_name,a.msize allocate_g,b.msize used_m ,a.msize-b.msize free_m
      from
         (select tablespace_name,round(sum(maxbytes)/1024/1024/1024,2) mSize
           from (
                select tablespace_name,decode(maxbytes,0,bytes,maxbytes) maxbytes
                   from dba_data_files
           )
              group by tablespace_name
         ) a left join
         (select tablespace_name, round(sum(bytes)/1024/1024/1024,2) mSize
           from dba_segments
              group by tablespace_name
         ) b on a.tablespace_name=b.tablespace_name
         where a.tablespace_name not in ('SYSAUX','SYSTEM','UNDOTBS1','PSAPSR3USR','PSAPUNDO','CAMPAIGN_OP','DM')
          order by 1,4 desc;
    spool off
    set linesize 100
    set pagesize 100
    spool /tmp/ora_autex.txt
    select tablespace_name,autoextensible from dba_data_files;
    spool off
    quit
    EOF
    };check &>/dev/null
    

    ѯռ䣺
    Խű޸ģOracleû룬Աй

    • Ӷʱ
    crontab -u oracle Cl
    */5 * * * * /home/oracle/bin/check_tablespace.sh
    • װagentԶ̽űȨ

    ޸agentļ
    ű·Include=·Ҫ/rootĿ¼£
    ȨޣUnsafeUserParameters=1
    ؽű·ڲִȨ

    ƣ discovery_oracle_tablespace.sh

    # cat discovery_oracle_tablespace.sh
    #!/bin/bash
    #zabbix discovery oracle tablespace
    table_spaces=(`cat /tmp/ora_tablespace.txt | sed -e "1,3d" -e "/^$/d" -e "/selected/d" | awk '{print $1}'`)
    length=${#table_spaces[@]}
    printf "{\n"
    printf '\t'"\"data\":["
    for ((i=0;i<$length;i++))
    do
        printf "\n\t\t{"
        printf "\"{#TABLESPACE_NAME}\":\"${table_spaces[$i]}\"}"
        if [ $i -lt $[$length-1] ];then
            printf ","
        fi
    done
        printf "\n\t]\n"
    printf "}\n" 
    
    # chmod +x discovery_oracle_tablespace.sh

    ռ䣺 check_tablespace.sh

    # cat check_tablespace.sh
    #!/bin/bash
    # oracle tablespace check
    CHECK_TYPE=$1
    TABLESPACE_NAME=$2
      
    function ALL {
        grep "\b$TABLESPACE_NAME\b" /tmp/ora_tablespace.txt | awk '{print $2}'|sed '$s/%$//'
    }
    function USED {
        grep "\b$TABLESPACE_NAME\b" /tmp/ora_tablespace.txt | awk '{print $3}'|sed '$s/M$//'
    }
    function FREE {
        grep "\b$TABLESPACE_NAME\b" /tmp/ora_tablespace.txt | awk '{print $4}'|sed '$s/M$//'
    }
    case $CHECK_TYPE in
        all)
            ALL ;;
        used)
            USED ;;
        free)
            FREE ;;
        *)
            echo -e "Usage: $0 [all|used|free] [TABLESPACE_NAME]"
    esac
    
    # chmod +x check_tablespace.sh

    űļsql_tablespace.conf

    cat sql_tablespace.conf
    UserParameter=discovery.oracle.tablespace[*],/etc/zabbix/scripts/discovery_oracle_tablespace.sh
    UserParameter=tablespace.check[*],/etc/zabbix/scripts/tablespace_check.sh $1 $2
    UserParameter=sql.log[*],cat /tmp/sql_log.txt | tr -cd "[0-9]"

    zabbix agent

    ؽزģ
    oracle_ռ

    ]]>
    1 /index.php/archives/17/#comments /index.php/feed/archives/17/
    FortClientVPN /index.php/archives/16/ /index.php/archives/16/ Wed, 02 Sep 2020 17:13:26 +0800 admin
    ǰ֪ʲôvpnһֱ
    Failed to establish the VPN connection. This may be caused by a mismatch in the TLS version. Please check the TLS version settings in the Advanced of the Internet options. (-5029)


    򿪵----һInternet

    ]]>
    2 /index.php/archives/16/#comments /index.php/feed/archives/16/
    Linux°װPython3.6 /index.php/archives/15/ /index.php/archives/15/ Thu, 27 Aug 2020 10:23:00 +0800 admin
  • ǰԣ
    Ϊװpython̫Ƶÿζʶƣʱܰٶȣֻóиʱ¼һ£´βҡ
  • Դpython2Ҫֱ2323пܵһЩĿǰpython2ķ쳣Ӱ졣

    װpython3.6

    1.

    yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel

    2.°װ


    https://www.python.org/downloads/

    #ذ
    cd /opt
     wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz
    ##ûwgetֱ yum install -y wget
    
    mkdir -p /usr/local/python3
    #Ŀ¼
    tar xf Python-3.6.1.tgz 
    #ѹ
     cd Python-3.6.1
    ./configure --prefix=/usr/local/python3
     make && make install
    #밲װ
    ln -s /usr/local/python3/bin/python3 /usr/bin/python3
    #
    vim /etc/profile
    export PATH=$PATH:/usr/local/python3/bin
    source /etc/profile
    #ûsourceʹЧ
    Python-3.6.1]# python3 -V
    Python 3.6.1
    Python-3.6.1]# pip3 -V
    pip 9.0.1 from /usr/local/python3/lib/python3.6/site-packages (python 3.6)
    #鰲װǷɹ
    ##pip3 -VҲԳԴһpip3ӣ
    ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3
    

    ./configure --prefix=/usr/local/python3

    checking for --without-gcc... no
    checking for --with-icc... no
    checking for gcc... no
    checking for cc... no
    checking for cl.exe... no
    configure: error: in `/usr/local/Python-3.6.1':
    configure: error: no acceptable C compiler found in $PATH
    See `config.log' for more detail
    yum -y install gcc

    Python3밲װsslģ
    ӣhttps://www.cnblogs.com/Caiyundo/p/9469711.html

    ]]>
    0 /index.php/archives/15/#comments /index.php/feed/archives/15/
    php7.27.3汾 /index.php/archives/14/ /index.php/archives/14/ Fri, 14 Aug 2020 17:00:00 +0800 admin 1.ͣ

    systemctl stop php-fpm
    

    2.ԭphp7.2,php7.3

    cd /data
    wget https://www.php.net/distributions/php-7.3.7.tar.gz
    tar -czf phpbak7.2.gz php

    3.ѹ

     tar xf php-7.3.7.tar.gz

    4.밲װ
    ǰıϴΰװûmake cleanĻԲ鿴 config.nice

    ./configure --prefix=/data/php --with-curl --with-freetype-dir --with-gd --with-gettext --with-ldap--with-iconv-dir --with-kerberos --with-libdir=lib64 --with-libxml-dir --with-mysqli --with-openssl --with-pcre-regex --with-pdo-mysql --with-pdo-sqlite --with-pear --with-png-dir --with-jpeg-dir --with-xmlrpc  --with-xsl --with-zlib --with-bz2  --with-mhash --enable-fpm --enable-bcmath --enable-libxml --enable-inline-optimization --enable-gd-native-ttf --enable-mbregex --enable-mbstring --enable-opcache --enable-pcntl --enable-shmop --enable-soap --enable-sockets --enable-sysvsem --enable-sysvshm --enable-xml --enable-zip
    • 1
    checking for pkg-config... (cached) /usr/bin/pkg-config
    checking for libzip... not found
    configure: error: Please reinstall the libzip distribution

    libzip İ汾̫ͣ libzip 汾

     wget https://libzip.org/download/libzip-1.3.2.tar.gz
     tar xf libzip-1.3.2.tar.gz 
     cd libzip-1.3.2/ 
     ./configure 
    make && make install

    ִ

    ./configure --pr
    • 2
    configure: error: off_t undefined; check your library configuration

    vim /etc/ld.so.conf 
    #¼
    /usr/local/lib64
    /usr/local/lib
    /usr/lib
    /usr/lib64 
    
    #˳
    
    ldconfig -v # ʹ֮Ч

    ִ

    ./configure --pr
    
    make && make install

    5.php

    systemctl start php-fpm
    ]]>
    0 /index.php/archives/14/#comments /index.php/feed/archives/14/
    zabbix4.4zabbix5.0밲װʽ /index.php/archives/13/ /index.php/archives/13/ Fri, 14 Aug 2020 15:57:00 +0800 admin һzabbix4.4zabbix5.0밲װʽ

    עõı밲װʽLNMPܹ

    ¿

    mysqldump -uroot -p zabbix -p1333> /root/zabbix.sql

    һ£ⱸ˿յ

    ll /root/zabbix.sql
    -rw-r--r-- 1 root root 3704002 8  14 14:52 /root/zabbix.sql

    °

    ѹӦĿ¼ҵdata
    ݾɵzabbixĿ¼

    tar -czf /opt/zabbix4.4.bak zabbix

    밲װǰı뷽ʽ

    ./configure --prefix=/data/zabbix/ --enable-server --enable-agent --enable-ipv6 --with-mysql=/usr/bin/mysql_config --with-net-snmp --with-libcurl --with-libxml2  --with-openipmi --with-ldap --with-ssh2 --enable-java --with-unixodbc
    
    make && make install

    µZABBIX-SERVER鿴־

    ./sbin/zabbix_server -c ./etc/zabbix_server.conf
    tailf /tmp/zabbix_server.log

    #tailf /tmp/zabbix_server.log
    1252:20200811:160002.502 [Z3005] query failed: [1050] Unknown error 1050 [create table task_data (
    `taskid` bigint unsigned not null,
    `type` integer default '0' not null,
    `data` text not null,
    `parent_taskid` bigint unsigned not null,
    primary key (taskid)
    ) engine=innodb]
     11252:20200811:160002.502 database upgrade failed

    ݿֱdropӦı

    drop table task_data;
    #ɾ
    mysql> drop table lld_override;
    ERROR 1217 (23000):

    ȡԼɾ

    mysql> set FOREIGN_KEY_CHECKS = 0;
    Query OK, 0 rows affected (0.00 sec) 
    
    mysql> drop table lld_override;
    Query OK, 0 rows affected (0.01 sec)
    ǵٸĻ
    mysql> set FOREIGN_KEY_CHECKS = 1;
    Query OK, 0 rows affected (0.00 sec)

    ǰ

    ǰǰ˰

    mv zabbix/ zab4.4
    cp /data/zabbix-5.0.2/ui/*  /data/nginx/html/zabbix/ -rf
    cd /data/nginx/html/zabbix/conf
    cp -a zabbix.conf.php.example zabbix.conf.php
    vim zabbix.conf.php

    ޸ij֮ǰü
    ˾

    ]]>
    0 /index.php/archives/13/#comments /index.php/feed/archives/13/