osCommerce Documentation

Template Installation

Technical Requirements

osCommerce Online Merchant可以安装在任何PHP启用的web服务器上,可以连接到MySQL数据库. This includes shared servers, dedicated servers, and local installations running on Linux, Unix, BSD, Mac OS X, and Microsoft Windows operating systems.

Web Server

web服务器必须支持PHP作为一个模块或允许CGI脚本的执行. For performance reasons FastCGI is recommended over CGI.

PHP

The following PHP options are recommended to be set in the php.ini configuration file:

完成准备步骤后,可以继续进行osCommerce安装.

register_globals Off
magic_quotes_gpc Off
file_uploads On
session.auto_start Off
session.use_trans_sid Off

The following PHP extensions are mandatory:

MySQL Off

The following PHP extensions are recommended:

GD Image processing module.
cURL Network communication library.
OpenSSL Encryption library.

MySQL Database Server

The minimum MySQL version required is v3.23. 建议数据库服务器使用最新的MySQL 4或MySQL 5版本. The following MySQL storage engines are supported:

MyISAM Default storage engine.

Pre-Installation Steps

osCommerce Online Merchant是一个基于web的解决方案,需要其相关文件存在于web服务器上. The 文件可以通过在计算机上提取下载包并上传其内容来复制到web服务器 to the web server via FTP, 或者直接将下载包复制到web服务器并提取其内容 there.

Copying the Files to the Web Server

下载包的内容需要复制到web服务器所提供的公共HTML目录中 from.

  • /home/shinyredapples/public_html/
  • /srv/www/htdocs/
  • /usr/local/htdocs/
  • /var/www/vhosts/yourwebsite.com/httpdocs/

The contents of the download package once extracted is:

  • catalog (directory)
  • CHANGELOG
  • community_docs.pdf
  • documentation.pdf
  • extras (directory)
  • LICENSE
  • STANDARD
  • upgrade.html

Using FTP to Copy the Download Package Contents to the Web Server

osCommerce Online Merchant的下载包应保存并提取到您的计算机上,以显示其 contents. catalog目录必须复制到web服务器上的公共HTML目录.

这可以在大多数FTP客户机上实现,方法是将目录从本地文件浏览器面板拖到 remote panel listing the files on the web server.

请随意查看以下教程,了解如何将文件上传到服务器.

All PHP files must be uploaded in ASCII mode (not in Binary mode).

File Permissions

The following files need to be writable by the web server.

Files Web Server Writable
catalog/includes/configure.php
catalog/admin/includes/configure.php

Feel free to check out osCommerce. Uploading files and changing permissions tutorial.

The catalog/includes/configure.php and catalog/admin/includes/configure.php files must have 安装过程成功完成后,其web服务器可写权限被删除. This is described in the Post-Installation Steps chapter.

请咨询您的主机提供商,以获得允许web服务器写入这些内容的正确权限标志 files. This is commonly defined with a permission flag of 755.

在某些情况下,可以使用777的世界写权限标志,但可能导致不安全 installation of osCommerce Online Merchant.

修改文件权限可以通过大多数FTP客户端执行,也可以直接在web服务器上执行.

Using FTP/cPanel file manager to Change File Permissions

Most FTP clients are capable of changing file permissions on the web server. This is commonly performed by 右键单击该文件并在上下文菜单上选择“属性”或“属性”.

The file permissions can be changed by allowing all users to read, write, and execute the file, or by manually entering the world readable and world writable flag of 777.

Feel free to check out the following tutorial on 如何管理文件/文件夹的权限使用FTP管理器或cPanel filemanager.

Database

安装过程中需要在web服务器或数据库服务器上安装MySQL数据库 import the database table structure and required data settings.

Feel free to check out the following tutorials on creating a database using cPanel and creating a database with GoDaddy.

Web Server and Database Server Details

在安装过程中需要以下web服务器和数据库服务器的详细信息. Please consult your hosting provider if these details are not known.

Web Server Details

Setting Description Possible Value
Server Address The web address to the online store. http://www.yourwebsite.com/catalog/
Root Directory The directory where the online store is installed on the web server. /home/yourwebsite/public_html/catalog/

Database Server Details

Setting Description Possible Value
Server Address The address of the database server in the form of a hostname or IP address. localhost
Username The username used to connect to the database server. oscommerce_user
Password 与用户名一起使用的连接数据库服务器的密码. securepassword
Database Name The name of the database to hold the data in. oscommerce

在继续安装之前,请查看预安装步骤一章 procedure.

Installation Procedure

基于web的安装过程配置在线商店,并将配置数据导入到数据库中 database. 这对于创建功能齐全的在线商店和创建管理员是必要的 administrates the online store through the Administration Tool.

默认情况下提供的配置值可以安全使用,但可能需要根据环境进行更改 of the web server.

  1. Installing a New Online Store
  2. Welcome Page
  3. Database Server
  4. Web Server
  5. Online Store Settings
  6. Finished!

Installing a New Online Store

通过web方式访问在线商店时,会自动启动web安装过程 browser. 这可以通过输入osCommerce Online Merchant的WWW地址安装在您的 browser.

For example:

http://www.yourwebsite.com/catalog/

osCommerce Online Merchant自动检测安装是否已经完成并重定向到 the installation procedure if it has not yet been performed.

Feel free to check out the tutorial on final steps of installation.

Welcome Page

第一步是欢迎页面,显示当前推荐的PHP配置设置:

Welcome Page

It is recommended to update a PHP configuration value, or to install and activate a PHP extension, if it is marked against the recommended setting.

当更改PHP配置或安装和激活PHP扩展时, the web server service needs to be restarted for the changes to take effect. Once restarted, refreshing the 欢迎安装页面,查看Server Capabilities列表可以确认PHP配置是否正确 changes have taken place and if it meets the recommended settings.

Database Server

第二步设置数据库连接参数,以成功连接到数据库服务器, to import the database table structure, and to import required data:

Database Server

在继续下一步之前,安装过程将验证输入的值. If there is a problem connecting to the database server, an error message is shown similar to the message shown in the screenshot below:

Database Server

Make sure the correct username, password, and database name are listed.

Web Server

第三步设置web服务器参数,以成功为用户提供在线商店服务:

Web Server
Online Store Settings

第四步为在线商店设置商店所有者和管理员设置:

记住管理员用户名和密码非常重要,因为它们用于登录和访问 the Administration Tool.

Online Store Settings

Additional administrators can be created in the Administration Tool after the installation procedure has been successfully completed.

Finished!

安装过程的最后一步将数据库服务器和web服务器参数存储到 configuration file on the web server. On successfully saving the configuration file, the installation procedure is finalized and the online store is ready to be used.

记住管理员用户名和密码非常重要,因为它们用于登录和访问 the Administration Tool.

Finished

Post-Installation Steps

Upon successful installation of osCommerce Online Merchant, the following steps need to be performed to secure the installation of the online store.

Remove Installation Files

The catalog/install 目录必须从web服务器中删除,否则用户可以使用安装过程并重新配置 the online store to use another database server.

Reset File and Directory Permissions

Configuration Files

The file permissions on catalog/includes/configure.php and catalog/admin/includes/configure.php must be set to deny write access by the web server service. This is commonly performed by setting the permission flag to a read only value of 644 or 444 depending on your server.

Writable Directories

必须将以下目录设置为允许web服务器服务写入管理工具的目录 function properly. 这通常是通过将权限标志设置为777这个全球可写值来实现的.

Directories Web Server Writable
catalog/images
catalog/cache (create this folder)
catalog/admin/backups
catalog/admin/images/graphs

Extra Protection for the Administration Tool

管理工具由其自己的登录例程保护,但仍然可以公开访问. It is recommended to 通过在目录/admin目录上设置htaccess密码来进一步保护管理工具.

如果没有为管理工具设置额外的保护,建议移动 目录/admin/backups目录外的公共HTML目录,否则将公共访问备份文件 be possible. 备份目录的位置必须在catalog/includes/configure中正确定义.php.

Feel free to check out the following tutorial on how to secure your osCommerce store.