Debian Squeeze にWP を試しに立ててみる

IMGP8267 🏛️

ずっとblog 放置してて最近はGoogle+ やPukiwiki にメモしたりしてますがblog もたまに書きたくなって来ました.
ということで,blog を立ち上げてみようかと思います.
先ずはこのblog の為にWP を入れてみたエントリから.

環境

$ cat /etc/debian_version 
6.0.5

導入

$ sudo apt-get install wordpress wordpress-l10n

設定

apache の設定

$ cd /etc/apache2/sites-enabled
$ sudo vi 004-matoken.org
$ sudo git diff 004-matoken.org
diff --git a/apache2/sites-enabled/004-matoken.org b/apache2/sites-enabled/004-matoken.org
index df3c502..1c9f8b7 100644
--- a/apache2/sites-enabled/004-matoken.org
+++ b/apache2/sites-enabled/004-matoken.org
@@ -14,6 +14,13 @@
                allow from all
        </Directory>

+       Alias /blog /usr/share/wordpress
+       <directory /usr/share/wordpress>
+               Options FollowSymLinks
+               AllowOverride Limit Options FileInfo
+               DirectoryIndex index.php
+       </directory>
+
        ErrorLog ${APACHE_LOG_DIR}/error-matoken.org.log

        # Possible values include: debug, info, notice, warn, error, crit,
$ sudo /etc/init.d/apache2 restart

db の作成

DB 名 : wordpress
DB User : wp
DB Password : password

$ mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 7158
Server version: 5.1.63-0+squeeze1 (Debian)

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> CREATE DATABASE wordpress;
Query OK, 1 row affected (0.04 sec)

mysql> GRANT ALL PRIVILEGES ON wordpress.* TO wp@localhost IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.22 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.16 sec)

mysql> EXIT
Bye

wordpress の設定

$ cat /etc/wordpress/config-matoken.org.php
<?php                                                                                                                                                 
define('DB_NAME', 'wordpress');                                                                                                                       
define('DB_USER', 'wp');                                                                                                                              
define('DB_PASSWORD', 'password');                                                                                                                 
define('DB_HOST', 'localhost');                                                                                                                       
define('DB_CHARSET', 'utf8');                                                                                                                         
define('DB_COLLATE', '');                                                                                                                             
define ('WPLANG', 'ja');                                                                                                                              
define('WP_HOME', 'https://matoken.org/blog');                                                                                                         
define('AUTH_KEY', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');                                                                                                                                                         
define('SECURE_AUTH_KEY', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');                                                                                                                                                  
define('LOGGED_IN_KEY', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');                                                                                                                                                    
define('NONCE_KEY', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');
?>

https://matoken.org/blog/ にアクセスして設定.

Plugin の導入

WordPress › Markdown on Save Improved « WordPress Plugins 🏛️

Markdown 記法が使えるようになるPlugin です.

$ cd /tmp
$ wget http://downloads.wordpress.org/plugin/markdown-on-save-improved.2.2.zip
$ cd /usr/share/wordpress/wp-content/plugins
$ sudo unzip /tmp/markdown-on-save-improved.2.2.zip

管理画面の「プラグイン」から Markdown on Save Improved を有効化

その他

パーマリンク設定が有効にならない

rewrite が無効になっているので有効にする

$ sudo a2enmod rewrite
Enabling module rewrite.
Run '/etc/init.d/apache2 restart' to activate new configuration!
$ sudo /etc/init.d/apache2 restart
Restarting web server: apache2 ... waiting .

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)