{"id":1682,"date":"2017-12-05T12:15:03","date_gmt":"2017-12-05T12:15:03","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/?p=1682"},"modified":"2021-02-27T09:31:12","modified_gmt":"2021-02-27T09:31:12","slug":"run-perforce-server-as-a-service","status":"publish","type":"post","link":"https:\/\/www.scmgalaxy.com\/tutorials\/run-perforce-server-as-a-service\/","title":{"rendered":"Run perforce Server as a Service"},"content":{"rendered":"<p><strong>rajeshkumar created the topic: Run perforce Server as a Service<\/strong><br \/>\nRun perforce Server as a Service OR boot automatically when system restart<\/p>\n<p>Template of p4d file under \/etc\/init.d<br \/>\n========================================<\/p>\n<p><code>#! \/bin\/sh<br \/>\n#<br \/>\n# chkconfig:   35 95 05<br \/>\n# description: Perforce revision control system server.<br \/>\n#<\/p>\n<p>umask 022<\/p>\n<p># Source function library.<br \/>\n. \/etc\/rc.d\/init.d\/functions<\/p>\n<p>. \/etc\/p4d.conf<\/p>\n<p>START_CMD=\"${P4D_DAEMON} -d -L $P4D_LOG -J $P4D_JOURNALS -r $P4D_ROOT -p $P4D_PO                                                                                                                     RT\"<\/p>\n<p># See how we were called.<br \/>\ncase \"$1\" in<br \/>\n  start)<br \/>\n        echo -n \"Starting p4d \"<br \/>\n        if [ ! -z \"$P4D_USER\" ]; then<br \/>\n                su - $P4D_USER -c \"$START_CMD\"<br \/>\n        else<br \/>\n                $START_CMD<br \/>\n        fi<br \/>\n        touch \/var\/lock\/subsys\/p4d<br \/>\n        ;;<br \/>\n  stop)<br \/>\n        echo -n \"Stopping p4d: \"<br \/>\n        killproc p4d<\/p>\n<p>        echo<br \/>\n        rm -f \/var\/lock\/subsys\/p4d<br \/>\n        ;;<br \/>\n  status)<br \/>\n        status p4d<br \/>\n        ;;<br \/>\n  restart)<br \/>\n        $0 stop<br \/>\n        $0 start<br \/>\n        ;;<br \/>\n  *)<br \/>\n        echo \"Usage: p4d {start|stop|status|restart}\"<br \/>\n        exit 1<br \/>\nesac<\/p>\n<p>exit 0<\/p>\n<p><\/code><\/p>\n<p>Template of p4d.conf<br \/>\n=====================================<br \/>\nP4D_ROOT=\/local\/home\/perforce\/p4root<br \/>\nP4D_DAEMON=${P4D_ROOT}\/p4d<br \/>\nP4D_LOG=${P4D_ROOT}\/logs\/p4d.log<br \/>\nP4D_JOURNALS=\/backups\/perforce_journal\/journal<br \/>\nP4D_USER=perforce<br \/>\nP4D_PORT=1666<\/p>\n<p>Add \/etc\/init.d\/p4d into chkconfig using following command&#8230;<\/p>\n<p>chkconfig &#8211;add \/etc\/init.d\/p4d<br \/>\nRegards,<br \/>\nRajesh Kumar<br \/>\nTwitt me @ <a href=\"http:\/\/twitter.com\/RajeshKumarIn\">twitter.com\/RajeshKumarIn<\/a><\/p>\n<p><strong>chander replied the topic: Re: Run perforce Server as a Service<\/strong><br \/>\nI think Services is a windows concept and method.<\/p>\n<p>To run perforce as a service the Perforce Server should be installed as a Windows service. Then an Administrator privileges can start and stop it using the Services dialog in the Control Panel.<\/p>\n<p>To start the Perforce service:<br \/>\nContext-click on &#8220;My Computer&#8221;, and select &#8220;Manage&#8221;. The &#8220;Computer Management&#8221; window is displayed.<br \/>\nIn the right hand pane, double click on &#8220;Services and Applications&#8221;.<br \/>\nDouble click on &#8220;Services&#8221;. You now have a list of available Windows services.<br \/>\nScroll down until you see the &#8220;Perforce&#8221; service. Right click on this item and select &#8220;Start&#8221;.<\/p>\n<p>In Unix it is running as a Daemon<\/p>\n<p><strong>rajeshkumar replied the topic: Re: Run perforce Server as a Service<\/strong><br \/>\nHi chander,<\/p>\n<p>Thanks for correcting terminology and your inputs for windows&#8230;<br \/>\nRegards,<br \/>\nRajesh Kumar<br \/>\nTwitt me @ <a href=\"http:\/\/twitter.com\/RajeshKumarIn\">twitter.com\/RajeshKumarIn<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>rajeshkumar created the topic: Run perforce Server as a Service Run perforce Server as a Service OR boot automatically when [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[370],"tags":[373],"class_list":["post-1682","post","type-post","status-publish","format-standard","hentry","category-perforce-version-control-systems","tag-perforce"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Run perforce Server as a Service - scmGalaxy<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.scmgalaxy.com\/tutorials\/run-perforce-server-as-a-service\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Run perforce Server as a Service - scmGalaxy\" \/>\n<meta property=\"og:description\" content=\"rajeshkumar created the topic: Run perforce Server as a Service Run perforce Server as a Service OR boot automatically when [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/run-perforce-server-as-a-service\/\" \/>\n<meta property=\"og:site_name\" content=\"scmGalaxy\" \/>\n<meta property=\"article:published_time\" content=\"2017-12-05T12:15:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-02-27T09:31:12+00:00\" \/>\n<meta name=\"author\" content=\"scmgalaxy K\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"scmgalaxy K\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/run-perforce-server-as-a-service\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/run-perforce-server-as-a-service\\\/\"},\"author\":{\"name\":\"scmgalaxy K\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\"},\"headline\":\"Run perforce Server as a Service\",\"datePublished\":\"2017-12-05T12:15:03+00:00\",\"dateModified\":\"2021-02-27T09:31:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/run-perforce-server-as-a-service\\\/\"},\"wordCount\":257,\"commentCount\":0,\"keywords\":[\"Perforce\"],\"articleSection\":[\"Perforce\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/run-perforce-server-as-a-service\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/run-perforce-server-as-a-service\\\/\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/run-perforce-server-as-a-service\\\/\",\"name\":\"Run perforce Server as a Service - scmGalaxy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\"},\"datePublished\":\"2017-12-05T12:15:03+00:00\",\"dateModified\":\"2021-02-27T09:31:12+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/run-perforce-server-as-a-service\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/run-perforce-server-as-a-service\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/run-perforce-server-as-a-service\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Run perforce Server as a Service\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\",\"name\":\"scmGalaxy\",\"description\":\"A Platform for Software Engineers\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\",\"name\":\"scmgalaxy K\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"caption\":\"scmgalaxy K\"},\"sameAs\":[\"http:\\\/\\\/www.DevOpsSchool.com\"],\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/author\\\/scmgalaxy\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Run perforce Server as a Service - scmGalaxy","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.scmgalaxy.com\/tutorials\/run-perforce-server-as-a-service\/","og_locale":"en_US","og_type":"article","og_title":"Run perforce Server as a Service - scmGalaxy","og_description":"rajeshkumar created the topic: Run perforce Server as a Service Run perforce Server as a Service OR boot automatically when [&hellip;]","og_url":"https:\/\/www.scmgalaxy.com\/tutorials\/run-perforce-server-as-a-service\/","og_site_name":"scmGalaxy","article_published_time":"2017-12-05T12:15:03+00:00","article_modified_time":"2021-02-27T09:31:12+00:00","author":"scmgalaxy K","twitter_card":"summary_large_image","twitter_misc":{"Written by":"scmgalaxy K","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/run-perforce-server-as-a-service\/#article","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/run-perforce-server-as-a-service\/"},"author":{"name":"scmgalaxy K","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102"},"headline":"Run perforce Server as a Service","datePublished":"2017-12-05T12:15:03+00:00","dateModified":"2021-02-27T09:31:12+00:00","mainEntityOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/run-perforce-server-as-a-service\/"},"wordCount":257,"commentCount":0,"keywords":["Perforce"],"articleSection":["Perforce"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.scmgalaxy.com\/tutorials\/run-perforce-server-as-a-service\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/run-perforce-server-as-a-service\/","url":"https:\/\/www.scmgalaxy.com\/tutorials\/run-perforce-server-as-a-service\/","name":"Run perforce Server as a Service - scmGalaxy","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website"},"datePublished":"2017-12-05T12:15:03+00:00","dateModified":"2021-02-27T09:31:12+00:00","author":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102"},"breadcrumb":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/run-perforce-server-as-a-service\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.scmgalaxy.com\/tutorials\/run-perforce-server-as-a-service\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/run-perforce-server-as-a-service\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.scmgalaxy.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Run perforce Server as a Service"}]},{"@type":"WebSite","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website","url":"https:\/\/www.scmgalaxy.com\/tutorials\/","name":"scmGalaxy","description":"A Platform for Software Engineers","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.scmgalaxy.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102","name":"scmgalaxy K","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","caption":"scmgalaxy K"},"sameAs":["http:\/\/www.DevOpsSchool.com"],"url":"https:\/\/www.scmgalaxy.com\/tutorials\/author\/scmgalaxy\/"}]}},"_links":{"self":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/1682","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/comments?post=1682"}],"version-history":[{"count":1,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/1682\/revisions"}],"predecessor-version":[{"id":1683,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/1682\/revisions\/1683"}],"wp:attachment":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media?parent=1682"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/categories?post=1682"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/tags?post=1682"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}