LAMP虚拟主机
虚拟主机:简单来说就是一个Apache服务多个站点
例如商城部署
一、基础环境
[[email protected] ~]# sed -ri ‘/^SELINUX=/cSELINUX=disabled’ /etc/selinux/config
[[email protected] ~]# setenforce 0
[[email protected] ~]# systemctl stop firewalld.service
[[email protected] ~]# systemctl disable firewalld.service
二、安装 LAMP
[[email protected] ~]# yum -y install httpd mariadb-server mariadb php php-mysql gd php-gd
[[email protected] ~]# systemctl start httpd mariadb
[[email protected] ~]# systemctl enable httpd mariadb
[[email protected] ~]# mysql_secure_installation
三、安装 Ecshop
- Apache 配置虚拟主机
[[email protected] ~]# vim /etc/httpd/conf.d/zhufo.conf
一下为配置文件添加内容:
*<VirtualHost :80>
ServverName www.doris.top
ServerAlias doris.top
DocumentRoot /webroot/doris
<Directory “/webroot/doris>
Require all granted
[[email protected] ~]# systemctl restart httpd
2. 导入 ecshop 网站源码
[[email protected] ~]# mkdir -p /webroot/doris
[[email protected] ~]# unzip ECShop_V3.0.0_UTF8_release0518.zip
[[email protected] ~]# cp -rf ECShop_V3.0.0_UTF8_release0518/* /webroot/zhufo/
3. 安装 ecshop [任何 client]
[[email protected] ~]# vim /etc/hosts //如果没有使用 DNS 解析
192.168.122.161 www.doris.top doris.top //161 为 web server IP
[[email protected] ~]# chmod -R 777 /webroot/doris/
修改 php.ini 时区
[[email protected]apache ~]# vim /etc/php.ini
[[email protected] ~]# systemctl restart httpd