(2020/11/14)
由於學校要使用到社團報名系統,之前用XOOPS下的模組很好用,所以在虛擬機再來安裝XOOPS架站,及安裝社團報名模組
一、XOOPS檔案資料
XOOPS 2.5.10 正體中文版(2019/05/03)
另外,還有一篇文章有更快的安裝方法
https://campus-xoops.tn.edu.tw/modules/tad_book3/page.php?tbsn=18&tbdsn=306
但需用到SSH的帳密,但由於本次虛擬機用金鑰的方式登入,所以沒有去試如何新增SSH的帳密
二、安裝步驟
將檔案上傳
可利用wget來上傳檔案(但不知連結網址)
我是先透過ftp上傳到/var/www/html下
將檔案解壓縮
[root@shsps html]# unzip XoopsCore25-2.5.10.zip
htdocs 底下的所有檔案上傳到網頁目錄下(如:/var/www/html )
[root@shsps html]# cd XoopsCore25-2.5.10
[root@shsps XoopsCore25-2.5.10]# mv htdocs /var/www/html
將 xoops_data 及 xoops_lib 移到網頁目錄之外(例如:/var/www )
[root@shsps XoopsCore25-2.5.10]# mv xoops_data /var/www
[root@shsps XoopsCore25-2.5.10]# mv xoops_lib /var/www
將下列資料夾與檔案的屬性設定為可寫入 UNIX, Linux(777);Windows(取消唯讀屬性):
chmod 777 /網頁目錄/include/license.php
chmod -R 777 /網頁目錄/uploads
chmod -R 777 /網頁目錄上一層/xoops_data
[root@shsps html]# mv htdocs xoops (把htdocs的目錄名稱改為xoops)
[root@shsps html]# cd xoops
[root@shsps xoops]# chmod 777 include/license.php
[root@shsps xoops]# chmod 777 uploads/
[root@shsps xoops]# chmod 777 /var/www/xoops_data/
開始安裝
輸入http://163.16.244.xxx/xoops/install/index.php
第2步驟(也就是之前所做的設定)
第3步驟
第4步驟
第5步驟,輸入用戶帳號及密碼
第6步驟,輸入資料庫名稱
第7步驟
修改
[root@shsps html]# chown -R apache:apache xoops
[root@shsps xoops]# cd /var/www
[root@shsps www]# chown -R apache:apache xoops_data/
第9步驟
第11步驟
第13步驟
第14步驟
修改
[root@shsps xoops]# chmod 444 mainfile.php
[root@shsps xoops]# rm -rf install_remove_11476089755faf90de2263b
三、安裝TadTools工具包、TadAdm站長工具、TadThems佈景管理
下載網址:https://campus-xoops.tn.edu.tw/
TadTools工具包:
https://campus-xoops.tn.edu.tw/modules/tad_modules/index.php?module_sn=1
若您的 XOOPS 是2.3版以上,請將整個 tadtools 上傳到XOOPS下的 modules 目錄下並安裝。
TadAdm站長工具箱:
TadThems佈景管理:
以上模組沒有用到,暫時先不裝
四、安裝【社團報名系統】
說明網址:https://campus-xoops.tn.edu.tw/modules/tad_modules/index.php?module_sn=101
下載網址:https://campus-xoops.tn.edu.tw/modules/tad_modules/index.php?op=tufdl&files_sn=2388#kw_club_1.6_20200513.zip
上傳檔案到modules資料夾
先將檔案下載後,利用ftp,將檔案上傳到/var/www/html/uploads
[root@shsps ~]# cd /var/www/html/xoops/modules
[root@shsps modules]# cp /var/www/html/upfiles/kw_club_1.6_20200513.zip .
[root@shsps modules]# unzip kw_club_1.6_20200513.zip
[root@shsps modules]# chown -R apache:apache kw_club
[root@shsps modules]# rm -rf kw_club_1.6_20200513.zip
安裝社團報名系統
點選【模組】/【安裝模組】
找到【社團報名系統】,點擊右方的【+】來安裝
安裝完成
五、問題解決
時間不對,修改目前時區及時間
[centos@shsps ~]$ date
Fri Nov 20 01:20:44 UTC 2020
[centos@shsps ~]$ sudo -s
[root@shsps centos]# timedatectl set-timezone "Asia/Taipei"
[root@shsps centos]# date
Fri Nov 20 09:23:12 CST 2020
後來發現在建立社團的資料時,都會發生如下錯誤
......
Data truncated for column 'class_ischecked' at row 1
解決的方法
先關閉資料庫的嚴格模式比較快
在/etc/my.cnf檔案中 加入下面2行
[mysqld]
sql_mode = NO_ENGINE_SUBSTITUTION
另重啟MySQL後再重新安裝 (先移除【社團報名系統】,等重啟MySQL後,再安裝【社團報名系統】)
systemctl restart mariadb
使用【報名狀況】/【匯出Excel】後,這Excel檔用Excel打開時,都發生錯誤,無法開啟
找到錯誤訊息如下:
A problem has occurred on our server! Page is currently unavailable We are working on a fix Please come back soon ... Error : Error: Class 'ZipArchive' not found
上網找資料,原來顯示錯誤訊息Class 'ZipArchive' not found 是因為缺少php-zip的擴充套件,將其安裝即可
yum install -y php-zip
ystemctl restart httpd
六、解決以前寫的教學資源管理系統
2020/01/06(三)解決教學資源組的管理系統
問題解決,把所有mysql_num_rows($result); 都改成mysqli_num_rows($result);
$msgs_per_page=2000;
$result = $xoopsDB->query($sql_select) or redirect_header($_SERVER['PHP_SELF'],6, "執行錯誤");
$totalnum = mysqli_num_rows($result); //總筆數
$totalpage =ceil( $totalnum / $msgs_per_page) ; //總頁數
七、移植以前的網路硬碟(tad_upload)
把舊機的 /var/www/html/xoops/module下的tad_uploader打包 (tar zcvf upload.tar tad_uploader/)
把舊檔移到新機的 /var/www/html/xoops/module (tar zxvf upload.tar)
將舊機的4個資料庫下載(shsps_tad_uploader...),利用phpMyadmin的滙出
再將4個資料庫下載(shsps_tad_uploader...),利用phpMyadmin的滙入
到Xoops進行此模組安裝
刪除新建立的4個資料庫
把原本匯入的4個資料庫(shsps_tad_uploader...)改名成(xeba_tad_uploader...)