In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how the record of lepus installation is, and the content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
Install the xampp integrated environment
[root@230_42-tiantu_monitor lepus] #. / xampp-linux-x64-5.6.24-1-installer.run
[root@230_42-tiantu_monitor lepus] # / opt/lampp/lampp start
[root@230_42-tiantu_monitor lepus] # / opt/lampp/bin/mysql-uroot-p
The initial password is empty
MariaDB [(none)] > GRANT ALL PRIVILEGES ON *. * TO 'root'@'%' IDENTIFIED BY' work123'
MariaDB [(none)] > flush privileges
Yum install-y libffi-devel python-devel openssl-devel mysql-devel libxml2 libxml2-dev
[root@230_42-tiantu_monitor lepus] # yum install-y libffi-devel python-devel openssl-devel mysql-devel libxml2 libxml2-dev libxslt* zlib openssl ncurses-devel gcc
[root@230_42-tiantu_monitor lepus] # unzip MySQL-python-1.2.5.zip
[root@230_42-tiantu_monitor lepus] # cd MySQL-python-1.2.5
[root@230_42-tiantu_monitor lepus] # python setup.py build
[root@230_42-tiantu_monitor lepus] # python setup.py install
[root@230_42-tiantu_monitor lepus] # rpm-ivh oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm
Preparing... # [100%]
1:oracle-instantclient11.### [100%]
[root@230_42-tiantu_monitor lepus] # rpm-ivh oracle-instantclient11.2-sqlplus-11.2.0.4.0-1.x86_64.rpm
Preparing... # [100%]
1:oracle-instantclient11.### [100%]
[root@230_42-tiantu_monitor lepus] # rpm-ivh oracle-instantclient11.2-devel-11.2.0.4.0-1.x86_64.rpm
Preparing... # [100%]
1:oracle-instantclient11.### [100%]
[root@230_42-tiantu_monitor lepus] # rpm-ivh oracle-instantclient11.2-tools-11.2.0.4.0-1.x86_64.rpm
Preparing... # [100%]
1:oracle-instantclient11.### [100%]
[root@230_42-tiantu_monitor] # cat ~ / .bash_profile
# .bash _ profile
# Get the aliases and functions
If [- f ~ / .bashrc]; then
. ~ / .bashrc
Fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
Export ORACLE_HOME=/usr/lib/oracle/11.2/client64
Export TNS_ADMIN=$ORACLE_HOME/network/admin
Export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:/usr/local/lib
Export TNS_ADMIN=/usr/local/oracle/oracle
Export LD_LIBRARY_PATH=$ORACLE_HOME:$LD_LIBRARY_PATH
Export PATH=$PATH:$ORACLE_HOME
Export LD_LIBRARY_PATH
Export PATH
[root@230_42-tiantu_monitor ~] # cd $ORACLE_HOME
[root@230_42-tiantu_monitor client64] # mkdir-p network/admin/
[root@230_42-tiantu_monitor client64] # vi network/admin/tnsnames.ora
[root@230_42-tiantu_monitor ~] # tar zxvf pymongo-3.3.0.tar.gz
[root@230_42-tiantu_monitor ~] # cd pymongo-3.3.0
[root@230_42-tiantu_monitor ~] # python setup.py build
[root@230_42-tiantu_monitor ~] # python setup.py install
Yum-y install mysql-devel libxml2 libxml2-dev libxslt* zlib gcc openssl
Yum install python-devel mysql-devel zlib-devel openssl-devel
Yum install ncurses-devel
System monitor and control
[root@20_52-mongodb3_test ~] # yum install net-snmp*
[root@20_52-mongodb3_test ~] # vi / etc/snmp/snmpd.conf
40 # sec.name source community
41 com2sec notConfigUser 192.168.20.136 lepus
61 # group context sec.model sec.level prefix read write notif
62 access notConfigGroup "" any noauth exact all none none
84 # # incl/excl subtree mask
85 view all included. 1 80
[root@localhost ~] # vi / etc/init.d/snmpd
# OPTIONS= "- LS0-6d-Lf / dev/null-p / var/run/snmpd.pid"
OPTIONS= "- LS 4 d-p / var/run/snmpd.pid-a"
[root@localhost ~] # service snmpd restart
Slow SQL monitoring
Client configuration
Post-installation toolkit
Rpm-ivh MySQL-shared-compat-5.6.32-1.el6.x86_64.rpm
Yum-y install perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker
Yum-y install perl-IO-Socket-SSL install perl-DBI perl-DBD-MySQL perl-Time-HiRes perl-IO-Socket-SSL
Tar zxvf percona-toolkit_2.2.15-2.tar.gz
Cd percona-toolkit-2.2.15/
Perl Makefile.PL
Make
Make install
# MySQL slow query
* / 5 * / opt/scripts/mysql/slow_query.sh
#! / bin/bash
# *
# ScriptName: / usr/local/sbin/lepus_slowquery.sh
# Create Date: 2014-03-25 10:01
# Modify Date: 2014-03-25 10:01
# *
# config lepus database server
Lepus_db_host= "l192.168.1.1"
Lepus_db_port=3306
Lepus_db_user= "root"
Lepus_db_password= "test"
Lepus_db_database= "lepus"
# config mysql server
Mysql_client= "/ usr/local/mysql/bin/mysql"
Mysql_host= "127.0.0.1"
Mysql_port=3306
Mysql_user= "root"
Mysql_password= "test"
# config slowqury
Slowquery_dir= "/ mysqldb/mysql/log/"
Slowquery_long_time=5
Slowquery_file= `$ mysql_client-h$mysql_host-P$mysql_port-u$mysql_user-p$mysql_password-e "show variables like 'slow_query_log_file'" | grep log | awk' {print $2}'`
Pt_query_digest= "/ usr/local/bin/pt-query-digest"
# config server_id
Lepus_server_id=286
# collect mysql slowquery log into lepus database
$pt_query_digest-- user=$lepus_db_user-- password=$lepus_db_password-- port=$lepus_db_port-- review hobbylepuspuspushdbroomhost database-- history hobbllepushdbroomhost database-- history hobbies pushroom database T=mysql_slow_query_review_history-no-report-limit=100%-filter= "\ $event- > {add_column} = length (\ $event- > {arg}) and\ $event- > {serverid} = $lepus_server_id" $slowquery_file > / tmp/lepus_slowquery.log
# set a new slow query log #
Tmp_log= `$ mysql_client-h$mysql_host-P$mysql_port-u$mysql_user-p$mysql_password-e "select concat ('$slowquery_dir','slowquery_',date_format (now (),'% Y% m% d'), '.log');" | grep log | sed-n-e '2p' `
# config mysql slowquery
$mysql_client-h$mysql_host-P$mysql_port-u$mysql_user-p$mysql_password-e "set global slow_query_log=1;set global long_query_time=$slowquery_long_time;"
$mysql_client-h$mysql_host-P$mysql_port-u$mysql_user-p$mysql_password-e "set global slow_query_log_file ='$tmp_log';"
# delete log before 7 days
Cd $slowquery_dir
/ usr/bin/find. /-name 'slowquery_*'-mtime + 7 | xargs rm-rf
How the record of lepus installation is shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.