请注意,当升级MarkLogic Server时,rpm可能包含/etc/sysconfig/MarkLogic的新版本.准备将您对此文件的所有更改与新版本合并.I started an EC2 instance running linux, and installed the MarkLogic Server rpm. But when I try to start the MarkLogic service, I see messages like this:Waiting for block device on /dev/sdfWaiting for block device on /dev/sdfWaiting for block device on /dev/sdfThere is no /dev/sdf. How can I get past this problem? 解决方案 MarkLogic Server for linux has an assumption built into it. If it sees that it is running under a xen hypervisor and it can find an EC2 hostname using AWS APIs, it assumes it is an instance of the MarkLogic Server AMI. That AMI expects to use /dev/sdf for its default data directory. The documentation mostly talks about using the MarkLogic Server AMI, but there is a brief mention of the solution to this problem at http://docs.marklogic.com/5.0doc/docapp.xqy#display.xqy?fname=http://pubs/5.0doc/xml/ec2/instance.xml%2381403It turns out that the startup script, /etc/init.d/MarkLogic, is looking at the environment variable MARKLOGIC_EBS to decide whether or not to wait for /dev/sdf to appear. That MARKLOGIC_EBS variable is set in /etc/sysconfig/MarkLogic, which is meant to be edited by administrators (that's also where you can set MARKLOGIC_USER to something other than daemon, for example).So we can edit /etc/sysconfig/MarkLogic to ignore /dev/sdf. Here is the interesting part of that file:# the initial hostname that MarkLogic should use on Amazon EC2if [ -d /proc/xen ]; then if [ "`curl -s --connect-timeout 2 -o /tmp/public-hostname -w %{http_code} http://169.254.169.254/2007-03-01/meta-data/public-hostname`" = "200" ]; then MARKLOGIC_HOSTNAME=`cat /tmp/public-hostname` MARKLOGIC_EC2_HOST=1 MARKLOGIC_EBS=/dev/sdf fifiThe simplest solution is to comment out the line that sets MARKLOGIC_EBS. the initial hostname that MarkLogic should use on Amazon EC2if [ -d /proc/xen ]; then if [ "`curl -s --connect-timeout 2 -o /tmp/public-hostname -w %{http_code} http://169.254.169.254/2007-03-01/meta-data/public-hostname`" = "200" ]; then MARKLOGIC_HOSTNAME=`cat /tmp/public-hostname` MARKLOGIC_EC2_HOST=1 #MARKLOGIC_EBS=/dev/sdf fifiThat will fix the problem, but MarkLogic will still get its public-hostname from the AWS API every time the service starts or restarts. That might cause a slight delay - probably unimportant. But you could stub that out too:# the initial hostname that MarkLogic should use on Amazon EC2if [ "" -a -d /proc/Xxen ]; then if [ "`curl -s --connect-timeout 2 -o /tmp/public-hostname -w %{http_code} http://169.254.169.254/2007-03-01/meta-data/public-hostname`" = "200" ]; then MARKLOGIC_HOSTNAME=`cat /tmp/public-hostname` MARKLOGIC_EC2_HOST=1 #MARKLOGIC_EBS=/dev/sdf fifiHowever you decide to bypass the EC2 test, you are now ready to start the MarkLogic service without being pestered about /dev/sdf. You will still need a MarkLogic Server license, of course. See http://developer.marklogic.com/licensing to learn more about the different license options.Note that when you upgrade MarkLogic Server, the rpm may contan a new version of /etc/sysconfig/MarkLogic. Be prepared to merge any of your changes to this file with the new version. 这篇关于如何使用自己的许可证密钥在AWS EC2上运行MarkLogic?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-29 08:23