為了更新單位的網站(big5)
做了一些安裝上的測試
- 原有版本資料改為 utf8 ,可是 xoops 卻是 big5 -> 亂碼
- 原有版本 xoops big5 升上 新版 -> 亂碼
- 安裝xoops 2.3.3 utf8 無障礙版-> 在ie 6 上會有時出現不正常的空白頁
看來要再花時間
我要的是純 utf8 的無障礙
如果寬度是預設給 800 x 600 螢幕的模版。要放大一點的圖就不方便。有時會超出文章的範圍或破壞版面!
其實只要修改幾個小地方就可以啦! 你可以參考使用的模版修改類似這些 CSS !
首頁主圖齊右
BODY {
Font-Family: Arial, Helvetica, sans-serif;
WIDTH: 100%;
COLOR: #FFFFFF;
HEIGHT: 100%;
TEXT-ALIGN: center;
background-color: #8DC63F;
background-image: url(47main_image.gif);
background-repeat: no-repeat;
background-position: top right; /* 改成靠右 */
}
改變整體寬度
#container {
MARGIN: 0px auto;
WIDTH: 100%; /* 改變整體寬度 */
TEXT-ALIGN: left;
}
改變內文寬度
#content {
FLOAT: left;
WIDTH: 75%;/* 改變內文寬度 */
padding-top: 10px;
}
改變文章寬度
.blogbody {
MARGIN-BOTTOM: 10px;
PADDING-BOTTOM: 10px;
PADDING-TOP: 10px;
border-top: #FFF 1px solid;
width: 100%;/* 改變文章寬度 */
padding-left: 10px;
}
改變選單寬度
#links {
MARGIN-TOP: 440px;
FLOAT: right;
TEXT-ALIGN: center;
width: 20%;/* 改變選單寬度 */
margin-left: 0px;
}
主圖框寬度改成 100 %
#banner {
WIDTH: 100%;HEIGHT: 252px;
background-image: url(top.gif);
background-repeat: no-repeat;
background-position: top left; /* 改成靠左上 */
background-color: #F5FAC7;
}
請自行修改您的主圖配新寬版面。
部落格名稱改齊右
.blogtitle {
FONT-SIZE: 20px;
PADDING-TOP: 30px;
TEXT-ALIGN: right;
padding-right: 20px;
color: #FFFFFF;
}
http://bash.cyberciti.biz/backup/mysql-backup.bash.php
#!/bin/bash
# Shell script to backup MySql database
# To backup Nysql databases file to /backup dir and later pick up by your
# script. You can skip few databases from backup too.
# For more info please see (Installation info):
# http://www.cyberciti.biz/nixcraft/vivek/blogger/2005/01/mysql-backup-script.html
# Last updated: Aug - 2005
# --------------------------------------------------------------------
# This is a free shell script under GNU GPL version 2.0 or above
# Copyright (C) 2004, 2005 nixCraft project
# Feedback/comment/suggestions : http://cyberciti.biz/fb/
# -------------------------------------------------------------------------
# This script is part of nixCraft shell script collection (NSSC)
# Visit http://bash.cyberciti.biz/ for more information.
# -------------------------------------------------------------------------MyUSER="SET-MYSQL-USER-NAME" # USERNAME
MyPASS="SET-PASSWORD" # PASSWORD
MyHOST="localhost" # Hostname# Linux bin paths, change this if it can't be autodetected via which command
MYSQL="$(which mysql)"
MYSQLDUMP="$(which mysqldump)"
CHOWN="$(which chown)"
CHMOD="$(which chmod)"
GZIP="$(which gzip)"# Backup Dest directory, change this if you have someother location
DEST="/backup"# Main directory where backup will be stored
MBD="$DEST/mysql"# Get hostname
HOST="$(hostname)"# Get data in dd-mm-yyyy format
NOW="$(date +"%d-%m-%Y")"# File to store current backup file
FILE=""
# Store list of databases
DBS=""# DO NOT BACKUP these databases
IGGY="test"[ ! -d $MBD ] && mkdir -p $MBD || :
# Only root can access it!
$CHOWN 0.0 -R $DEST
$CHMOD 0600 $DEST# Get all database list first
DBS="$($MYSQL -u $MyUSER -h $MyHOST -p$MyPASS -Bse 'show databases')"for db in $DBS
do
skipdb=-1
if [ "$IGGY" != "" ];
then
for i in $IGGY
do
[ "$db" == "$i" ] && skipdb=1 || :
done
fiif [ "$skipdb" == "-1" ] ; then
FILE="$MBD/$db.$HOST.$NOW.gz"
# do all inone job in pipe,
# connect to mysql using mysqldump for select mysql database
# and pipe it out to gz file in backup dir :)
$MYSQLDUMP -u $MyUSER -h $MyHOST -p$MyPASS $db | $GZIP -9 > $FILE
fi
done
#!/bin/sh
today=`date "+%Y-%m-%d"`
olddate=`date -d "-10 day" "+%Y-%m-%d"`
cd /backup/
tar -zcvf www.$today.tar.gz /var/www
service mysql stop
tar -zcvf mysql.$today.tar.gz /var/lib/mysql
service mysql start
rm -rf www.$olddate.tar.gz
rm -rf mysql.$olddate.tar.gz
ServerTokens OS ← 找到這一行,將“OS”改為“Prod”(在出現錯誤頁的時候不顯示服務器操作繫統的名稱)
↓
ServerTokens Prod ← 變為此狀態
(閱讀全文)
http://httpd.apache.org/docs/2.2/mod/core.html#servertokens
This directive controls whether Server
response
header field which is sent back to clients includes a
description of the generic OS-type of the server as well as
information about compiled-in modules.
ServerTokens Prod[uctOnly]
- Server sends (e.g.):
Server: Apache
ServerTokens Major
- Server sends (e.g.):
Server: Apache/2
ServerTokens Minor
- Server sends (e.g.):
Server: Apache/2.0
ServerTokens Min[imal]
- Server sends (e.g.):
Server: Apache/2.0.41
ServerTokens OS
- Server sends (e.g.):
Server: Apache/2.0.41 (Unix)
ServerTokens Full
(or not specified)- Server sends (e.g.):
Server: Apache/2.0.41 (Unix) PHP/4.2.2 MyMod/1.2
This setting applies to the entire server, and cannot be enabled or disabled on a virtualhost-by-virtualhost basis.
After version 2.0.44, this directive also controls the
information presented by the ServerSignature
directive.
引用文章自
http://docs.moodle.org/en/Environment#Moodle_version_1.9
Moodle version 1.6
MySQL
version 4.1.12 or later for sites that are exclusively Latin-1, 4.1.16
if you have other languages, or PostgreSQL 7.4.x or later
PHP version 4.3.0 or later is required ( but don't use versions 5.0.0 to 5.0.6 which were buggy )
The php_extension iconv is recommended to be installed/enabled
The php_extension mbstring is recommended to be installed/enabled
Moodle version 1.8
MySQL version 4.1.16 or later is required, or PostgreSQL 7.4.x or later
PHP version 4.3.0 or later is required ( but don't use versions 5.0.0 to 5.0.6 which were buggy )
Unicode is required
The php_extension curl is recommended to be installed/enabled
The php_extension iconv is recommended to be installed/enabled
The php_extension mbstring is recommended to be installed/enabled
The php_extension openssl is recommended to be installed/enabled
The php_extension tokenizer is recommended to be installed/enabled
Moodle version 1.9
MySQL version 4.1.16 or later is required, or PostgreSQL 8.0 or later
Moodle version 2.0PHP version 5.2.0 or later is required
http://blog.miniasp.com/post/2008/04/How-to-install-PHP4-on-Ubuntu-804-LTS.aspx
據我所知 Ubuntu Linux 大概從 6.06 (Dapper) 開始就不支援 PHP4 了,且 PHP 官方網站也宣布從 2007-12-31 起停止了 PHP4 的計畫(也就是以後也不會再出新版),不過我想應該還是有不少網站是用 PHP4 寫的,要讓這些網站在短時間內全部升級改寫成 PHP5 的版本還真不太容易。今天我也把 Ubuntu 8.04 LTS 裝起來了,並嘗試著也將 php4 裝起來,以下是在 Ubuntu 8.04 成功安裝 php4 的心得分享(當然這個方法在 Ubuntu 6.06, 6.10 或 7.10 一樣適用)。
1. 建立一個檔案到 /etc/apt/sources.list.d/ 目錄下:
# vi /etc/apt/sources.list.d/dapper.sources.list
檔案內容僅需要輸入一行即可:
deb http://tw.archive.ubuntu.com/ubuntu/ dapper universe main restricted multiverse
2. 執行 apt-get update 指令更新 Packages 資料庫
你可以發現最後面取得的時 dapper/universe 套件,這裡面就有包括 php4 的所有相關套件。
3. 搜尋所有 php4 相關的套件
root@ubuntu804:~# apt-cache search php4
4. 安裝 php4-cli
root@ubuntu804:~# apt-get install php4-cli
5. 大功告成!我們來測試一下 php4 是否可以正常執行:
root@ubuntu804:~# php4 -v PHP Warning: mime_magic: type search/400 \\input text/x-tex invalid in Unknown on line 0 PHP Warning: mime_magic: type search/400 \\section text/x-tex invalid in Unknown on line 0 PHP Warning: mime_magic: type search/400 \\setlength text/x-tex invalid in Unknown on line 0 PHP Warning: mime_magic: type search/400 \\documentstyle text/x-tex invalid in Unknown on line 0 PHP Warning: mime_magic: type search/400 \\chapter text/x-tex invalid in Unknown on line 0 PHP Warning: mime_magic: type search/400 \\documentclass text/x-tex invalid in Unknown on line 0 PHP Warning: mime_magic: type regex [Cc]onstant[[:space:]]+[Ss]tory text/x-inform invalid in Unknown on line 0 PHP 4.4.2-1build1 (cli) (built: Apr 6 2006 09:44:32) Copyright (c) 1997-2006 The PHP Group
你可以發現執行的過程會出現一堆 PHP Warning 的警告訊息,這是因為 Ubuntu 8.04 中預設的 /usr/share/file/magic.mime (MIME 定義檔) 檔案中有幾行 php4 認不得,而導致出現警示訊息,不過這幾行並不會影響 PHP 的運作。
因為在 magic.mime 中的這 7 行是用來定義 TeX documents 與 Inform interactive fiction language 的檔案類型,因為很少用到,所以我覺得將這幾行註解掉應該沒關係!所以我們還是修改一下 magic.mime 檔案,將這幾行「太新」的 MIME 定義給註解掉,讓 php4 不會出現警告訊息。你開啟 /usr/share/file/magic.mime 檔案後直接跳到第598行:
# TeX documents, from Daniel Quinlan (quinlan@yggdrasil.com)
0 search/400 \\input text/x-tex
0 search/400 \\section text/x-tex
0 search/400 \\setlength text/x-tex
0 search/400 \\documentstyle text/x-tex
0 search/400 \\chapter text/x-tex
0 search/400 \\documentclass text/x-tex
# Type: Inform interactive fiction language # URL: http://www.inform-fiction.org/ # From: Reuben Thomas <rrt@sc3d.org> 0 regex [Cc]onstant[[:space:]]+[Ss]tory text/x-inform
這要將這幾行最前面加上井字號 ( # ) 後存檔,然後我們在測試一下 php4 是否正常執行
root@ubuntu804:~# php -v PHP 4.4.2-1build1 (cli) (built: Apr 6 2006 09:44:32) Copyright (c) 1997-2006 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
LAMP與Moodle教學平台建置
推薦瀏覽軟體:Mozilla Firefox + Auto Copy 擴充套件
參考資料來源:
http://apt.nc.hcc.edu.tw/web/student_server_FC5/student_server_FC5.html
學生用伺服器建置流程(Fedora Core 5 版)
相關網路資料
IP:192.168.0.201~235(依座位而定)
FQDN:test.ttcps.tpc.edu.tw
Domain:ttcps.tpc.edu.tw
DNS Server:163.20.118.5(for 土城國小)
子網路遮罩(netmask):255.255.255.0
閘道器(gateway):192.168.0.254
Fedora Core 5 ISO 檔下載
Fedora 官方網站:http://fedora.redhat.com/
CD版本(共五片)
ftp://apt.nc.hcc.edu.tw/pub/fedora/linux/core/5/i386/iso/FC-5-i386-disc2.iso
ftp://apt.nc.hcc.edu.tw/pub/fedora/linux/core/5/i386/iso/FC-5-i386-disc3.iso
ftp://apt.nc.hcc.edu.tw/pub/fedora/linux/core/5/i386/iso/FC-5-i386-disc4.iso
ftp://apt.nc.hcc.edu.tw/pub/fedora/linux/core/5/i386/iso/FC-5-i386-disc5.iso
DVD版本(共一片)
透過 BitTorrent 下載:
http://torrent.fedoraproject.org/
sha1sum 檢查碼:ftp://apt.nc.hcc.edu.tw/pub/fedora/linux/core/5/i386/iso/SHA1SUM
sha1sum for windows:http://apt.nc.hcc.edu.tw/pub/mirror/sha1sum.exe