# :-: **搭建环境推荐说明:**
## 1、Php>=7.0 MYSQL>5.5 Nginx/Apache都可以(建议用宝塔直接安装)
## 2、宝塔面板新建一个站点,域名需要解析到IP,如下图站点的相关设置图
![](https://img.kancloud.cn/79/77/797771d6e0a191e205428d7b74b5413d_1319x789.png)
## 3、上传主程序文件到网站运行根目录并解压出来
![](https://img.kancloud.cn/98/8f/988f2dc875850c44c2cdc7af5b7210bb_1258x759.png)
## 4、设置网站伪静态(Nginx/Apache伪静态规则如下)
![](https://img.kancloud.cn/37/9e/379e40a4d4b408d2f203984cdd7b52c1_1916x808.png)
Nginx伪静态规则:
```
rewrite ^/index.html$ /index.php;
rewrite ^/app.html$ /app.php;
rewrite ^/mv.html$ /mv.php;
rewrite ^/mv_([0-9]+)_([0-9]+).html$ /mv.php?mlist=$1&m=$2;
rewrite ^/tv.html$ /tv.php;
rewrite ^/cx.html$ /cx.php;
rewrite ^/yy.html$ /yy.php;
rewrite ^/book.html$ /book.php;
rewrite ^/hall.html$ /hall.php;
rewrite ^/fuli.html$ /fuli.php;
rewrite ^/zhibo.html$ /zhibo.php;
rewrite ^/music.html$ /music.php;
rewrite ^/movie.html$ /movie.php;
rewrite ^/zongyi.html$ /zongyi.php;
rewrite ^/dongman.html$ /dongman.php;
rewrite ^/shop.html$ /shop.php;
rewrite ^/vod(.*)$ /play.php?play=$1;
rewrite ^/mvplay/(.*).html$ /mv.php?v=$1;
rewrite ^/cxplay/(.*).html$ /cxplay.php?id=$1;
rewrite ^/yplay/(.*).html$ /yplay.php?post=$1;
rewrite ^/movie_(.*)_(.*)_(.*)_(.*)_(.*)_(.*).html$ /movie.php?cat=$1&year=$2&area=$3&act=$4&rank=$5&pageno=$6;
rewrite ^/tv_(.*)_(.*)_(.*)_(.*)_(.*)_(.*).html$ /tv.php?cat=$1&year=$2&area=$3&act=$4&rank=$5&pageno=$6;
rewrite ^/dongman_(.*)_(.*)_(.*)_(.*)_(.*).html$ /dongman.php?cat=$1&year=$2&area=$3&rank=$4&pageno=$5;
rewrite ^/zongyi_(.*)_(.*)_(.*)_(.*)_(.*).html$ /zongyi.php?cat=$1&act=$2&area=$3&rank=$4&pageno=$5;
rewrite ^/gb_(.*).html$ /book.php?page=$1;
rewrite ^/cx_(.*)_([0-9]+).html$ /cx.php?cid=$1&page=$2;
rewrite ^/yy_(.*).html$ /yy.php?list=$1;
rewrite ^/star.html /star.php;
rewrite ^/mxstar_(.*)_(.*)_(.*).html /star.php?wd=$1&tab=$2&pageno=$3;
rewrite ^/seacher-(.*).html /seacher.php?wd=$1;
rewrite ^/mvseacher-(.*).html /mv.php?ac=$1;
rewrite ^/news.html$ /news.php;
rewrite ^/news_([0-9]+).html$ /news.php?page=$1;
rewrite ^/content-([0-9]+)-([0-9]+).html$ /content.php?dz=/$1/$2.shtml;
rewrite ^/shop_(.*)$ /shop.php?page=$1;
rewrite ^/dy.html$ /dy.php;
rewrite ^/hy.html$ /hy.php;
rewrite ^/top.html$ /top.php;
rewrite ^/hy_(.*)_(.*).html$ /hy.php?cid=$1&page=$2;
rewrite ^/hyplay_(.*).html$ /hyplay.php?id=$1;
```
Apache伪静态规则:
```
RewriteEngine On
RewriteRule ^index.html$ index.php
RewriteRule ^app.html$ app.php
RewriteRule ^mv.html$ mv.php
RewriteRule ^mv_([0-9]+)_([0-9]+).html$ mv.php?mlist=$1&m=$2
RewriteRule ^tv.html$ tv.php
RewriteRule ^cx.html$ cx.php
RewriteRule ^yy.html$ yy.php
RewriteRule ^book.html$ book.php
RewriteRule ^hall.html$ hall.php
RewriteRule ^fuli.html$ fuli.php
RewriteRule ^zhibo.html$ zhibo.php
RewriteRule ^music.html$ music.php
RewriteRule ^movie.html$ movie.php
RewriteRule ^zongyi.html$ zongyi.php
RewriteRule ^dongman.html$ dongman.php
RewriteRule ^shop.html$ shop.php
RewriteRule ^vod(.*)$ play.php?play=$1
RewriteRule ^mvplay/(.*).html$ mv.php?v=$1
RewriteRule ^cxplay/(.*).html$ cxplay.php?id=$1
RewriteRule ^yplay/(.*).html$ yplay.php?post=$1
RewriteRule ^movie_(.*)_(.*)_(.*)_(.*)_(.*)_(.*).html$ movie.php?cat=$1&year=$2&area=$3&act=$4&rank=$5&pageno=$6
RewriteRule ^tv_(.*)_(.*)_(.*)_(.*)_(.*)_(.*).html$ tv.php?cat=$1&year=$2&area=$3&act=$4&rank=$5&pageno=$6
RewriteRule ^dongman_(.*)_(.*)_(.*)_(.*)_(.*).html$ dongman.php?cat=$1&year=$2&area=$3&rank=$4&pageno=$5
RewriteRule ^zongyi_(.*)_(.*)_(.*)_(.*)_(.*).html$ zongyi.php?cat=$1&act=$2&area=$3&rank=$4&pageno=$5
RewriteRule ^gb_(.*).html$ book.php?page=$1
RewriteRule ^cx_(.*)_([0-9]+).html$ cx.php?cid=$1&page=$2
RewriteRule ^yy_(.*).html$ yy.php?list=$1
RewriteRule ^star.html star.php
RewriteRule ^mxstar_(.*)_(.*)_(.*).html star.php?wd=$1&tab=$2&pageno=$3
RewriteRule ^seacher-(.*).html seacher.php?wd=$1
RewriteRule ^mvseacher-(.*).html mv.php?ac=$1
RewriteRule ^news.html$ news.php
RewriteRule ^news_([0-9]+).html$ news.php?page=$1
RewriteRule ^content-([0-9]+)-([0-9]+).html$ content.php?dz=/$1/$2.shtml
RewriteRule ^shop_(.*)$ shop.php?page=$1
RewriteRule ^dy.html$ dy.php
RewriteRule ^hy.html$ hy.php
RewriteRule ^top.html$ top.php
RewriteRule ^hy_(.*)_(.*).html$ hy.php?cid=$1&page=$2
RewriteRule ^hyplay_(.*).html$ hyplay.php?id=$1
```
## **5、 在浏览器运行安装网址http://mk.52kj.wang/install,填写数据库信息,一直下一步直到成功,登录后台进行设置(登录后台第一件事就是需要清楚缓存,清楚缓存,清楚缓存)**
![](https://img.kancloud.cn/b0/1b/b01b0f677f9706d326b00bf20c8b2019_1459x681.png)
# 6、登录后台的相关设置
![](https://img.kancloud.cn/28/5a/285a0f9f0d0abf5edf8e01c913b8dfa2_1677x799.png)