動かざることバグの如し

近づきたいよ 君の理想に

NginxとPHP-fpmで爆速Owncloudを構築

環境

  • Ubuntu Server 14.04
  • Owncloud 8.2
  • nginx 1.8.0
  • PHP 5.5.9

Nginxのインストール

sudo apt-add-repository ppa:nginx/stable
sudo apt-get update
sudo apt-get install nginx

PHPのインストール

sudo apt-get install php5-cli php5-fpm php5-cgi php5-gd php5-curl php5-mysql

owncloudのダウンロード

このへんはrootでやると吉

cd /var/var/html
wget http://download.owncloud.org/community/owncloud-latest.zip
unzip owncloud-latest.zip
chown www-data: -R owncloud

MariaDBのインストール

公式サイト参考しろ

sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
sudo add-apt-repository 'deb [arch=amd64,i386] http://ftp.yz.yamagata-u.ac.jp/pub/dbms/mariadb/repo/10.1/ubuntu trusty main'
sudo apt-get update
sudo apt-get install mariadb-server

適当にDB作っておけ

An exception occurred while executing 'INSERT INTO `oc_users` ( `uid`, `password` ) VALUES( ?, ? )' with params ["thr3a", "1|$2y$10$C6vgJXgiJZsbTppZbyRgBe3B8nq6TlVL2j24bYw3fkUOfhHLOeJRK"]: SQLSTATE[HY000]: General error: 1665 Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.

とかいうエラー出たら/etc/mysql/my.cnfのmysqldの項目にbinlog_format=mixed追加する

Nginxの設定

gist.github.com