rh131筆記---unit4-system services

tonykorn97發表於2008-07-15
一,network time protocl
配置檔案:/etc/ntp.conf
配置工具:system-config-date[@more@]


二,日誌服務
配置遠端日誌服務
1,伺服器端配置
first,on the log server set up syslogd to accept remote messages,
a, Edit /etc/sysconfig/syslog;
SYSLOGD_OPTIONS="-r -m 0"
b, 重啟syslog服務

2,客戶端配置
a, append in /etc/syslog.conf the following line
user.* @192.168.0.254
b, 重啟syslog服務

3, 測試
logger -i -t yourname "This is a test"

三,XOrg: The X11 Server
1,配置
在3執行級別下執行system-config-display

2,remote X sessions

1>,重定向到其他機器DISPLAY
export DISPLAY=192.168.0.18:0.0
2>, 執行其他機器的影像顯示
xhost + (允許全部)
xhost +192.168.0.22 (允許22這臺機器)
3>, 恢復本機顯示
export DISPLAY=:0.0


四,vnc配置
(1)設定vnc server的訪問密碼  
vncpasswd
  
(2)啟動vnc server  
vncserver

(3)關閉
vncserver -kill :1

vncserver的配置
透過編輯檔案$HOME/.vnc/xstartup來啟動你喜歡的視窗管理器。使用startkde &來啟動KDE,使用gnome-session &來啟動GNOME,fvwm2 &來啟動FVWM2 。下面是一個例子

(如果不設定,第一次登陸的時候linux 上啟動的 vnc server 內定的管理環境是 twm,不好看,也不方便,所以需要修改一下)

#!/bin/sh
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
gnome-session &
#startkde
#twm &


五,cron
used to schedule recurring events
use crontab to edit,install,and view job schedules
syntax
crontab [-u user] file
crontab [-l|-r|-e]

-l lists crontab
-r removes crontab
-e ediats crontab using $EDITOR

controlling access to cron
restrict /allow user access to cron
/etc/cron.allow
/etc/cron.deny


六,The anacron system
anacron runs cron jobs that did not run when the computer is down
assumes computers are not up continually
vital for laptops,desktops,workstations,and other systems that are not up continually
useful for servers that need to be tacken down templrarily

configuration file:/etc/anacrontab
field 1: if the job has not been run in this many days
field 2: wait this number of minutes after reboot and then run it
field 3: job identifier
field 4: the job to run

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/312079/viewspace-1007339/,如需轉載,請註明出處,否則將追究法律責任。

相關文章