Author: buildbot
Date: Mon Jun 10 19:34:50 2019
New Revision: 1046095

Log:
Staging update by buildbot for vcl

Modified:
    websites/staging/vcl/trunk/content/   (props changed)
    websites/staging/vcl/trunk/content/docs/installphpmyadmin.html

Propchange: websites/staging/vcl/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Mon Jun 10 19:34:50 2019
@@ -1 +1 @@
-1860969
+1860974

Modified: websites/staging/vcl/trunk/content/docs/installphpmyadmin.html
==============================================================================
--- websites/staging/vcl/trunk/content/docs/installphpmyadmin.html (original)
+++ websites/staging/vcl/trunk/content/docs/installphpmyadmin.html Mon Jun 10 
19:34:50 2019
@@ -114,67 +114,84 @@ the VCL web server.
 
 <ol>
 <li>
-<p>Download phpMyAdmin</p>
-<p>a. Check the version of PHP installed on the web server (you may need to 
perform step 
-1a of <a href="VCL232InstallGuide.html">VCL 2.3.2 Web Code Installation</a> to 
install httpd and php first):</p>
-<div class="codehilite"><pre>    <span class="p">:::</span><span 
class="n">BashLexer</span>
-    <span class="n">php</span> <span class="o">-</span><span class="n">v</span>
+<p>phpmyadmin recommends performing installation using packages available from 
you Linux distribution</p>
+<p>For CentOS, the EPEL yum repository needs to have been added (which is done 
for installing
+the VCL management node code). Use the following to install phpMyAdmin from 
EPEL:</p>
+<div class="codehilite"><pre><span class="n">yum</span> <span 
class="n">install</span> <span class="o">-</span><span class="n">y</span> <span 
class="n">phpMyAdmin</span>
 </pre></div>
 
 
-<ul>
-<li>Use phpMyAdmin 2.x if the version of PHP is &lt; 5.2:
-<pre class="docnote">
-PHP 4.3.2 (cgi), Copyright (c) 1997-2003 The PHP Group
-</pre></li>
-<li>Use phpMyAdmin 3.x if the version of PHP is 5.x:<br />
-<div><pre class="docnote">
-PHP 5.3.11 (cli) (built: May  8 2012 15:53:27)
-</pre></div></li>
-</ul>
-<p>b. Download the appropriate version of phpMyAdmin from:
-    <pre>
-    <a 
href="http://www.phpmyadmin.net/home_page/downloads.php";>http://www.phpmyadmin.net/home_page/downloads.php</a>
 for 3.x series
-    <a 
href="http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/";>http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/</a>
 for 2.x series
-    </pre></p>
 </li>
 <li>
-<p>Extract the phpMyAdmin package:</p>
-<div class="codehilite"><pre><span class="n">tar</span> <span 
class="n">xf</span> <span class="n">phpMyAdmin</span><span 
class="o">-</span>2<span class="p">.</span>11<span class="p">.</span>11<span 
class="p">.</span>3<span class="o">-</span><span class="n">english</span><span 
class="p">.</span><span class="n">tar</span><span class="p">.</span><span 
class="n">bz2</span>
+<p>By default phpMyAdmin on Red Hat based distros restrict access to localhost 
only. Modify
+/etc/httpd/conf.d/phpMyAdmin.conf to change that.  It is advisable to only 
allow access from some
+specific IP addresses or IP ranges so that phpMyAdmin is not open to everyone 
to try to access.</p>
+<ul>
+<li>In the &lt;Directory /usr/share/phpMyAdmin/&gt; section, add
+  <div><pre>Require ip x.x.x.x/y</pre></div>
+Where x.x.x.x/y represents an IP range such as 192.168.100.1/24. Multiple 
lines can be added
+to match multiple ranges.</li>
+<li>restart httpd to active the changes<div class="codehilite"><pre><span 
class="n">systemctl</span> <span class="n">restart</span> <span 
class="n">httpd</span>
 </pre></div>
 
 
 </li>
+</ul>
+</li>
 <li>
-<p>Move the phpMyAdmin directory to the web server directory:</p>
-<div class="codehilite"><pre><span class="n">mv</span> <span 
class="n">phpMyAdmin</span><span class="o">-</span>2<span 
class="p">.</span>11<span class="p">.</span>11<span class="p">.</span>3<span 
class="o">-</span><span class="n">english</span> <span class="o">/</span><span 
class="n">var</span><span class="o">/</span><span class="n">www</span><span 
class="o">/</span><span class="n">html</span><span class="o">/</span><span 
class="n">phpmyadmin</span>
+<p>A special database needs to be created to enable some of the more helpful 
phpMyAdmin functionality.
+phpMyAdmin provides a script for creating the database. Look for 
create_tables.sql (for v4.4.15.10,
+it was at /usr/share/phpMyAdmin/sql/create_tables.sql). Create the database 
using</p>
+<div class="codehilite"><pre><span class="n">mysql</span> <span 
class="o">&lt;</span> <span class="o">/</span><span class="n">usr</span><span 
class="o">/</span><span class="n">share</span><span class="o">/</span><span 
class="n">phpMyAdmin</span><span class="o">/</span><span 
class="n">sql</span><span class="o">/</span><span 
class="n">create_tables</span><span class="p">.</span><span class="n">sql</span>
 </pre></div>
 
 
 </li>
 <li>
-<p>Follow the installation instructions in: 
/var/www/html/phpmyadmin/Documentation.txt</p>
-<p><pre class="docnote">
-The instructions must be followed in order to secure phpMyAdmin
-</pre></p>
-<p>If you receive 403-Forbidden errors after installing phpMyAdmin, the 
problem is likely caused by SELinux. Run the following command to correct the 
problem:
-<pre class="docnote">
-chcon -R -t httpd_sys_content_t /var/www/html/phpmyadmin
-</pre></p>
+<p>A control user must be created in mysql/mariadb for phpMyAdmin to use 
(we'll use pmacontrol, 
+<strong>replace mypassword with your own password!</strong>):</p>
+<div class="codehilite"><pre><span class="n">mysql</span> <span 
class="o">-</span><span class="n">e</span> &quot;<span class="n">CREATE</span> 
<span class="n">USER</span> <span class="s">&#39;pmacontrol&#39;</span><span 
class="p">@</span><span class="s">&#39;localhost&#39;</span> <span 
class="n">IDENTIFIED</span> <span class="n">BY</span> <span 
class="s">&#39;mypassword&#39;</span><span class="p">;</span>&quot;
+</pre></div>
+
+
+<p>Save the following in a file named pmaprivs.sql to grant the pmacontrol 
user access to various parts tables:</p>
+<div class="codehilite"><pre><span class="nt">&lt;div&gt;&lt;pre&gt;</span>
+GRANT USAGE ON mysql.* TO &#39;pmacontrol&#39;@&#39;localhost&#39;;
+GRANT SELECT (
+Host, User, Select_priv, Insert_priv, Update_priv, Delete_priv,
+Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv,
+File_priv, Grant_priv, References_priv, Index_priv, Alter_priv,
+Show_db_priv, Super_priv, Create_tmp_table_priv, Lock_tables_priv,
+Execute_priv, Repl_slave_priv, Repl_client_priv
+) ON mysql.user TO &#39;pmacontrol&#39;@&#39;localhost&#39;;
+GRANT SELECT ON mysql.db TO &#39;pmacontrol&#39;@&#39;localhost&#39;;
+GRANT SELECT ON mysql.host TO &#39;pmacontrol&#39;@&#39;localhost&#39;;
+GRANT SELECT (Host, Db, User, Table_name, Table_priv, Column_priv)
+ON mysql.tables_priv TO &#39;pmacontrol&#39;@&#39;localhost&#39;;
+GRANT SELECT, INSERT, UPDATE, DELETE ON phpmyadmin.* TO 
&#39;pmacontrol&#39;@&#39;localhost&#39;;
+<span class="nt">&lt;/pre&gt;&lt;/div&gt;</span>
+
+:::BashLexer
+mysql <span class="nt">&lt; pmaprivs.sql</span>
+</pre></div>
+
+
 </li>
 <li>
 <p>Configure the phpMyAdmin-VCL Table relationships:</p>
-<p>After following the documentation on creating the phpMyAdmin Linked-tables 
-infrastructure, you can set up the VCL table relationships. The phpmyadmin.sql 
file is 
-provided in the mysql directory in the Apache VCL source code. It will add 
entries to the 
-pma_table_info table in the phpmyadmin database. These entries cause 
corresponding 
-information to be displayed when you hover over a value in the VCL 
database.</p>
+<p>A file named phpmyadmin.sql file is provided in the mysql directory in the 
Apache VCL source 
+code. It will add entries to the pma_table_info table in the phpmyadmin 
database. These entries 
+cause useful information to be displayed when you hover over values in the VCL 
database.</p>
 <p>Import the SQL file into the phpmyadmin database:</p>
-<div class="codehilite"><pre><span class="n">mysql</span> <span 
class="n">phpmyadmin</span> <span class="o">&lt;</span> <span 
class="n">apache</span><span class="o">-</span><span class="n">VCL</span><span 
class="o">-</span>2<span class="p">.</span>3<span class="p">.</span>2<span 
class="o">/</span><span class="n">mysql</span><span class="o">/</span><span 
class="n">phpmyadmin</span><span class="p">.</span><span class="n">sql</span>
+<div class="codehilite"><pre><span class="n">mysql</span> <span 
class="n">phpmyadmin</span> <span class="o">&lt;</span> <span 
class="n">apache</span><span class="o">-</span><span class="n">VCL</span><span 
class="o">-</span>2<span class="p">.</span>5<span class="p">.</span>1<span 
class="o">/</span><span class="n">mysql</span><span class="o">/</span><span 
class="n">phpmyadmin</span><span class="p">.</span><span class="n">sql</span>
 </pre></div>
 
 
 </li>
+<li>
+<p>You should now be able to log in to phpMyAdmin using the account set up for 
VCL to access the
+database (can be referenced in /etc/vcl/vcld.conf or 
/var/www/html/vcl/.ht-inc/secrets.php).</p>
+</li>
 </ol>
   </div>
   


Reply via email to