next up previous contents
Next: 安裝 phpmyadmin Up: 安裝 Moodle Previous: 安裝 Moodle   Contents

其他設定

  1. 若使用 LDAP 進行用戶認證,必須加裝 php-ldap 套件。
    [root@kvm5 ~]# yum install php-ldap
    [root@kvm5 ~]# /etc/init.d/httpd reload
    
  2. Moodle 無法寄信。
    sendmail: fatal: chdir /var/spool/postfix: Permission denied
    
  3. 讓網頁 PHP 可以寄信。
    [root@kvm5 ~]# setsebool -P httpd_can_sendmail on
    
  4. Moodle 主機 Domain name 必須可以反查。
    [root@dywang ~]# nslookup CloudVM-004.cyut.edu.tw
    Server:		163.17.10.1
    Address:	163.17.10.1#53
    
    ** server can't find CloudVM-004.cyut.edu.tw: NXDOMAIN
    
  5. Moodle 主機 postfix 轉信主機設定是否正確?
    [root@kvm5 ~]# vim relayhost /etc/postfix/main.cf 
    # The relayhost parameter specifies the default host to send mail to
    # no relayhost is given, mail is routed directly to the destination.
    relayhost = xxx.xxx.xxx.xxx
    
  6. 重新 Moodle 主機 postfix 服務。
    [root@kvm5 ~]# /etc/init.d/postfix restart
    
  7. 修改 php 設定檔,限制上傳下載檔案大小、設定時區。
    [root@dywang ~]# diff -urN php.ini /etc/php.ini 
    --- php.ini	2014-03-20 19:46:56.340663099 +0800
    +++ /etc/php.ini	2014-02-28 19:19:51.128049556 +0800
    @@ -454,7 +454,7 @@
     
     ; Maximum amount of memory a script may consume (128MB)
     ; http://www.php.net/manual/en/ini.core.php#ini.memory-limit
    -memory_limit = 128M
    +memory_limit = 256M
     
     ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
     ; Error handling and logging ;
    @@ -726,7 +726,7 @@
     
     ; Maximum size of POST data that PHP will accept.
     ; http://www.php.net/manual/en/ini.core.php#ini.post-max-size
    -post_max_size = 8M
    +post_max_size = 11M
     
     ; Magic quotes are a preprocessing feature of PHP where PHP will attempt to
     ; escape any character sequences in GET, POST, COOKIE and ENV data which might
    @@ -875,7 +875,7 @@
     
     ; Maximum allowed size for uploaded files.
     ; http://www.php.net/manual/en/ini.core.php#ini.upload-max-filesize
    -upload_max_filesize = 2M
    +upload_max_filesize = 11M
     
     ;;;;;;;;;;;;;;;;;;
     ; Fopen wrappers ;
    @@ -943,7 +943,7 @@
     [Date]
     ; Defines the default timezone used by the date functions
     ; http://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone
    -;date.timezone =
    +date.timezone = "Asia/Taipei"
     
     ; http://www.php.net/manual/en/datetime.configuration.php#ini.date.default-latitude
     ;date.default_latitude = 31.7667
    



2017-06-15