(转)osCommerce安装配置

来源:百度文库 编辑:神马文学网 时间:2024/04/19 23:02:43
找一个支持php的空间,如222365.org等等,按照附带的安装说明直接安装就好了。如果本地调试,建议用AppServV,架设php非常方便。我以前在我google的博客里面写了一篇安装的说明,可惜现在打不开了。
这是我在oscommerce官方论坛找到的简洁的安装办法,翻译如下,希望对你有帮助:
Here are the essential steps to install osCommerce in 5 minutes.这是一个精炼的安装方法,让你在5分钟之内安装osc.

1. Unzip the file oscommerce-2.2ms2.zip. 解压缩你下载的oscommerce.
2. Copy the 'catalog' folder and put it in your web server directory path.把catalog文件拷贝到你的服务器上的相应文件夹。(如果是appservV,就是在WWW文件夹,当然这是本地调试)

For example in Windows with IIS: 例如,在window环境下用iis调试,就放在C:\Inetpub\wwwroot\catalog


3. Keep your MySQL database username and password handy.输入你的mysql数据库的密码。

4. Point your browser to:在你的浏览器里面输入
http://localhost/catalog/install/(或者是127.0.0.1/catalog/install)

and follow the on-screen instructions

5. Remember to change the directory and file permissions as recommended during the installation process.记着删掉install文件夹,并且把config.*改为只读。

That's it. You should have osCommerce up and running!

Good luck,好运!
如果需要更详细的,如下:
1. You should download XXXX.zip file from www.template-help.com where your osCommerce template is stored. Once you’ve downloaded the file, you should unpack the archive and save the unpacked files to any folder on your computer.
2. You archive manager will create XXXX file. You should rename it using shop as the new name. Then copy it to the root catalogue of your web server.
3. Type http://YOUR_SITE/shop/ in your browser (YOUR_SITE – is an address of your web server).
If you have any problems with your browser, try http://YOUR_SITE/shop/install/. Check for the closing slash at the end of the URL, as some of the configurations of the web servers may not process URLs without the closing slash.
4. Click Install to get the next step
5. For the correct installation check in both matchboxes (Import Catalogue Database and Automatic Configuration) and press Continue.
As osCommerce uses database to store data, you should fill in all the fields to provide the information on your database server. osCommerce installing script will import values from the file WEB_ROOT/shop/install/oscommerce.sql to the database you point to (WEB_ROOT is the path to your web server's root catalogue).
Database Server – your database server address
Username – the name of the user who has rights to create and change databases and tables
Password – password of the user
Database Name – the name of your osCommerce database
Session Storage – special storage to keep sessions’ values
6. Press Continue for the next step. osCommerce will process the test connection to the database server now. You will be informed about the results. If osCommerce fails to process the connection, you should get in touch with your administrator to check your server settings.
7. Press Continue now. osCommerce will add the values to the database now. This process may take several minutes.
8. Check osCommerce configuration settings. It's recommended to keep these settings unless you have to change them. After checking the settings press Continue.
9. We recommend that you save the settings with the form but create a new account (user) for OsCommerce.
10. To finish the installation press Continue. You will be shown a notification about successful installation.
11. To have a look at your on-line shop, press Catalogue.
You will have 2 or 3 notifications at the top of your browser. To hide them you should
a) delete the catalogue install from WEB_ROOT/shop folder
b) mark WEB_ROOT/shop/includes/configure.php file as read only
12. To make any changes to your on-line shop, you should type http://YOUR_SITE/shop/admin/ with your browser. We recommend that you rename your admin folder with any other secret name (secret_name) and enter the admin section using this name http://YOUR_SITE/shop/secret_name/

以下是osc大中华版的安装,很类似的,供参考
快速安装(使用安装向导)
快速安装是针对第一次使用osCommerce大中华版的用户而设,用户可以通过简单的步骤完成安装过程,而无需过多地对主机进行设置。
1、解压文件包
A) 直接在Linux主机上解压:
运行命令:
unzip OSC-2.2ms2-GreaterChina2006.zip (对于zip文件)

tar -xzf OSC-2.2ms2-GreaterChina2006.tar.gz (对于tar.gz文件)
B) 在windows下解压,请使用最新版本的winzip或winrar.

2、拷贝目录catalog到您的站点WWW根目录下
A) Linux下:
cd OSC-2.2ms2-GreaterChina2006
cp -R catalog /usr/local/apache/htdocs/
(高级话题:在这个例子里,我们以WWW的站点根目录/usr/local/apache/htdocs/为例,但用户的WWW站点根目录由您的 主机实际设置情况所决定,具体请查阅Apache的设置文件/etc/httpd/httpd.conf,或咨询您的主机管理人员;如果您使用的虚拟主机 无法使用命令行操作,请先把文件在Windows下解压,然后再用FTP上传到您的站点WWW根目录下。)
B) Windows下:
通过FTP把catalog目录上传到您的站点WWW根目录下。

3、修改文件和目录访问权限
在Linux系统环境下,必须正确设置部分文件和目录权限,以便正确进行安装。当然,如果您忘记预先进行设置,在安装过程中我们的程序还是会提醒您的。
把以下文件的权限设为666:
./catalog/include/configure.php
./catalog/admin/include/configure.php
把以下文件的权限设为777,以用于写入文件:
./catalog/admin/backups/.
./catalog/images
如果你把osCommerce大中华版安装于MS Windows上,则无须做此步。

以命令行方式修改:
cd /usr/local/apache/htdocs/
chmod 666 ./catalog/include/configure.php
chmod 666 ./catalog/admin/include/configure.php
chmod 777 ./catalog/admin/backups/
chmod 777 ./catalog/images
此步骤也可以用FTP软件完成,Linux上的权限设置问题,请参阅网上相关的文章。

4、MySQL的设置
您必须在运行安装向导程序之前在MySQL中创建一个空的数据库,名字不限,可以设置为“OSC_GreaterChina”或其他。
如果您对命令行下的MySQL管理不熟悉,建议您在Linux服务器上安装一个MySQL的网页管理界面工具phpMyAdmin,使用十分简单方便,详细使用和安装方式请联系您的主机管理员或参阅http://www.phpmyadmin.net

5、运行安装向导程序
A) 打开网页浏览器,并输入如下地址:
http://[your site]/catalog/install
“[your site]”以您主机的真实域名替换,例如localhost, http://lcalhost/catalog/install
请注意,安装向导界面将统一使用简体中文版本。
您将见到如下的安装欢迎页面:

B) 点击Install图标,进行第一次安装(请注意,旧版本的osCommerce大中华版标准版本提供的“升级向导”功能,在osCommerce大中华 版2006中将不再提供,原因是由于大中华版2006加入了STS功能并修改大量的页面,除部分数据库结构外,其他均与旧版本有较大区别,直接使用升级向 导升级可能会导致小部分页面出错,所以只提供了第一次安装模式。但如果使用清洁的第一次安装,均不会出现任何问题。)
为免安装出错,请先备份旧系统,并把旧系统文件夹改名。如果使用osCommerce大中华版2006升级旧版本的osCommerce大中华版STS-base或STS-MAX,也应先进行备份再作覆盖安装。
C) 选择“导入数据库”和“自动设定”两项,并点击“继续”:

D) 根据您的主机实际情况,或根据主机管理员为您做的数据库设定资料,填写对应的数据库主机名、数据库访问用户名、数据库访问密码、数据库名称等项目。如果您 的主机非独立的主机,最好不选择保持连接,因为这样会使主机的负荷增加。Session(对话,PHP中保持用户登陆状态的信息)可以选择保存在数据库上 (如使用Windows主机必须选择保存在数据库上):

E) 提示即将自动导入对应的MySQL数据库表(所有osCommerce大中华版2006已提供正确的数据库表,在./catalog/install/下面,安装程式已预设该路径),请确认:

F) 导入成功:

G) 确认安装目录资料,此次将写入另一个配置文件,请在此步确认是否使用SSL(安全的网页信息加密,但您的主机必须已安装SSL。使用SSL后,访问您的网上购物站点必须使用https):

H) 再次确认数据库资料:

如果您的./catalog/include/configure.php和./catalog/admin/include/configure.php读写权限设置不当,您将获得一个警告页面:

按照提示修改读写权限后,按“重试”即可安装成功:

I) 点击“前台”将看到已经安装后的网络商店主页,点击右下角的中国国旗标志,可切换到简体中文界面;点击香港特区区旗,可得到繁体中文界面;英国国旗则是英 文界面;日本国旗就是日文界面。页面上的红色区域是提示您./catalog/include/configure.php和. /catalog/admin/include/configure.php读写权限需改回644的只读模式,修改正确后红色区域将自动消失。
J) 点击“后台管理工具”将进入管理界面,由于osCommerce大中华版增加了后台管理密码保护功能,这里需要有管理员密码才能登陆。如果您是第一次使用 后台管理模式,管理界面将根据您的浏览器语言版本自动选择语言,您有可能见到英文版本的后台登陆界面。不用担心,当您成功登陆并选择后台管理语言后,以后 的登陆界面都会按照您的习惯自动进行修正。

osCommerce大中华版2006默认的管理员邮箱是support@maxcapture.com,管理员密码是admin。在修改管理员邮箱前,请不要使用忘记密码功能,否则您的新密码将寄到support@maxcapture.com去了:)
后台管理的功能十分强大,请用户在您的网络购物站点投入正式使用前必须要做测试,以免出现操作错误。
由于我们预设的部分数据库资料是以简体中文为标准,所以如果您正在使用英文、繁体中文或日文的后台界面,部分页面可能会出错或乱码。

K) 如果您获得的是osCommerce大中华版2006(或STS-base,或STS-MAX),简单模板系统将在安装向导过程中自动安装成功。您会获得 一个预设的页面模板:./catalog/includes/sts_template.html。更多关于STS的知识请见以下文件:. /catalog/includes/sts_templates/README.txt。对于STS的进一步修改和设定,我们将在后文中介绍。

三、手动安装
手动安装适合高级用户使用,便于开发用户进行测试。
1、创建数据库并导入数据库表
用户可根据实际情况,直接使用MySQL命令或phpMyadmin进行操作。命令行下的操作如下,例如我们要建立的数据库名字为OSC_CreaterChina:
mysqladmin create OSC_CreaterChina
mysql OSC_GreaterChina < ./install/OSC-2.2ms2-GreaterChina-AddImages.sql
如果您需要检查数据表是否成功被导入,您可以使用mysqlshow把它们给列出来:
mysqlshow OSC_CreaterChina

2、修改配置文件
手工修改以下两个配置文件,具体的设置方式在文件里面有注释说明:
./catalog/includes/configure.php
./ catalog/admin/includes/configure.php