LAMP架构搭建网站商城

LAMP架构搭建网站商城

Linux+Apache+Mysql/MariaDB+Perl/PHP/Python一组常用来搭建动态网站或者服务器的开源软件,共同组成了一个强大的Web应用程序平台

一、

安装需要的软件包

[root@w-163 ~]# yum install httpd
mysql-server mysql php php-mysql  -y

二、

启动LAMP相关服务

[root@w-163 ~]# service httpd start

[root@w-163 ~]# chkconfig httpd on

[root@w-163 ~]# service mysqld start

[root@w-163 ~]# chkconfig mysqld on

三、

配置MySQL root密码

[root@xuegod64 ~]# /usr/bin/mysqladmin -u
root password "123456"

四、

测试:登录mysql

[root@w-163 kaixin]# mysql -u root -p123456

五、

测试网站是否支持PHP

[root@w-163 kaixin]# cd /var/www/html/

[root@stu003 html]# vim index.php

[root@stu003 html]# cat  index.php

<?php

phpinfo();

?>

使用浏览器访问http://192.168.1.63/index.php,若出现PHP信息页即支持PHP

六、

上传网站模板  ECShop

[root@w-163~]# unzip -d /usr/local/src/ecshop 

ECShop_V2.7.3_UTF8_release0411.zip

[root@w-163 ECShop_V2.7.3_UTF8_release0411]# ls

docs  upgrade upload

上传upload;修改权限:

chown apache:apache ecshop/ -R

七、

网页安装

http://192.168.1.63/ecshop/install/index.php

安装时报错:

创建管理员帐号............失败

Warning: date(): It is not safe to rely on the system'stimezone settings. You are *required* to use the date.timezone setting or thedate_default_timezone_set() function. In case you used any of those methods andyou are still getting this warning, you most likely misspelled the timezoneidentifier. We selected 'Asia/Chongqing' for 'CST/8.0/no DST' instead in/home/babap/ecshop/includes/lib_time.php on line 28 OK

修改方法:

vimecshop/install/includes/init.php

1<?php

2 date_default_timezone_set('Asia/Shanghai');第二行插入此代码,设置时区

成功后点击进入网站首页


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

互联网老辛

你的鼓励是我最大的动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值