WordPress:Installing WPMU

来自站长百科
Fludlen讨论 | 贡献2008年9月22日 (一) 11:23的版本
跳转至: 导航、​ 搜索

WordPress MU, or WordPress Multi User

WordPress MU, 或者WordPress多个用户

WordPress MU, or WordPressµ, is the multi-user version of the WordPress blogging application, that allows you to run hundreds of thousands of blogs with a single install of WordPress, and is most famously used for WordPress.com.

WordPress MU,或者WordPressµ,是著名的WordPress博客软件的多用户版本,安装一个WordPress,就可以运行成千上万个博客,最常见是在WordPress.com上的使用。


Installing WordPress MU

安装 WordPress MU

Adapted from WordPress:Installing_WordPress: 根据 Installing_WordPress改编: 1. Download and unzip the WordPress MU package, if you haven't already. The unzipped files will be created in a directory named "wordpressmu" followed by a version or "wpmu" followed by a date.

1.如果你还没有准备好,下载并且解压WordPress MU软件包。解压后的文件会在名为"wordpressmu"目录中创建,目录后有个版本名称或者"wpmu"后面有个日期。

For the sake of convenience, rename this folder "wordpressmu" before continuing.

为了更便利,将这个文件夹重新命名为"wordpressmu"再继续。

2. Create a database for WordPress MU on your web server, as well as a !MySQL user who has all privileges for accessing and modifying it.

2.在你的网络服务器上为WordPress MU创建个数据库,!MySQL用户有权限访问和更改这个数据库。

3. Place the WordPress MU files in the desired location on your web server:

3.将WordPress MU文件放到你的网络服务器上适当的位置上:

  • If you want to integrate WordPress MU into the root of your domain (e.g. http://example.com/), move or upload all contents of the unzipped WordPress MU directory (but excluding the directory itself) into the root directory of your web server.
  • 如果你希望将WordPress MU与你的根域名相结合(例如http://example.com/)将解压的WordPress MU目录的所有内容(但是目录本身除外)转移或者上传到你的网络服务器的根目录。
  • If you want to have your WordPress MU installation in its own subdirectory on your web site (e.g. http://example.com/blogs/), rename the directory wordpressmu to the name you'd like the subdirectory to have and move or upload it to your web server. For example if you want the WordPress MU installation in a subdirectory called "blog", you should rename the directory called "wordpressmu" to "blogs" and upload it to the root directory of your web server.
  • 如果你将WordPress MU安装在你的网站上WordPress MU自身的子目录中(例如http://example.com/blogs/),将目录wordpressmu重新命名为你喜欢的子目录名并且将这个目录转移或者上传到你的网络服务器上。例如,如果你希望WordPress MU安装在称为"博客"的子目录上,你应该将称为"wordpressmu"的目录重新命名为"blogs"并且将目录上传到你的网络服务器的根目录上。

4. Run the WordPress MU installation script by accessing index.php in your favorite web browser.

4.在你最喜爱的网络浏览器中访问index.php,运行安装WordPress MU脚本。

  • If you're upgrading, skip to the end of this document.
  • 如果你正在升级,跳到这个文档的最后部分。
  • If you fill in the form and get a blank page, with no errors logged, the first thing to check is that you have php-mysql installed.
  • 如果你填写了表格,得到了空白的页面,没有错误,首先要检查的是你已经安装了php-mysql。
  On Fedora and Centos: yum install php-mysql.
  On RedHat: up2date php-mysql. 


在Fedora和Centos: yum install php-mysql.

  在RedHat: up2date php-mysql. 


HTTP Server : Apache

HTTP 服务器 : Apache

Apache must be configured so that mod_rewrite works. Here are instructions for Apache 2. Apache 1.3 is very similar.

Apache必须配置,mod_rewrite才能够运行。下面是Apache 2的指示说明。Apache 1.3非常相似。

  1. Make sure a line like the following appears in your httpd.conf LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so
  1.确定像下面的这一行出现在你的httpd.conf LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so
  2. In the <Directory> directive of your virtual host, look for this line "AllowOverride None" and change it to "AllowOverride FileInfo Options"
 2.在你的虚拟主机的<目录>命令中,查找"AllowOverride None"并且将其更改为"AllowOverride FileInfo 选项"
  3. In the <VirtualHost?> section of the config file for your host there will be a line defining the hostname. You need to add the following if you want virtual hosts to work properly: "ServerAlias *.domain.tld". Replace domain.tld with whatever your one is, and remove the quotes. 

 3.在你的主机配置文件的<VirtualHost?>部分,有一行定义了主机名。如果你希望虚拟主机正常运行,你需要添加下面的内容:"ServerAlias *.domain.tld"。将domain.tld替换,并且移除引号。

Rewriting Rules for others HTTP Server

其它的HTTP服务器的重写规则

Lighttpd

Lighttpd

Rewriting method: (best)

重写方法:(最好的)

  url.rewrite-once = (
   "^/(.*)?/?files/$" => "index.php",
   "^/(.*)?/?files/(.*)" => "wp-content/blogs.php?file=$2",
   "^/(wp-.*)$" => "$1",
   "^/([_0-9a-zA-Z-]+/)?(wp-.*)" => "$2",
   "^/([_0-9a-zA-Z-]+/)?(.*\.php)$" => "$2",
   "(\?.*)$" => "index.php$1",
   "." => "index.php"
  )


url.rewrite-once = (

   "^/(.*)?/?files/$" => "index.php",
   "^/(.*)?/?files/(.*)" => "wp-content/blogs.php?file=$2",
   "^/(wp-.*)$" => "$1",
   "^/([_0-9a-zA-Z-]+/)?(wp-.*)" => "$2",
   "^/([_0-9a-zA-Z-]+/)?(.*\.php)$" => "$2",
   "(\?.*)$" => "index.php$1",
   "." => "index.php"
  )

Without rewriting method: 没有重写方法:

  server.error-handler-404 = "/index.php"
  server.error-handler-404 = "/index.php"

Source: 资源:


Nginx

  rewrite ^.*/files/(.*) /wp-content/blogs.php?file=$1
  if (!-e $request_filename) {
   rewrite ^.+/?(/wp-.*) $1 last;
   rewrite ^.+/?(/.*\.php)$ $1 last;
   rewrite ^(.+)$ /index.php?q=$1 last;
  }



Nginx

  rewrite ^.*/files/(.*) /wp-content/blogs.php?file=$1
  if (!-e $request_filename) {
   rewrite ^.+/?(/wp-.*) $1 last;
   rewrite ^.+/?(/.*\.php)$ $1 last;
   rewrite ^(.+)$ /index.php?q=$1 last;
  }


Source: 资源:


DNS

域名服务器

If you want to host blogs of the form http://blog.domain.tld/ where domain.tld is the domain name of your machine then you must add a wildcard record to your DNS records. This usually means adding a "*" hostname record pointing at your webserver in your DNS configuration tool. Matt has a more detailed explanation: http://ma.tt/2003/10/wildcard-dns-and-sub-domains/

如果你想要托管http://blog.domain.tld/形式的博客,domain.tld是你的电脑的域名,那么你需要向你的域名服务器添加通配符。这通常指的是添加"*" 主机名record指向你的DNS配置工具中的网络服务器。Matt拥有更详细的解释:http://ma.tt/2003/10/wildcard-dns-and-sub-domains/

PHP

PHP

For security reasons, it's very important that PHP be configured as follows:

出于安全方面的考虑,PHP配置成以下的形式很重要:

  1. Don't display error messages to the browser. This is almost always turned off but sometimes when you're testing you turn this on and forget to reset it.
  1. 不要向浏览器显示错误信息。这个选项基本是关闭的,但是当你测试的时候,你会打开,而且可能忘记关闭。
  1. GLOBAL variables must be turned off. This is one of the first things any security aware admin will do. These days the default is for it to be off!
  1. 必须关闭全局变数。这是管理员需要处理的第一个安全方面的问题。如今,默认为关闭!
  1. If you want to restrict blog signups, set the restrict domain email setting in the admin.
  1. 如果你想要限制博客注册人数,在管理中设置限制域名电子邮件设置。

The easiest way of configuring it is via the .htaccess file that is created during the install. If you haven't installed WPMU yet then edit the file htaccess.dist in this directory and add these two lines at the top:

最简单的配置方法是通过.htaccess文件,这个文件是安装的时候,创建的。如果你还没有安装WPMU,那么编辑这个目录中的文件htaccess.dist,并且将这两行添加到顶上方:

  php_flag register_globals 0 
  php_flag display_errors 0

php_flag register_globals 0

  php_flag display_errors 0

This is NOT included in that file by default because it doesn't work on all machines. If it doesn't work on your machine, you'll get a cryptic "500 internal error" after you install WPMU. To remove the offending lines just edit the file ".htaccess" in your install directory and you'll see them at the top. Delete and save the file again. Read here for how to enable this: http://ie.php.net/configuration.changes

默认情况下,这两行不包含在文件中,但是这两行并不是在所有电脑中都能够运行。如果不能够在你的电脑上运行,安装WPMU后,你会得到含义模糊的"500 内部错误"。移除这两行,在你的安装目录中编辑文件".htaccess",你能够在顶上方看到。再次地删除并且保存文件。在这里阅读怎样操作:http://ie.php.net/configuration.changes

If you don't want to edit your .htaccess file then you need to change your php.ini. It's beyond the scope of this README to know exactly where it is on your machine, but if you're on a shared hosted server you probably don't have access to it as it requires root or administrator privileges to change.

如果你不想要编辑.htaccess文件,你就需要更改你的php.ini。这个README不了解php.ini位于你的电脑上的什么位置,但是如果你在共享的主机服务器上,你可能不需要访问php.ini,因此访问php.ini需要根目录访问或者管理员权限来更改。

If you do have root access, try "locate php.ini" or check in:

如果你真的有根目录访问选项,试着"locate php.ini"或者进入是:

  /etc/php4/apache2/php.ini 
  /usr/local/lib/php.ini

/etc/php4/apache2/php.ini

  /usr/local/lib/php.ini

Once you have opened your php.ini, look for the sections related to register_globals and display_errors. Make sure both are Off like so:

你一旦打开了你的php.ini,查找register_globals 和display_errors的相关部分。确定两个部分都如下:

  display_errors = Off 
  register_globals = Off
  display_errors = Off 
  register_globals = Off

You'll have to restart Apache after you modify your php.ini for the settings to be updated.

更改php.ini,使得设置更新之后,你必须重启Apache。

Upgrading

升级

Please see this page for instructions on upgrading your install: http://trac.mu.wordpress.org/wiki/UpgradingWpmu

请看看这个页面上,关于升级你的安装内容的指示:http://trac.mu.wordpress.org/wiki/UpgradingWpmu

Support Forum and Bug Reports

支持论坛和程序缺陷报告=

Please read http://trac.mu.wordpress.org/wiki/DebuggingWpmu before asking any questions. Without all the information required there we'll just ask for it anyway or worse, your request will be ignored.

询问任何问题之前,请阅读http://trac.mu.wordpress.org/wiki/DebuggingWpmu。如果你不了解上面的信息,你可能重复问了同个问题,更糟的是,你的问题可能被忽视。

http://mu.wordpress.org/forums/

http://mu.wordpress.org/forums/

Trac is our bug tracking system. Again, please read the above link before submitting a bug report: http://trac.mu.wordpress.org/report/1

Trac是我们的程序缺陷追踪系统。请阅读上述的链接,再递交程序缺陷报告:http://trac.mu.wordpress.org/report/1

You can login to both sites using your wordpress.org username and password.

你可以使用你的wordpress.org用户名和密码登录到两个站点上。

Related

相关的

http://mu.wordpress.org/download/ http://mu.wordpress.org/download/