LAMP搭建ECSHOP

环境:Centos 7.6 、Mysql 5.5、Apache、 PHP 7.3.8、ECSHOP
安装介绍:mysql&apache均用yum默认安装,php源码编译,ECSHOP官网注册账号再下载
依赖环境部署

[root@localhost ~]# wget http://mirrors.aliyun.com/repo/Centos-7.repo
[root@localhost ~]# yum clean all
[root@localhost ~]# yum makecache
[root@localhost ~]# yum -y install php-mcrypt libmcrypt libmcrypt-devel  autoconf  freetype gd libmcrypt libpng libpng-devel libjpeg libxml2 libxml2-devel zlib curl curl-devel re2c php-pear

yum安装apache&mysql

[root@localhost ~]# yum install httpd httpd-devel mariadb-server http(httpd-devel为提供apsx以供编译apache php模块)
[root@localhost php-7.3.8]# vim /etc/my.cnf
character-set-server=utf8
[root@localhost ~]# systemctl start mariadb && systemctl enable mariadb
[root@localhost ~]# systemctl start httpd && systemctl enable httpd
[root@localhost ~]# mysql_secure_installation 
[root@localhost ~]# mysql -uroot -p12345
MariaDB [(none)]> create database ecshop;
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> grant all on ecshop.* to ecshop@localhost identified by 'ecshop';
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)

源码编译安装PHP


[root@localhost ~]# tar xf php-7.3.8.tar.gz -C /usr/local/src/
[root@localhost ~]# cd /usr/local/src/php-7.3.8/
[root@localhost php-7.3.8]# ./configure --prefix=/usr/local/php/ --with-apxs2=/usr/bin/apxs --enable-mbstring --with-curl --with-gd --enable-fpm --enable-mysqlnd  --with-pdo-mysql=mysqlnd --with-config-file-path=/usr/local/php/etc/ --with-mysqli=mysqlnd --with-mysql-sock=/var/lib/mysql/mysql.sock
[root@localhost php-7.3.8]# make
[root@localhost php-7.3.8]# make test(执行此步骤可能会遇到一个bug,可忽略)
[root@localhost php-7.3.8]# make install
[root@localhost php]# grep -r php /etc/httpd/modules/(注意这里可以看到此版本的apache模块是libphp7.so)
Binary file /etc/httpd/modules/libphp7.so matches
Binary file /etc/httpd/modules/mod_fcgid.so matches
[root@localhost php]# vim /etc/httpd/conf/httpd.conf(查看apache配置文件,已发现php模块已加载)
LoadModule php7_module        /usr/lib64/httpd/modules/libphp7.so
[root@localhost php]# vim /etc/httpd/conf/httpd.conf
    AddType application/x-gzip .gz .tgz(在此行下面增加下面两行)
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
[root@localhost php]# systemctl restart httpd
[root@localhost php]# tee /var/www/html/index.php<<-"EOF"(创建php测试页面)
>     phpinfo();
> ?>
> EOF

WEB访问测试
LAMP搭建ECSHOP_第1张图片
导入ECSHOP


[root@localhost ~]# rm -rf /var/www/html/index.php
[root@localhost ~]# unzip -d /var/www/html/ ECShop_V4.0.6_UTF8_release20190731_88190802281242_\(1\).zip
[root@localhost html]# ls
ECShop_V4.0.6_UTF8_release20190731  __MACOSX  source
[root@localhost html]# cd ECShop_V4.0.6_UTF8_release20190731/
[root@localhost ECShop_V4.0.6_UTF8_release20190731]# ls
check_file.php  readme  source
[root@localhost ECShop_V4.0.6_UTF8_release20190731]# cd readme/ (次目录内有安装说明可参考)
[root@localhost readme]# ls
ECSHOP4.0移动端H5用户操作手册.docx  商派ECShop4.0操作手册(201907).docx
ECSHOP移动端安装说明v1.3.docx       检测文件使用说明.rtf
[root@localhost source]# cp -R appserver/ /var/www/html/
[root@localhost source]# cp -R ecshop/ /var/www/html/
[root@localhost html]# chmod -R 777 appserver/
[root@localhost html]# chmod -R 777 ecshop/

WEB安装
浏览器输入:
http://192.168.3.11/ecshop/install/index.php
LAMP搭建ECSHOP_第2张图片
LAMP搭建ECSHOP_第3张图片
(个别功能不支持,可忽略,编译时漏了参数,不影响使用)
LAMP搭建ECSHOP_第4张图片
LAMP搭建ECSHOP_第5张图片
注意这里的账号为ECSHOP官网下载源码前注册的账号
LAMP搭建ECSHOP_第6张图片
这里填入的信息为刚注册的管理账号
LAMP搭建ECSHOP_第7张图片
此为管理页面,可自行设置
LAMP搭建ECSHOP_第8张图片
输入网址访问主页:
http://192.168.3.11/ecshop/index.php

你可能感兴趣的:(LAMP搭建ECSHOP)