很奇怪ㄋㄟ
又沒怎樣,WWW的IPV6就跑掉了
檢查/etc/hosts
無緣無故多了幾行
好⁓ 刪掉
重啟apache
齁 還是不行
再還原之前所有正常的設定
重啟apache
還是不行
啊~ 現在到底是怎樣
會不會重灌還比較快?
(真的,每次要抓bug,總是興起這念頭....)
乾脆IPV6的設定重頭走一回
啊~ 就真的可以了
可是 參數都沒改呢
捺也安呢?
唯一更動的是 正解檔中的"序號"(我給它加1)
/etc/bind/db.sgps.tn.edu.tw
然後重啟動BIND
/etc/init.d/bind9 restart
難道這就是問題的所在嗎?
不管了,反正解決了就好。
2013年7月25日 星期四
2013年6月19日 星期三
沒事不要亂搞主機
這是2星期以來的網管感言
沒事改什麼主機名稱嘛
就只嫌它太長?
結果哩
你看,凸槌了
ipv6跑掉了,最新消息進不去(index.php開不了),然後個人網頁也無法開...
真多事!
果不其然,教網中心來mail關切了
凡事喜歡自己來的性格
讓自己在電腦桌前忙了許久許許久
(論文前三章都放著)
終於 在畢業典禮忙完後,總算有閒來專心除錯了
問題1.WWW的IPV6 跑掉
解法:這個簡單,把原來的主機名字改回來,重新起動Web
編輯 /etc/hosts 及 /etc/hostname 改回原主機名稱
然後 sudo /etc/init.d/apache2 restart
問題2.index.php 開不了,都會問你要把index.php下載到哪裡
解法:這個更簡單,重新安裝php5就好(其實也試了不少法子)
apt-get install php5 libapache2-mod-php5
問題3.個人網頁無法開啟
解法:基本上啟動個人網頁服務就好
sudo a2enmod userdir
但事實上這個我弄最久
因為跟 /etc/apache2/mods-available/userdir.conf 及
/etc/apache2/mods-available/userdir.load 這2支檔案有關
得把它們 soft link 到/etc/apache2/mods-enable/中
即是 cd /etc/apache2/mods-enable
sudo ln -s /etc/apache2/mods-available/userdir.conf userdir.conf
sudo ln -s /etc/apache2/mods-available/userdir.load userdir.load
然後 sudo a2enmod userdir
再 sudo /etc/init.d/apache2 restart
真的
沒事不要亂搞
除非.......................你很閒
沒事改什麼主機名稱嘛
就只嫌它太長?
結果哩
你看,凸槌了
ipv6跑掉了,最新消息進不去(index.php開不了),然後個人網頁也無法開...
真多事!
果不其然,教網中心來mail關切了
凡事喜歡自己來的性格
讓自己在電腦桌前忙了許久許許久
(論文前三章都放著)
終於 在畢業典禮忙完後,總算有閒來專心除錯了
問題1.WWW的IPV6 跑掉
解法:這個簡單,把原來的主機名字改回來,重新起動Web
編輯 /etc/hosts 及 /etc/hostname 改回原主機名稱
然後 sudo /etc/init.d/apache2 restart
問題2.index.php 開不了,都會問你要把index.php下載到哪裡
解法:這個更簡單,重新安裝php5就好(其實也試了不少法子)
apt-get install php5 libapache2-mod-php5
問題3.個人網頁無法開啟
解法:基本上啟動個人網頁服務就好
sudo a2enmod userdir
但事實上這個我弄最久
因為跟 /etc/apache2/mods-available/userdir.conf 及
/etc/apache2/mods-available/userdir.load 這2支檔案有關
得把它們 soft link 到/etc/apache2/mods-enable/中
即是 cd /etc/apache2/mods-enable
sudo ln -s /etc/apache2/mods-available/userdir.conf userdir.conf
sudo ln -s /etc/apache2/mods-available/userdir.load userdir.load
然後 sudo a2enmod userdir
再 sudo /etc/init.d/apache2 restart
真的
沒事不要亂搞
除非.......................你很閒
2013年6月12日 星期三
原來Ubuntu的個人網頁是要另外開啟服務的
啟用個人網頁
sudo a2enmod userdir
sudo /etc/init.d/apache2 restart
sudo a2enmod userdir
sudo /etc/init.d/apache2 restart
關閉個人網頁
sudo a2dismod userdir
sudo /etc/init.d/apache2 restart
sudo a2dismod userdir
sudo /etc/init.d/apache2 restart
2013年5月15日 星期三
IP擴充及IPV6設定(ubuntu miniserver)
【IP擴充】
- 完成書面申請,聯繫市網安排切換時間
- 市網告知新IP網段資料
- 將DGS-3426回復預設值(需帳號密碼,市網可提供)
- 重新調整網路線實體接線位置(將DGS-3426當主幹switch用)
- 更改網路界面WWW、DNS、DHCP設定,重新執行
【網路卡界面更動】
<設定>sudo vi /etc/network/interfaces
也就是在interfaces 這支檔案中,在ipv4的設定之下
再加上ipv6的設定
如下:
auto lo eth0
iface eth0 inet static
address 163.26.139.1
netmask 255.255.255.0
gateway 163.26.139.254
iface eth0 inet6 static ---->網卡設固定IP
address 2001:288:7589::1 ---->設IP位址
netmask 48 ---->設定遮罩
gateway 2001:288:7589::FFFE ---->設閘道器
(其中粉紅字碼為本校所分配)
<重新啟動服務>
sudo /etc/init.d/networking restart
【DNS設定】
<設定>cat /etc/bind/named.conf
看看有哪些檔案要注意的
發現 named.conf 正解設定中指向以下相關檔案
/etc/bind/db.root
/etc/bind/localhost
/etc/bind/local.rev
/etc/bind/db.sgps.tn.edu.tw
/etc/bind/db.163.26.139
/etc/bind/local6.rev
/etc/bind/2001.288.7589.rev
其中以 /etc/bind/db.sgps.tn.edu.tw 這支正解檔最重要
sudo vi /etc/bind/db.sgps.tn.edu.tw
關於IPv6 的寫法是將「A」改成「AAAA」,
例如:
dns IN AAAA 2001:288:7589::1
(其中粉紅字碼為本校主機IPV6的IP)
<重新啟動服務>
sudo /etc/init.d/bind9 restart
----------------------------------------------------------------------------
其實在 ubuntu miniserver 中的"伺服器快樂架"
若能將網路IP正確填入該在的空格
以上這些都不用傷腦筋
以下可以解決大部份疑惑
夢幻天地BLOG
2013年5月14日 星期二
PDF瘦身術
剛剛試了把PDF瘦身的方法
比較了2支人家介紹的free程式
結果 PDF Reducer 比較好
PDF Compressor 沒甚麼減到
還有浮水印(better compress)
不過只試了小檔案
大檔案的表現如何
有待驗證
比較了2支人家介紹的free程式
結果 PDF Reducer 比較好
PDF Compressor 沒甚麼減到
還有浮水印(better compress)
不過只試了小檔案
大檔案的表現如何
有待驗證
2013年5月7日 星期二
因版本舊而安裝Xoops2模組失敗
安裝Xoops2模組時
若安裝失敗出現下面訊息時
"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE = MyISAM' at line 5"
表示版本過舊
可以到該模組中的sql資料夾中
mysql.sql檔案中
以文字編輯器
找出 TYPE = MyISAM;
改成 ENGINE=MyISAM;
十之八九,可以安裝成功
若安裝失敗出現下面訊息時
"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE = MyISAM' at line 5"
表示版本過舊
可以到該模組中的sql資料夾中
mysql.sql檔案中
以文字編輯器
找出 TYPE = MyISAM;
改成 ENGINE=MyISAM;
十之八九,可以安裝成功
2013年5月4日 星期六
製作網路架構圖
因為不會畫網路架構圖
所以遲遲不去申請擴充IP
(為什麼要叫老師來畫?那個很專業呢~)
但.....
該來的終究跑不掉
終於下條子了
真想不透
既然教育部有評比
就乾脆直接發下新擴充好的IP給我
然後我照做就是了
明明學校小,根本無須擴充
還要網管主動去申請
什麼開埠申請表、IP需求表、新網段分配表、網路架構圖
還至少給1個C(二百多個IP)呢!
喂~以為網管不用上課喔!
好啦,牢騷發完了~
本來以為星期天來學校可以做很多事
譬如把前三章的第三章趕完
結果一碰電腦
真的完了
論文都沒動
就只畫了張“網路架構圖”
不用安裝,線上就可以畫好
註冊後免費試用30天
Cliffy Online
雖然是英文網站,但是真的很簡單使用
就選來選去、拖來拖去、放大縮小...
還可以打中文字
最後可以以圖檔輸出
(不會畫的人如我,就是給他耗時間畫而已)
當然,流程圖、組織圖之類的圖也都可以做喔!
我在想
萬一30天後我想再畫另一張呢?
簡單,帳號那麼多,再註冊一組就好了
不過,就沒辦法修改曾經做過的圖了
所以遲遲不去申請擴充IP
(為什麼要叫老師來畫?那個很專業呢~)
但.....
該來的終究跑不掉
終於下條子了
真想不透
既然教育部有評比
就乾脆直接發下新擴充好的IP給我
然後我照做就是了
明明學校小,根本無須擴充
還要網管主動去申請
什麼開埠申請表、IP需求表、新網段分配表、網路架構圖
還至少給1個C(二百多個IP)呢!
喂~以為網管不用上課喔!
好啦,牢騷發完了~
本來以為星期天來學校可以做很多事
譬如把前三章的第三章趕完
結果一碰電腦
真的完了
論文都沒動
就只畫了張“網路架構圖”
不用安裝,線上就可以畫好
註冊後免費試用30天
Cliffy Online
雖然是英文網站,但是真的很簡單使用
就選來選去、拖來拖去、放大縮小...
還可以打中文字
最後可以以圖檔輸出
(不會畫的人如我,就是給他耗時間畫而已)
當然,流程圖、組織圖之類的圖也都可以做喔!
我在想
萬一30天後我想再畫另一張呢?
簡單,帳號那麼多,再註冊一組就好了
不過,就沒辦法修改曾經做過的圖了
2013年5月2日 星期四
Xoops2在主選單中加入連結
1.到網頁目錄的xoops2資料夾中/modules/system/templates/blocks
2.下載system_block_mainmenu.html
3.以文字編輯器(如Notepad++)在html碼中,以超連結方式進行連結
4.再回傳即可
5.這連結要嘛擺最上面,不然只能放最下面。
6.其實放圖示連結也很酷。
2.下載system_block_mainmenu.html
3.以文字編輯器(如Notepad++)在html碼中,以超連結方式進行連結
4.再回傳即可
5.這連結要嘛擺最上面,不然只能放最下面。
6.其實放圖示連結也很酷。
2013年4月17日 星期三
網管維運
- 各校IPV6分配見:http://www.tn.edu.tw/ngn/a1_3.htm
- 查詢學校IPV6流量:http://flow2.tn.edu.tw
- 網管參考文件 :http://lms.tn.edu.tw
- 網路電話號碼異動:http://voip.tn.edu.tw
- 學校內稽核文件:http://www.tn.edu.tw/is.htm
- 臺南市成績系統操作圖解:http://it.dc2es.tnc.edu.tw/91escore/index.asp?dir=./pdf
- 公文管理整合系統服務電話:06-2130669 轉 44 網路電話 63086,63087
- 網管技術論壇:http://web.tn.edu.tw/forum/
- 資安演練平台:https://drill.cert.tanet.edu.tw
- 學校連線狀況查詢:http://ping.tn.edu.tw/pingsrh.php?zone=%E4%B8%83%E8%82%A1%E5%8D%80
2013年3月23日 星期六
vsftp的安裝
安裝ubuntu miniserver 12.04
其中vsftpd總是無法順利完成
1,重新安裝vsftpd的指令
sudo apt-get remove --purge vsftpd
sudo apt-get install vsftpd
2,重新啟動
sudo /etc/init.d/vsftpd start
3,設定檔在 /etc/vsftpd.conf
其中比較要注意的是幾個設定值
例如:(拿掉#)
- 將使用者限定在家目錄中 chroot_local_user = YES
- 可否寫入write_enable=YES
- 任何入讀取匿名ftp資料夾 anonymous_enable=YES
4,匿名ftp預設登入目錄為 /srv/ftp
*******參考文件***********************************
500 OOPS: vsftpd: refusing to run with writable root inside chroot()
This is one of the most annoying and frustrating problems I have run into lately. This supposed security fix makes vsftp simply unusable after upgrading to Ubuntu 12.04 from 10.04. No amount of cajoling or messing with options will get it working again.
The fix is pretty easy though, just copy/paste these lines into a terminal. It will update your /etc/vsftpd.conf that stopped working after you upgraded.
This has been tested and works on Ubuntu 12.04
這是新版的 vsftpd 又增加了安全性的設定了,它不允許你的根目錄的權限設定是可以寫入的
The fix is pretty easy though, just copy/paste these lines into a terminal. It will update your /etc/vsftpd.conf that stopped working after you upgraded.
This has been tested and works on Ubuntu 12.04
wget http://http.us.debian.org/debian/pool/main/v/vsftpd/vsftpd_3.0.2-2_amd64.deb
dpkg -i vsftpd_3.0.2-2_amd64.deb
echo "allow_writeable_chroot=YES" >> /etc/vsftpd.conf
service vsftpd reload
*******參考文件***********************************這是新版的 vsftpd 又增加了安全性的設定了,它不允許你的根目錄的權限設定是可以寫入的
所以你必須把該使用者的家目錄,可寫入的權限拿掉才能正常的登入
chmod a-w /home/user
*******參考文件***********************************
Before you close this out to repetition, I have been researching all of the proposed solutions to this bug and so far I have been unable to keep a FTP user jailed to their website directory. While I am not a ubuntu server expert, I wanted to reach out to the community to see if anyone has found a solution that both fixes this bug and keeps the user jailed to their directory.
My vsftpd settings that I changed:
listen_port=9000
Set: anonymous_enable=NO
Uncomment: local_enable=YES
Uncomment: write_enable=YES
Uncomment: local_umask=022
Set: connect_from_port_20=NO
Uncomment: idle_session_timeout=600
Uncomment: data_connection_timeout=120
Comment out: #ftpd_banner=Welcome to blah FTP service. [should be on line 104]
Added: banner_file=/etc/issue.net
Uncomment: chroot_local_user=YES
Uncomment: chroot_local_user=YES
Uncomment: chroot_list_enable=YES
Uncomment : chroot_list_file=/etc/vsftpd.chroot_list
At the end of the file I added:
# Show hidden files and the "." and ".." folders.
# Useful to not write over hidden files:
force_dot_files=YES
# Hide the info about the owner (user and group) of the files.
hide_ids=YES
# Connection limit for each IP:
max_per_ip=10
# Maximum number of clients:
max_clients=5
# FTP Passive Settings
pasv_enable=YES
#If your listen_port is 9000 set this range to 7500 and 8500
pasv_min_port=[port range min]
pasv_max_port=[port range max]
The user in question mybloguser
is jailed to her website directory under /srv/www/myblog
and this user is not part of the nano /etc/vsftpd.chroot_list
file. The user’s home directory is also /srv/www/myblog
which used to work in the past.
I tried the allow_writeable_chroot=YES
solution which did not work, and actually broke vsftpd completely.
I have tried:
How can we both fix this error and keep the user jailed to their home directory?
訂閱:
文章 (Atom)