Chinaunix首页 | 论坛 | 博客
  • 博客访问: 352359
  • 博文数量: 42
  • 博客积分: 1984
  • 博客等级: 上尉
  • 技术积分: 927
  • 用 户 组: 普通用户
  • 注册时间: 2010-11-30 14:40
文章分类

全部博文(42)

文章存档

2016年(11)

2014年(3)

2013年(7)

2012年(3)

2011年(8)

2010年(10)

分类: 系统运维

2011-05-19 18:27:23

作业环境
服务器端:RHEL6.0   IP:10.8.110.8
客户端:Windows 7    IP:10.8.110.28

一、ECShop简介

ECShop是上海商派网络科技有限公司(ShopEx)旗下——B2C独立网店系统,适合企业及个人快速构建个性化网上商店。系统是基于PHP语言及MYSQL数据库构架开发的跨平台开源程序。目前最新版本为2.7.2。

ECShop网店系统可免费下载、免费使用、免费升级,无使用时间与功能限制。 ECShop网店系统是一套免费开源的网上商店软件,无论在稳定性、代码优化、运行效率、负载能力、安全等级、功能可操控性和权限严密性等方面都居国内外同类产品领先地位。

二、创建yum源

RHEL6.0的安装就不说了,这是基本功。 系统刚装好时,是无法使用yum命令,需要手动创建yum源。方法如下:

a. 加载光驱
[root@sqing ~]# mount /dev/cdrom /mnt
mount: block device /dev/sr0 is write-protected, mounting read-only
[root@sqing ~]# cd /mnt
[root@sqing mnt]# ls

b. 创建/var/rhel6目录,并将光驱内容拷到该目录下
[root@sqing mnt]# mkdir -p /var/rhel6
[root@sqing mnt]# cp -prf /mnt/* /var/rhel6/

c. 在/etc/yum.repos.d下创建local.repo文件,编辑其内容为:
[root@sqing ~]# cat /etc/yum.repos.d/local.repo
[local-Server]
baseurl=file:///var/rhel6
enable=1
gpgcheck=0
至此,可以正常使用yum命令了。

三、LAMP环境搭建

通过yum源安装相关软件,不需进行特殊配置,也省去了源码安装的复杂性。
[root@sqing ~]# yum install –y httpd mysql-server php php-devel php-mysql

将mysqld httpd服务设为开机启动
[root@sqing ~]# chkconfig –add mysqld
[root@sqing ~]# chkconfig mysqld on
[root@sqing ~]# chkconfig –add httpd
[root@sqing ~]# chkconfig httpd on

安装好后,使用/usr/sbin/apachectl –t命令进行测试,输出为“Syntax OK”表示能正常启动apache了。
[root@sqing ~]# /usr/sbin/apachectl -t
httpd: apr_sockaddr_info_get() failed for sqing
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
Syntax OK
[root@sqing ~]# service httpd start

有Win7系统上,用IE登录RHEL服务器地址,可以看到apache羽毛标志,表示Apache已成功安装并启用。

要想知道是否已成功启动php模块,则进入/var/www/html目录,并创建php脚本,如下:
[root@sqing ~]# cat /var/www/html/phpinfo.php 
#welcome to sqing
phpinfo();
?>

phpinfo()是特殊的PHP函数,可以显示出目前服务器内PHP模块的相关核心资料。在Win7系统上,用IE浏览器浏览,结果如下:

开启mysql服务
[root@sqing ~]# service mysql start

四、ECShop系统部署

首先,将/etc/httpd/conf/httpd.conf中关于文件夹的权限由deny from all,改为allow from all,重启httpd服务。并且确定mysqld服务也已开启。

将项目文件夹放到/var/www/html目录下,并安装要求将设置目录及其子目录、文件的属性置为777。
[root@sqing ~]# chmod –R 777 data
[root@sqing ~]# chmod –R 777 temp
[root@sqing ~]# chmod –R 777 cert
[root@sqing ~]# chmod –R 777 includes
[root@sqing ~]# chmod –R 777 images
[root@sqing ~]# chmod –R 777 themes

重启动httpd服务,在Win7系统上,用IE浏览器登录,结果如下:

在安装过程中,有个设置时区的选项,默认是“亚洲,中国,重庆”,会安装进程终止,不能安装数据库。若将时区设置为“亚洲,中国,上海”,能安装数据,但在创建管理员帐号时还是会报错:


        创建配置文件............成功
        创建数据库............成功
        安装数据............成功
        创建管理员帐号............失败

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

由于当前RHEL系统采用“Asia/Shanghai”时区的时间(将其改为“Asia/Chongqing”也是行不通的),需修改源码中\upload\install\includes\lib_installer.php文件,在其开始位置添加“date_default_timezone_set ('Asia/Shanghai'); ”,内容如下:
date_default_timezone_set ('Asia/Shanghai');
…… ……
?>

成功安装后,ECShop系统即可正常运转。

本文出自 “一树清劲” 博客,请务必保留此出处http://sunshyfangtian.blog.51cto.com/1405751/568112

阅读(1461) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~