Showing posts with label server. Show all posts
Showing posts with label server. Show all posts

2012-02-21

Configuring Windows 2008 R2 as an NTP Server

試了半天,windows 2008 r2的w32time可以當作ntp server提供ntp服務給d-link等網路設備...
可是偏偏和cisco不相容,原因是root dispersion....
所以建議cisco ntp還是設定internet上的ntp server...
或是用unix server
或去找其他windows上的ntp程式...
http://www.meinberg.de/english/sw/ntp.htm
也許是個好選擇...

我是採用internet上的ntp server...懶得再安裝ntp程式了...
底下是測試過還算正確的設法


In order to configure an WIndows 2008 R2 Server you will need to make a number of changes to the registry. This tutorial will show you both the settings for configuring the NTP Server in addition to the client settings.
NOTES

It is worth noting that this example is based on the below,
A Windows 2008 R2 Server acting as the NTP Server
A Windows 2008 R2 Server acting as the NTP client for which it will source its time from the above server.
This configuration is not based upon using a Windows Domain.
NTP SERVER

SERVER SETTINGS

1. Enable the NTP Server
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer]"
"Enabled"=dword:00000001
CLIENT SETTINGS

1. Enable NTP Client and set polling interval.
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient]"
"Enabled"=dword:00000001
"SpecialPollInterval"="300"
2. Configure the NTP Time Source, period and frequency
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters]
"NtpServer"="[NTP SERVER IP],0x1"
"Type"="NTP"
"Period"="freq"  /* 找不到 */
NTP CLIENT

CLIENT SETTINGS

1. Enable NTP Client and set polling interval.
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient]"
"Enabled"=dword:00000001
"SpecialPollInterval"="300"
2. Configure the NTP Time Source, period and frequency
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters]
"NtpServer"="[NTP SERVER IP],0x1"
"Type"="NTP"
"Period"="freq"

ADDITIONAL

STARTUP

By default the w32tm service will not automatically start if your Windows machine is not on a domain. To ensure that the service starts automatically run the following command :
sc triggerinfo w32time start/networkon stop/networkoff


TROUBLESHOOTING

To confirm that your clients are correctly peering with your time source run the following command.
w32tm /query /peers
w32tm /query /status

cisco debug

sh ntp asso
sh ntp asso detail
sh ntp status

2011-09-30

延碩SOL NA8 NAS使用心得

有2個power supply

功能還算ok,該有都有還有iSCSI。
網頁管理還算流暢...
似乎是以CentOS為基礎...
沒辦法像qnap或synology那樣接收ip cam的影像。
所以應該是沒辦法當video server
使用XFS file system。有硬體RAID卡。

預設default ip 192.168.1.100
可以接VGA和USB Keyboard。
用了SOL NAS Finder可是卻找不到...
原來是弄錯Ethernet 0的port.
靠近電源供應器的是Ethernet 1
靠近機器開關的是Ethernet 0。
機器開關在後面。
不是在機器前面,機器前面也沒有USB port。


滑軌品質感覺有點粗糙...
說明文文件還可以...


2010-09-27

hp proliant server driver

1. install os with smartstart cd
2. install os with os cd. After installed os, use proliant support pack.

2010-04-30

Sql 2008 RTM install fail

在server 2003 install SQL 2008 RTM發生無法正確安裝的問題,原來是因為之前windows update安裝了MSXML 6 SP2 KB954459,造成server 2008的安裝程式有問題。
所以需要先移除就可以正確安裝了。

2009-07-24

FreeBSD遠端Console設定UTF-8環境

http://toolbox.orzcorp.com/?p=8

ftp utf-8 big5

xp的下的檔案總管不支援ftp utf-8的檔案名,只能用big 5
所以pureftpd.conf必須要配合調整一下。
compile --with-rfc2640

FileSystemCharset big5
ClientCharset big5

vista底下的ftp就support utf8 filename

pureftpd anonymous delete resume rename file

os:freebsd 6.1

使用pure-ftpd想要開啟anonymous delete resume rename file
必須在configure前就要 setenv

setenv CPPFLAGS "-DANON_CAN_DELETE -DANON_CAN_RENAME"
cd /usr/ports/ftp/pure-ftpd
make install clean
就可以了

setenv CFLAGS not work。



Hi again.

What follows is something extremely confidential, private, undocumented
and top secret. But as you subscribed to the shiny pureftpd-users
mailing-list, you need to know. Maybe this is dangerous. Maybe if
someone knows that you've read this, special agents will murder you.
So you're free to delete this message without any further reading now.

Still here? Are you sure?

Well...

Ok.

Apart from ./configure and run-time options, there are some
undocumented switches in Pure-FTPd. They are undocumented because they
were only designed for testing/debugging, or because they are uncommon
needs.

But if you are strong, you can play with these undocumented switches.

To enable them, you have to recompile pure-ftpd with something like
that :

env CFLAGS="$CFLAGS -DSTRICT_REST -DLOG_ANON_EMAIL" ./configure
make install-strip

Add as many -D as you want here.

Here's a list of these top secret features :

* ALWAYS_RESOLVE_IDS :
Always try to get full user names, even once chrooted. If you define
this, you can put a fake etc/passwd file (or similar, like pwd.db) in
a chrooted environment to get user names.

* ANON_CAN_CHANGE_PERMS :
Allow anonymous users to chmod files.

* ANON_CAN_DELETE :
Allow anonymous users to delete files.

* ANON_CAN_RENAME :
Allow anonymous users to rename files.

* ANON_CAN_RESUME :
Allow anonymous users to resume uploads.

* AUTORENAME_REVERSE_ORDER :
When autorename is enabled, put the unique id at the beginning of
file names, not at the end. Useful if you want to keep extensions.

* DEFAULT_TO_BINARY_TYPE :
Default to binary transfers even if 'bin' ('TYPE I') hasn't been
issued by the client.

* DISABLE_MKD_RMD :
People can't create/delete directories any more.

* DO_AUTHD_TIMEOUT :
Send an ALRM signal to an authentication module after 60 seconds.

* FANCY_LS_DIRECTORY_HEADERS :
Display 'ls' with multiple directories with lovely headers. This is how
the good old first releases of pure-ftpd were displaying things.
Unfortunately, it breaks parsing with some clients (like ncftp with a
recursive get) . But I really feel nostalgic when I see these headers
again.

* LOG_ANON_EMAIL :
Log what anonymous users have entered in the 'password' field.
Except for SPAM, I don't see any reason why people would enable this.
So no, no, no, don't ask, it won't become a standard feature.

* NON_BLOCKING_DATA_SOCKET :
Create transfers socket with O_NONBLOCK.

* RFC_CONFORMANT_LINES :
Assumes that all clients will end their command lines with \r\n as
expected. Unfortunately, in the real life, this is not always the case.

* RFC_CONFORMANT_PARSER :
Allows control characters and other horrible stuff in commands and
file names.

* SAVE_DESCRIPTORS :
Save file descriptors by closing/reopening the log after/before
every logged message. Slow, painful, and not chroot-friendly.

* SKIP_COMMAND_TRAILING_SPACES :
Trim spaces after commands, so that 'STOR xyz' is the same as 'STOR
xyz' . For brain damaged clients.

* SNPRINTF_IS_NOT_BUGGY :
Asserts that your snprintf() function works the ISO C99 way. Never
enable this on binary packages.

* STRICT_REST :
Disallow REST commands in ASCII mode (or at least : reply with an
error code) .

* WITHOUT_PAM_SESSION :
Do PAM authentication, but don't open PAM sessions.


Have fun...

_______________________________________________________________
Hundreds of nodes, one monster rendering program.
Now that's a super model! Visit http://clustering.foundries.sf.net/

_______________________________________________
Pureftpd-users mailing list
Pureftpd-users@lists.sourceforge.net
https://lists.sourceforge.net/lists.../pureftpd-users

2009-07-02

FreeBSD 7.2+Apache22+PHP+mysql51

1. Fresh Install a FreeBSD 7.2-RELEASE
install from ftp6.tw.freebsd.org

2. portsnap fetch extract

3. mysql51-server (for a long time)
mkdir /usr/local/mysql
chown /usr/local/mysql user:mysql pw:mysql
用ln -s 於/var/db/mysql建link至/usr/local/mysql(可省略)
make WITH_CHARSET=utf8 WITH_XCHARSET=all WITH_COLLATION=utf8_general_ci BUILD_OPTIMIZED=yes BUILD_STATIC=yes install clean

cp /usr/local/share/mysql/my-huge.cnf /var/db/mysql/my.cnf
ee my.cnf
[mysqld]
skip-name-resolve



4. install apache22 (for a long time with perl)
make config
BerkleyDB(subversion) mod_proxy all

/etc/newsyslog.conf
#newsyslog
/var/log/httpd-access.log 644 3 1 @T00 Z
/var/log/httpd-error.log 644 3 1 @T00 Z /var/run/httpd.pid


modify apache22.conf
#kenny
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps


5. install php5

6. install pure-ftpd

7. http://blog.cheyingwu.tw/index.php/2007/05/04/freebsd-utf8-env/
FreeBSD UTF-8 環境

FreeBSD 5.x 以上,就已經支援 i18n,之前因為 ftp 日文檔名的問題,所以全面 utf-8 記錄一下整個過程

改 csh 的登入設定

#~/.cshrc setenv LC_ALL zh_TW.UTF-8


安裝 convmv 轉 big5 中文檔名

cd /usr/ports/converters/convmv make install clean;rehash

使用法

convmv -f big5 -t utf-8 -r --notest [檔名 or 目錄名]

檔案內容編碼用 iconv 轉

iconv -f big5 -t utf-8 檔名 > 檔名

重編 pure-ftpd 支援 RFC 2640,在 Makefile 裡面加上

--with-rfc2640

編完後編輯 pure-ftpd.conf

FileSystemCharset utf-8 ClientCharset big5

這樣一來就完成 FreeBSD UTF-8 化

延伸閱讀

兔耳八克斯 » FreeBSD遠端Console設定UTF-8環境
MC104 :: 觀看文章 - [推薦] 轉換目錄/檔名編碼的 perl 程式

8. install phpmyadmin (安裝很多雜七雜八的port,也是很久)
mysqladmin -u root password xxxxxx(更改root password)
modify httpd.conf
Alias /phpmyadmin/ "/usr/local/www/phpMyAdmin/"

Options none
AllowOverride Limit

Order Deny,Allow
Deny from all
Allow from 127.0.0.1 192.168.1.x(自己的網段)

http://x.x.x.x/phpmyadmin/setup

9.cd /usr/ports/devel/ruby-gems
# make install clean
remember to install ruby-iconv
不然rails會出現undefined method `camelize' for "app":String
cd /usr/ports/converters/ruby-iconv

2009-05-01

Freebsd 7.0 初期環境建制

http://plog.longwin.com.tw/my_note-unix/2007/07/16/freebsd_initial_env_build_2007

cp /usr/share/examples/etc/make.conf /etc/
cp /usr/share/examples/cvsup/stable-supfile /etc/
cp /usr/share/examples/cvsup/ports-supfile /etc/
modify stable-supfile to use cvsup6.tw.freebsd.org
csup /etc/stable-supfile

ports用portsnap較快

對於Release版的security patch可以用freebsd-update來做更新
http://ohaha.ks.edu.tw/post/1/32
The freebsd-update(8) utility supports binary upgrades of i386 and amd64 systems running earlier FreeBSD releases. Systems running 7.0-RELEASE, 7.1-BETA, 7.1-BETA2, 7.1-RC1, or 7.1-RC2 can upgrade as follows:
# freebsd-update upgrade -r 7.1-RELEASE
During this process, FreeBSD Update may ask the user to help by merging some configuration files or by confirming that the automatically performed merging was done correctly.
# freebsd-update install
The system must be rebooted with the newly installed kernel before continuing.
# shutdown -r now
After rebooting, freebsd-update needs to be run again to install the new userland components, and the system needs to be rebooted again:
# freebsd-update install
# shutdown -r now
自動安裝官方已經compile好的binary

2008-08-19

dnspark nameserver ip list

ns1.dnspark.net. 3600 IN A 64.34.197.141
ns2.dnspark.net. 3600 IN A 83.170.90.100
ns3.dnspark.net. 3600 IN A 66.98.161.195
ns4.dnspark.net. 3600 IN A 209.160.66.110
ns5.dnspark.net. 3600 IN A 69.59.153.140

2008-08-13

freebsd dante socks proxy server

用freebsd ports安裝完之後修改sockd.conf


sockd.conf

logoutput: /var/log/sockd/sockd 可用來查看連線的紀錄
internal: eth0 port = 1080
external: eth1 method: none username pam
clientmethod: none
user.libwrap: libwrap 自己vipw加入 user libwrap
#user.privileged: sockd
user.notprivileged: sockd 自己vipw加入user sockd
connecttimeout: 30

# Allow everyone from my LAN
client pass {
from: 192.168.0.0/24 port 1-65535 to: 0.0.0.0/0
log: connect disconnect
}

# Block everyone else
client block {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: connect error
}

# Block everyone connection to lo
block {
from: 0.0.0.0/0 to: 127.0.0.0/8
log: connect error
}

# Block subnet 172.16.0.0/32
block {
from: 0.0.0.0/0 to: 172.16.0.0/12
log: connect error
}

# Allow replys to bind and incoming udp
pass {
from: 0.0.0.0/0 to: 192.168.0.0/24 command: bindreply udpreply
log: connect error
}

# Allow tcp and upd connections from our lan to everywhere
pass {
from: 192.168.0.0/24 to: 0.0.0.0/0 protocol: tcp udp
log: error
}

# Log all the rest
block {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: connect error
}

用flashfxp 可成功 ftp出去。log有socks的連線紀錄,可幫助debug

2008-05-16

更改MySQL database的路徑

建議用 mysql 4.1 (下面這些沒測過)

cd /usr/ports/databases/mysql41-server/
make WITH_CHARSET=utf8 BUILD_OPTIMIZED=yes BUILD_STATIC=yes install

如果要將 database 的檔案放在 /home/mysql 的話用

mv /var/db/mysql /home/mysql
ln -s /home/mysql /var/db/mysql

並在 /etc/rc.conf 中加入

mysql_enable="YES"

freebsd 7.0 Release install procedure

fetch
setenv HTTP_PROXY
ntpd.conf
ftp/pure-ftpd
port-mgmt/portsnap
database/mysql
www/apahce22
edit /etc/newsyslog.conf
/var/log/httpd-access.log 644 3 1 @T00 Z
/var/log/httpd-error.log 644 3 1 @T00 Z /var/run/httpd.pid

lang/php5(check apache module)
edit httpd.conf
cacti

2023 灌籃高手 SLAM Dunk

 2023 哩哩摳摳 昨天是難得的颱風假。 去看了二輪的灌籃高手。 電影院一堆的小朋友阿。 以下有小暴雷。 雖然我不算是非常的迷灌籃高手,但是還是很喜歡這部作品。 井上老師的畫風我也非常喜歡。 整部片是以良田的角度來看的。 以前我並不是很熟習良田這個角色,但是看到良田能重新站起來...