“UbuntuHelp:WordPress”的版本间的差异
来自Ubuntu中文
小 |
小 |
||
第1行: | 第1行: | ||
{{From|https://help.ubuntu.com/community/WordPress}} | {{From|https://help.ubuntu.com/community/WordPress}} | ||
{{Languages|UbuntuHelp:WordPress}} | {{Languages|UbuntuHelp:WordPress}} | ||
− | |||
− | |||
[http://www.wordpress.org Wordpress] is a popular web publishing software, most commonly used for weblogs (also known as "blogs"). | [http://www.wordpress.org 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). | Follow these instructions to install Wordpress on Ubuntu 6.06 (Dapper Drake). | ||
− | |||
=== LAMP Installation === | === LAMP Installation === | ||
− | |||
Wordpress runs on the LAMP (Linux, Apache, MySQL, PHP) stack of applications. | Wordpress runs on the LAMP (Linux, Apache, MySQL, PHP) stack of applications. | ||
− | |||
First you need to install and configure LAMP. See the [[UbuntuHelp:ApacheMySQLPHP]] page. | First you need to install and configure LAMP. See the [[UbuntuHelp:ApacheMySQLPHP]] page. | ||
− | |||
=== Enable the Universe repository === | === Enable the Universe repository === | ||
− | |||
* [[UbuntuHelp:Repositories/CommandLine| I am using Ubuntu server (command line)]] | * [[UbuntuHelp:Repositories/CommandLine| I am using Ubuntu server (command line)]] | ||
* [[UbuntuHelp:AddingRepositoriesHowto| I am using a desktop]] | * [[UbuntuHelp:AddingRepositoriesHowto| I am using a desktop]] | ||
− | |||
=== Install Wordpress === | === Install Wordpress === | ||
Use [[UbuntuHelp:InstallingSoftware| any method]] to install | Use [[UbuntuHelp:InstallingSoftware| any method]] to install | ||
− | |||
<pre><nowiki> | <pre><nowiki> | ||
wordpress php5-gd | wordpress php5-gd | ||
</nowiki></pre> | </nowiki></pre> | ||
− | |||
The following will install Wordpress in the /wordpress directory of your default web site. To put it somewhere else, alter these commands to suit. | The following will install Wordpress in the /wordpress directory of your default web site. To put it somewhere else, alter these commands to suit. | ||
− | |||
<pre><nowiki> | <pre><nowiki> | ||
sudo ln -s /usr/share/wordpress /var/www/wordpress | sudo ln -s /usr/share/wordpress /var/www/wordpress | ||
− | |||
sudo sh /usr/share/doc/wordpress/examples/setup-mysql -n (your mysql user) localhost | sudo sh /usr/share/doc/wordpress/examples/setup-mysql -n (your mysql user) localhost | ||
− | |||
sudo /etc/init.d/apache2 restart | sudo /etc/init.d/apache2 restart | ||
</nowiki></pre> | </nowiki></pre> | ||
− | |||
Now, browse to "http://localhost/wordpress" in your browser and click on the "install.php" link. | Now, browse to "http://localhost/wordpress" in your browser and click on the "install.php" link. | ||
https://help.ubuntu.com/community/WordPress?action=AttachFile&do=get&target=wordpress1.jpg | https://help.ubuntu.com/community/WordPress?action=AttachFile&do=get&target=wordpress1.jpg | ||
− | |||
https://help.ubuntu.com/community/WordPress?action=AttachFile&do=get&target=wordpress2.jpg | https://help.ubuntu.com/community/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. | 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. | 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'' | For example, if my dns was ''hello.homelinux.net'' | ||
<pre><nowiki> | <pre><nowiki> | ||
第51行: | 第32行: | ||
Change the URLs to: | Change the URLs to: | ||
https://help.ubuntu.com/community/WordPress?action=AttachFile&do=get&target=wordpress4.jpg | https://help.ubuntu.com/community/WordPress?action=AttachFile&do=get&target=wordpress4.jpg | ||
− | |||
=== Troubleshooting === | === Troubleshooting === | ||
− | |||
==== Error when running setup-mysql ==== | ==== Error when running setup-mysql ==== | ||
While installing wordpress you may encounter the following error. | While installing wordpress you may encounter the following error. | ||
第60行: | 第39行: | ||
/usr/share/doc/wordpress/examples/setup-mysql: 38: Syntax error: Bad substitution | /usr/share/doc/wordpress/examples/setup-mysql: 38: Syntax error: Bad substitution | ||
</nowiki></pre> | </nowiki></pre> | ||
− | |||
This issue seems to be Edgy related. I did not encounter the error using Dapper. Here is a [http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg199581.html link] to the bug reported on the Debian mailing list. | This issue seems to be Edgy related. I did not encounter the error using Dapper. Here is a [http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg199581.html 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: | Note: the issue seems to appear on Gutsy as well, only that the error code is slightly different: | ||
− | |||
<pre><nowiki> | <pre><nowiki> | ||
/usr/share/doc/wordpress/examples/setup-mysql: 37: Syntax error: Bad substitution | /usr/share/doc/wordpress/examples/setup-mysql: 37: Syntax error: Bad substitution | ||
</nowiki></pre> | </nowiki></pre> | ||
− | |||
To correct this, you first need to remove any configuration that may have already been created: | To correct this, you first need to remove any configuration that may have already been created: | ||
<pre><nowiki> | <pre><nowiki> | ||
rm /etc/wordpress/config-localhost.php | rm /etc/wordpress/config-localhost.php | ||
</nowiki></pre> | </nowiki></pre> | ||
− | |||
Then run the same command but using ''bash'' instead of ''sh'': | Then run the same command but using ''bash'' instead of ''sh'': | ||
<pre><nowiki> | <pre><nowiki> |
2007年11月30日 (五) 22:32的版本
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 UbuntuHelp: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 sudo /etc/init.d/apache2 restart
Now, browse to "http://localhost/wordpress" in your browser and click on the "install.php" link. 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
Change the URLs to:
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