owncloud を立てる

メディアサーバは便利だが、普通のzipファイルとかが置けない。
plex media server に書籍を圧縮したzipを置いたが認識されなかった。。。。
そこで、さらにownCloudというdropboxもどきの自前のストレージサーバを立ててみた。

# yum install php php-gd php-xml php-intl php-mysql php-pdo php-pear
# yum install mysql-server
# rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# yum --enablerepo=epel install php-pear-MDB2-Driver-mysqli php-pear-Net-Curl
# wget http://download.opensuse.org/repositories/isv:ownCloud:community/CentOS_CentOS-6/isv:ownCloud:community.repo -P /etc/yum.repos.d
# yum -y install owncloud
# /etc/rc.d/init.d/httpd restart

http://(インストール先のIP)/owncloud/
でアクセスした後、最初に管理者用のID,PASSを設定する(任意のものでOK)
この段階で、
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken.
Please double check the installation guides."
というエラーが出た場合には、/etc/hosts ファイルに、
127.0.0.1 に対して外部からアクセスする名前を付けてあげる

さらにこの状態だとSSLが効いてないので、SSLをインストールした後、/etc/init.d/httpd restart で再起動する

# yum install openssl
# yum install mod_ssl
cd /etc/httpd/conf
# openssl genrsa -aes128 1024 > server.key
# openssl req -new -key server.key > server.csr
# openssl x509 -in server.csr -days 36500 -req -signkey server.key > server.crt
# mv server.key server.key.bak
# openssl rsa -in server.key.bak > server.key
Enter pass phrase for server.key.back:パスフレーズ
writing RSA key