8.尚硅谷电商推荐系统预览


  • 课程地址:尚硅谷大数据项目教程(大数据实战电商推荐系统)
  • 尚硅谷电商推荐系统的配套资料及虚拟机
    链接:https://pan.baidu.com/s/1iSMqV2wPkEfIsO1FrkxRNQ?pwd=1996
    提取码:1996
  • 1.项目体系架构设计(电商推荐系统)
  • 2.工具环境搭建(电商推荐系统)
  • 3.创建项目并初始化业务数据(电商推荐系统)
  • 4.离线推荐服务建设(电商推荐系统)
  • 5.实时推荐服务建设(电商推荐系统)
  • 6.冷启动问题处理(电商推荐系统)
  • 7.基于内容的相似推荐与基于物品的协同过滤推荐
  • 8.尚硅谷电商推荐系统预览

  1. 开启前端服务器:systemctl start httpd.service

  2. 开启后端服务器:tomcat.sh start

    [root@spark01 ~]# tomcat.sh start
     --------启动 spark01 Tomcat-------
    Using CATALINA_BASE:   /opt/module/tomcat
    Using CATALINA_HOME:   /opt/module/tomcat
    Using CATALINA_TMPDIR: /opt/module/tomcat/temp
    Using JRE_HOME:        /opt/module/jdk1.8.0_212
    Using CLASSPATH:       /opt/module/tomcat/bin/bootstrap.jar:/opt/module/tomcat/bin/tomcat-juli.jar
    Tomcat started.
    [root@spark01 ~]# jps
    1174 Jps
    1163 Bootstrap
    
  3. 开启redis数据库:redis.sh start

    [root@spark01 ~]# redis.sh start
     --------启动 spark01 Redis-------
    
  4. 开启mongodb数据库:mongodb.sh start

    [root@spark01 ~]# mongodb.sh start
     --------启动 spark01 Mongodb-------
    about to fork child process, waiting until server is ready for connections.
    forked process: 1265
    child process started successfully, parent exiting
    
  5. 开启zookeeper服务:zk.sh start

    [root@spark01 ~]# zk.sh start
     --------启动 spark01 Zookeeper-------
    ZooKeeper JMX enabled by default
    Using config: /opt/module/zookeeper/bin/../conf/zoo.cfg
    Starting zookeeper ... STARTED
    [root@spark01 ~]# jps
    1334 QuorumPeerMain
    1351 Jps
    1163 Bootstrap
    
  6. 开启kafka:kf.sh start

    [root@spark01 ~]# kf.sh start
     --------启动 spark01 Kafka-------
    [root@spark01 ~]# jps
    1334 QuorumPeerMain
    1590 Kafka
    1610 Jps
    1163 Bootstrap
    
  7. 开启flume:f1.sh start

    [root@spark01 ~]# f1.sh start
     --------启动 spark01 采集Flume-------
    [root@spark01 ~]# jps
    1700 Jps
    1334 QuorumPeerMain
    1590 Kafka
    1163 Bootstrap
    1677 Application
    
  8. 进入网页前端,浏览器直接输入192.168.88.107,并注册一个账户
    8.尚硅谷电商推荐系统预览_第1张图片
    得到如下初始界面
    8.尚硅谷电商推荐系统预览_第2张图片

  9. 开启实时推荐:online.sh
    通过手动评分产生评分流数据
    8.尚硅谷电商推荐系统预览_第3张图片

    [root@spark01 ~]# online.sh
    开始执行………………………………
    streaming started
    rating data coming!>>>>>>>>>>>>>>>>>>>
    rating data coming!>>>>>>>>>>>>>>>>>>>
    rating data coming!>>>>>>>>>>>>>>>>>>>
    rating data coming!>>>>>>>>>>>>>>>>>>>
    rating data coming!>>>>>>>>>>>>>>>>>>>
    rating data coming!>>>>>>>>>>>>>>>>>>>
    rating data coming!>>>>>>>>>>>>>>>>>>>
    rating data coming!>>>>>>>>>>>>>>>>>>>
    rating data coming!>>>>>>>>>>>>>>>>>>>
    

    topic.sh:转存topic的数据:log -> rec,开启 topic.sh才会有rating data coming!>>>>>>>>>>>>>>>>>>>出现!

    [root@spark01 ~]# topic.sh
    kafka stream started!
    product rating data coming!!! 2022-08-09 03:09:47,889   INFO --- [                              http-nio-8088-exec-9]  com.business.rest.ProductRestApi                                                (line:   161)  :  PRODUCT_RATING_PREFIX:96321|6797|5.0|1659985787
    product rating data coming!!! 2022-08-09 03:09:50,411   INFO --- [                             http-nio-8088-exec-10]  com.business.rest.ProductRestApi                                                (line:   161)  :  PRODUCT_RATING_PREFIX:96321|501559|4.5|1659985790
    product rating data coming!!! 2022-08-09 03:09:50,987   INFO --- [                              http-nio-8088-exec-1]  com.business.rest.ProductRestApi                                                (line:   161)  :  PRODUCT_RATING_PREFIX:96321|501559|5.0|1659985790
    product rating data coming!!! 2022-08-09 03:09:53,954   INFO --- [                              http-nio-8088-exec-2]  com.business.rest.ProductRestApi                                                (line:   161)  :  PRODUCT_RATING_PREFIX:96321|57272|3.0|1659985793
    product rating data coming!!! 2022-08-09 03:09:55,412   INFO --- [                              http-nio-8088-exec-3]  com.business.rest.ProductRestApi                                                (line:   161)  :  PRODUCT_RATING_PREFIX:96321|184282|2.5|1659985795
    product rating data coming!!! 2022-08-09 03:09:59,949   INFO --- [                              http-nio-8088-exec-4]  com.business.rest.ProductRestApi                                                (line:   161)  :  PRODUCT_RATING_PREFIX:96321|8195|5.0|1659985799
    product rating data coming!!! 2022-08-09 03:11:33,298   INFO --- [                             http-nio-8088-exec-10]  com.business.rest.ProductRestApi                                                (line:   161)  :  PRODUCT_RATING_PREFIX:96321|6797|5.0|1659985893
    product rating data coming!!! 2022-08-09 03:11:36,096   INFO --- [                              http-nio-8088-exec-8]  com.business.rest.ProductRestApi                                                (line:   161)  :  PRODUCT_RATING_PREFIX:96321|14103|5.0|1659985896
    product rating data coming!!! 2022-08-09 03:11:37,574   INFO --- [                              http-nio-8088-exec-1]  com.business.rest.ProductRestApi                                                (line:   161)  :  PRODUCT_RATING_PREFIX:96321|62138|5.0|1659985897
    

    此时,刷新页面就可以看到实时推荐部分的内容
    8.尚硅谷电商推荐系统预览_第4张图片

  10. 开启离线推荐:offline.sh

    [root@spark01 ~]# offline.sh
    开始执行………………………………
    执行完成
    

    8.尚硅谷电商推荐系统预览_第5张图片

  11. 基于内容的推荐:content.sh

    	[root@spark01 ~]# content.sh 
    开始执行………………………………
    任务完成!!!!
    
  12. 基于物品的协同过滤推荐:stat.sh

    [root@spark01 ~]# stat.sh 
    开始执行………………………………
    执行完成  
    

    8.尚硅谷电商推荐系统预览_第6张图片

你可能感兴趣的:(#,尚硅谷电商推荐系统,电商推荐系统)