lepus(天兔安装教程)

1、官网教程

http://www.lepus.cc/

http://suifu.blog.51cto.com/9167728/1770493


2、安装教程

[root@localhost ~]# yum install python-devel mysql-devel zlib-devel openssl openssl-devel

[root@localhost ~]# yum install php.x86_64  -y
[root@localhost /]# yum install python.x86_64  -y


[root@localhost lepus]# yum install php.x86_64

[root@localhost /]# python -V
Python 2.7.1


[root@localhost /]# php -v
PHP 5.3.3 (cli) (built: Aug 11 2016 20:33:53) 
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies


3、安装Mysql

请参考:

http://blog.csdn.net/xfg0218/article/details/51244068


[root@localhost /]# mysql -V
mysql  Ver 14.14 Distrib 5.6.34, for Linux (x86_64) using  EditLine wrapper


4、软件下载


链接:http://pan.baidu.com/s/1sldCOnN 密码:wy41


MySQL 模块下载:

[root@localhost local]# mkdir newlepus

[root@localhost newlepus]# wget http://cdn.lepus.cc/cdncache/software/MySQLdb-python.zip

[root@localhost newlepus]# unzip MySQLdb-python.zip

[root@localhost newlepus]# cd MySQLdb1-master/

[root@localhost MySQLdb1-master]# yum install mysql-devel

[root@localhost MySQLdb1-master]# which mysql_config
/usr/bin/mysql_config

[root@localhost MySQLdb1-master]# vi site.cfg

修改下面的配置:

mysql_config =/usr/bin/mysql_config


[root@localhost MySQLdb1-master]# yum install gcc libffi-devel python-devel openssl-devel

[root@localhost MySQLdb1-master]# python setup.py install


Redis模块下载:

[root@localhost newlepus]# wget http://cdn.lepus.cc/cdncache/software/redis-py-2.10.3.tar.gz

[root@localhost newlepus]#  tar zxvf redis-py-2.10.3.tar.gz

[root@localhost redis-2.10.3]# python setup.py install


Mongodb 模块下载:

[root@localhost newlepus]# wget http://cdn.lepus.cc/cdncache/software/pymongo-2.7.tar.gz

[root@localhost newlepus]# tar zxvf pymongo-2.7.tar.gz 

[root@localhost newlepus]# cd pymongo-2.7

[root@localhost pymongo-2.7]# python setup.py install



5、安装lepus

软件请去百度链接地址下载,往上爬。


[root@localhost newlepus]# unzip lepus.zip 

[root@localhost newlepus]# cd lepus_v3.7/

[root@localhost python]# chmod a+x *.py  *.sh

[root@localhost python]# python test_driver_redis.py 
Redis python drivier is ok!


[root@localhost python]# python test_driver_mongodb.py 
MongoDB python drivier is ok!


[root@localhost python]# python test_driver_mysql.py 
MySQL python drivier is ok!


6、在mysql中创建数据库

[root@localhost python]# mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.6.34 MySQL Community Server (GPL)


Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.


Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.


Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


mysql> insert into mysql.user(Host,User,Password,ssl_cipher,x509_issuer,x509_subject) values('localhost','lepus',password('lepus'),'BLOB','BLOB','BLOB');

Query OK, 1 row affected (0.00 sec)

 

mysql> flush privileges;

Query OK, 0 rows affected (0.00 sec)


mysql> create database lepus default character set utf8;

mysql >grant select,insert,update,delete,create on lepus.* to 'lepus_user'@'localhost' identified by 'lepus';

mysql> flush privileges;


[root@localhost lepus_v3.7]# mysql -ulepus -p lepus < sql/lepus_table.sql 

[root@localhost lepus_v3.7]# mysql -ulepus -p lepus < sql/lepus_data.sql 


7、安装lepus的主程序

[root@localhost python]# ./install.sh

[note] lepus will be install on basedir: /usr/local/lepus
[note] /usr/local/lepus directory does not exist,will be created.
[note] /usr/local/lepus directory created success.
[note] wait copy files.......
[note] change script permission.
[note] create links.
[note] install complete.


8、修改配置文件

[root@localhost python]# cd etc/

[root@localhost etc]# vi config.ini 
###监控机MySQL数据库连接地址###
[monitor_server]
host="localhost"
port=3306
user="lepus"
passwd="lepus"
dbname="lepus"

9、开启lepus

[root@localhost etc]# lepus start



10、设置web界面

[root@localhost lepus_v3.7]# cp -rf php/*  /var/www/html/

[root@localhost lepus_v3.7]# cd /var/www/html/application/

[root@localhost application]# cd config/

[root@localhost config]# vi  database.php 

修改一下配置:

$db['default']['hostname'] = 'localhost';
$db['default']['port']     = '3306';
$db['default']['username'] = 'lepus';
$db['default']['password'] = 'lepus';
$db['default']['database'] = 'lepus';
$db['default']['dbdriver'] = 'mysql';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;


11、开启服务

[root@localhost config]# service  httpd start

[root@localhost config]# netstat -nltp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name   
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      8582/sshd           
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN      1838/cupsd          
tcp        0      0 127.0.0.1:6010              0.0.0.0:*                   LISTEN      9217/sshd           
tcp        0      0 :::3306                     :::*                        LISTEN      8909/mysqld         
tcp        0      0 :::80                       :::*                        LISTEN      9555/httpd         
tcp        0      0 :::22                       :::*                        LISTEN      8582/sshd           
tcp        0      0 ::1:631                     :::*                        LISTEN      1838/cupsd          
tcp        0      0 ::1:6010                    :::*                        LISTEN      9217/sshd    


12、web界面操作

用户名:admin

密码:Lepusadmin






可参考:

http://www.bubuko.com/infodetail-1098872.html




  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
要在CentOS上安装Lepus,您需要按照以下步骤进行操作: 1. 下载Lepus安装包并解压缩。 2. 运行install.sh脚本以安装Lepus。 3. 配置MySQL的授权访问,创建lepus数据库并授权。 4. 导入lepus初始化数据。 具体的步骤如下: 1. 下载Lepus安装包并解压缩。 您可以从Lepus的官方网站(https://github.com/51idc/Lepus)下载最新版本的安装包。下载完成后,您需要将其解压缩到您的CentOS系统中。 2. 运行install.sh脚本以安装Lepus。 在解压缩后的Lepus目录中,您可以找到一个名为install.sh的脚本。运行该脚本以安装Lepus。您可以使用以下命令运行该脚本: ``` cd /path/to/Lepus sh install.sh ``` 在安装过程中,您需要输入一些配置信息,例如MySQL的用户名和密码等。 3. 配置MySQL的授权访问,创建lepus数据库并授权。 在安装Lepus之前,您需要在MySQL中创建一个名为lepus的数据库,并授权给Lepus用户。您可以使用以下命令完成此操作: ``` mysql -uroot -p ``` 然后输入MySQL的root用户密码以登录MySQL。 ``` create database lepus default character set utf8; grant select,insert,update,delete,create on lepus.* to 'lepus'@'localhost' identified by 'lepus'; grant select,insert,update,delete,create on lepus.* to 'lepus'@'127.0.0.1' identified by 'lepus'; flush privileges; ``` 这些命令将创建一个名为lepus的数据库,并授权给Lepus用户。 4. 导入lepus初始化数据。 在创建了lepus数据库之后,您需要将lepus的初始化数据导入到该数据库中。您可以使用以下命令完成此操作: ``` cd /path/to/Lepus/sql mysql -uroot -p lepus < lepus_table.sql mysql -uroot -p lepus < lepus_data.sql ``` 这些命令将导入lepus的初始化数据到lepus数据库中。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

盒马coding

你的支持是我最大的动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值