+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="StartupSequence"></a>3.8. Understanding the startup sequence</h3></div></div></div>
+<p>During service startup described in <a href="#QuickStart" title="3.2. QuickStart ">Section 3.2, “ QuickStart ”</a>, observe the output of this command for
+ any failures. If no failures occur, you should see output similar
+ to the following:</p>
+<div class="example">
+<a name="id2679556"></a><p class="title"><b>Example 8. A successful MyPLC startup.</b></p>
+<pre class="programlisting">Mounting PLC: [ OK ]
+PLC: Generating network files: [ OK ]
+PLC: Starting system logger: [ OK ]
+PLC: Starting database server: [ OK ]
+PLC: Generating SSL certificates: [ OK ]
+PLC: Configuring the API: [ OK ]
+PLC: Updating GPG keys: [ OK ]
+PLC: Generating SSH keys: [ OK ]
+PLC: Starting web server: [ OK ]
+PLC: Bootstrapping the database: [ OK ]
+PLC: Starting DNS server: [ OK ]
+PLC: Starting crond: [ OK ]
+PLC: Rebuilding Boot CD: [ OK ]
+PLC: Rebuilding Boot Manager: [ OK ]
+PLC: Signing node packages: [ OK ]
+</pre>
+</div>
+<p>If <code class="filename">/plc/root</code> is mounted successfully, a
+ complete log file of the startup process may be found at
+ <code class="filename">/plc/root/var/log/boot.log</code>. Possible reasons
+ for failure of each step include:</p>
+<div class="itemizedlist"><ul type="disc">
+<li><p><code class="literal">Mounting PLC</code>: If this step
+ fails, first ensure that you started MyPLC as root. Check
+ <code class="filename">/etc/sysconfig/plc</code> to ensure that
+ <code class="envar">PLC_ROOT</code> and <code class="envar">PLC_DATA</code> refer to the
+ right locations. You may also have too many existing loopback
+ mounts, or your kernel may not support loopback mounting, bind
+ mounting, or the ext3 filesystem. Try freeing at least one
+ loopback device, or re-compiling your kernel to support loopback
+ mounting, bind mounting, and the ext3 filesystem. If you see an
+ error similar to <code class="literal">Permission denied while trying to open
+ /plc/root.img</code>, then SELinux may be enabled. See <a href="#Requirements" title="2. Requirements ">Section 2, “ Requirements ”</a> above for details.</p></li>
+<li><p><code class="literal">Starting database server</code>: If
+ this step fails, check
+ <code class="filename">/plc/root/var/log/pgsql</code> and
+ <code class="filename">/plc/root/var/log/boot.log</code>. The most common
+ reason for failure is that the default PostgreSQL port, TCP port
+ 5432, is already in use. Check that you are not running a
+ PostgreSQL server on the host system.</p></li>
+<li><p><code class="literal">Starting web server</code>: If this
+ step fails, check
+ <code class="filename">/plc/root/var/log/httpd/error_log</code> and
+ <code class="filename">/plc/root/var/log/boot.log</code> for obvious
+ errors. The most common reason for failure is that the default
+ web ports, TCP ports 80 and 443, are already in use. Check that
+ you are not running a web server on the host
+ system.</p></li>
+<li><p><code class="literal">Bootstrapping the database</code>:
+ If this step fails, it is likely that the previous step
+ (<code class="literal">Starting web server</code>) also failed. Another
+ reason that it could fail is if <code class="envar">PLC_API_HOST</code> (see
+ <a href="#Configuration" title="3.3. Changing the configuration">Section 3.3, “Changing the configuration”</a>) does not resolve to
+ the host on which the API server has been enabled. By default,
+ all services, including the API server, are enabled and run on
+ the same host, so check that <code class="envar">PLC_API_HOST</code> is
+ either <code class="filename">localhost</code> or resolves to a local IP
+ address. Also check that <code class="envar">PLC_ROOT_USER</code> looks like
+ an e-mail address.</p></li>
+<li><p><code class="literal">Starting crond</code>: If this step
+ fails, it is likely that the previous steps (<code class="literal">Starting
+ web server</code> and <code class="literal">Bootstrapping the
+ database</code>) also failed. If not, check
+ <code class="filename">/plc/root/var/log/boot.log</code> for obvious
+ errors. This step starts the <span><strong class="command">cron</strong></span> service and
+ generates the initial set of XML files that the Slice Creation
+ Service uses to determine slice state.</p></li>
+</ul></div>
+<p>If no failures occur, then MyPLC should be active with a
+ default configuration. Open a web browser on the host system and
+ visit <code class="literal">http://localhost/</code>, which should bring you
+ to the front page of your PLC installation. The password of the
+ default administrator account
+ <code class="literal">root@localhost.localdomain</code> (set by
+ <code class="envar">PLC_ROOT_USER</code>) is <code class="literal">root</code> (set by
+ <code class="envar">PLC_ROOT_PASSWORD</code>).</p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="FilesInvolvedRuntime"></a>3.9. Files and directories
+ involved in <span class="emphasis"><em>myplc</em></span></h3></div></div></div>
+<p>MyPLC installs the following files and directories:</p>
+<div class="orderedlist"><ol type="1">
+<li><p><code class="filename">/plc/root.img</code>: The main
+ root filesystem of the MyPLC application. This file is an
+ uncompressed ext3 filesystem that is loopback mounted on
+ <code class="filename">/plc/root</code> when MyPLC starts. This
+ filesystem, even when mounted, should be treated as an opaque
+ binary that can and will be replaced in its entirety by any
+ upgrade of MyPLC.</p></li>
+<li><p><code class="filename">/plc/root</code>: The mount point
+ for <code class="filename">/plc/root.img</code>. Once the root filesystem
+ is mounted, all MyPLC services run in a
+ <span><strong class="command">chroot</strong></span> jail based in this
+ directory.</p></li>
+<li>
+<p><code class="filename">/plc/data</code>: The directory where user
+ data and generated files are stored. This directory is bind
+ mounted onto <code class="filename">/plc/root/data</code> so that it is
+ accessible as <code class="filename">/data</code> from within the
+ <span><strong class="command">chroot</strong></span> jail. Files in this directory are
+ marked with <span><strong class="command">%config(noreplace)</strong></span> in the
+ RPM. That is, during an upgrade of MyPLC, if a file has not
+ changed since the last installation or upgrade of MyPLC, it is
+ subject to upgrade and replacement. If the file has changed,
+ the new version of the file will be created with a
+ <code class="filename">.rpmnew</code> extension. Symlinks within the
+ MyPLC root filesystem ensure that the following directories
+ (relative to <code class="filename">/plc/root</code>) are stored
+ outside the MyPLC filesystem image:</p>
+<div class="itemizedlist"><ul type="disc">
+<li><p><code class="filename">/etc/planetlab</code>: This
+ directory contains the configuration files, keys, and
+ certificates that define your MyPLC
+ installation.</p></li>
+<li><p><code class="filename">/var/lib/pgsql</code>: This
+ directory contains PostgreSQL database
+ files.</p></li>
+<li><p><code class="filename">/var/www/html/alpina-logs</code>: This
+ directory contains node installation logs.</p></li>
+<li><p><code class="filename">/var/www/html/boot</code>: This
+ directory contains the Boot Manager, customized for your MyPLC
+ installation, and its data files.</p></li>
+<li><p><code class="filename">/var/www/html/download</code>: This
+ directory contains Boot CD images, customized for your MyPLC
+ installation.</p></li>
+<li><p><code class="filename">/var/www/html/install-rpms</code>: This
+ directory is where you should install node package updates,
+ if any. By default, nodes are installed from the tarball
+ located at
+ <code class="filename">/var/www/html/boot/PlanetLab-Bootstrap.tar.bz2</code>,
+ which is pre-built from the latest PlanetLab Central
+ sources, and installed as part of your MyPLC
+ installation. However, nodes will attempt to install any
+ newer RPMs located in
+ <code class="filename">/var/www/html/install-rpms/planetlab</code>,
+ after initial installation and periodically thereafter. You
+ must run <span><strong class="command">yum-arch</strong></span> and
+ <span><strong class="command">createrepo</strong></span> to update the
+ <span><strong class="command">yum</strong></span> caches in this directory after
+ installing a new RPM. PlanetLab Central cannot support any
+ changes to this directory.</p></li>
+<li><p><code class="filename">/var/www/html/xml</code>: This
+ directory contains various XML files that the Slice Creation
+ Service uses to determine the state of slices. These XML
+ files are refreshed periodically by <span><strong class="command">cron</strong></span>
+ jobs running in the MyPLC root.</p></li>
+<li><p><code class="filename">/root</code>: this is the
+ location of the root-user's homedir, and for your
+ convenience is stored under <code class="filename">/data</code> so
+ that your local customizations survive across
+ updates - this feature is inherited from the
+ <span><strong class="command">myplc-devel</strong></span> package, where it is probably
+ more useful. </p></li>
+</ul></div>
+</li>
+<li><p><a name="MyplcInitScripts"></a><code class="filename">/etc/init.d/plc</code>: This file
+ is a System V init script installed on your host filesystem,
+ that allows you to start up and shut down MyPLC with a single
+ command, as described in <a href="#QuickStart" title="3.2. QuickStart ">Section 3.2, “ QuickStart ”</a>.</p></li>
+<li><p><code class="filename">/etc/sysconfig/plc</code>: This
+ file is a shell script fragment that defines the variables
+ <code class="envar">PLC_ROOT</code> and <code class="envar">PLC_DATA</code>. By default,
+ the values of these variables are <code class="filename">/plc/root</code>
+ and <code class="filename">/plc/data</code>, respectively. If you wish,
+ you may move your MyPLC installation to another location on your
+ host filesystem and edit the values of these variables
+ appropriately, but you will break the RPM upgrade
+ process. PlanetLab Central cannot support any changes to this
+ file.</p></li>
+<li><p><code class="filename">/etc/planetlab</code>: This
+ symlink to <code class="filename">/plc/data/etc/planetlab</code> is
+ installed on the host system for convenience.</p></li>
+</ol></div>
+</div>