廣告
请使用 http://www.luhui.net 網址高速訪問本站,歡迎關注微信公衆賬号:guanfu8 平台長期發布海量社科數據, 本站QQ交流群:84142868 探讨人文理想,共謀和諧世界!
黄金广告位招租,投放热线15900718107,13386070835 详情查看=》   鲁之虺:“  上网就是搜索,生活就是分类,科技服务大众,信息引领生活,地方分类站长,开启您的事业之旅。生活分类信息整体提供商:http://huike.luhui.net”。
×

鲁虺繁体中文社区

 找回密碼
 立即註冊
廣告

 

查看: 2|回復: 0

[▽PHP>SEO搜索链接] 2016最新百度云网盘搜索引擎源码k1995-BaiduyunSpider-df32802百度云网盘搜索引擎 BaiduyunSpider

[複製鏈接]
發表於 2019-5-31 06:59:38 | 顯示全部樓層 |閱讀模式
廣告
搜索看看︰2016最新百度云网盘搜索引擎源码k1995-BaiduyunSpider-df32802百度云网盘搜索引擎 BaiduyunSpider
廣告

k1995-BaiduyunSpider-df32802百度云网盘搜索引擎 BaiduyunSpider .zip\k1995-BaiduyunSpider-df32802\spider - ZIP 压缩文件, 解包大小为 3,241,818 字节

# 爱百应 - 百度云搜索引擎,安装部署教程

## 运行环境

开始之前你需要安装

* PHP 5.3.7 +
* MySQL
* Python 2.7 ~
* [xunsearch](http://xunsearch.com/) 搜索引擎



## 获取源码

```
git clone git@github.com:k1995/BaiduyunSpider.git
```

或手动下载

```
https://github.com/k1995/BaiduyunSpider/archive/master.zip
```



下载完毕后,___项目的目录结构___大致是这样的

```
--- indexer/  #索引
--- spider/   #爬虫
--- sql/      
--- web/          #网站
        --- application/
                --- config/ # 配置相关
                                --- config.php
                                --- database.php # 数据库配置
                                ...
                ...
        --- static/ # 存放静态资源,css|js|font
        --- system/
        --- index.php
        ...
```





## 开始部署

### 创建数据库

创建名为`pan`的数据库,编码设为`utf-8`。然后导入`sql`,完成表的创建。



### 网站部署

支持`nginx`,`apache` 服务器。

__apache__ 需要开启 *mod_rewrite* 。

__nginx__  配置如下

```
location /
{   
        index index.php;
        try_files $uri $uri/ /index.php/$uri;
}

location ~ [^/]\.php(/|$)
{
        fastcgi_pass  127.0.0.1:9000;
        fastcgi_index index.php;
        include fastcgi.conf;
        include pathinfo.conf;
}
```



####  配置文件修改

`config.php` 文件修改网站标题,描述等信息

`database.php` 修改数据库账号,密码等信息

> 网站是基于CodeIgniter 框架开发的,如安装,部署,或二次开发有问题,请参考[官网文档]( http://codeigniter.org.cn/user_guide/general/welcome.html)



### 启动爬虫

进入 `spider/`目录,修改`spider.py` 中数据库信息。

__如果你是第一次部署,需运行下面命令,完成做种__

```
python spider.py --seed-user
```

上面其实就是抓取百度云热门分享用户的相关信息,然后从他们开始入手爬取数据

然后运行

```
python spider.py
```

此时爬虫已经开始工作了



### 安装xunsearch

目前使用__xunsearch__作为搜索引擎,后面会更换为`elasticsearch`。

安装过程请参考(不需要安装,PHP SDK,我已经整合到web里了)

http://xunsearch.com/doc/php/guide/start.installation



### 索引数据
上面我们完成了爬虫的数据抓取,网站的搭建,但还不能搜索,下面开始最后一步,索引的建立。

进入 `indexer/`目录,在`indexer.php`中将$prefix,替换为你web的根路径
```
require '$prefix/application/helpers/xs/lib/XS.php';
```
并修改数据库账号密码

然后运行
```
python ./index.php
```



到此为止程序已全部安装完毕,若有疑问请在 [github 中文社区](http://www.githubs.cn/topic/118) 发帖
k1995-BaiduyunSpider-df32802百度云网盘搜索引擎 BaiduyunSpider .zipk1995-Baiduyun.png k1995-BaiduyunSpider-df32802百度云网盘搜索引擎 BaiduyunSpider .zipk1995-Baiduyun.png











遊客,本帖隱藏的內容需要積分高於 100 才可瀏覽,您當前積分為 0


廣告
您需要登錄後才可以回帖 登錄 | 立即註冊

本版積分規則

廣告

廣告
操作系统 Fuchsia OS  |Microsoft Windows  |Android  |Chrome OS  |Novell  |Linux  |Mac OS X  |Unix  |FreeBSD  | Ubuntu
廣告

QQ|關于我們|聯繫我們|合作共赢|免責聲明|隐私条款|Archiver|手機版|拘留所|申請友鏈|付款方式|鲁虺繁体中文社区 |贊助我們 -

GMT+8, 2025-5-14 19:29 , Processed in 0.252015 second(s), 19 queries , WinCache On.

Powered by HCMS 1.0

© 2004-01-11 鲁虺文化网 版权所有

快速回復 返回頂部 返回列表