如何在Linux系统上安装Domino Server
|
注:如果下载不成功,通过其他电脑打开后,粘贴内容即可: #!/bin/sh # # # Lotus Domino rc-script /etc/init.d/domino # For Debian GNU/Linux, but also usable on other distributions. # # Usage: # /etc/init.d/domino {start|stop|restart|kill|help} # # Written by Jens Vogel in 2004 - 2007 # Inspired by written IBM documentation # # Modified by Danilo Dellaquila in 2007 # K-Gigas Computers S.L. <ddellaquila@gmail.com> # Thanks Jens for your script. # I've just put some chkconfig stuff, # and added the Spanish language support. # ############################################################################# # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # ############################################################################# # # chkconfig: 345 95 5 # description: This script is used to start the domino # server as a background process. # # http://www.desktux.nl/ # desktux@desktux.nl # Variables ########### # Remember to adapt everyting to your installation! # The values below work only on default installations! domino_user="notes" domino_group="notes" data_dir="/local/notesdata" if [ -d "/opt/lotus/bin" ]; then bin_dir="/opt/lotus/bin" # For Domino 6.5.x or older elif [ -d "/opt/ibm/lotus/bin" ]; then bin_dir="/opt/ibm/lotus/bin" # For Domino 7 else bin_dir="/usr/local/bin" # If your bin_dir is somwhere else fi # Uncomment just one of the following # NOTE: if you use a logfile and wish to rotate the logfile you *must* use the # logrotate-option "copytruncate" or stop the server before rotating! output="/dev/tty12" #output="/var/log/domino.log" # The password file must exist and have the permissions # 0400 $domino_user:$domino_group! # If you have no server password just touch an empty file. passwd_file="${data_dir}/.domino.pwd" # Thanks to Giorgio Fedon for pointing this out: # In case you didn't set up your language environment correctly and have # problems with characters specific to your language, uncomment one of the # following or enter your own value. #LANG="de_DE@euro" #LANG="fr_FR@euro" #LANG="it_IT@euro" #LANG="nl_NL@euro" #LANG="es_ES@euro" export LANG # See how we are called and take action ####################################### function start() { # Check for the password file if [ ! -f $passwd_file ]; then echo -e "aFatal error: no password file ${passwd_file} found!" exit 1 fi # Just preventive: correct the rights chmod 0400 $passwd_file chown $domino_user:$domino_group $passwd_file # Start the server echo -n "Starting Domino server: " su - $domino_user -c "cd ${data_dir}; cat ${passwd_file}|${bin_dir}/server" >> $output 2>&1 & echo "done. Output is redirected to ${output}." } function stop() { # Stop the server echo "Stopping Domino server:" su - $domino_user -c "cd ${data_dir}; ${bin_dir}/server -q" echo "Done." } case $1 in start) start;; stop) stop;; restart) stop start ;; kill) # Kill the server if stopping soesn't work. # Also write an NSD file. echo -n "Killing Domino server: " su - $domino_user -c "cd ${data_dir}; ${bin_dir}/nsd -kill" echo "Done." ;; help) # Give help for those in need... echo -e "nLotus Domino rc-script" echo -e "/etc/init.d/domino {start|stop|restart|kill|help}n" echo "Options:" echo "--------" echo -e "starttStarts the Domino Server." echo -e "stoptStops the Domino Server." echo -e "restarttRestarts the Domino Server." echo -e "killtKills the Domino Server if 'stop' doesn't work.ntAlso writes a nsd logfile in ${data_dir}." echo -e "helptShow this message.n" echo -e "Remember to adapt the variables to your installation if you didn't run a defaultnDomino installation!n" ;; *) # Small usage instructions echo "Usage: /etc/init.d/domino {start|stop|restart|kill|help}" ;; esac exit 0 修改脚本,修改成如下所示, 将/bin/sh 改为 /bin/bash
退出并保存 将脚本拷入到 /etc/init.d/目录,并重命名成domino,更改拥有主和拥有组为root,赋予755的权限
并注册为随机启动 sudo update-rc.d domino start 99 2 3 4 5 . stop 01 0 1 6 .
在 /local/notesdata下创建 .domino.pwd文件,内容为空 sudo touch /local/notesdata/.domino.pwd sudo chown notes.notes /local/notesdata/.domino.pwd sudo chmod 400 /local/notesdata/.domino.pwd
至此设置完毕 重启服务器 sudo reboot 脚本里设置的是将控制台信息放到 tty12,即第12控制台。如果是物理机,按alt+F12即可登录到tty12 如果是在vmware虚拟机里,先按着 ctrl + alt 按一下space键然后松开,再按F12就可以了
(编辑:佛山站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |





