あるowncloudの記録(´・ω・)ス | WEB系技術電脳日記

あるowncloudの記録(´・ω・)ス


【追記】
owncloud入れたサーバー、
Can't write into config directory!
This can usually be fixed by giving the webserver write access to the config directory.
   なぜUnlimitedなのに???
   Your storage is full, files can not be updated or synced anymore!

# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup-lv_root
51606140 49460120 0 100% /
tmpfs 1122744 68 1122676 1% /dev/shm
/dev/mapper/pdc_hfceifebcp1
495844 68500 401744 15% /boot
/dev/mapper/VolGroup-lv_home
1868009828 235328 1772885132 1% /home

おいおい・・・・・

これはその記録(´・ω・)ス




スタッフにファイルサーバーを頼んだが、
ファイルを上げてみると、ownCloud 入れてあり、
40GB程上げてみると、エラー、
Your storage is full, files can not be updated or synced anymore!
無制限だよね?ねえねぇ?と聞くとなぜエラーになるか分からないドットコムらしいので、
修復する記録・・・。


さて、開始、
まずは基本がPHP5.3じゃだめらしいので、レポジトリ追加しつつアップデート。

# php -v
PHP 5.5.11 (cli) (built: Apr 6 2014 12:03:37)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies
おけおけ

次に、mysql絡みも

yum install php55w-common
yum install php55w-mysql

安価にphp起動確認。おk
※あくまでローカルなので、ディレクトリー名とかデフォ設定よろ(´・ω・)ス
------------------------------------------------------------------------
00:15 次にMySQL絡みを。phpMyAdminを入れる。安全にphpMyAdmin-4.1.14
00:16 白い白いぞ画面が、エラー確認。
PHP Fatal error: Call to undefined function mb_detect_encoding() in
/var/www/html/phpMyAdmin/libraries/php-gettext/gettext.inc on line 177
ライブラリ足りないか?
yum --enablerepo=remi,epel,rpmforge install php
php-mbstring php-devel php-pear php-mysql php-gd php-mcrypt php-pcre php-xml
などなど。
/etc/rc.d/init.d/httpd restart
ん?違うな、コード見ていくか。
あれ・Call to undefined function mb_detect_encoding()だからmb_detect_encoding 関数がないのか?
ん?入ってないのか?
# rpm -qa | grep php
php55w-5.5.11-1.w6.x86_64
php55w-mysql-5.5.11-1.w6.x86_64
php55w-common-5.5.11-1.w6.x86_64
php55w-pdo-5.5.11-1.w6.x86_64
php55w-opcache-5.5.11-1.w6.x86_64
php55w-cli-5.5.11-1.w6.x86_64

とりあえず入れる。
yum install php-mbstring
エンコード項目もphp.iniで確認する。
モジュール場所どこだー


/usr/lib64/php/modules 把握(´・ω・)ス
お、これか
http://rpm.pbone.net/index.php3/stat/4/idpl/26096898/dir/redhat_el_6/com/php55w-mbstring-5.5.9-1.w6.x86_64.rpm.html
ぬぅ・・・・

01:37 ハマった・・・・
01:48 やっと完了。
# php -m
]# php -m
[PHP Modules]
bz2
calendar
Core
ctype
curl
date
ereg
exif
fileinfo
filter
ftp
gettext
gmp
hash
iconv
json
libxml
mbstring
mhash
mysql
mysqli
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
sqlite3
standard
tokenizer
xml
Zend OPcache
zip
zlib
[Zend Modules]

ハマった結論からいうと、# yum install php55w-mbstring と、soが無かった(´・ω・)ス
そして探した。
php5.5まではいいとしてモジュール探すのを本家までいきつつアレアレした。
で、普通に yum search mbstring で探せば良かった。
参考:
http://siguniang.wordpress.com/2013/03/16/php-mbstring-missing-on-red-hat-enterprise-linux-6/
http://otyoppu.hatenablog.com/entry/2013/10/17/153713
01:53 さて、次はDB設定しつつ、入れるか。
うほ、出てる出てる(´・ω・)ス
せっかくなら最新バージョンにしておくか?

ownCloud 6.0.3 is available.
Get more information on how to update.
とか出てるしね。
Upgrade is not possible.
Make sure that your webserver has write access to
the following files and directories:

そりゃそうか。
まずはディレクトリーのエラーを直すか。

Can't write into apps directory
You can usually fix this by giving the webserver user write access to
the apps directory in owncloud or disabling the appstore in the config file.
把握(´・ω・)ス
それと、
Can't write into apps directory
Can't create data directory (/var/www/html/data)
apps のディレクトリ??コンフィグ見る
# vi /var/www/owncloud/config/config.php
appsとは明確書いてないけど、まずはdataから
chown -R apache html
chown -R apache owncloud
うし、エラーが消えた。
02:26 次に、PHP module GD is not installed
はいってねーのか、再度確認
# yum install php-gd
あ、また同じミスを。
# yum install php-gd
php-gd.x86_64 : A module for PHP applications for using the gd graphics library
把握(´・ω・)ス
php-gdでコケるお・・・・

02:55 最初から、yum search~~で探した方が早かった(´・ω・)ス
   これでエラーは全部潰した(´・ω・)ス
   これで・・・あら、まっしろ、
PHP Fatal error: require_once(): Failed opening required 'phpass/PasswordHash.php'
(include_path='/var/www/html/lib:/var/www/html/config:/var/www/html/3rdparty
:/var/www/html/apps:/var/www/html/lib:.:/usr/share/pear:/usr/share/php:/var/www/html') in /var/www/html/lib/user/database.php on line 36
またドライバ絡みか
yum install php55w-common
yum install php55w-mysql

これで何度目だナウシカ状態(´・ω・)ス
さらに、更新するたびに改行入るなんだか。