In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
I. brief introduction
Lepus installation needs Lamp environment, Lamp environment installation personal think is more difficult, XAMPP one-click deployment of LAMP environment is easy and easy, lepus official website manual also recommends the use of XAMPP installation, lepus is also developed on XAMPP, see the official website installation manual, read for a long time did not succeed, after many days of hard work, and finally achieve lepus fast, lightweight deployment
Note: xampp installs all apache,mysql,php, so install it in a clean environment to avoid conflict between the two mysql installations.
Environment:
Master01:172.160.20.122---- monitored computer slave1:172.160.20.126-monitoring machine
Second, build the LNMP environment (part 126)
Install XAMPP
Download address: https://www.apachefriends.org/download.html
Note to the version:
Upload to service, authorize
# chmod + x xampp-linux-x64-7.3.0-0-installer.run
# installation
#. / xampp-linux-x64-7.3.0-0-installer.run
# start
# / opt/lampp/lampp start
# netstat-tnlp | grep-E "3306 | 21 | 80"
# configure environment variables
# vim / etc/profile
Export PATH=$PATH:/opt/lampp/bin/
Export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/lampp/lib
# effective order
# source / etc/profile
Turn off mysql network security mode
# vim / opt/lampp/etc/my.cnf
# skip-networking
Set the password:
# / opt/lampp/lampp security
Setting a password will use this password to protect the XAMPP demo page (http:// localhost / xampp /). The user name is' xamppence!
After running this command, your XAMPP installation should be more secure.
Restart the service
# / opt/lampp/lampp restart
3. Install Lepus (on 126)
Download the MySQLdb-python.zip file, which is necessary to monitor mysql after lepus installation.
# decompression
# unzip MySQL-python-1.2.5.zip
# cd MySQL-python-1.2.5/
# python setup.py build
The error is as follows:
Solution:
Yum install mysql-devel
Yum install gcc libffi-devel python-devel openssl-devel
# modify the file
# vim site.cfg
Mysql_config = / usr/bin/mysql_config
# re-execute
# python setup.py build
# python setup.py install
4. Lepus installation collector (download from lepus official website)
Download address: http://www.lepus.cc/soft/17
1. Decompression
# unzip Lepus3.7.zip
2. Create databases and users
> use mysql
> create database lepus default character set utf8
> grant select,insert,update,delete,create on lepus.* to 'lepus'@'%' identified by' 123456'
> flush privileges
3. Import the database
# mysql-uroot-p lepus
< sql/lepus_table.sql # mysql -uroot -p lepus < sql/lepus_data.sql 4、设置数据库 >Use lepus
> alter table mysql_status modify column max_connect_errors bigint (18)
> alter table mysql_status_history modify column max_connect_errors bigint (18)
5. Create the account password of the monitored database
Omit
6. Lepus configuration
# cd python/
# chmod + x install.sh
#. / install.sh
Modify the configuration file
# vim / usr/local/lepus/etc/config.ini
# MySQL database connection address of monitor computer #
[monitor_server]
Host= "172.160.20.126"
Port=3306
User= "lepus"
Passwd= "123456"
Dbname= "lepus"
[root@slave1 lepus_v3.7] # cp-r php/* / opt/lampp/htdocs/
# modify database user links
# vim / opt/lampp/htdocs/application/config/database.php
$db ['default'] [' hostname'] = '172.160.20.126'
$db ['default'] [' port'] = '3306'
$db ['default'] [' username'] = 'lepus'
$db ['default'] [' password'] = '123456'
$db ['default'] [' database'] = 'lepus'
$db ['default'] [' dbdriver'] = 'mysql'
# start lepus
# cd / usr/local/lepus/
# lepus start
7. Modify the virtual host
# vim / opt/lampp/etc/extra/httpd-vhosts.conf
AddDefaultCharset UTF-8
DocumentRoot "/ opt/lampp/htdocs"
ServerName www.jiangjj.com
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from All
ErrorLog "| / usr/local/apache/bin/rotatelogs / home/logs/apache/php_%Y%m%d_error.log86400 480"
CustomLog "| / usr/local/apache/bin/rotatelogs / home/logs/apache/php_%Y%m%d_access.log86400 480" common
8. Visit http://www.jiangjj.com
Default administrator account password after logging in with admin/Lepusadmin, please change the administrator password and add an ordinary account.
An error was reported in the interview, as follows:
Solution:
Reference address: http://blog.itpub.net/15498/viewspace-2134612/?tdsourcetag=s_pcqq_aiomsg
The first modification:
# vim / opt/lampp/htdocs/system/core/Common.php
# 257 lines
# return $_ config [0] = & $config
$_ config [0] = & $config; return $_ config [0]
The second amendment:
# vim / opt/lampp/htdocs/application/config/database.php
$db ['default'] [' dbdriver'] = 'mysqli'
The third point:
# vim / opt/lampp/htdocs/application/libraries/Layout.php
# function Layout ($layout = "layout_main")
Function _ _ construct ($layout = "layout_main")
Download MySQL-python
It is necessary to monitor mysql after lepus installation
Download address: https://pypi.org/project/MySQL-python/
Download address: https://pypi.org/project/setuptools/
After adding the mysql host, the image reported an error
-- unable to view graphics in MySQL replication monitoring
Vi / opt/lampp/htdocs/application/controllers/lp_mysql.php
Line 337, remove 'mysql/replication',' and change it to parent::check_privilege ()
Originally parent::check_privilege ('mysql/replication')
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.