Linux/CentOS 7 环境安装ECShop 3.6
2020-02-26 本文已影响0人
Vined
- 检查系统是否已经安装了Apache HTTP Server,即httpd
如果返回如下内容,说明已经安装
[root@localhost ~]# httpd -version
Server version: Apache/2.4.6 (CentOS)
Server built: Aug 8 2019 11:41:18
如果没有安装,执行下面命令安装和启动服务
[root@localhost ~]# yum install httpd -y
- 检查系统是否已经安装了PHP和插件
如果返回如下内容,说明已经安装PHP
[root@localhost ~]# php -v
PHP 5.4.16 (cli) (built: Nov 1 2019 16:04:20)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
[root@localhost ~]# rpm -qa | grep php-gd
php-gd-5.4.16-46.1.el7_7.x86_64
[root@localhost ~]# rpm -qa|grep php-mysql
php-mysql-5.4.16-46.1.el7_7.x86_64
如果没有安装,执行下面命令安装
[root@localhost ~]# yum install php php-gd php-mysql -y
- 检查系统是否已经安装了MySQL或MariaDB
如果返回如下内容,说明已经安装MariaDB
[root@localhost ~]# rpm -qa|grep mariadb
mariadb-libs-5.5.64-1.el7.x86_64
mariadb-5.5.64-1.el7.x86_64
mariadb-server-5.5.64-1.el7.x86_64
如果没有安装,执行下面命令安装和配置,按照提示输入root用户新密码
[root@localhost ~]# yum install mariadb-server -y
[root@localhost ~]# systemctl start mariadb
[root@localhost ~]# systemctl enable mariadb
[root@localhost ~]# systemctl status mariadb
[root@localhost ~]# mysql_secure_installation
- 修改PHP配置文件设置时区
搜索timezone,把date.timezone前的注释符#去掉,值设为PRC
[root@localhost ~]# vim /etc/php.ini
date.timezone = PRC
- 下载,解压ECShop 3.6源码
[root@localhost ~]# wget http://zj.mycodes.net/201708/ECShop_3.6.0_UTF8_release.zip
[root@localhost ~]# unzip ECShop_3.6.0_UTF8_release.zip
[root@localhost ~]# mv ECShop_3.6.0_UTF8_release/source/* /var/www/html/
- 设置源码目录可写
[root@localhost ~]# mv ECShop_3.6.0_UTF8_release/source/* /var/www/html/
[root@localhost ~]# cd /var/www/html
[root@localhost ~]# ls
appserver ecshop
[root@localhost ~]# chmod 777 -R appserver ecshop
- 关闭selinux
修改selinux的配置文件,把SELINUX的值改为disabled
[root@localhost conf]# vim /etc/selinux/config
SELINUX=disabled
SELINUXTYPE=targeted
[root@localhost conf]# setenforce 0
setenforce: SELinux is disabled
- 启动Apache服务,查询服务状态并设置开机启动服务
[root@localhost ~]# systemctl start httpd
[root@localhost ~]# systemctl enable httpd
[root@localhost ~]# systemctl status httpd
- 防火墙允许Apache服务的80端口
[root@localhost conf]# firewall-cmd --add-port=80/tcp --zone=public --permanent
success
[root@localhost conf]# firewall-cmd --reload
success
- 浏览器安装ECShop
假设服务器的IP地址是192.168.8.128,浏览器地址栏输入
http://192.168.8.128/ecshop/install/index.php
根据安装向导步骤,同意协议,检查环境
ECShop安装 同意协议
配置系统时输入数据库root用户密码,数据库名ecshop,输入管理员账号和密码,勾选安装测试数据,点击立即安装
ECShop安装 配置系统
安装完成后不需要激活系统,浏览器输入首页地址访问
http://192.168.8.128/ecshop/index.php