<作業系統> Ubuntu 10.04 server 32位元
<安裝套件> LAMP server OpenSSH server
IP
Getway
DNS 163.22.168.1
==========================
<更新系統>
sudo apt-get update
sudo apt-get upgrade
(手動安裝)
sudo apt-get install apache2 mysql-server-5.1 php5 php5-mysql php5-gd
<安裝sfs3>================================
cd /var/www
wget http://sfscvs.tcc.edu.tw/sfs_stable5.tar.gz
tar zxvf sfs_stable.tar.gz
chmod 711 setup.sh
./setup.sh
開啟瀏覽器
http://xxx.xxx.xxx.xxx/sfs3/
===================================
(自動更新修正)
sudo apt-get install php5-cli
1.請在/root下將底下的程式碼存成upsfs3.php
(建議使用putty直接貼進去, 若在Windows中存好檔案再傳進去可能無法執行.)
2.將$SFS_INSTALL_PATH的值改成貴校學務系統的真實目錄
3.chmod 700 upsfs3.php
即可執行 (下指令方式 ./upsfs.php )
#!/usr/bin/php
//sfs3 安裝目錄
$SFS_INSTALL_PATH="/var/www/html/sfs3";
$SFS_TEMP_DIR="/tmp/sfs3_stable";
if (is_dir($SFS_TEMP_DIR)) {
exec("rm -rf ".$SFS_TEMP_DIR);
}
if (file_exists("/tmp/sfs_stable.tar.gz")) {
exec("rm -f /tmp/sfs_stable.tar.gz");
}
if (!is_dir($SFS_INSTALL_PATH)) {
echo "Oh! Error! .... File *** sfs3 *** not exists!\n";
echo "Please run ./setup.sh first!\n";
exit;
}
$SFS_TAR_FILE="http://sfscvs.tcc.edu.tw/sfs_stable.tar.gz";
exec("wget -q ".$SFS_TAR_FILE." --directory-prefix=/tmp");
exec("tar zxf /tmp/sfs_stable.tar.gz -C /tmp");
exec("cp -a ".$SFS_TEMP_DIR."/* ".$SFS_INSTALL_PATH);
include $SFS_INSTALL_PATH."/sfs-release.php";
echo "Update to ".$SFS_BUILD_DATE."\n";
?>
===== 以下是給 FreeBSD 的使用者 =====
PS: FreeBSD 的 php 位置有所不同, 第一行請改成
#!/usr/local/bin/php
而其中要用到wget, 請用port來安裝
cd /usr/ports/ftp/wget
make install clean
系統就會自動把wget安裝起來。
====================================
(建議使用putty直接貼進去, 若在Windows中存好檔案再傳進去可能無法執行.)
2.將$SFS_INSTALL_PATH的值改成貴校學務系統的真實目錄
3.chmod 700 upsfs3.php
即可執行 (下指令方式 ./upsfs.php )
#!/usr/bin/php
//sfs3 安裝目錄
$SFS_INSTALL_PATH="/var/www/html/sfs3";
$SFS_TEMP_DIR="/tmp/sfs3_stable";
if (is_dir($SFS_TEMP_DIR)) {
exec("rm -rf ".$SFS_TEMP_DIR);
}
if (file_exists("/tmp/sfs_stable.tar.gz")) {
exec("rm -f /tmp/sfs_stable.tar.gz");
}
if (!is_dir($SFS_INSTALL_PATH)) {
echo "Oh! Error! .... File *** sfs3 *** not exists!\n";
echo "Please run ./setup.sh first!\n";
exit;
}
$SFS_TAR_FILE="http://sfscvs.tcc.edu.tw/sfs_stable.tar.gz";
exec("wget -q ".$SFS_TAR_FILE." --directory-prefix=/tmp");
exec("tar zxf /tmp/sfs_stable.tar.gz -C /tmp");
exec("cp -a ".$SFS_TEMP_DIR."/* ".$SFS_INSTALL_PATH);
include $SFS_INSTALL_PATH."/sfs-release.php";
echo "Update to ".$SFS_BUILD_DATE."\n";
?>
===== 以下是給 FreeBSD 的使用者 =====
PS: FreeBSD 的 php 位置有所不同, 第一行請改成
#!/usr/local/bin/php
而其中要用到wget, 請用port來安裝
cd /usr/ports/ftp/wget
make install clean
系統就會自動把wget安裝起來。
沒有留言:
張貼留言