Upgrade roundcube

  • Category: 電腦相關
  • Last Updated: Tuesday, 19 August 2014 12:36
  • Published: Tuesday, 12 August 2014 18:56
  • Written by sam

roundcube 從裝好到現在都沒更新過

剛好今天作系統更新,順便作一下

我的版本是2010年最新版…由此可見真的蠻久了…

先至官網抓下最新版本

 photo 2014-08-12_175240_zpsefefc12e.jpg

因為是使用更新的方式

所以就蠻簡單的

但照安裝 roundcube on centos 5.5時,

roundcube的要求通常都是要新一點的php版本

這次也是不例外

至少要到php5.3才行

首先…一樣先備份…將舊的目錄整個tar起來

tar -cvf xxx.tar ./xxx

 

將新下載的例如…解壓後…蓋過原本的目錄即可

再來請執行./bin/update.sh

[root@myla bin]# ./update.sh
What version are you upgrading from? Type '?' if you don't know.
0.4.2
WARNING: Replaced config options:
(These config options have been replaced or renamed)
- 'imap_root' was replaced by 'imap_ns_personal'
- 'default_imap_folders' was replaced by 'default_folders'
- 'min_keep_alive' was replaced by 'min_refresh_interval'
- 'pagesize' was replaced by 'mail_pagesize'
- 'keep_alive' was replaced by 'refresh_interval'
- 'top_posting' was replaced by 'reply_mode'
 
NOTICE: Obsolete config options:
(You still have some obsolete or inexistent properties set. This isn't a problem but should be noticed)
- 'double_auth'
- 'db_max_length'
- 'mime_magic'
 
Do you want me to fix your local configuration? (y/N)
y
. backing up the current config file(s)...
. writing /var/www/html/config/config.inc.php...
Done.
Your configuration files are now up-to-date!
WARNING: File type detection doesn't work properly!
Please check the 'mime_magic' config option or the finfo functions of PHP and run this script again.
WARNING: Mimetype to file extension mapping doesn't work properly!
Please check the 'mime_types' config option and run this script again.
Executing database schema update.
ERROR: MySQL driver requires PHP >= 5.3, current version is 5.2.10ERROR: MySQL driver requires PHP >= 5.3, current version is 5.2.10

我的是超久的0.4.2

可以見到它會自動修改./config/裡的設定檔案

也能看到重點就是它要使用至少php5.3版本的php

以上動作也可以在Browser作

http://yourDomain/installer/

這樣也行;照著項目提示即可

完成時,它會提到一個"檔案連結",點擊下載…然後蓋過您原本的設定檔案就行了

再來是修正php的版本問題

[root@myla bin]# service httpd stop
[root@myla bin]# yum list installed | egrep ^php
php.x86_64                             5.2.10-1.el5.centos       installed
php-cli.x86_64                         5.2.10-1.el5.centos       installed
php-common.x86_64                      5.2.10-1.el5.centos       installed
php-ldap.x86_64                        5.2.10-1.el5.centos       installed
php-mysql.x86_64                       5.2.10-1.el5.centos       @c5-testing
php-pdo.x86_64                         5.2.10-1.el5.centos       installed
php-xml.x86_64                         5.2.10-1.el5.centos       installed

使用yum remove 將所有移除

再來是加入[root@myla bin]# cd /usr/local/src

[root@myla src]# wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/epel-release-5-4.noarch.rpm
                 ###32bit### 請抓 http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/epel-release-5-4.noarch.rpm
[root@myla src]# rpm -i epel-release-5-4.noarch.rpm

有了來源…再使用

yum -y install XXX 把剛剛刪除的相關套件裝回

yum install php53 php53-cli php53-common php53-gd php53-ldap php53-mbstring php53-mcrypt php53-mysql php53-pdo
[root@myla src]# service httpd start
正在啟動 httpd:                                            [  確定  ]

通常這樣就可以打開您的browser了

 photo 2014-08-12_175312_zpsed2548bd.jpg

操作前請記得詳細檢查php和您所使用的程式相容性!!!

以免憾事!!!

 

###0819###

如果您也是裝了新版後…日期怎麼也調不出來

但是按下去…還是可以排序哦…

再怎麼設定都沒用

先檢查一下

/var/www/html/logs

主要的問題就是php的時區沒有設定

[root@myla logs]# vim /etc/php.ini

[root@myla logs]# /etc/init.d/httpd restart
正在停止 httpd:                                            [  確定  ]
正在啟動 httpd:                                            [  確定  ]

這樣就行了