docs: Use command tag for commands to be executed by reader.

This was mentioned by Joe Brockmeier on the mailinglist, to make the documentation
more readable we should use the <command> tag for to be executed commands
by the reader.

This commit does that for the KVM hypervisor host installation part.
This commit is contained in:
Wido den Hollander 2012-10-22 12:42:35 +02:00
parent 5e44e61127
commit 1055ea8f67
6 changed files with 30 additions and 30 deletions

View File

@ -46,9 +46,9 @@
<para>Use your preferred editor and open (or create) <filename>/etc/apt/sources.list.d/cloudstack</filename>. Add the community provided repository to the file:</para>
<programlisting>deb http://cloudstack.apt-get.eu/ubuntu precise 4.0</programlisting>
<para>We now have to add the public key to the trusted keys.</para>
<programlisting language="Bash"><prompt>#</prompt> <command>wget</command> -O - http://cloudstack.apt-get.eu/release.asc|apt-key add -</programlisting>
<programlisting language="Bash"><prompt>$</prompt> <command>wget</command> -O - http://cloudstack.apt-get.eu/release.asc|apt-key add -</programlisting>
<para>Now update your local apt cache.</para>
<programlisting language="Bash"><prompt>#</prompt> <command>apt-get</command> update</programlisting>
<programlisting language="Bash"><prompt>$</prompt> <command>apt-get</command> update</programlisting>
<para>Your DEB package repository should now be configured and ready for use.</para>
</section>
<section id="configure-package-repository-rpm">
@ -65,7 +65,7 @@ gpgcheck=1
</programlisting>
<para>Next you'll want to add the GPG key:</para>
<screen>
<command># rpm --import http://server.url/downloads/RPM-GPG-KEY.txt</command>
<command>$ rpm --import http://server.url/downloads/RPM-GPG-KEY.txt</command>
</screen>
<para>Now you should be able to install CloudStack using Yum.</para>
</section>

View File

@ -27,8 +27,8 @@
<para>To manage KVM instances on the host &PRODUCT; uses a Agent. This Agent communicates with the Management server and controls all the instances on the host.</para>
<para>First we start by installing the agent:</para>
<para>In RHEL or CentOS:</para>
<programlisting language="Bash">yum install cloud-agent</programlisting>
<programlisting language="Bash"><command>$ yum install cloud-agent</command></programlisting>
<para>In Ubuntu:</para>
<programlisting language="Bash">apt-get install cloud-agent</programlisting>
<programlisting language="Bash"><command>$ apt-get install cloud-agent</command></programlisting>
<para>The host is now ready to be added to a cluster. This is covered in a later section, see <xref linkend="host-add" />. It is recommended that you continue to read the documentation before adding the host!</para>
</section>

View File

@ -37,23 +37,23 @@
<section id="hypervisor-host-install-firewall-rhel">
<title>Open ports in RHEL/CentOS</title>
<para>RHEL and CentOS use iptables for firewalling the system, you can open extra ports by executing the following iptable commands:</para>
<programlisting language="Bash">iptables -I INPUT -p tcp -m tcp --dport 22 -j ACCEPT</programlisting>
<programlisting language="Bash">iptables -I INPUT -p tcp -m tcp --dport 1798 -j ACCEPT</programlisting>
<programlisting language="Bash">iptables -I INPUT -p tcp -m tcp --dport 16509 -j ACCEPT</programlisting>
<programlisting language="Bash">iptables -I INPUT -p tcp -m tcp --dport 5900:6100 -j ACCEPT</programlisting>
<programlisting language="Bash">iptables -I INPUT -p tcp -m tcp --dport 49152:49216 -j ACCEPT</programlisting>
<programlisting language="Bash"><command>$ iptables -I INPUT -p tcp -m tcp --dport 22 -j ACCEPT</command></programlisting>
<programlisting language="Bash"><command>$ iptables -I INPUT -p tcp -m tcp --dport 1798 -j ACCEPT</command></programlisting>
<programlisting language="Bash"><command>$ iptables -I INPUT -p tcp -m tcp --dport 16509 -j ACCEPT</command></programlisting>
<programlisting language="Bash"><command>$ iptables -I INPUT -p tcp -m tcp --dport 5900:6100 -j ACCEPT</command></programlisting>
<programlisting language="Bash"><command>$ iptables -I INPUT -p tcp -m tcp --dport 49152:49216 -j ACCEPT</command></programlisting>
<para>These iptable settings are not persistent accross reboots, we have to save them first.</para>
<programlisting language="Bash">iptables-save > /etc/sysconfig/iptables</programlisting>
<programlisting language="Bash"><command>$ iptables-save > /etc/sysconfig/iptables</command></programlisting>
</section>
<section id="hypervisor-host-install-firewall-ubuntu">
<title>Open ports in Ubuntu</title>
<para>The default firewall under Ubuntu is UFW (Uncomplicated FireWall), which is a Python wrapper around iptables.</para>
<para>To open the required ports, execute the following commands:</para>
<programlisting language="Bash">ufw allow proto tcp from any to any port 22</programlisting>
<programlisting language="Bash">ufw allow proto tcp from any to any port 1798</programlisting>
<programlisting language="Bash">ufw allow proto tcp from any to any port 16509</programlisting>
<programlisting language="Bash">ufw allow proto tcp from any to any port 5900:6100</programlisting>
<programlisting language="Bash">ufw allow proto tcp from any to any port 49152:49216</programlisting>
<programlisting language="Bash"><command>$ ufw allow proto tcp from any to any port 22</command></programlisting>
<programlisting language="Bash"><command>$ ufw allow proto tcp from any to any port 1798</command></programlisting>
<programlisting language="Bash"><command>$ ufw allow proto tcp from any to any port 16509</command></programlisting>
<programlisting language="Bash"><command>$ ufw allow proto tcp from any to any port 5900:6100</command></programlisting>
<programlisting language="Bash"><command>$ ufw allow proto tcp from any to any port 49152:49216</command></programlisting>
<note><para>By default UFW is not enabled on Ubuntu. Executing these commands with the firewall disabled does not enable the firewall.</para></note>
</section>
</section>

View File

@ -49,9 +49,9 @@
<listitem>
<para>Restart libvirt</para>
<para>In RHEL or CentOS:</para>
<programlisting language="Bash">service libvirtd restart</programlisting>
<programlisting><command>$ service libvirtd restart</command></programlisting>
<para>In Ubuntu:</para>
<programlisting language="Bash">service libvirt-bin restart</programlisting>
<programlisting><command>$ service libvirt-bin restart</command></programlisting>
</listitem>
</orderedlist>
</section>

View File

@ -29,12 +29,12 @@
<listitem><para>Log in to your OS as root.</para></listitem>
<listitem>
<para>Check for a fully qualified hostname.</para>
<programlisting language="Bash">hostname --fqdn</programlisting>
<programlisting language="Bash"><command>$ hostname --fqdn</command></programlisting>
<para>This should return a fully qualified hostname such as "kvm1.lab.example.org". If it does not, edit /etc/hosts so that it does.</para>
</listitem>
<listitem>
<para>Make sure that the machine can reach the Internet.</para>
<programlisting language="Bash">ping www.cloudstack.org</programlisting>
<programlisting language="Bash"><command>$ ping www.cloudstack.org</command></programlisting>
</listitem>
<listitem>
<para>Turn on NTP for time synchronization.</para>
@ -42,9 +42,9 @@
<orderedlist numeration="loweralpha">
<listitem><para>Install NTP</para>
<para condition="community">On RHEL or CentOS:</para>
<programlisting language="Bash">yum install ntp</programlisting>
<programlisting language="Bash"><command>$ yum install ntp</command></programlisting>
<para condition="community">On Ubuntu:</para>
<programlisting language="Bash">apt-get install openntpd</programlisting>
<programlisting language="Bash"><command>$ apt-get install openntpd</command></programlisting>
</listitem>
</orderedlist>
</listitem>

View File

@ -32,10 +32,10 @@
<listitem>
<para>Check to see whether SELinux is installed on your machine. If not, you can skip this section.</para>
<para>In RHEL or CentOS, SELinux is installed and enabled by default. You can verify this with:</para>
<programlisting language="Bash">rpm -qa | grep selinux</programlisting>
<programlisting language="Bash"><command>$ rpm -qa | grep selinux</command></programlisting>
</listitem>
<listitem>
<para>Set the SELINUX variable in /etc/selinux/config to "permissive". This ensures that the permissive setting will be maintained after a system reboot.</para>
<para>Set the SELINUX variable in <filename>/etc/selinux/config</filename> to "permissive". This ensures that the permissive setting will be maintained after a system reboot.</para>
<para>In RHEL or CentOS:</para>
<programlisting language="Bash">vi /etc/selinux/config</programlisting>
<para>Change the following line</para>
@ -45,7 +45,7 @@
</listitem>
<listitem>
<para>Then set SELinux to permissive starting immediately, without requiring a system reboot.</para>
<programlisting language="Bash">setenforce permissive</programlisting>
<programlisting language="Bash"><command>$ setenforce permissive</command></programlisting>
</listitem>
</orderedlist>
</listitem>
@ -55,14 +55,14 @@
<listitem>
<para>Check to see whether AppArmor is installed on your machine. If not, you can skip this section.</para>
<para>In Ubuntu AppArmor is installed and enabled by default. You can verify this with:</para>
<programlisting language="Bash">dpkg --list 'apparmor'</programlisting>
<programlisting language="Bash"><command>$ dpkg --list 'apparmor'</command></programlisting>
</listitem>
<listitem>
<para>Disable the AppArmor profiles for libvirt</para>
<programlisting language="Bash">ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/</programlisting>
<programlisting language="Bash">ln -s /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper /etc/apparmor.d/disable/</programlisting>
<programlisting language="Bash">apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd</programlisting>
<programlisting language="Bash">apparmor_parser -R /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper</programlisting>
<programlisting language="Bash"><command>$ ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/</command></programlisting>
<programlisting language="Bash"><command>$ ln -s /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper /etc/apparmor.d/disable/</command></programlisting>
<programlisting language="Bash"><command>$ apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd</command></programlisting>
<programlisting language="Bash"><command>$ apparmor_parser -R /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper</command></programlisting>
</listitem>
</orderedlist>
</listitem>