Fecshop的安装以及配置

Fecshop安装

1、安装WAMP

2、百度云中下载最新fecshop:https://pan.baidu.com/s/1hs1iC2C#list/path=/

解压,文件夹内容放到自己的文件夹下面

3、配置本地的host指向

打开文件C:\Windows\System32\drivers\etc

hosts属性 安全 Users权限改为完全控制

打开hosts文件在hosts文件最后添加

127.0.0.1       rock.fecshoptest.com     # rockmongo的域名指向,rockmongo是mongodb的可视化界面,类似于mysql的phpmyadmin
127.0.0.1       my.fecshoptest.com       # mysql的phpmyadmin的域名指向
127.0.0.1       appadmin.fecshoptest.com # 后台域名指向
127.0.0.1       appfront.fecshoptest.com # 前台pc端域名指向
127.0.0.1       appfront.fecshoptest.es  # 前台pc端 es 语言的域名指向
127.0.0.1       apphtml5.fecshoptest.com # 前台html端的域名指向
127.0.0.1       appapi.fecshoptest.com   # api端的域名指向
127.0.0.1       appserver.fecshoptest.com # server端的域名指向
127.0.0.1       img.fecshoptest.com        #appimage/common   图片的域名指向
127.0.0.1       img2.fecshoptest.com    #appimage/appadmin 图片的域名指向
127.0.0.1       img3.fecshoptest.com    #appimage/appfront 图片的域名指向
127.0.0.1       img4.fecshoptest.com    #appimage/apphtml5 图片的域名指向
127.0.0.1       img5.fecshoptest.com    #appimage/appserver图片的域名指向

3.修改apache的配置

打开文件wamp\bin\apache\apache2.4.23\conf\ extra\httpd-vhosts.conf文件

# appfront.fecshoptest.com -> xxx/appfront/web 
# appfront.fecshoptest.es  -> xxx/appfront/web 
<VirtualHost *:80>
    ServerName appfront.fecshoptest.com
    ServerAlias appfront.fecshoptest.es
    DocumentRoot D:/wamp/www/fecshop/appfront/web
    <Directory  "D:/wamp/www/fecshop/appfront/web/">
        Options +Indexes +Includes +FollowSymLinks +MultiViews
        AllowOverride All
        Require local
    </Directory>
</VirtualHost>

# appadmin.fecshoptest.com -> xxx/appadmin/web
<VirtualHost *:80>
    ServerName appadmin.fecshoptest.com
    ServerAlias appadmin.fecshoptest.com
    DocumentRoot D:/wamp/www/fecshop/appadmin/web
    <Directory  "D:/wamp/www/fecshop/appadmin/web/">
        Options +Indexes +Includes +FollowSymLinks +MultiViews
        AllowOverride All
        Require local
    </Directory>
</VirtualHost>

# apphtml5.fecshoptest.com -> xxx/apphtml5/web
<VirtualHost *:80>
    ServerName apphtml5.fecshoptest.com
    ServerAlias apphtml5.fecshoptest.com
    DocumentRoot D:/wamp/www/fecshop/apphtml5/web
    <Directory  "D:/wamp/www/fecshop/apphtml5/web/">
        Options +Indexes +Includes +FollowSymLinks +MultiViews
        AllowOverride All
        Require local
    </Directory>
</VirtualHost>

# appapi.fecshoptest.com -> xxx/appapi/web
<VirtualHost *:80>
    ServerName appapi.fecshoptest.com
    ServerAlias appapi.fecshoptest.com
    DocumentRoot D:/wamp/www/fecshop/appapi/web
    <Directory  "D:/wamp/www/fecshop/appapi/web/">
        Options +Indexes +Includes +FollowSymLinks +MultiViews
        AllowOverride All
        Require local
    </Directory>
</VirtualHost>


# appserver.fecshoptest.com -> xxx/appserver/web
<VirtualHost *:80>
    ServerName appserver.fecshoptest.com
    ServerAlias appserver.fecshoptest.com
    DocumentRoot D:/wamp/www/fecshop/appserver/web
    <Directory  "D:/wamp/www/fecshop/appserver/web/">
        Options +Indexes +Includes +FollowSymLinks +MultiViews
        AllowOverride All
        Require local
    </Directory>
</VirtualHost>

# img.fecshoptest.com -> xxx/appimage/common
<VirtualHost *:80>
    ServerName img.fecshoptest.com
    ServerAlias img.fecshoptest.com
    DocumentRoot D:/wamp/www/fecshop/appimage/common
    <Directory  "D:/wamp/www/fecshop/appimage/common/">
        Options +Indexes +Includes +FollowSymLinks +MultiViews
        AllowOverride All
        Require local
    </Directory>
</VirtualHost>


# img2.fecshoptest.com -> xxx/appimage/appadmin
<VirtualHost *:80>
    ServerName img2.fecshoptest.com
    ServerAlias img2.fecshoptest.com
    DocumentRoot D:/wamp/www/fecshop/appimage/appadmin
    <Directory  "D:/wamp/www/fecshop/appimage/appadmin/">
        Options +Indexes +Includes +FollowSymLinks +MultiViews
        AllowOverride All
        Require local
    </Directory>
</VirtualHost>


# img3.fecshoptest.com -> xxx/appimage/appfront
<VirtualHost *:80>
    ServerName img3.fecshoptest.com
    ServerAlias img3.fecshoptest.com
    DocumentRoot D:/wamp/www/fecshop/appimage/appfront
    <Directory  "D:/wamp/www/fecshop/appimage/appfront/">
        Options +Indexes +Includes +FollowSymLinks +MultiViews
        AllowOverride All
        Require local
    </Directory>
</VirtualHost>

# img4.fecshoptest.com -> xxx/appimage/apphtml5
<VirtualHost *:80>
    ServerName img4.fecshoptest.com
    ServerAlias img4.fecshoptest.com
    DocumentRoot D:/wamp/www/fecshop/appimage/apphtml5
    <Directory  "D:/wamp/www/fecshop/appimage/apphtml5/">
        Options +Indexes +Includes +FollowSymLinks +MultiViews
        AllowOverride All
        Require local
    </Directory>
</VirtualHost>


# img5.fecshoptest.com -> xxx/appimage/appserver
<VirtualHost *:80>
    ServerName img5.fecshoptest.com
    ServerAlias img5.fecshoptest.com
    DocumentRoot D:/wamp/www/fecshop/appimage/appserver
    <Directory  "D:/wamp/www/fecshop/appimage/appserver/">
        Options +Indexes +Includes +FollowSymLinks +MultiViews
        AllowOverride All
        Require local
    </Directory>
</VirtualHost>
对应链接地址的的修改,页面访问对应链接

访问 appfront.fecshoptest.com 页面出现对应文件夹

4、安装mongodb,redis的php扩展

https://pecl.php.net/package/mongodb/1.3.2/windows 下载对应的两个文件夹

把里面的文件php_mongodb.dll php_redis.dll放到\wamp\bin\php\php7.0.10\ext目录下

修改两处php.ini的配置(php.ini文件下面添加)

extension=php_mongodb.dll
extension=php_redis.dll

5、安装redis:

redis下载:https://github.com/MicrosoftArchive/redis/releases

页面下载Redis-x64-3.2.100.msi下载成功直接点击安装,安装完毕,cmd运行

redis-cli

6、安装fecshop

cd /d  D:\wamp\www\fecshop
php init
  [0] Development
输入0 回车

Initialize the application under 'Development' environment? [yes|no]
输入y 回车

7、修改store key 修改文件

wamp\www\fecshop\appfront\config\fecshop_local_services\Store.php 把域名fecshop.appfront.fancyecommerce.com 替换成 appfront.fecshoptest.com

8、安装mongodb: 下载地址:https://www.mongodb.com/download-center

安装完mongodb,选择安装到D盘D:\Program Files目录下,我的mongoDB安装在D:\Program Files文件夹中。 在MongoDB的安装目录下,找到bin目录。

1)在目录下面新建文件夹 data,用于MongoDB数据库存放。

2)新建文件: mongodb.config,打开文件,在文件中写入: dbpath=D:\Program Files\MongoDB\Server\3.4\bin\data

在bin文件夹找开cmd控制台,执行下面命令:

mongod --config mongodb.config

9、安装完成

重启apache2,浏览器输入:http://appfront.fecshoptest.com/ 就可以出现fecshop主页


Fecshop初始配置

1、配置 fecshop app advanced

fecshop\common\config\main-local.php

<?php
return [
    'components' => [
        // Mysql部分的配置
        'db' => [ 
            'class' => 'yii\db\Connection',
            'dsn' => 'mysql:host=127.0.0.1;dbname=fecshop',
            'username' => 'root',
            'password' => 'xxxxxx',
            'charset' => 'utf8',
        ],
        // Mongodb部分的配置
        'mongodb' => [
            'class' => 'yii\mongodb\Connection',
			# 有账户的配置
            //'dsn' => 'mongodb://username:password@localhost:27017/datebase',
			# 无账户的配置
			'dsn' => 'mongodb://127.0.0.1:27017/fecshop_test_2017_04_19',
			# 复制集
			//'dsn' => 'mongodb://10.10.10.252:10001/erp,mongodb://10.10.10.252:10002/erp,mongodb://10.10.10.252:10004/erp?replicaSet=terry&readPreference=primaryPreferred',
        ],
		// Redis的配置
		'redis' => [
            'class' => 'yii\redis\Connection',
            'hostname' => '127.0.0.1',    // redis的host
            'port' => 6379,               // redis的端口     
			//'password'  => 'xxxxx', // redis的密码
            'database' => 0,    // redis的库,此处不要改动
        ],
        // Cache 组件的配置,您需要配置下面的redis
        'cache' => [
            'class'     => 'yii\redis\Cache',
            // 缓存配置独立的redis,您可以和上面的redis配置一致
            'redis' => [
                'hostname' => '127.0.0.1',   // redis的host
                'port' => 6379,              // redis的端口   
                //'password'  => 'xxxxx', // redis的密码
            ],
        ],
        // Session 组件的配置,您需要配置下面的redis
        'session' => [
            'class'   => 'yii\redis\Session',
            // session过期时间,1天过期
            'timeout' => 86400 * 1, 
            // 缓存配置独立的redis,您可以和上面的redis配置一致
            'redis' => [
                'hostname' => '127.0.0.1', // redis的host
                'port' => 6379,            // redis的端口   
                //'password'  => 'xxxxx', // redis的密码
            ],
        ],
    ]
]

密码设置为空

2、配置语言(可以先使用默认):

在配置文件(:@common\config\fecshop_local_services\FecshopLang.php

3、配置货币(可以先使用默认):

在文件:@common\config\fecshop_local_services\Page.php

4、配置store的域名

针对前台访问入口的,也就是appfront(pc) apphtml5(wap) appserver(app) 几个入口的,对于console appadmin 是不需要配置Store.php 的,因为后台是没有多store的概念的

fecshop.appfront.fancyecommerce.com 替换成 appfront.fecshoptest.com

按照此格式替换三个入口

5、图片域名配置文件:@common\config\fecshop_local_services\Image.php ,譬如我的代码(您可以和我的保持一致,相应域名已经在上面添加host):

<?php
/**
 * FecShop file.
 * @link http://www.fecshop.com/
 * @copyright Copyright (c) 2016 FecShop Software LLC
 * @license http://www.fecshop.com/license/
 */
return [
	'image' => [
		'appbase'	=> [
			'appfront' => [
				'basedir' => '@appimage/appfront',
				'basedomain' => '//img3.fecshoptest.com',
			],
			'apphtml5' => [
				'basedir' => '@appimage/apphtml5',
				'basedomain' => '//img2.fecshoptest.com',
			],
			'appadmin' => [
				'basedir' => '@appimage/appadmin',
				'basedomain' => '//img2.fecshoptest.com',
			],
			'common' => [
				'basedir' => '@appimage/common',
				'basedomain' => '//img.fecshoptest.com',
			],
		],
	],
];

6、测试数据安装

https://pan.baidu.com/s/1kVwRD2Z#list/path=%2F环境部署%2Ffecshop测试数据包

把fecshop.sql 导入到mysql中
导入mongodb测试数据

上面下载的文件夹中的文件mongo-fecshop-20180212-110657.js上传到您的系统中

下载的文件路径运行cmd 执行

mongo 127.0.0.1:27017/fecshop --quiet mongo-fecshop-20180212-110657.js

7、产品图片

上面下载的appimage解压,覆盖原目录fecshop\appadmin

如果发现产品图片没有出来,那么您需要清空 appimage/common/media/catalog/product/cache/*下面所有文件和文件夹

8、后台的账户密码为: admin admin123

http://appadmin.fecshoptest.com/ 进入后台

http://appfront.fecshoptest.com/ 就可以出现fecshop主页

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值