CMSDrupal 1:Drupal安装与中文语言包安装

提前准备的软件:
  
  1、WAMP
  下载地址:http://www.wampserver.com/en/download.php
  
  2、drupal:
  下载地址:http://drupal.org/ 
  
-------------------------------------------------------------------------------------------  
drupal安装步骤:
-------------------------------------------------------------------------------------------
安装wamp
执行安装包,自动安装即可。
复制drupal内容
复制drupal内容到 wamp的www文件夹之下,覆盖index.php。
运行wamp
在桌面右下角选择运行中wamp的localhost,会出现drupal的安装页面。如果不行的话,通常是wamp的问题,我试了试,通常在彻底删除wamp及其创建的所有文件之后,重新安装wamp,问题都会得到解决。
-------------------------------------------------------------------------------------------
  1、首先会提示解决安装的中文支持问题,
-------------------------------------------------------------------------------------------  
  去下载了一个中文支持包,复制到了WAMP\WWW\的根目录下。
  其实这时候并没有解决中文支持,但是在安装完drupal之前,是无法安装中文支持的,具体的中文支持做法,在本文末尾。
-------------------------------------------------------------------------------------------  
  2、然后遇到了这个问题
-------------------------------------------------------------------------------------------   
  Requirements problem
  The following error must be resolved before you can continue the installation process:
  The Drupal installer requires that you create a settings file as part of the installation process.
  
   1. Copy the ./sites/default/default.settings.php file to ./sites/default/settings.php.
   2. Change file permissions so that it is writable by the web server. If you are unsure how to grant file permissions, please consult the on-line handbook.
  
  More details about installing Drupal are available in INSTALL.txt.
  
  Please check the error messages and try again. 
 
**解决办法**
  
把./sites/default/default.settings.php这个文件复制一下到./sites/default/settings.php.这里,实际上就是复制一个副本,然后把副本的名字改一下就行了。
  
  改权限的办法如下:
  http://drupal.org/node/202491 应该也是必须在NTFS的格式下。  
------------------------------------------------------------------------------------------- 
  3、数据库必须之前建好
-------------------------------------------------------------------------------------------  
  Database configuration
  The following error must be resolved before you can continue the installation process:
  Failed to connect to your MySQL database server. MySQL reports the following message: Access denied for user 'huze'@'localhost' (using password: YES).
  
   * Are you sure you have the correct username and password?
   * Are you sure that you have typed the correct database hostname?
   * Are you sure that the database server is running?
  
  For more help, see the Installation and upgrading handbook. If you are unsure what these terms mean you should probably contact your hosting provider.
  Basic options
  
  To set up your Drupal database, enter the following information.
  Database name: *
  The name of the mysqli database your Drupal data will be stored in. It must exist on your server before Drupal can be installed.
  Database username: *
  Database password:
  
**解决办法**

用PHPMYADMIN创建数据库:
  
  如何创建请看这里:http://rockoy.cn/phpmyadmin-user/
  与这篇文章所不同的地方是,我在文章所说的最后一步设置权限的时候,把管理权限也都打上勾了。
  
  接下来回到DRUPAL的安装页面,填写刚才所创建的数据库名称、用户名、密码。
  
  成功,直接进入安装界面,系统自动安装,等等就可以了。
  
-------------------------------------------------------------------------------------------  
  4、填写了一些信息,然后提示了我这个错误。
-------------------------------------------------------------------------------------------  
  Drupal installation complete
  
   * warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in F:\wamp\www\includes\mail.inc on line 193.
   * Unable to send e-mail. Please contact the site admin, if the problem persists.
  
  Congratulations, Drupal has been successfully installed.
  
  我的网站名称写的是HUZEWEBSITE\邮件写的是huze@huzewebsite,不知道怎么解决这个问题,暂时不用邮件系统,所以先跳过。
-------------------------------------------------------------------------------------------  
  5、中文支持包的安装
-------------------------------------------------------------------------------------------  
  发现,中文支持包没有起作用,
  原来中文支持需要执行两步
  
  第一步
  
  是将中文支持文件拷贝到网站的根部目下(与下载文件中说的一样)
  
  第二步
  
  还需要导入汉化包:
  1、admin->site building->modules [admin/build/modules] 启用 Locale 模块。
  2、admin->site configuration->Languages点 Add Language链接。
  3、Language name: 选择 Chinese,Simplified(简体中文)选择Add Language按钮。
  4、进入Importing interface translations页面,等待完成。
  5、导入完成之后系统自动回到了Languages页面,把zh-hans Chinese, Simplified简体中文 的Default选项选定。save configuration就OK了。

Linux下安装

 

我的服务器环境

* Linux: CentOS 5.1.x
* Apache: 2.2.x
* MySql: 5.0.37
* PHP: 5.2.5
* Zend-Optimizer: 3.3.x
* 组件: Mod_Rewrite、GD2、freetype2、iconv、.htaccess、CGI、perl

我的站点资料

域名:http://code.petkk.com

mysql数据库连接地址:localhost

mysql数据库连接端口:

mysql数据库用户名是:playts_test

mysql数据库名称是:playts_test

mysql数据库用户密码是: 123456

好了,跟我一起开始吧

我的服务器环境

* Linux: CentOS 5.1.x
* Apache: 2.2.x
* MySql: 5.0.37
* PHP: 5.2.5
* Zend-Optimizer: 3.3.x
* 组件: Mod_Rewrite、GD2、freetype2、iconv、.htaccess、CGI、perl

我的站点资料

域名:http://code.petkk.com

mysql数据库连接地址:localhost

mysql数据库连接端口:

mysql数据库用户名是:playts_test

mysql数据库名称是:playts_test

mysql数据库用户密码是: 123456

好了,跟我一起开始吧

下载drupal-5.7

http://ftp.drupal.org/files/projects/drupal-5.7.tar.gz

下载drupal-5.7简体中文语言包

http://ftp.drupal.org/files/projects/zh-hans-5.x-1.0.tar.gz

将下载回来的drupal-5.7.tar.gz解压并上传全部的文件到web站点根目录

URL地址到:http://code.petkk.com

(图1)由于\sites\default\settings.php 文件不能读写,请更改\sites\default\settings.php许可属性为:777 ,然后刷新一下,会出现(图2),然后填写相应的资料

对照一下我前面的资料,填写成你的资料,确认无误后点击“

Save configuration”按钮,开始安装,稍等片刻,就会出现(图3)界面

由于之前更改\sites\default\settings.php许可属性为:777 ,现在我们需要再更改\sites\default\settings.php许可属性为:644

更改完后,点击“your newsite”连接,会转到(图4)

我们要创建一个管理员帐号,这个帐号会拥有全部的权限,点击图4中“手形”的连接,转到(图5)

(图5)标注的很清楚也很简单,不多说了,我们来看 (图6)

在 (图6)界面,可以修改我们刚才创建的帐户admin的信息,最后记得保存。

至此 drupal-5.7安装完毕了,接着我们安装简体中文语言包

点击左栏的导航菜单Administer 其URL路径为:http://code.petkk.com/?q=admin

在(图7)中我们收到了错误通知,按(图7)的讲解,我们会转到URL:http://code.petkk.com/?q=admin/logs/status

按照(图8) 的指示,会URL到http://code.petkk.com/?q=admin/settings/file-system

按照(图9)将

File system path:修改为sites/default/files

Temporary directory: 修改为sites/default/tmp

并在FTP里建立这2个目录,设置许可权限为:777

再URL到http://code.petkk.com/?q=admin/logs/status处理另一个错误

在(图10)中我们看到刚才File system的错误信息已经没了 ,按照(图10)所示

运行 完之后还会回到URL:http://code.petkk.com/?q=admin/logs/status

如 (图11)所示

好了,错误通知都消除了

URL到http://code.petkk.com/?q=admin/build/modules

请按照(图12)所示操作,然后URL到:http://code.petkk.com/?q=admin

我们刚才启用了3个模块,在(图13)都能找到,先添加语言吧

URL到:http://code.petkk.com/?q=admin/settings/locale

根据(图14 )操作会URL到:http://code.petkk.com/?q=admin/settings/locale/language/add

根据(图15 )操作

在下拉列表中找到 简体中文,然后点“Add language”

好了,我们把下载 的简体中文语言包解压,会得到一个zh-hans目录,里面有4个文件

zh-hans.po就是我们要的语言包

URL到:http://code.petkk.com/?q=admin/settings/locale/language/import

语言包导入后,还需要激活、设置 为默认

简体中文界面出来了,如(图18)

下接:http://drupalchina.org/node/4617

原文地址:https://www.cnblogs.com/callbin/p/1446753.html