03_Linux下搭建Ecshop
-
打开虚拟机,选择自己的虚拟机,右键设置
-
检查下列勾选框是否勾选上
-
创建文件夹
mkdir /mnt/cdrom
- 加载LINUX安装光盘
mount /dev/cdrom /mnt/cdrom
- 进入安装程序目录
cd /mnt/cdrom/Server
- 安装apache 服务器,执行下列命令
- >
rpm -ivh postgresql-libs-8.1.11-1.el5_1.1.i386.rpm
- >
rpm -ivh apr-1.2.7-11.el5_3.1.i386.rpm
- >
rpm -ivh apr-util-1.2.7-7.el5_3.2.i386.rpm
- >
rpm -ivh httpd-2.2.3-31.el5.i386.rpm
<br>
- 启动http服务
service httpd start
<br>
- 在浏览器中访问http://linux的IP地址成功出现默认页面
<br>
- 安装MYSQL,执行下列命令
- >
rpm -ivh perl-DBI-1.52-2.el5.i386.rpm
- >
rpm -ivh mysql-5.0.77-3.el5.i386.rpm
- >
rpm -ivh perl-DBD-MySQL-3.0007-2.el5.i386.rpm
- >
rpm -ivh mysql-server-5.0.77-3.el5.i386.rpm
<br>
- 启动Mysql服务
service mysqld start
<br>
- 安装PHP
- >
rpm -ivh php-common-5.1.6-23.2.el5_3.i386.rpm
- >
rpm -ivh gmp-4.1.4-10.el5.i386.rpm
- >
rpm -ivh php-cli-5.1.6-23.2.el5_3.i386.rpm
- >
rpm -ivh php-5.1.6-23.2.el5_3.i386.rpm
- >
rpm -ivh php-mbstring-5.1.6-23.2.el5_3.i386.rpm
<br>
- 修改PHP对Apache的支持
vi /etc/httpd/conf/httpd.conf
进入末行模式,然后跳转到第800行
:800
然后在进入到编辑模式
i
直接粘贴以下内容
AddType application/x-httpd-php .php .php3 .phtml .inc
AddType application/x-httpd-php-source .phps
在末行模式保存退出
:wq
<br>
- 重启http服务
service httpd restart
<br>
- 将环境搭建练习文件夹中的ecshop.tar.gz文件拷入
/var/www/html
中
<br>
- 输入以下命令
- >
cd /var/www/html
- >
tar -xzvf ./ecshop.tar.gz
- >
chmod -R 777 ./ecshop
- 进入目录安装相应的gd库和mysql的支持:
cd /mnt/cdrom/Server/
rpm -ivh php-common-5.1.6-23.2.el5_3.i386.rpm
rpm -ivh php-pdo-5.1.6-23.2.el5_3.i386.rpm
rpm -ivh php-pdo-5.1.6-23.2.el5_3.i386.rpm
rpm -ivh php-mysql-5.1.6-23.2.el5_3.i386.rpm
rpm -ivh php-gd-5.1.6-23.2.el5_3.i386.rpm
service httpd restart
<br>
- 在浏览器中访问http://linux的ip地址/ecshop 即可进行安装
至此,安装结束