查看selinux的状态,关闭selinux
查看防火墙规则
# firewall-cmd --permanent --list-all
加入防火墙规则,对外提供 http,https服务
# firewall-cmd --permanent --add-service=http --add-service=https
加载服务
# firewall-cmd --reload
yum安装LAMP环境
# yum -y install httpd mariadb-server mariadb php php-mysql gd php-gd
启动 httpd,mariadb
# systemctl start httpd mariadb
开机自启动 httpd,mariadb
# systemctl enable httpd mariadb
在浏览器输入ip,就可以访问测试页
设置数据库的root密码
# mysqladmin -uroot password "123"
设置虚拟主机
# vim /etc/httpd/conf.d/ecshop.conf
<VirtualHost *:80>
ServerName www.ecshop.com
ServerAlias ecshop.com
DocumentRoot "/webroot/ecshop"
</VirtualHost>
<Directory "/webroot/ecshop">
Require all granted
</Directory>
创建根目录,修改配置文件,检测语法
# mkdir -p /webroot/ecshop
# vim /etc/httpd/conf/httpd.conf
ServerName www.example.com:80
# httpd -t
建立测试页
# echo "ecshop text page ..." > /webroot/ecshop/index.html
重启启动 httpd
# systemctl restart httpd
windows中的hots文件
192.168.221.10 www.ecshop.com ecshop.com
浏览器中访问
上传 ECShop_V3.0.0_UTF8_release0530.zip,解压,放到根目录,权限设置
cd /webroot/ecshop/
rm -rf *
cd
yum install lrzsz -y
rz
yum install unzip -y
unzip ECShop_V3.0.0_UTF8_release0530.zip
cp -rf ECShop_V3.0.0_UTF8_release0530/* /webroot/ecshop/
chown -R apache:apache /webroot/ecshop/
部署开发人员写好的代码,进行数据库的安装
有这样的报警信息
vim /etc/php.ini
date.timezone = Asia/Shanghai
systemctl restart httpd
刷新页面
按照页面填写,完成数据库的安装
mysql -p123
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| ecshop |
| mysql |
| performance_schema |
| test |
+--------------------+
生成了ecshop数据库。
原文地址:http://blog.51cto.com/13480443/2104897
时间: 2024-10-10 11:11:00