wordpressを入れてみる

参考1:http://www.ddhost.jp/lab/2013/12/raspberry_piwordpress.html
参考2:http://denshikousaku.net/raspberry-pi-wordpress-and-power-consumption
# apt-get install chkconfig
# chkconfig –list
apache2が無かった?
# service apache2 stop
# apt-get install lighttpd php5-cgi php5-mysql mysql-server
New password for the MySQL “root” user: ****************  ←適切なパスワードを入力
# cd /etc/lighttpd/conf-enabled
# ln -s ../conf-available/10-fastcgi.conf .
# ln -s ../conf-available/15-fastcgi-php.conf .
# cd /var
# wget http://ja.wordpress.org/latest-ja.zip
# unzip latest-ja.zip
# mv wordpress www
# rm -rf latest-ja.zip
# chown -R www-data:www-data www
# mysql -u root -p
Passwordを入力する
# create database wpdb;
GRANT ALL PRIVILEGES ON wpdb.* TO wpuser@localhost IDENTIFIED BY “yourpassword”;
exit
# cd /var/www/wordpress
# mv wp-config-sample.php wp-config.php
# vi wp-config.php
define(‘DB_NAME’, ‘wpdb’);
define(‘DB_USER’, ‘wpuser‘);
define(‘DB_PASSWORD’, ‘yourpassword’);
# chmod 404 wp-config.php
# /etc/init.d/lighttpd force-reload
http://192.168.*.*/wordpress
暫く待つとWordPressの設定画面
 
# apt-get install phpmyadmin
Web server to reconfigure automatically:
[ ] apache2
[*] lighttpd
Configure database for phpmyadmin with dbconfig-common?
<YES>
・・・
dpkg: error processing phpmyadmin (–configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
phpmyadmin
E: Sub-process /usr/bin/dpkg returned an error code (1)
となるけど
# /etc/init.d/lighttpd force-reload
[ ok ] Reloading web server configuration: lighttpd.
し、ブラウザからは観えるようになった。
まだ、WordPressもPhpMyAdminも恐ろしく遅い。
バックアップはWin32DiskImager の Read でimgファイルを作成する。
7.42 GBもあるので、圧縮にかなり時間がかかるけど、結構小さく(1.15 GB)なる。
# apt-get install php-apc
で、ずいぶんと速くなった気がする。
でも、まだ遅い
結局
# raspi-config
オーバークロック
http://c-mobberley.com/wordpress/2013/05/18/raspberry-pi-lighttpd-optimisation-for-wordpress-owncloud-and-more/
に良い事が書いてあるらしい。
# vi /etc/php5/cgi/php.ini
; cgi.fix_pathinfo=1   の ; を取る。
# vi /etc/lighttpd/lighttpd.conf
server.modules = (
“mod_access”,
“mod_alias”,
“mod_compress”,
“mod_redirect”,
# “mod_rewrite”,
)
の後に
fastcgi.server = ( “.php” => ((
“bin-path” => “/usr/bin/php5-cgi”,
“socket” => “/tmp/php.socket”
)))
を追記して
# service lighttpd restart
これで、ブラウザの画面更新が1秒ぐらいになったので何とかなりそう。
WordPressのWP Super Cache プラグインも入れてみる。
設定しようとしたら、wp-config.php を書き換えられないと泣きが入ったので644に
さらにパーマリンクがデフォルトのままでも支障があるようなので「日付と投稿名」に変更し
やっとWP Super Cache プラグインの設定画面を観れる。
簡易タグで ●キャッシング利用 (推奨) に変えて更新。
プリロードタグで、30分から、12000分(200時間)に更新。
しかし、記事が見つからなくなってしまったので、無効化、パーマリンクもデフォルトに戻す。
 




コメントを残す

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

CAPTCHA