个人工具

UbuntuHelp:WordPress/zh

来自Ubuntu中文

Lainme讨论 | 贡献2009年8月1日 (六) 15:52的版本 (创建新页面为 '{{From|https://help.ubuntu.com/community/WordPress}} {{Languages|UbuntuHelp:WordPress}} [http://www.wordpress.org Wordpress] is a popular web publishing software, most commonly ...')

(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航, 搜索

Wordpress is a popular web publishing software, most commonly used for weblogs (also known as "blogs"). Follow these instructions to install Wordpress on Ubuntu 6.06 (Dapper Drake).

LAMP Installation

Wordpress runs on the LAMP (Linux, Apache, MySQL, PHP) stack of applications. First you need to install and configure LAMP. See the ApacheMySQLPHP page.

Enable the Universe repository

Install Wordpress

Use any method to install

wordpress php5-gd 

The following will install Wordpress in the /wordpress directory of your default web site. To put it somewhere else, alter these commands to suit.

sudo ln -s /usr/share/wordpress /var/www/wordpress 

sudo sh /usr/share/doc/wordpress/examples/setup-mysql -n (your mysql user) localhost # use bash instead of sh on Gutsy

sudo /etc/init.d/apache2 restart

Now, browse to "http://localhost/wordpress" in your browser and click on the "install.php" link. WordPress?action=AttachFile&do=get&target=wordpress1.jpg WordPress?action=AttachFile&do=get&target=wordpress2.jpg The configuration changes the password of the MySQL user you use. You need to create a different MySQL user if you want to set up other web applications. Once installed, to change the url of your site, link the file /etc/wordpress/config-localhost.php to /etc/wordpress/config-my.url.com.php as well as changing the url in the wordpress configuration Options menu. For example, if my dns was hello.homelinux.net

sudo ln -s /etc/wordpress/config-localhost.php /etc/wordpress/config-hello.homelinux.net.php

WordPress?action=AttachFile&do=get&target=wordpress3.jpg Change the URLs to: WordPress?action=AttachFile&do=get&target=wordpress4.jpg

Troubleshooting

Error when running setup-mysql

While installing wordpress you may encounter the following error.

$ sudo sh /usr/share/doc/wordpress/examples/setup-mysql -n (your mysql user) localhost
/usr/share/doc/wordpress/examples/setup-mysql: 38: Syntax error: Bad substitution

This issue seems to be Edgy related. I did not encounter the error using Dapper. Here is a link to the bug reported on the Debian mailing list. Note: the issue seems to appear on Gutsy as well, only that the error code is slightly different:

/usr/share/doc/wordpress/examples/setup-mysql: 37: Syntax error: Bad substitution

To correct this, you first need to remove any configuration that may have already been created:

rm /etc/wordpress/config-localhost.php

Then run the same command but using bash instead of sh:

sudo bash /usr/share/doc/wordpress/examples/setup-mysql -n (your mysql user) localhost

External Links

The following are unverified suggestions made by users.

Turnkey Linux

An Ubuntu-based WordPress appliance is one of the easiest ways to get up and running with WordPress on Ubuntu. It's part of a family of pre-integrated TurnKey Linux Software Appliances based on Ubuntu 8.04.2 (Hardy LTS).