1 最后由 rain6966 (2017-01-24 11:36:41) 编辑

主题: iRedAdmin-0.6 升級 0.7 出現錯誤

==== 必填信息。没有填写将不予回复 ====
- iRedMail 版本号:0.6
- 使用哪个数据库存储用户帐号(OpenLDAP,MySQL,PostgreSQL):OpenLDAP
- 使用的 Linux/BSD 发行版名称及版本号:CentOS 6.8
- 与您的问题相关的日志信息:
====
PS: 另一台 CentOS7 更新正常

目前為 iRedAdmin-Pro-LDAP-2.6.1 ;
依照在Upgrade from iRedMail-0.9.5-1 文件, 出現錯誤

iRedAdmin-Pro 版 有需要做  iRedAdmin 的 upgrade 動作?



錯誤訊息如下:
~/iRedAdmin-0.7/tools]# bash upgrade_iredadmin.sh
* Detected Linux/BSD distribution: RHEL
* HTTP server root: /var/www
* Found iRedAdmin directory: /var/www/iredadmin, symbol link of iRedAdmin-Pro-LDAP-2.6.1
* Found iRedAdmin config file: /var/www/iredadmin/settings.py
* Copying new version to /var/www/iRedAdmin-0.7
* Removing old symbol link /var/www/iredadmin
* Creating symbol link /var/www/iredadmin to /var/www/iRedAdmin-0.7
* Delete all existing sessions, admins are forced to re-login to iRedAdmin.
* Check and install dependent Python modules:
  + [required] json or simplejson
  + [required] dnspython
  + [required] pycurl
  + [optional] BeautifulSoup
  + [optional] lxml
* Check SQL tables, and add missed ones - if there's any
ERROR 1142 (42000) at line 8 in file: '/var/www/iredadmin/SQL/iredadmin.mysql': CREATE command denied             to user 'iredadmin'@'localhost' for table 'sessions'
ERROR 1142 (42000) at line 17 in file: '/var/www/iredadmin/SQL/iredadmin.mysql': CREATE command denied             to user 'iredadmin'@'localhost' for table 'log'
ERROR 1142 (42000) at line 37 in file: '/var/www/iredadmin/SQL/iredadmin.mysql': CREATE command denied             to user 'iredadmin'@'localhost' for table 'updatelog'
ERROR 1142 (42000) at line 45 in file: '/var/www/iredadmin/SQL/iredadmin.mysql': CREATE command denied             to user 'iredadmin'@'localhost' for table 'deleted_mailboxes'
ERROR 1142 (42000) at line 68 in file: '/var/www/iredadmin/SQL/iredadmin.mysql': CREATE command denied             to user 'iredadmin'@'localhost' for table 'tracking'
ERROR 1142 (42000) at line 76 in file: '/var/www/iredadmin/SQL/iredadmin.mysql': CREATE command denied             to user 'iredadmin'@'localhost' for table 'domain_ownership'
* iRedAdmin has been successfully upgraded.
* Restarting httpd service to use new iRedAdmin release ...
正在停止 httpd:                                           [  確定  ]
正在啟動 httpd:                                           [  確定  ]
* Upgrading completed.
<<< NOTE >>> If iRedAdmin doesn't work as expected, please post your issue in
<<< NOTE >>> our online support forum: http://www.iredmail.org/forum/

回复: iRedAdmin-0.6 升級 0.7 出現錯誤

雖然不知為什麼會出現前面錯誤訊息,
但iRedMail 的運作正常 ,
可登入 iRedAdmin 控制平台
顯示為 v2.7.0 (LDAP)

回复: iRedAdmin-0.6 升級 0.7 出現錯誤

rain6966 写道:

ERROR 1142 (42000) at line 76 in file: '/var/www/iredadmin/SQL/iredadmin.mysql': CREATE command denied             to user 'iredadmin'@'localhost' for table 'domain_ownership'

此错误表示你的 SQL user “iredadmin”没有 'CREATE TABLE' 的权限。请以 sql root user 执行以下命令来修正:

sql> GRANT ALL ON iredadmin.* TO iredadmin@localhost;
sql> FLUSH PRIVILEGES;
sql> USE iredadmin;
sql> SOURCE /var/www/iredadmin/SQL/iredadmin.mysql;

回复: iRedAdmin-0.6 升級 0.7 出現錯誤

sql> GRANT ALL ON iredadmin.* TO iredadmin@localhost;
sql> FLUSH PRIVILEGES;
sql> USE iredadmin;
sql> SOURCE /var/www/iredadmin/SQL/iredadmin.mysql;

新年好,公司現已放年假了 . 感謝回覆 ;

執行以上指令;再移除 /vaw/www/iRedAdmin-Pro-LDAP-2.7.0 ,恢復為2.6.1版 連結
/root/iRedAdmin-Pro-LDAP-2.7.0/tools# bash upgrade_iredadmin.sh
執行升級 正常.

但在自己家裡連結 iredadmin 無法登入, 出現
219.80.xxx.xxx - - [26/Jan/2017:13:51:25 +0800] "GET /imail HTTP/1.1" 500 656
以前在公司是可連結登入

在 /etc/httpd/conf.d/iredadmin.conf
加入紅色字即可登入
<Directory /var/www/iredadmin/>
    Order allow,deny
    Allow               from all
    #Require all granted
    Require ip 192.168.1.0/24
    Require ip 219.80.xxx.xxx
    #Require valid-user
    Satisfy Any
</Directory>

回复: iRedAdmin-0.6 升級 0.7 出現錯誤

Apache 里的 ACL 不是 iRedMail 添加的,所以就交给你自己处理了。 big_smile