You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by bu...@apache.org on 2013/01/25 22:32:47 UTC
svn commit: r847973 [2/2] - in /websites/staging/vcl/trunk/content: ./
confluence_export/automated-installation-of-vcl.html
Modified: websites/staging/vcl/trunk/content/confluence_export/automated-installation-of-vcl.html
==============================================================================
--- websites/staging/vcl/trunk/content/confluence_export/automated-installation-of-vcl.html (original)
+++ websites/staging/vcl/trunk/content/confluence_export/automated-installation-of-vcl.html Fri Jan 25 21:32:47 2013
@@ -94,21 +94,21 @@ contains a database of configuration dat
at several different geographical locations who use my repository to
perform automated installation and configuration of LAMP servers, directory
servers, repository servers, Plandora, Moodle, and so forth. I mirrored my
-home site at NCA&T, and added customization for some NCA&T hosts.</p>
+home site at NC A&T, and added customization for some NC A&T hosts.</p>
<p>Each student team adds their customization data, for example, host name,
partitioning information, and application customization data. Each team
-also makes an entry in the local <em>dnsmasq</em> TFTP/DNS/DHCP configuration.
+also makes an entry in the local dnsmasq TFTP/DNS/DHCP configuration.
These one-time tasks are completed early in the semester during the study
of enterprise configuration. This background is of interest only because my
VCL scripts assume certain things, such as, the web directory roots for all
-named virtual hosts are in <em>/var/www/web_servers/</em> and configuration
-snippets are in <em>/etc/httpd/virtual_hosts/</em>.</p>
+named virtual hosts are in <strong>/var/www/web_servers/</strong> and configuration
+snippets are in <strong>/etc/httpd/virtual_hosts/</strong>.</p>
<p>Once the LAMP server is loaded, a team member opens Firefox and downloads
-<em>vcl_pre_commands_nn.sh</em> from the repo web server. The ânnâ is
+<strong>vcl_pre_commands_nn.sh</strong> from the repo web server. The ânnâ is
anything, but usually a â1â, or a â2â, and forth, to access a
unique parameters file for each unique VCL installation. If you look in the
pre_commands script, you will notice the number is just used to append to
-the filename <em>vcl_parameters_nn.sh</em>. In the scripts below, I used "13",
+the filename <strong>vcl_parameters_nn.sh</strong>. In the scripts below, I used "13",
since the particular target host name was "burton-research-13". Before
starting installation, the students make a one-time instance of both the
vcl_pre_commands file and the vcl_parameters file customized for their
@@ -121,23 +121,22 @@ certificates and so forth. If you use th
you will wish to change additional settings to reflect your institution's
name and login credentials. The parameters.sh file is -- at least to me
-- documented and straightforward. I kept the students confined to a
-private LAN without outside access, so <em>{<em>}{+}we used weak
-passwords{+}{</em>}</em>. Please, use a strong password for any system with access
+private LAN without outside access, so <strong>we used weak
+passwords</strong>. Please, use a strong password for any system with access
from the Internet. Once the pre-commands file is downloaded, the students
make the file executable, the run the script. About 30 minutes later, VCL
installation is complete. Packages are installed using <em>yum</em> (see
-<em>vcl_packages.sh</em>), and all source tarballs are downloaded directly from
-the VCL site. The main script, <em>install_vcl.sh</em>, incorporates several
+<strong>vcl_packages.sh</strong>), and all source tarballs are downloaded directly from
+the VCL site. The main script, <strong>install_vcl.sh</strong>, incorporates several
modifications to the current VCL installation instructions. Notable areas
are sourcing the MySQL database structure, dynamically modifying the VCL
perl script to remove Linux package installation and perl interaction, use
of SL 6.2, and rearranging the order of installation to complete all
package installation in one place. The use of explicit yum package
-installation will allow me to copy <em>vcl_packages.sh</em> almost directly into
+installation will allow me to copy <strong>vcl_packages.sh</strong> almost directly into
RPM requires statements. I did not use an RPM for my students because I
wanted the students to explore and experiment with the scripts.</p>
-<p><a name="AutomatedInstallationofVCL-SowhatisaâcompleteâVCLinstallation?"></a></p>
-<h3 id="so-what-is-a-complete-vcl-installation">So what is a âcompleteâ VCL installation?</h3>
+<h2 id="so-what-is-a-complete-vcl-installation">So what is a âcompleteâ VCL installation?</h2>
<p>In this case, it means everything required to install and configure the VCL
web front end and the VCL management node is completed automatically. The
script automatically launches Firefox to the VCL web interface and lists
@@ -153,21 +152,18 @@ installed VMware ESXi manually on a serv
infrastructure, booting a bare metal image with a PXE boot to my repository
automatically builds Linux images. I expect XCAT can be persuaded to do the
same.</p>
-<p><a name="AutomatedInstallationofVCL-HowcouldthesescriptshelptheVCLproject?"></a></p>
-<h3 id="how-could-these-scripts-help-the-vcl-project">How could these scripts help the VCL project?</h3>
-<p>I mentioned the automated installation in a poster session at the first ICA-CON conference hosted by IBM in April, 2012 ( <a href="http://www.ibm.com/solutions/education/cloudacademy/us/en/cloud_academy_conference.html">ICA-CON</a>
- ). Several people expressed an interest in access to the scripts, and I
+<h2 id="how-could-these-scripts-help-the-vcl-project">How could these scripts help the VCL project?</h2>
+<p>I mentioned the automated installation in a poster session at the first ICA-CON
+conference hosted by IBM in April, 2012 (<a href="http://www.ibm.com/solutions/education/cloudacademy/us/en/cloud_academy_conference.html">ICA-CON</a>). Several people expressed an interest in access to the scripts, and I
agreed to post the scripts in support of the Apache VCL project. I suppose
with a few tweaks the script could be embedded in a no-arch RPM (or at
least a self-determining arch) so that those who are interested in using
VCL, but might not have the skills or patience to wade through the
installation, could go immediately to their own VCL cloud with a click or
two. This could lower the barrier to entry of cloud computing, and let more
-folks get on with exploring new ways to actually <em>{<em>}use{</em>}</em> a vcl cloud.</p>
-<p><a name="AutomatedInstallationofVCL-Thescriptsfollow:"></a></p>
+folks get on with exploring new ways to actually <strong>use</strong> a vcl cloud.</p>
<h2 id="the-scripts-follow">The scripts follow:</h2>
-<p><a name="AutomatedInstallationofVCL- vcl_pre_commands_13.sh"></a></p>
-<h3 id="wzxhzdk16vcl_pre_commands_13sh"> vcl_pre_commands_13.sh</h3>
+<h3 id="vcl_pre_commands_13sh">vcl_pre_commands_13.sh</h3>
<div class="codehilite"><pre> <span class="c1"># Make sure time is correct, otherwise certificates will fail</span>
<span class="n">ntpd</span> <span class="o">-</span><span class="n">gq</span>
<span class="n">service</span> <span class="n">ntpd</span> <span class="n">start</span>
@@ -178,1487 +174,994 @@ folks get on with exploring new ways to
</pre></div>
-<p><a name="AutomatedInstallationofVCL-vcl_parameters_13.sh"></a></p>
<h3 id="vcl_parameters_13sh">vcl_parameters_13.sh</h3>
-<div class="codehilite"><pre> <span class="c">#</span>
-<span class="c"># + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</span>
+<div class="codehilite"><pre><span class="c1"># + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</span>
+<span class="c1"># + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</span>
+<span class="c1"># + +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â </span>
+<span class="c1"># + +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â </span>
+<span class="c1"># + + Filename:Â Â Â Â vcl_parameters.sh</span>
+<span class="c1"># + + Author:Â Â Â Â Â Â Larry Burton</span>
+<span class="c1"># + + Copyright:Â Â Â Copyright 2012 Larry Burton All rights reserved.</span>
+<span class="c1"># + + Revision:Â Â Â Â 20120324</span>
+<span class="c1"># + + Description:Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â </span>
+<span class="c1"># + + A script to define paramters used to install Apache VCL</span>
+<span class="c1"># + + Usage:Â Â Â Â Â Â Â sourced in other files</span>
+<span class="c1"># + +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â </span>
+<span class="c1"># + +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â </span>
+<span class="c1"># + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</span>
+<span class="c1"># + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</span>
+<span class="c1">#</span>
+<span class="n">this_host</span><span class="o">=</span><span class="s">"burton-research-13"</span>
+<span class="n">this_domain</span><span class="o">=</span><span class="s">"ncat.edu"</span>
+<span class="c1">#Â + + + + + + + + VCL Installation paramters + + + + + + + + + + + +</span>
+<span class="c1">#</span>
+<span class="c1"># Logging file</span>
+<span class="n">export</span> <span class="n">log_file</span><span class="o">=</span><span class="s">"/tmp/vcllog.log"</span>
+<span class="c1"># Logging device</span>
+<span class="n">export</span> <span class="n">logging</span><span class="o">=</span><span class="s">"| tee $log_file"</span>
+<span class="c1"># Location of the VCL source tarball</span>
+<span class="n">export</span> <span class="n">source_url</span><span class="o">=</span><span class="s">"http://www.apache.org/dist/incubator/vcl"</span>
+<span class="c1"># VCL version</span>
+<span class="n">export</span> <span class="n">vcl_version</span><span class="o">=</span><span class="s">"2.2.1-incubating"</span>
+<span class="c1"># tarball directory</span>
+<span class="n">export</span> <span class="n">vcl_source_directory</span><span class="o">=</span><span class="s">"/opt/vcl"</span>
+<span class="c1"># The FQDN of the VCL Management Node (Must have valid DNS entry)</span>
+<span class="n">export</span> <span class="n">vcl_management_node_name</span><span class="o">=</span><span class="s">"$this_host.$this_domain"</span>
+<span class="c1"># The FQDN of the VCL Management Node (Must have valid DNS entry)</span>
+<span class="n">export</span> <span class="n">vcl_FQDN</span><span class="o">=</span><span class="s">"$this_host.$this_domain"</span>
+<span class="c1">#</span>
+<span class="c1"># The architecture of this machine (for Perl download)</span>
+<span class="n">export</span> <span class="n">arch</span><span class="o">=</span><span class="s">'i386'</span>
+<span class="c1">#</span>
+<span class="c1">#</span>
+<span class="c1">#Â + + + + + + + + MySQL parameters + + + + + + + + + + + +</span>
+<span class="c1">#</span>
+<span class="c1"># The MySQL root password</span>
+<span class="n">export</span> <span class="n">mysql_password</span><span class="o">=</span><span class="s">'useyourownpassword'</span>
+<span class="c1"># VCL database user name</span>
+<span class="n">export</span> <span class="n">vcl_mysql_user_name</span><span class="o">=</span><span class="s">"vcluser"</span>
+<span class="c1"># VCL database user password</span>
+<span class="n">export</span> <span class="n">vcl_mysql_user_password</span><span class="o">=</span><span class="s">"vcluserpassword"</span>
+<span class="c1"># VCL database name</span>
+<span class="n">export</span> <span class="n">vcl_database_name</span><span class="o">=</span><span class="s">"vcl"</span>
+<span class="c1"># $mcryptkey</span>
+<span class="n">export</span> <span class="n">vcl_mcryptkey</span><span class="o">=</span><span class="s">"alongpassword"</span>
+<span class="c1">#vcl_pemkey</span>
+<span class="n">export</span> <span class="n">vcl_pemkey</span><span class="o">=</span><span class="s">"alongkey"</span>
+<span class="c1"># FQDN of database server (Must have valid DNS entry)</span>
+<span class="n">export</span> <span class="n">vcl_database_server_name</span><span class="o">=</span><span class="s">"$this_host.$this_domain"</span>
+<span class="c1">#LockerWrtUser</span>
+<span class="n">export</span> <span class="n">vcl_lockerwrite_user</span><span class="o">=</span><span class="s">"vcluser"</span>
+<span class="c1"># LockerWrtUser password</span>
+<span class="n">export</span> <span class="n">vcl_lockerwrite_user_password</span><span class="o">=</span><span class="s">"vcluserpassword"</span>
+<span class="c1"># MySQL server name (The name used to connect, which must match the</span>
+<span class="c1"># MySQL database username. Typically, localhost unless you explicitly</span>
+<span class="c1"># allow external connections to the database.</span>
+<span class="n">export</span> <span class="n">vcl_mysql_server_name</span><span class="o">=</span><span class="s">"localhost"</span>
+<span class="c1">#</span>
+<span class="c1">#Â + + + + + + + + HTTP parameters + + + + + + + + + + + +</span>
+<span class="c1">#</span>
+<span class="n">export</span> <span class="n">host_name</span><span class="o">=</span><span class="s">"$this_host.$this_domain"</span>
+<span class="n">export</span> <span class="n">search_path</span><span class="o">=</span><span class="s">"$this_domain"</span>
+<span class="n">export</span> <span class="n">web_virtual_hosts_directory</span><span class="o">=</span><span class="s">'/etc/httpd/virtual_hosts'</span>
+<span class="n">export</span> <span class="n">web_content_base</span><span class="o">=</span><span class="s">'/var/www/web_servers'</span>
+<span class="c1"># The VCL document root for the web server</span>
+<span class="n">export</span> <span class="n">vcl_web_document_root</span><span class="o">=</span><span class="s">"$web_content_base/$host_name"</span>
+<span class="c1">#</span>
+<span class="c1">#Â + + + + + + + + CA Certificate Parameters + + + + + + + + + + + +</span>
+<span class="c1">#</span>
+<span class="n">export</span> <span class="n">ca_passphrase</span><span class="o">=</span><span class="s">"password"</span>
+<span class="c1">#</span>
+<span class="n">export</span> <span class="n">ca_starting_serial_number</span><span class="o">=</span><span class="s">"100"</span>
+<span class="n">export</span> <span class="n">ca_country</span><span class="o">=</span><span class="s">"US"</span>
+<span class="n">export</span> <span class="n">ca_state</span><span class="o">=</span><span class="s">'NorthCarolina'</span>
+<span class="n">export</span> <span class="n">ca_city</span><span class="o">=</span><span class="s">"Greensboro"</span>
+<span class="n">export</span> <span class="n">ca_org</span><span class="o">=</span><span class="s">"LinuxLab"</span>
+<span class="n">export</span> <span class="n">ca_ou</span><span class="o">=</span><span class="s">"VirtualComputingLab"</span>
+<span class="n">export</span> <span class="n">ca_common_name</span><span class="o">=</span><span class="s">"$this_host.$this_domain"</span>
+<span class="n">export</span> <span class="n">ca_email</span><span class="o">=</span><span class="s">"super@ncat.edu"</span>
+<span class="c1"># File to contain the self-signed CA certificate (which contains the public key)</span>
+<span class="n">export</span> <span class="n">ca_certificate_file_name</span><span class="o">=</span><span class="s">"$ca_common_name.cer"</span>
+<span class="c1"># File to contain the unencrypted, base-64 encoded, private key</span>
+<span class="n">export</span> <span class="n">ca_certificate_private_unencrypted_key_file_name</span><span class="o">=</span><span class="s">"$ca_common_name.key"</span>
+<span class="c1"># The directory in which to copy the digital certificates</span>
+<span class="n">export</span> <span class="n">ca_path_to_local_certs_files</span><span class="o">=</span><span class="s">"/etc/pki/tls/certs"</span>
+<span class="c1"># The directory in which to copy the unencrypted private certificate key</span>
+<span class="n">export</span> <span class="n">ca_path_to_local_key_files</span><span class="o">=</span><span class="s">"/etc/pki/tls/private"</span>
+<span class="c1">#</span>
+<span class="c1">#Â + + + + + + + + xmlrpc Parameters + + + + + + + + + + + +</span>
+<span class="c1">#</span>
+<span class="c1"># The VCL daemon uses xmlrpc (remote procedure call) to connect to the</span>
+<span class="c1"># MySQL database for doing things such as creating block reservations.</span>
+<span class="c1"># A user must exist in the vcl MySQL database with privileges suitable for</span>
+<span class="c1"># acccomplishing the database queries. You may use the MySQL GRANT command</span>
+<span class="c1"># to create a distinct user, or you may use the default vcl user.</span>
+<span class="n">export</span> <span class="n">vcl_xmlrpc_username</span><span class="o">=</span><span class="nv">$vcl_mysql_user_name</span>
+<span class="n">export</span> <span class="n">vcl_xmlrpc_pass</span><span class="o">=</span><span class="nv">$vcl_mysql_user_password</span>
</pre></div>
-<ul>
-<li>+
- # + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</li>
-<li>+
- # +
-+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
-Â
- # +
-+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
-Â
- # + + Filename:Â Â Â Â vcl_parameters.sh
- # + + Author:Â Â Â Â Â Â Larry Burton
- # + + Copyright:Â Â Â Copyright 2012 Larry Burton All rights reserved.
- # + + Revision:Â Â Â Â 20120324
- # + +
-Description:Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
-Â
- # + + A script to define paramters used to install Apache VCL
- # + + Usage:Â Â Â Â Â Â Â sourced in other files
- # +
-+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
-Â
- # +
-+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
-Â
- # + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</li>
-<li>+
- # + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</li>
-<li>+
- #
- this_host="burton-research-13"
- this_domain="ncat.edu"
- #Â + + + + + + + + VCL Installation paramters + + + + + + + + + + + +
- #
- # Logging file
- export log_file="/tmp/vcllog.log"
- # Logging device
- export logging="| tee $log_file"
- # Location of the VCL source tarball
- export source_url="http://www.apache.org/dist/incubator/vcl"
- # VCL version
- export vcl_version="2.2.1-incubating"
- # tarball directory
- export vcl_source_directory="/opt/vcl"
- # The FQDN of the VCL Management Node (Must have valid DNS entry)
- export vcl_management_node_name="$this_host.$this_domain"
- # The FQDN of the VCL Management Node (Must have valid DNS entry)
- export vcl_FQDN="$this_host.$this_domain"
- #
- # The architecture of this machine (for Perl download)
- export arch='i386'
- #
- #
- #Â + + + + + + + + MySQL parameters + + + + + + + + + + + +
- #
- # The MySQL root password
- export mysql_password='useyourownpassword'
- # VCL database user name
- export vcl_mysql_user_name="vcluser"
- # VCL database user password
- export vcl_mysql_user_password="vcluserpassword"
- # VCL database name
- export vcl_database_name="vcl"
- # $mcryptkey
- export vcl_mcryptkey="alongpassword"
- #vcl_pemkey
- export vcl_pemkey="alongkey"
- # FQDN of database server (Must have valid DNS entry)
- export vcl_database_server_name="$this_host.$this_domain"
- #LockerWrtUser
- export vcl_lockerwrite_user="vcluser"
- # LockerWrtUser password
- export vcl_lockerwrite_user_password="vcluserpassword"
- # MySQL server name (The name used to connect, which must match the
- # MySQL database username. Typically, localhost unless you explicitly
- # allow external connections to the database.
- export vcl_mysql_server_name="localhost"
- #
- #Â + + + + + + + + HTTP parameters + + + + + + + + + + + +
- #
- export host_name="$this_host.$this_domain"
- export search_path="$this_domain"
- export web_virtual_hosts_directory='/etc/httpd/virtual_hosts'
- export web_content_base='/var/www/web_servers'
- # The VCL document root for the web server
- export vcl_web_document_root="$web_content_base/$host_name"
- #
- #Â + + + + + + + + CA Certificate Parameters + + + + + + + + + + + +
- #
- export ca_passphrase="password"
- #
- export ca_starting_serial_number="100"
- export ca_country="US"
- export ca_state='NorthCarolina'
- export ca_city="Greensboro"
- export ca_org="LinuxLab"
- export ca_ou="VirtualComputingLab"
- export ca_common_name="$this_host.$this_domain"
- export ca_email="super@ncat.edu"
- # File to contain the self-signed CA certificate (which contains the public
-key)
- export ca_certificate_file_name="$ca_common_name.cer"
- # File to contain the unencrypted, base-64 encoded, private key
- export
-ca_certificate_private_unencrypted_key_file_name="$ca_common_name.key"
- # The directory in which to copy the digital certificates
- export ca_path_to_local_certs_files="/etc/pki/tls/certs"
- # The directory in which to copy the unencrypted private certificate key
- export ca_path_to_local_key_files="/etc/pki/tls/private"
- #
- #Â + + + + + + + + xmlrpc Parameters + + + + + + + + + + + +
- #
- # The VCL daemon uses xmlrpc (remote procedure call) to connect to the
- # MySQL database for doing things such as creating block reservations.
- # A user must exist in the vcl MySQL database with privileges suitable for
- # acccomplishing the database queries. You may use the MySQL GRANT command
- # to create a distinct user, or you may use the default vcl user.
- export vcl_xmlrpc_username=$vcl_mysql_user_name
- export vcl_xmlrpc_pass=$vcl_mysql_user_password</li>
-</ul>
-<p><a name="AutomatedInstallationofVCL-https_setup.sh"></a></p>
-<h3 id="https_setupsh">https_setup.sh</h3>
-<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre>1
-2
-3</pre></div></td><td class="code"><div class="codehilite"><pre> <span class="c">#!/bin/bash</span>
+<h2 id="https_setupsh">https_setup.sh</h2>
+<div class="codehilite"><pre><span class="c">#!/bin/bash</span>
<span class="c">#</span>
-<span class="c"># + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</span>
+<span class="c"># + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</span>
+<span class="c"># + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</span>
+<span class="c"># + +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â </span>
+<span class="c"># + +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â </span>
+<span class="c"># + + Filename:Â Â Â Â https_setup.sh</span>
+<span class="c"># + + Author:Â Â Â Â Â Â Larry Burton</span>
+<span class="c"># + + Copyright:Â Â Â Copyright 2012 Larry Burton All rights reserved.</span>
+<span class="c"># + + Revision:Â Â Â Â 20120324</span>
+<span class="c"># + + Description:Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â </span>
+<span class="c"># + + A script to configure httpd for https</span>
+<span class="c"># + + Usage:Â Â Â Â Â Â Â https_setup.sh</span>
+<span class="c"># + +              Must be run as root                                    </span>
+<span class="c"># + +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â </span>
+<span class="c"># + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</span>
+<span class="c"># + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</span>
+<span class="c">#</span>
+<span class="c">#Â + + + + + + + + HTTP parameters + + + + + + + + + + + +</span>
+<span class="c">#</span>
+
+<span class="c"># Note: This script assumes httpd is already setup with Larry Burton's LAMP</span>
+<span class="c">#Â Â Â Â Â Â RPMs. This means the virtual_hosts directory and the web_servers</span>
+<span class="c">#Â Â Â Â Â Â directories are in place and the http access on port 80 is already</span>
+<span class="c">#Â Â Â Â Â Â in place.</span>
+<span class="c">#</span>
+<span class="c">#Â Â Â Â Â Â This script forces ALL HTTP access to rewrite to HTTPS. If you wish to</span>
+<span class="c">#Â Â Â Â Â Â keep some HTTP access, you will have to edit the reqrite section to</span>
+<span class="c">#Â Â Â Â Â Â only rewrite selected locations, eg /location, rather than /.</span>
+<span class="c">#</span>
+<span class="c">#</span>
+<span class="c">#Â + + + + + + + + Add the https rewrite directives + + + + + + + + + + + +</span>
+<span class="c">#</span>
+<span class="c"># ************ check for existence of cert files ***********************</span>
+<span class="c"># The line with CustomLog appears in Larry Burton's default HTTP access.</span>
+<span class="c"># Add the new location to httpd virtual host</span>
+<span class="c">#</span>
+sed -i -e <span class="s1">'/CustomLog/a\ \n\</span>
+<span class="s1">Â \</span>
+<span class="s1"># \ </span>
+<span class="s1"><Location "/"> \</span>
+<span class="s1"># Set the content to ALLOW Indexex to be displayed and to FOLLOW \</span>
+<span class="s1"># symbolic links \</span>
+<span class="s1">Options FollowSymLinks Indexes \</span>
+<span class="s1"># \</span>
+<span class="s1"># \</span>
+<span class="s1">RewriteEngine On \</span>
+<span class="s1"># This will enable the Rewrite capabilities \</span>
+<span class="s1"># \</span>
+<span class="s1">RewriteCond %{HTTPS} !=on \</span>
+<span class="s1"># This checks to make sure the connection is not already HTTPS \</span>
+<span class="s1"># \</span>
+<span class="s1">RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} \</span>
+<span class="s1"># \</span>
+<span class="s1"># This takes http request and changes hhtp to https \</span>
+<span class="s1"># \</span>
+<span class="s1"># \</span>
+<span class="s1"></Location> \</span>
+<span class="s1">Â \</span>
+<span class="s1">'</span> <span class="nv">$web_virtual_hosts_directory</span>/<span class="nv">$host_name</span>.conf
+<span class="c">#</span>
+<span class="c">#</span>
+<span class="c">#</span>
+<span class="c">#Â + + + + + + + + Add the https access directives + + + + + + + + + + + +</span>
+<span class="c">#</span>
+<span class="c"># The </VirtualHost> tag will be the last line of some HTTP virtual host,</span>
+<span class="c"># so we may insert the https virtual host immediately afterwards.</span>
+<span class="c"># Note the escaping of the forward slash.</span>
+<span class="c">#</span>
+sed -i -e <span class="s1">'/<\/VirtualHost>/a\ \n\</span>
+<span class="s1">Â \</span>
+<span class="s1"># \</span>
+<span class="s1"># Make sure httpd listens to port 443 \</span>
+<span class="s1"># \</span>
+<span class="s1">NameVirtualHost *:443 \</span>
+<span class="s1"># \</span>
+<span class="s1"># Add an HTTPS virtual host \</span>
+<span class="s1"># \</span>
+<span class="s1"><VirtualHost *:443> \</span>
+<span class="s1">Â \</span>
+<span class="s1">DirectoryIndex home.php \</span>
+<span class="s1">Â \</span>
+<span class="s1">Â \</span>
+<span class="s1">Â \</span>
+<span class="s1">Â \</span>
+<span class="s1">Â Â Â Â ServerAdmin webmaster@'</span><span class="s2">"$host_name"</span><span class="s1">' \</span>
+<span class="s1">Â Â Â Â DocumentRoot '</span><span class="s2">"$web_content_base/$host_name"</span><span class="s1">' \</span>
+<span class="s1">Â \</span>
+<span class="s1">Â Â Â Â ServerName '</span><span class="s2">"$host_name"</span><span class="s1">' \</span>
+<span class="s1">Â Â Â Â ErrorLog logs/'</span><span class="s2">"$host_name"</span><span class="s1">'-error_log \</span>
+<span class="s1">Â Â Â Â CustomLog logs/'</span><span class="s2">"$host_name"</span><span class="s1">'-access_log common \</span>
+<span class="s1">Â \</span>
+<span class="s1">Â Â Â Â Â Â Â SSLEngine on \</span>
+<span class="s1">Â Â Â Â Â Â Â SSLCertificateFile '</span><span class="s2">"$ca_path_to_local_certs_files/$ca_certificate_file_name"</span><span class="s1">' \</span>
+<span class="s1">Â Â Â Â Â Â Â SSLCertificateKeyFile '</span><span class="s2">"$ca_path_to_local_key_files/$ca_certificate_private_unencrypted_key_file_name"</span><span class="s1">' \</span>
+<span class="s1">Â \</span>
+<span class="s1">Â Â Â Â Â Â Â <Directory /'</span><span class="s2">"$web_content_base/$host_name"</span><span class="s1">'> \</span>
+<span class="s1">Â Â Â Â Â Â Â AllowOverride All \</span>
+<span class="s1">Â Â Â Â Â Â Â </Directory> \</span>
+<span class="s1">Â \</span>
+<span class="s1">Â \</span>
+<span class="s1"><Location \/> \</span>
+<span class="s1">Options FollowSymLinks Indexes \</span>
+<span class="s1"></Location> \</span>
+<span class="s1"># \</span>
+<span class="s1"></VirtualHost> \</span>
+<span class="s1"># This ends an HTTPS virtual host definition. \</span>
+<span class="s1"># \</span>
+<span class="s1">Â \</span>
+<span class="s1">'</span> <span class="nv">$web_virtual_hosts_directory</span>/<span class="nv">$host_name</span>.conf
+<span class="c">#</span>
+<span class="c">#</span>
+<span class="c">#Â + + + + + + + + Restart -- not reload -- the httpd server + + + + + + + + +</span>
+<span class="c">#</span>
+<span class="c"># Retart the web server daemon:</span>
+/etc/init.d/httpd restart
+<span class="c">#</span>
+<span class="c"># End of script</span>
</pre></div>
-</td></tr></table>
-<ul>
-<li>+
- # + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</li>
-<li>+
- # +
-+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
-Â
- # +
-+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
-Â
- # + + Filename:Â Â Â Â https_setup.sh
- # + + Author:Â Â Â Â Â Â Larry Burton
- # + + Copyright:Â Â Â Copyright 2012 Larry Burton All rights reserved.
- # + + Revision:Â Â Â Â 20120324
- # + +
-Description:Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
-Â
- # + + A script to configure httpd for https
- # + + Usage:Â Â Â Â Â Â Â https_setup.sh
- # + +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Must be run as
-root                                   Â
-Â
- # +
-+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
-Â
- # + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</li>
-<li>+
- # + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</li>
-<li>
-<p>+
- #
- #Â + + + + + + + + HTTP parameters + + + + + + + + + + + +
- #</p>
-<h1 id="note-this-script-assumes-httpd-is-already-setup-with-larry-burtons-lamp">Note: This script assumes httpd is already setup with Larry Burton's LAMP</h1>
-<h1 id="rpms-this-means-the-virtual_hosts-directory-and-the">RPMs. This means the virtual_hosts directory and the</h1>
-<p>web_servers</p>
-<h1 id="directories-are-in-place-and-the-http-access-on-port-80-is">directories are in place and the http access on port 80 is</h1>
-<p>already</p>
-<h1 id="in-place">in place.</h1>
-<h1></h1>
-<h1 id="this-script-forces-all-http-access-to-rewrite-to-https-if">This script forces ALL HTTP access to rewrite to HTTPS. If</h1>
-<p>you wish to</p>
-<h1 id="keep-some-http-access-you-will-have-to-edit-the-reqrite">keep some HTTP access, you will have to edit the reqrite</h1>
-<p>section to</p>
-<h1 id="only-rewrite-selected-locations-eg-location-rather-than">only rewrite selected locations, eg /location, rather than /.</h1>
-<h1></h1>
-<h1></h1>
-<h1 id="add-the-https-rewrite-directives">+ + + + + + + + Add the https rewrite directives + + + + + + + + + + +</h1>
-<p>+</p>
-<h1></h1>
-<h1 id="check-for-existence-of-cert-files"><strong><em>*</em></strong><strong><em>** check for existence of cert files </em></strong><strong><em>*</em></strong><strong><em>*</em></strong><strong>*</strong>*</h1>
-<h1 id="the-line-with-customlog-appears-in-larry-burtons-default-http-access">The line with CustomLog appears in Larry Burton's default HTTP access.</h1>
-<h1 id="add-the-new-location-to-httpd-virtual-host">Add the new location to httpd virtual host</h1>
-<h1></h1>
-<p>sed -i -e '/CustomLog/a\ \n\
-Â \</p>
-<h1 id="">\</h1>
-<p><Location "/"> \</p>
-<h1 id="set-the-content-to-allow-indexex-to-be-displayed-and-to-follow">Set the content to ALLOW Indexex to be displayed and to FOLLOW \</h1>
-<h1 id="symbolic-links">symbolic links \</h1>
-<p>Options FollowSymLinks Indexes \</p>
-<h1 id="_1">\</h1>
-<h1 id="_2">\</h1>
-<p>RewriteEngine On \</p>
-<h1 id="this-will-enable-the-rewrite-capabilities">This will enable the Rewrite capabilities \</h1>
-<h1 id="_3">\</h1>
-<p>RewriteCond %{HTTPS} !=on \</p>
-<h1 id="this-checks-to-make-sure-the-connection-is-not-already-https">This checks to make sure the connection is not already HTTPS \</h1>
-<h1 id="_4">\</h1>
-<p>RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} \</p>
-<h1 id="_5">\</h1>
-<h1 id="this-takes-http-request-and-changes-hhtp-to-https">This takes http request and changes hhtp to https \</h1>
-<h1 id="_6">\</h1>
-<h1 id="_7">\</h1>
-<p></Location> \
-Â \
-' $web_virtual_hosts_directory/$host_name.conf</p>
-<h1></h1>
-<h1></h1>
-<h1></h1>
-<h1 id="add-the-https-access-directives">+ + + + + + + + Add the https access directives + + + + + + + + + + + +</h1>
-<h1></h1>
-<h1 id="the-wzxhzdk29-tag-will-be-the-last-line-of-some-http-virtual-host">The </VirtualHost> tag will be the last line of some HTTP virtual host,</h1>
-<h1 id="so-we-may-insert-the-https-virtual-host-immediately-afterwards">so we may insert the https virtual host immediately afterwards.</h1>
-<h1 id="note-the-escaping-of-the-forward-slash">Note the escaping of the forward slash.</h1>
-<h1></h1>
-<p>sed -i -e '/<\/VirtualHost>/a\ \n\
-Â \</p>
-<h1 id="_8">\</h1>
-<h1 id="make-sure-httpd-listens-to-port-443">Make sure httpd listens to port 443 \</h1>
-<h1 id="_9">\</h1>
-<p>NameVirtualHost *:443 \</p>
-<h1 id="_10">\</h1>
-<h1 id="add-an-https-virtual-host">Add an HTTPS virtual host \</h1>
-<h1 id="_11">\</h1>
-<p><VirtualHost *:443> \
-Â \
-DirectoryIndex home.php \
-Â \
-Â \
-Â \
-Â \
-Â Â Â Â ServerAdmin webmaster@'"$host_name"' \
-Â Â Â Â DocumentRoot '"$web_content_base/$host_name"' \
-Â \
-Â Â Â Â ServerName '"$host_name"' \
-Â Â Â Â ErrorLog logs/'"$host_name"'-error_log \
-Â Â Â Â CustomLog logs/'"$host_name"'-access_log common \
-Â \
-Â Â Â Â Â Â Â SSLEngine on \
-Â Â Â Â Â Â Â SSLCertificateFile
-'"$ca_path_to_local_certs_files/$ca_certificate_file_name"' \
-Â Â Â Â Â Â Â SSLCertificateKeyFile
-'"$ca_path_to_local_key_files/$ca_certificate_private_unencrypted_key_file_name"'
-\
-Â \
-Â Â Â Â Â Â Â <Directory /'"$web_content_base/$host_name"'> \
-Â Â Â Â Â Â Â AllowOverride All \
-Â Â Â Â Â Â Â </Directory> \
-Â \
-Â \
-<Location \\/> \
-Options FollowSymLinks Indexes \
-</Location> \</p>
-<h1 id="_12">\</h1>
-<p></VirtualHost> \</p>
-<h1 id="this-ends-an-https-virtual-host-definition">This ends an HTTPS virtual host definition. \</h1>
-<h1 id="_13">\</h1>
-<p>\
-' $web_virtual_hosts_directory/$host_name.conf</p>
-<h1></h1>
-<h1></h1>
-<h1 id="restart-not-reload-the-httpd-server">+ + + + + + + + Restart -- not reload -- the httpd server + + + + + + +</h1>
-<ul>
-<li>+</li>
-</ul>
-<h1></h1>
-<h1 id="retart-the-web-server-daemon">Retart the web server daemon:</h1>
-<p>/etc/init.d/httpd restart</p>
-<h1></h1>
-<h1 id="end-of-script">End of script</h1>
-</li>
-</ul>
-<p><a name="AutomatedInstallationofVCL-vcl_packages.sh"></a></p>
-<h3 id="vcl_packagessh">vcl_packages.sh</h3>
+
+<h2 id="vcl_packagessh">vcl_packages.sh</h2>
<p>I placed the installation of required packages in a separate file to ease
the transition of the script into an RPM.</p>
-<div class="codehilite"><pre> <span class="c">#</span>
-<span class="c"># + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</span>
+<div class="codehilite"><pre><span class="c1">#</span>
+<span class="c1"># + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</span>
+<span class="c1"># + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</span>
+<span class="c1"># + +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â </span>
+<span class="c1"># + +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â </span>
+<span class="c1"># + + Filename:Â Â Â Â vcl_packages.sh</span>
+<span class="c1"># + + Author:Â Â Â Â Â Â Larry Burton</span>
+<span class="c1"># + + Copyright:Â Â Â Copyright 2012 Larry Burton All rights reserved.</span>
+<span class="c1"># + + Revision:Â Â Â Â 20120324</span>
+<span class="c1"># + + Description:Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â </span>
+<span class="c1"># + + A script to define paramters used to install packages used by Apache VCL</span>
+<span class="c1"># + + Usage:Â Â Â Â Â Â Â sourced in other files</span>
+<span class="c1"># + +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â </span>
+<span class="c1"># + +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â </span>
+<span class="c1"># + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</span>
+<span class="c1"># + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</span>
+<span class="c1">#</span>
+<span class="c1">#Â + + + + + + + + VCL Installation paramters + + + + + + + + + + + +</span>
+<span class="c1">#</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">"Installing packages used by VCL"</span> <span class="nv">$logging</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">""</span> <span class="nv">$logging</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">"Some of these packages may already be installed, but we"</span> <span class="nv">$logging</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">"check them anyway to see if they need updating."</span> <span class="nv">$logging</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">""</span> <span class="nv">$logging</span>
+<span class="c1">#</span>
+<span class="c1"># Install these packages</span>
+<span class="c1">#</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">"httpd - Apache HTTP Server"</span> <span class="nv">$logging</span>
+<span class="n">yum</span> <span class="o">-</span><span class="n">y</span> <span class="n">install</span> <span class="n">httpd</span>
+<span class="c1">#</span>
+<span class="c1">#</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">"mod_ssl - SSL/TLS module for the Apache HTTP server"</span> <span class="nv">$logging</span>
+<span class="n">yum</span> <span class="o">-</span><span class="n">y</span> <span class="n">install</span> <span class="n">mod_ssl</span>
+<span class="c1">#</span>
+<span class="c1">#</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">"php - The PHP HTML-embedded scripting language"</span> <span class="nv">$logging</span>
+<span class="n">yum</span> <span class="o">-</span><span class="n">y</span> <span class="n">install</span> <span class="n">php</span>
+<span class="c1">#</span>
+<span class="c1">#</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">"We will not use libmcrypt - Encryption algorithms library"</span> <span class="nv">$logging</span>
+<span class="c1">#yum -y install libmcrypt</span>
+<span class="c1">#</span>
+<span class="c1"># Required PHP Modules:</span>
+<span class="c1">#</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">""</span> <span class="nv">$logging</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">"We need the following PHP modules."</span> <span class="nv">$logging</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">""</span> <span class="nv">$logging</span>
+<span class="c1">#</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">"php-gd"</span> <span class="nv">$logging</span>
+<span class="n">yum</span> <span class="o">-</span><span class="n">y</span> <span class="n">install</span> <span class="n">php</span><span class="o">-</span><span class="n">gd</span>
+<span class="c1">#</span>
+<span class="c1">#</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">"php-json (required if your PHP version is 5.2 or later)"</span> <span class="nv">$logging</span>
+<span class="n">yum</span> <span class="o">-</span><span class="n">y</span> <span class="n">install</span> <span class="n">php</span><span class="o">-</span><span class="n">json</span>
+<span class="c1">#</span>
+<span class="c1">#</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">"We will not use php-mcrypt"</span> <span class="nv">$logging</span>
+<span class="c1">#yum -y install php-mcrypt</span>
+<span class="c1">#</span>
+<span class="c1">#</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">"php-mysql"</span> <span class="nv">$logging</span>
+<span class="n">yum</span> <span class="o">-</span><span class="n">y</span> <span class="n">install</span> <span class="n">php</span><span class="o">-</span><span class="n">mysql</span>
+<span class="c1">#</span>
+<span class="c1">#</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">"php-openssl"</span> <span class="nv">$logging</span>
+<span class="n">yum</span> <span class="o">-</span><span class="n">y</span> <span class="n">install</span> <span class="n">php</span><span class="o">-</span><span class="n">openssl</span>
+<span class="c1">#</span>
+<span class="c1">#</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">"php-sysvsem"</span> <span class="nv">$logging</span>
+<span class="n">yum</span> <span class="o">-</span><span class="n">y</span> <span class="n">install</span> <span class="n">php</span><span class="o">-</span><span class="n">sysvsem</span>
+<span class="c1">#</span>
+<span class="c1">#</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">"php-xml"</span> <span class="nv">$logging</span>
+<span class="n">yum</span> <span class="o">-</span><span class="n">y</span> <span class="n">install</span> <span class="n">php</span><span class="o">-</span><span class="n">xml</span>
+<span class="c1">#</span>
+<span class="c1">#</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">"php-xmlrpc"</span> <span class="nv">$logging</span>
+<span class="n">yum</span> <span class="o">-</span><span class="n">y</span> <span class="n">install</span> <span class="n">php</span><span class="o">-</span><span class="n">xmlrpc</span>
+<span class="c1">#</span>
+<span class="c1">#</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">"php-ldap"</span> <span class="nv">$logging</span>
+<span class="n">yum</span> <span class="o">-</span><span class="n">y</span> <span class="n">install</span> <span class="n">php</span><span class="o">-</span><span class="n">ldap</span>
+<span class="c1">#</span>
+<span class="c1">#</span>
+<span class="c1"># Management Node packages</span>
+<span class="c1">#Required Linux Packages:</span>
+
+<span class="c1"># The VCL management node daemon (vcld) requires the following Linux packages and </span>
+<span class="c1"># Perl modules in order to run (see step 2 below for installation instructions):</span>
+
+<span class="c1">#</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">"expat - A library for parsing XML"</span> <span class="nv">$logging</span>
+<span class="n">yum</span> <span class="o">-</span><span class="n">y</span> <span class="n">install</span> <span class="n">expat</span>
+<span class="c1">#</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">"expat-devel - Libraries and include files to develop XML applications with expat"</span> <span class="nv">$logging</span>
+<span class="n">yum</span> <span class="o">-</span><span class="n">y</span> <span class="n">install</span> <span class="n">expat</span><span class="o">-</span><span class="n">devel</span>
+<span class="c1">#</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">"gcc - Various compilers C, C++, Objective-C, Java, ..."</span> <span class="nv">$logging</span>
+<span class="n">yum</span> <span class="o">-</span><span class="n">y</span> <span class="n">install</span> <span class="n">gcc</span>
+<span class="c1">#</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">"krb5-libs - The shared libraries used by Kerberos 5"</span> <span class="nv">$logging</span>
+<span class="n">yum</span> <span class="o">-</span><span class="n">y</span> <span class="n">install</span> <span class="n">krb5</span><span class="o">-</span><span class="n">libs</span>
+<span class="c1">#</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">"krb5-devel - Development files needed to compile Kerberos 5 programs"</span> <span class="nv">$logging</span>
+<span class="n">yum</span> <span class="o">-</span><span class="n">y</span> <span class="n">install</span> <span class="n">krb5</span><span class="o">-</span><span class="n">devel</span>
+<span class="c1">#</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">"libxml2 - Library providing XML and HTML support"</span> <span class="nv">$logging</span>
+<span class="n">yum</span> <span class="o">-</span><span class="n">y</span> <span class="n">install</span> <span class="n">libxml2</span>
+<span class="c1">#</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">"libxml2-devel - Libraries, includes, etc. to develop XML and HTML applications"</span> <span class="nv">$logging</span>
+<span class="n">yum</span> <span class="o">-</span><span class="n">y</span> <span class="n">install</span> <span class="n">libxml2</span><span class="o">-</span><span class="n">devel</span>
+<span class="c1">#</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">"mysql - MySQL client programs and shared libraries"</span> <span class="nv">$logging</span>
+<span class="n">yum</span> <span class="o">-</span><span class="n">y</span> <span class="n">install</span> <span class="n">mysql</span>
+<span class="c1">#</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">"nmap - Network exploration tool and security scanner"</span> <span class="nv">$logging</span>
+<span class="n">yum</span> <span class="o">-</span><span class="n">y</span> <span class="n">install</span> <span class="n">nmap</span>
+<span class="c1">#</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">"openssh - The OpenSSH implementation of SSH protocol versions 1 and 2"</span> <span class="nv">$logging</span>
+<span class="n">yum</span> <span class="o">-</span><span class="n">y</span> <span class="n">install</span> <span class="n">openssh</span>
+<span class="c1">#</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">"openssl - The OpenSSL toolkit"</span> <span class="nv">$logging</span>
+<span class="n">yum</span> <span class="o">-</span><span class="n">y</span> <span class="n">install</span> <span class="n">openssl</span>
+<span class="c1">#</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">"openssl-devel - Files for development of applications which will use OpenSSL"</span> <span class="nv">$logging</span>
+<span class="n">yum</span> <span class="o">-</span><span class="n">y</span> <span class="n">install</span> <span class="n">openssl</span><span class="o">-</span><span class="n">devel</span>
+<span class="c1">#</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">"perl - The Perl programming language"</span> <span class="nv">$logging</span>
+<span class="n">yum</span> <span class="o">-</span><span class="n">y</span> <span class="n">install</span> <span class="n">perl</span>
+<span class="c1">#</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">"perl-DBD-MySQL - A MySQL interface for perl"</span> <span class="nv">$logging</span>
+<span class="n">yum</span> <span class="o">-</span><span class="n">y</span> <span class="n">install</span> <span class="n">perl</span><span class="o">-</span><span class="n">DBD</span><span class="o">-</span><span class="n">MySQL</span>
+<span class="c1">#</span>
+<span class="c1">#Â Â Â Â Â Â Â Â Â ------------------------- /bin/echo "xmlsec1-openssl - OpenSSL crypto plugin for XML Security Library" $logging</span>
+<span class="c1">#Â Â Â Â Â Â Â Â Â ------------------------- yum -y install xmlsec1-openssl</span>
+<span class="c1">#</span>
+<span class="c1">#</span>
+<span class="c1">#</span>
+<span class="k">if</span> <span class="p">[</span> <span class="nv">$arch</span> <span class="o">==</span> <span class="s">"i386"</span> <span class="p">]</span>
+<span class="k">then</span>
+<span class="n">perlarch</span><span class="o">=</span><span class="s">"i686"</span>
+<span class="k">else</span>
+<span class="n">perlarch</span><span class="o">=</span><span class="s">"x86_64"</span>
+<span class="n">fi</span>
+<span class="sr">/bin/</span><span class="n">echo</span> <span class="s">"Perl Architecture for download is $perlarch"</span> <span class="nv">$logging</span>
+<span class="n">wget</span> <span class="n">ftp:</span><span class="sr">//</span><span class="n">rpmfind</span><span class="o">.</span><span class="n">net</span><span class="sr">/linux/</span><span class="n">epel</span><span class="sr">/beta/</span><span class="mi">6</span><span class="sr">/$arch/xm</span><span class="n">lsec1</span><span class="o">-</span><span class="mf">1.2.16</span><span class="o">-</span><span class="mi">2</span><span class="o">.</span><span class="n">el6</span><span class="o">.</span><span class="nv">$perlarch</span><span class="o">.</span><span class="n">rpm</span>
+<span class="n">yum</span> <span class="o">-</span><span class="n">y</span> <span class="n">install</span> <span class="n">xmlsec1</span><span class="o">-</span><span class="mf">1.2.16</span><span class="o">-</span><span class="mi">2</span><span class="o">.</span><span class="n">el6</span><span class="o">.</span><span class="nv">$perlarch</span><span class="o">.</span><span class="n">rpm</span>
+<span class="c1">#</span>
+<span class="c1">#</span>
+<span class="c1">#wget ftp://rpmfind.net/linux/epel/beta/6/x86_64/xmlsec1-1.2.16-2.el6.x86_64.rpm</span>
+<span class="c1">#yum -y install xmlsec1-1.2.16-2.el6.x86_64.rpm</span>
+<span class="c1">#</span>
+<span class="c1">#wget http://rpmfind.net/linux/epel/beta/6/i386/xmlsec1-1.2.16-2.el6.i686.rpm</span>
+<span class="c1">#yum -y install xmlsec1-1.2.16-2.el6.i686.rpm</span>
</pre></div>
-<ul>
-<li>+
- # + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</li>
-<li>+
- # +
-+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
-Â
- # +
-+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
-Â
- # + + Filename:Â Â Â Â vcl_packages.sh
- # + + Author:Â Â Â Â Â Â Larry Burton
- # + + Copyright:Â Â Â Copyright 2012 Larry Burton All rights reserved.
- # + + Revision:Â Â Â Â 20120324
- # + +
-Description:Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
-Â
- # + + A script to define paramters used to install packages used by Apache
-VCL
- # + + Usage:Â Â Â Â Â Â Â sourced in other files
- # +
-+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
-Â
- # +
-+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
-Â
- # + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</li>
-<li>+
- # + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</li>
-<li>
-<p>+
- #
- #Â + + + + + + + + VCL Installation paramters + + + + + + + + + + + +
- #
- /bin/echo "Installing packages used by VCL" $logging
- /bin/echo "" $logging
- /bin/echo "Some of these packages may already be installed, but we"
-$logging
- /bin/echo "check them anyway to see if they need updating." $logging
- /bin/echo "" $logging
- #
- # Install these packages
- #
- /bin/echo "httpd - Apache HTTP Server" $logging
- yum -y install httpd
- #
- #
- /bin/echo "mod_ssl - SSL/TLS module for the Apache HTTP server" $logging
- yum -y install mod_ssl
- #
- #
- /bin/echo "php - The PHP HTML-embedded scripting language" $logging
- yum -y install php
- #
- #
- /bin/echo "We will not use libmcrypt - Encryption algorithms library"
-$logging
- #yum -y install libmcrypt
- #
- # Required PHP Modules:
- #
- /bin/echo "" $logging
- /bin/echo "We need the following PHP modules." $logging
- /bin/echo "" $logging
- #
- /bin/echo "php-gd" $logging
- yum -y install php-gd
- #
- #
- /bin/echo "php-json (required if your PHP version is 5.2 or later)"
-$logging
- yum -y install php-json
- #
- #
- /bin/echo "We will not use php-mcrypt" $logging
- #yum -y install php-mcrypt
- #
- #
- /bin/echo "php-mysql" $logging
- yum -y install php-mysql
- #
- #
- /bin/echo "php-openssl" $logging
- yum -y install php-openssl
- #
- #
- /bin/echo "php-sysvsem" $logging
- yum -y install php-sysvsem
- #
- #
- /bin/echo "php-xml" $logging
- yum -y install php-xml
- #
- #
- /bin/echo "php-xmlrpc" $logging
- yum -y install php-xmlrpc
- #
- #
- /bin/echo "php-ldap" $logging
- yum -y install php-ldap
- #
- #
- # Management Node packages
- #Required Linux Packages:</p>
-<h1 id="the-vcl-management-node-daemon-vcld-requires-the-following-linux">The VCL management node daemon (vcld) requires the following Linux</h1>
-<p>packages and Perl modules in order to run (see step 2 below for
-installation instructions):</p>
-<h1></h1>
-<p>/bin/echo "expat - A library for parsing XML" $logging
-yum -y install expat</p>
-<h1></h1>
-<p>/bin/echo "expat-devel - Libraries and include files to develop XML
-applications with expat" $logging
-yum -y install expat-devel</p>
-<h1></h1>
-<p>/bin/echo "gcc - Various compilers C, C++, Objective-C, Java, ..." $logging
-yum -y install gcc</p>
-<h1></h1>
-<p>/bin/echo "krb5-libs - The shared libraries used by Kerberos 5" $logging
-yum -y install krb5-libs</p>
-<h1></h1>
-<p>/bin/echo "krb5-devel - Development files needed to compile Kerberos 5
-programs" $logging
-yum -y install krb5-devel</p>
-<h1></h1>
-<p>/bin/echo "libxml2 - Library providing XML and HTML support" $logging
-yum -y install libxml2</p>
-<h1></h1>
-<p>/bin/echo "libxml2-devel - Libraries, includes, etc. to develop XML and
-HTML applications" $logging
-yum -y install libxml2-devel</p>
-<h1></h1>
-<p>/bin/echo "mysql - MySQL client programs and shared libraries" $logging
-yum -y install mysql</p>
-<h1></h1>
-<p>/bin/echo "nmap - Network exploration tool and security scanner" $logging
-yum -y install nmap</p>
-<h1></h1>
-<p>/bin/echo "openssh - The OpenSSH implementation of SSH protocol versions 1
-and 2" $logging
-yum -y install openssh</p>
-<h1></h1>
-<p>/bin/echo "openssl - The OpenSSL toolkit" $logging
-yum -y install openssl</p>
-<h1></h1>
-<p>/bin/echo "openssl-devel - Files for development of applications which will
-use OpenSSL" $logging
-yum -y install openssl-devel</p>
-<h1></h1>
-<p>/bin/echo "perl - The Perl programming language" $logging
-yum -y install perl</p>
-<h1></h1>
-<p>/bin/echo "perl-DBD-MySQL - A MySQL interface for perl" $logging
-yum -y install perl-DBD-MySQL</p>
-<h1></h1>
-<h1 id="-binecho-xmlsec1-openssl-">------------------------- /bin/echo "xmlsec1-openssl -</h1>
-<p>OpenSSL crypto plugin for XML Security Library" $logging</p>
-<h1 id="-yum-y-install">------------------------- yum -y install</h1>
-<p>xmlsec1-openssl</p>
-<h1></h1>
-<h1></h1>
-<h1></h1>
-<p>if [ $arch == "i386" ]
-then
-perlarch="i686"
-else
-perlarch="x86_64"
-fi
-/bin/echo "Perl Architecture for download is $perlarch" $logging
-wget
-ftp://rpmfind.net/linux/epel/beta/6/$arch/xmlsec1-1.2.16-2.el6.$perlarch.rpm
-yum -y install xmlsec1-1.2.16-2.el6.$perlarch.rpm</p>
-<h1></h1>
-<h1></h1>
-<h1 id="wget">wget</h1>
-<p>ftp://rpmfind.net/linux/epel/beta/6/x86_64/xmlsec1-1.2.16-2.el6.x86_64.rpm</p>
-<h1 id="yum-y-install-xmlsec1-1216-2el6x86_64rpm">yum -y install xmlsec1-1.2.16-2.el6.x86_64.rpm</h1>
-<h1></h1>
-<h1 id="wget_1">wget</h1>
-<p>http://rpmfind.net/linux/epel/beta/6/i386/xmlsec1-1.2.16-2.el6.i686.rpm</p>
-<h1 id="yum-y-install-xmlsec1-1216-2el6i686rpm">yum -y install xmlsec1-1.2.16-2.el6.i686.rpm</h1>
-</li>
-</ul>
-<p><a name="AutomatedInstallationofVCL-create_a_new_self_signed_certificate.sh"></a></p>
-<h3 id="create_a_new_self_signed_certificatesh">create_a_new_self_signed_certificate.sh</h3>
-<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre>1
-2
-3</pre></div></td><td class="code"><div class="codehilite"><pre> <span class="c">#!/bin/bash</span>
+<h2 id="create_a_new_self_signed_certificatesh">create_a_new_self_signed_certificate.sh</h2>
+<div class="codehilite"><pre><span class="c">#!/bin/bash</span>
+<span class="c">#</span>
+<span class="c"># + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</span>
+<span class="c"># + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</span>
+<span class="c"># + +</span>
+<span class="c"># + +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â </span>
+<span class="c"># + + Filename:Â Â Â Â create_new_self-signed_ca.sh</span>
+<span class="c"># + + Author:Â Â Â Â Â Â Larry Burton</span>
+<span class="c"># + + Copyright:Â Â Â Copyright 2012 Larry Burton All rights reserved.</span>
+<span class="c"># + + Revision:Â Â Â Â 20120324</span>
+<span class="c"># + + Description:Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â </span>
+<span class="c"># + + A script to create a new self-signed digital certificate</span>
+<span class="c"># + + Usage:Â Â Â Â Â Â Â create_new_self-signed_ca.sh</span>
+<span class="c"># + +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â </span>
+<span class="c"># + +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â </span>
+<span class="c"># + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</span>
+<span class="c"># + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</span>
+<span class="c">#</span>
+<span class="c">#</span>
+<span class="c"># This script will create a new self-signed Certificate Authority (CA)</span>
+<span class="c"># digital certificate. The CA certificate can be posted on a web server for</span>
+<span class="c"># the public to download in order to verify digital certificates signed by</span>
+<span class="c"># this CA certificate.</span>
+<span class="c">#</span>
+<span class="c"># When creating the CA, we will NOT ENCRYPT the private key because we wish</span>
+<span class="c"># to store the unencrypted private key on a server for access by software</span>
+<span class="c"># such as httpd. If we encrypted the private key, we would have to type in the</span>
+<span class="c"># passphrase every time the software needed to use the key. The "-nodes"</span>
+<span class="c"># option specifies no encryption.</span>
+
+<span class="c"># Prepare subject text</span>
+<span class="c"># If you have a problem</span>
+<span class="nv">ca_subj</span><span class="o">=</span>/C<span class="o">=</span><span class="nv">$ca_country</span>/ST<span class="o">=</span><span class="nv">$ca_state</span>/O<span class="o">=</span><span class="nv">$ca_org</span>/localityName<span class="o">=</span><span class="nv">$ca_city</span>/commonName<span class="o">=</span><span class="nv">$ca_common_name</span>/organizationalUnitName<span class="o">=</span><span class="nv">$ca_ou</span>/emailAddress<span class="o">=</span><span class="nv">$ca_email</span>
+<span class="c">#</span>
+<span class="nb">echo</span> <span class="s2">"The subject text is:"</span>
+<span class="nb">echo</span> <span class="s2">"$ca_subj"</span>
+<span class="c">#</span>
+<span class="c"># Create the self-signed certificate</span>
+<span class="c">#Â Â Â PEM format is default, but specify it to make sure we do not have DER format</span>
+openssl req -x509 <span class="se">\</span>
+Â Â Â -nodes <span class="se">\</span>
+Â Â Â -keyform PEM <span class="se">\</span>
+Â Â Â -inform PEM <span class="se">\</span>
+Â Â Â -outform PEM <span class="se">\</span>
+Â Â Â -days 3650 <span class="se">\</span>
+Â Â Â -newkey rsa:2048 <span class="se">\</span>
+Â Â Â -set_serial <span class="nv">$ca_starting_serial_number</span> <span class="se">\</span>
+Â Â Â -batch <span class="se">\</span>
+Â Â Â -subj <span class="s2">"$ca_subj"</span> <span class="se">\</span>
+Â Â Â -keyout <span class="nv">$ca_certificate_private_unencrypted_key_file_name</span> <span class="se">\</span>
+Â Â Â -out <span class="nv">$ca_certificate_file_name</span> <span class="se">\</span>
+Â Â Â -passin pass:<span class="nv">$ca_passphrase</span>
<span class="c">#</span>
-<span class="c"># + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</span>
+<span class="c"># Self-signed certificate is complete</span>
+/bin/echo <span class="s2">"Here is the unencrypted private key stored in $ca_certificate_private_unencrypted_key_file_name:"</span>
+cat <span class="nv">$ca_certificate_private_unencrypted_key_file_name</span>
+/bin/echo <span class="s2">"Here is the self-signed Certificate Authority certificate stored in $ca_certificate_file_name:"</span>
+cat <span class="nv">$ca_certificate_file_name</span>
+<span class="c">#</span>
+/bin/echo <span class="s2">"Here is the information contained in the self-signed CA certificate:"</span>
+openssl x509 -text -in <span class="nv">$ca_certificate_file_name</span>
+<span class="c">#</span>
+<span class="c">#Â + + + + + + + + Copy Cert and Key to local directory + + + + + + + + + + + +</span>
+<span class="c">#</span>
+mkdir -p <span class="nv">$ca_path_to_local_certs_files</span>
+mkdir -p <span class="nv">$ca_path_to_local_key_files</span>
+cp <span class="nv">$ca_certificate_file_name</span> <span class="nv">$ca_path_to_local_certs_files</span>/<span class="nv">$ca_certificate_file_name</span>
+cp <span class="nv">$ca_certificate_private_unencrypted_key_file_name</span> <span class="nv">$ca_path_to_local_key_files</span>/<span class="nv">$ca_certificate_private_unencrypted_key_file_name</span>
+<span class="c">#</span>
+/bin/echo <span class="s2">"The CA certificate has been copied to $ca_path_to_local_certs_files"</span>
+/bin/echo <span class="s2">"The CA unecrypted private key has been copied to $ca_path_to_local_key_files"</span>
+<span class="c"># end of script</span>
</pre></div>
-</td></tr></table>
-<ul>
-<li>+
- # + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</li>
-<li>+
- # +
-+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
-Â
- # +
-+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
-Â
- # + + Filename:Â Â Â Â create_new_self-signed_ca.sh
- # + + Author:Â Â Â Â Â Â Larry Burton
- # + + Copyright:Â Â Â Copyright 2012 Larry Burton All rights reserved.
- # + + Revision:Â Â Â Â 20120324
- # + +
-Description:Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
-Â
- # + + A script to create a new self-signed digital certificate
- # + + Usage:Â Â Â Â Â Â Â create_new_self-signed_ca.sh
- # + +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
- # +
-+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
-Â
- # + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</li>
-<li>+
- # + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</li>
-<li>
-<p>+
- #
- #
- # This script will create a new self-signed Certificate Authority (CA)
- # digital certificate. The CA certificate can be posted on a web server for
- # the public to download in order to verify digital certificates signed by
- # this CA certificate.
- #
- # When creating the CA, we will NOT ENCRYPT the private key because we wish
- # to store the unencrypted private key on a server for access by software
- # such as httpd. If we encrypted the private key, we would have to type in
-the
- # passphrase every time the software needed to use the key. The "-nodes"
- # option specifies no encryption.</p>
-<h1 id="prepare-subject-text">Prepare subject text</h1>
-<h1 id="if-you-have-a-problem">If you have a problem</h1>
-<p>ca_subj=/C=$ca_country/ST=$ca_state/O=$ca_org/localityName=$ca_city/commonName=$ca_common_name/organizationalUnitName=$ca_ou/emailAddress=$ca_email</p>
-<h1></h1>
-<p>echo "The subject text is:"
-echo "$ca_subj"</p>
-<h1></h1>
-<h1 id="create-the-self-signed-certificate">Create the self-signed certificate</h1>
-<h1 id="pem-format-is-default-but-specify-it-to-make-sure-we-do-not-have">PEM format is default, but specify it to make sure we do not have</h1>
-<p>DER format
-openssl req -x509 \
-Â Â Â -nodes \
-Â Â Â -keyform PEM \
-Â Â Â -inform PEM \
-Â Â Â -outform PEM \
-Â Â Â -days 3650 \
-Â Â Â -newkey rsa:2048 \
-Â Â Â -set_serial $ca_starting_serial_number \
-Â Â Â -batch \
-Â Â Â -subj "$ca_subj" \
-Â Â Â -keyout $ca_certificate_private_unencrypted_key_file_name \
-Â Â Â -out $ca_certificate_file_name \
-Â Â Â -passin pass:$ca_passphrase</p>
-<h1></h1>
-<h1 id="self-signed-certificate-is-complete">Self-signed certificate is complete</h1>
-<p>/bin/echo "Here is the unencrypted private key stored in
-$ca_certificate_private_unencrypted_key_file_name:"
-cat $ca_certificate_private_unencrypted_key_file_name
-/bin/echo "Here is the self-signed Certificate Authority certificate stored
-in $ca_certificate_file_name:"
-cat $ca_certificate_file_name</p>
-<h1></h1>
-<p>/bin/echo "Here is the information contained in the self-signed CA
-certificate:"
-openssl x509 -text -in $ca_certificate_file_name</p>
-<h1></h1>
-<h1 id="copy-cert-and-key-to-local-directory">+ + + + + + + + Copy Cert and Key to local directory + + + + + + + + +</h1>
-<ul>
-<li>
-<ul>
-<li>+</li>
-</ul>
-</li>
-</ul>
-<h1></h1>
-<p>mkdir -p $ca_path_to_local_certs_files
-mkdir -p $ca_path_to_local_key_files
-cp $ca_certificate_file_name
-$ca_path_to_local_certs_files/$ca_certificate_file_name
-cp $ca_certificate_private_unencrypted_key_file_name
-$ca_path_to_local_key_files/$ca_certificate_private_unencrypted_key_file_name</p>
-<h1></h1>
-<p>/bin/echo "The CA certificate has been copied to
-$ca_path_to_local_certs_files"
-/bin/echo "The CA unecrypted private key has been copied to
-$ca_path_to_local_key_files"</p>
-<h1 id="end-of-script_1">end of script</h1>
-</li>
-</ul>
-<p><a name="AutomatedInstallationofVCL-install_vcl.sh"></a></p>
-<h3 id="install_vclsh">install_vcl.sh</h3>
-<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre>1
-2
-3</pre></div></td><td class="code"><div class="codehilite"><pre> <span class="c">#!/bin/bash</span>
+
+<h2 id="install_vclsh">install_vcl.sh</h2>
+<div class="codehilite"><pre><span class="c">#!/bin/bash</span>
+<span class="c">#</span>
+<span class="c"># + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</span>
+<span class="c"># + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</span>
+<span class="c"># + +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â </span>
+<span class="c"># + +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â </span>
+<span class="c"># + + Filename:Â Â Â Â install_vcl.sh</span>
+<span class="c"># + + Author:Â Â Â Â Â Â Larry Burton</span>
+<span class="c"># + + Copyright:Â Â Â Copyright 2012 Larry Burton All rights reserved.</span>
+<span class="c"># + + Revision:Â Â Â Â 20120324</span>
+<span class="c"># + + Description:Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â </span>
+<span class="c"># + + A script to install Apache VCL on a LAMP server</span>
+<span class="c"># + + Usage:Â Â Â Â Â Â Â install_vcl.sh repo_url host</span>
+<span class="c"># + + Example:Â Â Â Â Â install_vcl.sh "http://linuxlab.ncat.edu/inet_boot" "1"</span>
+<span class="c"># + +              Must be run as root   </span>
+<span class="c"># + +Â Â Â Â Â Â Â Â Â Â Â Â Â Â The second paraeter is appended to the parameters filename</span>
+<span class="c"># + +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â to allow multiple different VCL installations to use the same script</span>
+<span class="c"># + +Â Â Â Â Â Â Â Â Â Â Â Â Â Â The target server, which is the computer upon which this</span>
+<span class="c"># + +Â Â Â Â Â Â Â Â Â Â Â Â Â Â script is executing, must have:</span>
+<span class="c"># + +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Internet access and must</span>
+<span class="c"># + +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â A valid forward and reverse DNS entry</span>
+<span class="c"># + +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Access to a valid DS server</span>
+<span class="c"># + +                 Access to a valid DHCP server                                 </span>
+<span class="c"># + +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â </span>
+<span class="c"># + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</span>
+<span class="c"># + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</span>
+<span class="c">#</span>
+<span class="nv">repo_url</span><span class="o">=</span><span class="nv">$1</span>
+<span class="nv">target_host</span><span class="o">=</span><span class="nv">$2</span>
+<span class="c">#</span>
+mkdir -p /tmp/install
+<span class="c">#</span>
+<span class="c"># Get installation parameters</span>
+wget --no-host-directories --output-document<span class="o">=</span><span class="s2">"/tmp/install/vcl_parameters"</span> <span class="nv">$repo_url</span>/vcl_parameters_<span class="nv">$target_host</span>.sh
+<span class="c">#</span>
+<span class="c"># All the host paramters are now in /tmp/install/host_parameters</span>
+<span class="c">#</span>
+<span class="c"># Source the customization variables</span>
+. /tmp/install/vcl_parameters
+/bin/echo <span class="s2">"Following are the VCL installation parameters"</span> <span class="nv">$logging</span>
+cat /tmp/install/vcl_parameters
+<span class="c">#</span>
+<span class="c">#</span>
+<span class="c"># Use yum to install the necessary repository packages</span>
+wget --no-host-directories --output-document<span class="o">=</span><span class="s2">"/tmp/install/vcl_packages"</span> <span class="nv">$repo_url</span>/vcl_packages.sh
+. /tmp/install/vcl_packages
+<span class="c">#</span>
+<span class="c">#Â + + + + + + + + Start the VCL Installation + + + + + + + + + + + +</span>
+<span class="c">#</span>
+<span class="c"># The starting point is an installed and hardened LAMP server created by</span>
+<span class="c"># Larry Burton's RPMs</span>
+<span class="c">#</span>
+<span class="c"># Create the VCL source code directory</span>
+/bin/echo <span class="s2">"Creating VCL source code directory as $vcl_source_directory"</span> <span class="nv">$logging</span>
+mkdir -p <span class="nv">$vcl_source_directory</span>
+<span class="c"># Change the working directory to the source code directory</span>
+/bin/echo <span class="s2">"Changing working directory to source code directory"</span> <span class="nv">$logging</span>
+<span class="nb">pushd</span> <span class="nv">$vcl_source_directory</span>
+<span class="c"># Download & Extract the Apache VCL Source</span>
+/bin/echo <span class="s2">"Downloading the VCL source tarball from $source_url"</span> <span class="nv">$logging</span>
+wget <span class="nv">$source_url</span>/apache-VCL-<span class="nv">$vcl_version</span>.tar.bz2
+<span class="c"># Extract the files</span>
+/bin/echo <span class="s2">"Extracting the VCL source tarball"</span> <span class="nv">$logging</span>
+tar -jxvf apache-VCL-2.2.1-incubating.tar.bz2
+<span class="c">#</span>
+<span class="c"># Configure MySQL for VCL (MySQL is already installed and configured by LAMP)</span>
+<span class="c">#</span>
+<span class="c"># Make sure the firewall on the database server is configured to allow</span>
+<span class="c"># traffic from the web server and management node servers to connect to</span>
+<span class="c"># the MySQL daemon TCP port: 3306. See the firewall documentation for</span>
+<span class="c"># more information.</span>
+<span class="c">#</span>
+<span class="c"># Create a VCL database</span>
+/bin/echo <span class="s2">"Creating VCL database"</span> <span class="nv">$logging</span>
+
+<span class="c">#mysql --user=root --password=$mysql_password -e 'DROP DATABASE vcl;'</span>
+mysql --user<span class="o">=</span>root --password<span class="o">=</span><span class="nv">$mysql_password</span> -e <span class="s1">'CREATE DATABASE vcl; USE vcl; source apache-VCL-2.2.1-incubating/mysql/vcl.sql; SHOW TABLES;'</span>
+
+mysql --user<span class="o">=</span>root --password<span class="o">=</span><span class="nv">$mysql_password</span> -e <span class="s2">"GRANT SELECT,INSERT,UPDATE,DELETE,CREATE TEMPORARY TABLES ON vcl.* TO '$vcl_mysql_user_name'@'localhost' IDENTIFIED BY '$vcl_mysql_user_password';"</span>
+
+mysql --user<span class="o">=</span>root --password<span class="o">=</span><span class="nv">$mysql_password</span> -e <span class="s2">"USE mysql; SELECT * FROM user WHERE User='vcluser';"</span>
+
+<span class="c"># Create the VCL user for the MySQL database</span>
+<span class="c"># Note this user is created with access from the localhost only since the</span>
+<span class="c"># database server is assumed to be on the same physical machine as the vcl daemon</span>
+
+/bin/echo <span class="s2">"These are the tables in the VCL database:"</span> <span class="nv">$logging</span>
+mysql --user<span class="o">=</span>root --password<span class="o">=</span><span class="nv">$mysql_password</span> -e <span class="s2">"USE vcl;SHOW TABLES;"</span>
+<span class="c">#</span>
+<span class="c"># At this point, VCL support in MySQL is complete</span>
+/bin/echo <span class="s2">""</span> <span class="nv">$logging</span>
+<span class="c">#</span>
+/bin/echo <span class="s2">"MySQL configuration for VCL complete"</span> <span class="nv">$logging</span>
+/bin/echo <span class="s2">""</span> <span class="nv">$logging</span>
+<span class="c">#</span>
+<span class="c">#Â NOTE ----------- Change http.conf document root to correct document root</span>
+sed -i -e <span class="s2">"s:DocumentRoot \"/var/www/html\":DocumentRoot \"$web_content_base/$vcl_FQDN\":g"</span> /etc/httpd/conf/httpd.conf
+<span class="c">#</span>
+<span class="c">#Â + + + + + + + + Set up Apache httpd for https + + + + + + + + + + + +</span>
+<span class="c">#</span>
+/bin/echo <span class="s2">"Creating digital certificates for web server"</span> <span class="nv">$logging</span>
+<span class="c"># Download and run the https configuration script</span>
+wget --no-host-directories --output-document<span class="o">=</span><span class="s2">"/tmp/install/create_new_self-signed_ca.sh"</span> <span class="nv">$repo_url</span>/create_new_self-signed_ca.sh
+sh /tmp/install/create_new_self-signed_ca.sh
+
+<span class="c">#</span>
+<span class="c"># Note: The certificates must be in place before trying to start https</span>
+<span class="c">#</span>
+/bin/echo <span class="s2">"Beginning httpd configuration for VCL"</span> <span class="nv">$logging</span>
+<span class="c"># Download and run the https configuration script</span>
+wget --no-host-directories --output-document<span class="o">=</span><span class="s2">"/tmp/install/https_setup.sh"</span> <span class="nv">$repo_url</span>/https_setup.sh
+sh /tmp/install/https_setup.sh
+<span class="c">#</span>
+<span class="c"># At this point, VCL support in httpd is complete</span>
+/bin/echo <span class="s2">""</span> <span class="nv">$logging</span>
+/bin/echo <span class="s2">"httpd configuration for VCL complete"</span> <span class="nv">$logging</span>
+/bin/echo <span class="s2">""</span> <span class="nv">$logging</span>
+<span class="c">#</span>
+
+<span class="c">#4. If SELinux is enabled, run the following command to allow the web server to connect to the database:</span>
+<span class="c">#/usr/sbin/setsebool -P httpd_can_network_connect=1</span>
+<span class="c">#5. If the iptables firewall is being used, port 80 and 443 should be opened up:</span>
+<span class="c">#vi /etc/sysconfig/iptables</span>
+<span class="c">#</span>
+<span class="c">#-A RH-Firewall-1-INPUT -m state --state NEW -p tcp --dport 80 -j ACCEPT</span>
+<span class="c">#-A RH-Firewall-1-INPUT -m state --state NEW -p tcp --dport 443 -j ACCEPT</span>
+<span class="c">#service iptables restart</span>
+<span class="c">#</span>
+<span class="c">#</span>
+<span class="c">#</span>
+<span class="c">#Â + + + + + + + + Install the VCL Frontend Web Code + + + + + + + + + + + +</span>
+<span class="c">#</span>
+<span class="c">#</span>
+/bin/echo <span class="s2">"Beginning VCL Frontend Web Code Installation"</span> <span class="nv">$logging</span>
+<span class="c">#</span>
+<span class="c"># Copy the web directory to a location under the web root of your web server</span>
+<span class="c"># and navigate to the destination .ht-inc subdirectory</span>
+<span class="c"># Create the VCL web server document root directory</span>
+mkdir -p <span class="nv">$vcl_web_document_root</span>
+<span class="c"># Copy the VCL web documents to the VCL web server document root</span>
+cp -r apache-VCL-<span class="nv">$vcl_version</span>/web/ <span class="nv">$vcl_web_document_root</span>/vcl
+<span class="c"># Change the working directory to the web server document root patch file directory</span>
+<span class="nb">pushd</span> <span class="nv">$vcl_web_document_root</span>/vcl/.ht-inc
+<span class="c"># Apply patch to fix editing reservations</span>
+wget https://issues.apache.org/jira/secure/attachment/12477101/utils_virtual_undefined.patch
+patch < utils_virtual_undefined.patch
[... 1271 lines stripped ...]