Menu

Tree [32f309] master /
 History

HTTPS access


File Date Author Commit
 AppEcon unknown
 ai unknown
 i-learning-XML unknown
 powebe.wordpress.com 2018-03-08 Yi-Nung Yang Yi-Nung Yang [cf8122] update i-XML
 pwb 2019-05-30 Yi-Nung Yang Yi-Nung Yang [32f309] Initial commit
 sb2 2018-03-05 Yi-Nung Yang Yi-Nung Yang [19fc44] update sb2
 Readme.txt 2019-05-09 Yi-Nung Yang Yi-Nung Yang [2992aa] Initial commit

Read Me

2018/01/14 webgame系統安裝在 Ubuntu 14.04.5 LTS 程序

從 @ibm1204 採自動升級 新安裝在 @ibm1204 http://140.135.90.36/powebe 和 http://140.135.90.36/webgame

    注意, http://140.135.90.36/powebe 用的是新程式 還原用程式備份 2012-07-07 版 
    新版的稱為 powebe , 有 ./powebe/index.php 檔, 會將位置自動轉移到 ./powebe/www 之下 
    舊版的稱為 webgame , 直接進入 ./webgame/scm_webgame/www 還原用程式備份 2012-04-10 版 

    主程式位置放在 /var/www/ 

    上次安裝紀錄可以, 但這次好像不能放在 /home/yinung/ 


1. 在 ubuntu 的 LAMPP 安裝好後, 進入 phpmyadmin, 新增一個名為 scm_webgame 的資料庫

    記得編輯 php.ini 讓 upload 檔案 size 可以大一點, 可參考 http://yinung2.blogspot.com/2011/03/wordpress.html 

2. mysql 5.7.20 版的新增 user, 比較複雜一點

    參見這一篇: http://yinung2.blogspot.tw/2018/01/access-denied-for-user-rootlocalhost.html 
    簡單地說, 安裝了 mysql-5.7.20 在 mint 18 (ubuntu 16.04) 之後, 想 (依以前的方式) 利用 phpmyadim 來增加資料庫和新 user, 結果: phpmyadmin 無法登入!!! 
    改用 terminal 指令模式, 輸入, 注意root 預密碼沒有, 直接按 Enter 

mysql -u root -p
Enter password:

    代表需要先設定 root 的密碼, 仍在 mysql> 的指令模式下, 更新 root 的密碼為, 例如 66666666 : 

mysql> UPDATE mysql.user SET authentication_string = PASSWORD('66666666') WHERE User = 'root' AND Host = 'localhost';
Query OK, 1 row affected, 1 warning (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 1

如果看到像以上的回應, 就成功了。打 exit 離開 mysql, 再重新啟動 mysql:

mysqladmin shutdown
service mysql start

    回到 phpmyadmin, 應該就可以新增名為 scm_webgame; 其權限為對 scm_webgame 資料庫 的全部 

3. 將 powebe 的主程式上傳至 /var/www/

4.1 編輯其中的 /home/yinung/powebe/scm_webgame/etc/configuration.php

    sudo vi /home/yinung/powebe/scm_webgame/etc/configuration.php 
    檔案、和網址根目錄 (網址根目錄更動好像沒有作用...) 

define('DIR_FS_HTTP', '/var/www/powebe/'); // 檔案根目錄路徑 define('DIR_WS_HTTP', '/powebe/'); // 網址根目錄路徑

    舊程式則用這指令, 
    sudo vi /var/www/webgame/scm_webgame/etc/includes/configuration.php 
    改 configuration.php 裡面的這幾行 
    define('DIR_FS_HTTP', '/var/www/webgame/scm_webgame/'); // 檔案根目錄路徑 
    define('DIR_WS_HTTP', '/scm_webgame/'); // 網址根目錄路徑 


5. 變更網站實體目錄位置: 修改 /etc/apache2/sites-available/000-default.conf

sudo vi /etc/apache2/sites-available/000-default.conf

    網站根目錄原始設成 DocumentRoot /var/www/html 
    改成安裝 wordpress, 所以在此檔中設定 

DocumentRoot /var/www/wordpress

    加入以下指令, 即可自訂 /webgame 為虛擬網址

        Alias /powebe "/var/www/webgame/scm_webgame/www" 
        Alias /webgame /home/yinung/powebe/scm_webgame/www 

5.1 啟動 000-default.conf 設定檔 用指令檢查

ls /etc/apache2/sites-enabled

    如果目錄是空的, 則表示未啟動000-default.conf 設定檔.需要下指令, 或者用 ln -ls 應該也可以 

a2ensite

終端機會回應:

Your choices are: 000-default default-ssl
Which site(s) do you want to enable (wildcards ok)?

打 000* 即可。好了可再次下 ls /etc/apache2/sites-enabled 檢查, 應該有如下出現

000-default.conf

6. 虛擬子目錄是定義在 : /etc/apache2/mods-enabled/alias.conf

sudo vi /etc/apache2/mods-enabled/alias.conf

    新增兩行 

Alias /webgame "/var/www/webgame/scm_webgame/www"
Alias /powebe "/var/www/powebe"

6. 重新啟動 apache2

sudo service apache2 restart

[edit] 2011/04/01 webgame系統安裝在 ubuntu 10.04 程序

新安裝在 ib-new-server http://140.135.90.121

    主程式位置放在 

/home/yinung/powebe/scm_webgame

1. 在 ubuntu 的 LAMPP 安裝好後, 進入 phpmyadmin, 新增一個名為 scm_webgame 的資料庫

    記得編輯 php.ini 讓 upload 檔案 size 可以大一點, 可參考 http://yinung2.blogspot.com/2011/03/wordpress.html 

2. 新增 user 名為 scm_webgame; 其權限為對 scm_webgame 資料庫 的全部

3. 將 scm_webgame 的主程式上傳至 /home/yinung/powebe/scm_webgame

4. 編輯其中的 /home/yinung/powebe/scm_webgame/etc/configuration.php

    sudo gedit /home/yinung/powebe/scm_webgame/etc/configuration.php 
    檔案、和網址根目錄 (網址根目錄更動好像沒有作用...) 

5. 變更虛擬子目錄: 修改 /etc/apache2/sites-available/default

    sudo gedit /etc/apache2/sites-available/default 
    加入以下指令, 即可自訂 /webgame 為虛擬網址

        Alias /webgame /home/yinung/powebe/scm_webgame/www 

6. 上傳 還原用 mySQL備份 2012-02-20, 
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.