synology DS1512+ 的 rsync 設定檔在 /etc/rsync.conf
裡面設定
secrets file = /etc/rsyncd.secrets
用putty 透過ssh 連線
#vi rsync.conf 修改其內容
設定中預設module 是 [NetBackup]
NetBackup 資料夾在啟動網路備份後會自動出現
預設的路徑為 /var/services/NetBackup
如果要開設其他備份資料夾可以在共用資料夾中新增
新增的資料夾預設在 /volume1/下面
想要由freebsd 伺服器連線做backup 要安裝rsync套件,也要在/etc/下新增一個 rsyncd.secrets密碼檔
由其他伺服器freebsd 中安裝 rsync套件
/usr/ports/net/rsync
make install clean
透過
# /usr/local/bin/rsync -avrHS --delete --password-file=/etc/rsyncd.secrets /要備份的資料夾 user@163.XX.XX.XX::NetBackup
可以使用預設的 NetBackup 的 module 也可以自己設定其他module
新增一個執行檔 backup.sh
#chmod +x backup.sh
將上面的內容填入
在crontab -e
中設定執行時間
也可以在freebsd /etc中設定密碼檔 rsyncd.secrets檔
# ee rsyncd.secrets
輸入密碼
2012年4月23日 星期一
2012年4月7日 星期六
一些Freebsd 的 port用法 -portmaster , portaudit
Portmaster makes life easy when upgrading most of the packages even if there are other packages depend on it, for example if you have Apache Server and you want to upgrade eXpat you have to uninstall eXpat and install the new version, doing this will break the Apache installation, Portmaster can be used to do this operation safely without breaking any links ..etc.
To install Portmaster do the following:
cd /usr/ports/ports-mgmt/portmaster
make install clean
rehash
Portaudit is a nice application which will check the vulnerability database when building ports to ensure that there is no known security issues with what you are installing, if there is a known issue if wont continue and will reference you to the vulnerability.
To install it do the following:
cd /usr/ports/ports-mgmt/portaudit
make install clean
rehash
If you want to install a program even if it has a known vulnerability you can do that using the following command:
make -D DISABLE_VULNERABILITIES install clean
make install clean
rehash
make install clean
rehash
2012年3月21日 星期三
FreeBSD - 以port 安裝套件時,套件重複時的處理
在FreeBSD 中安裝套件非常方便,用port 來安裝快速簡便
當server上已經安裝過某一個套件時,要在裝一次更新的套件時,有時候
make deinstall clean 沒辦法清的很乾淨時,
用make FORCE_PKG_REGISTER="yes" 可以強制安裝新版的套件
當server上已經安裝過某一個套件時,要在裝一次更新的套件時,有時候
make deinstall clean 沒辦法清的很乾淨時,
用make FORCE_PKG_REGISTER="yes" 可以強制安裝新版的套件
2012年3月5日 星期一
freebsd 啟用 ssh 連線
在 /etc/inetd.conf
unmark 掉 ssh ipv4 服務
重新啟動 inetd 服務
在/etc/ssh/sshd_config
unmark 掉 PermitRootLogin no -> 改成 PermitRootLogin yes
就可以用root 來 ssh 連線了
unmark 掉 ssh ipv4 服務
重新啟動 inetd 服務
在/etc/ssh/sshd_config
unmark 掉 PermitRootLogin no -> 改成 PermitRootLogin yes
就可以用root 來 ssh 連線了
2009年4月9日 星期四
var 爆掉
blog 主機 /var 空間爆掉
因為 db 和 spool 用掉大部份的空間
把db 和 spool 移到 /home/var/下
mv /var/db /home/var/
移完db後要把裡面mysql目錄改成 owner 為mysql 這樣mysql才能順利啟動
chown -R mysql /home/var/db/mysql
chgrp -R mysql /home/var/db/mysql
mv /var/spool /home/var/
cd /var
ln -s /home/var/db db
ln -s /home/var/spool spool
因為 db 和 spool 用掉大部份的空間
把db 和 spool 移到 /home/var/下
mv /var/db /home/var/
移完db後要把裡面mysql目錄改成 owner 為mysql 這樣mysql才能順利啟動
chown -R mysql /home/var/db/mysql
chgrp -R mysql /home/var/db/mysql
mv /var/spool /home/var/
cd /var
ln -s /home/var/db db
ln -s /home/var/spool spool
訂閱:
文章 (Atom)