<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.pixelrefraction.com/index.php?action=history&amp;feed=atom&amp;title=RefractSurvey_Automated_Server_Setup</id>
	<title>RefractSurvey Automated Server Setup - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.pixelrefraction.com/index.php?action=history&amp;feed=atom&amp;title=RefractSurvey_Automated_Server_Setup"/>
	<link rel="alternate" type="text/html" href="https://wiki.pixelrefraction.com/index.php?title=RefractSurvey_Automated_Server_Setup&amp;action=history"/>
	<updated>2026-09-16T17:25:23Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://wiki.pixelrefraction.com/index.php?title=RefractSurvey_Automated_Server_Setup&amp;diff=175&amp;oldid=prev</id>
		<title>Nerdofepic: Created page with &quot;If you&#039;ve got a bare Debian or Ubuntu server (even a small one) and want RefractSurvey running on it with HTTPS, &lt;code&gt;refractsurvey_server/prereqs.sh&lt;/code&gt; does the whole job for you interactively &amp;mdash; no need to hand-install Apache, PHP, or a database first.  &#039;&#039;&#039;This is a technical, server-administration page.&#039;&#039;&#039; If you already have a server set up with PHP/MySQL and just want to drop RefractSurvey onto it, see Getting Started inst...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.pixelrefraction.com/index.php?title=RefractSurvey_Automated_Server_Setup&amp;diff=175&amp;oldid=prev"/>
		<updated>2026-09-13T13:47:53Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;If you&amp;#039;ve got a bare Debian or Ubuntu server (even a small one) and want RefractSurvey running on it with HTTPS, &amp;lt;code&amp;gt;refractsurvey_server/prereqs.sh&amp;lt;/code&amp;gt; does the whole job for you interactively — no need to hand-install Apache, PHP, or a database first.  &amp;#039;&amp;#039;&amp;#039;This is a technical, server-administration page.&amp;#039;&amp;#039;&amp;#039; If you already have a server set up with PHP/MySQL and just want to drop RefractSurvey onto it, see &lt;a href=&quot;/index.php/RefractSurvey_Getting_Started&quot; title=&quot;RefractSurvey Getting Started&quot;&gt;Getting Started&lt;/a&gt; inst...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;If you&amp;#039;ve got a bare Debian or Ubuntu server (even a small one) and want RefractSurvey running on it with HTTPS, &amp;lt;code&amp;gt;refractsurvey_server/prereqs.sh&amp;lt;/code&amp;gt; does the whole job for you interactively &amp;amp;mdash; no need to hand-install Apache, PHP, or a database first.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;This is a technical, server-administration page.&amp;#039;&amp;#039;&amp;#039; If you already have a server set up with PHP/MySQL and just want to drop RefractSurvey onto it, see [[RefractSurvey_Getting_Started|Getting Started]] instead.&lt;br /&gt;
&lt;br /&gt;
== What it does ==&lt;br /&gt;
&lt;br /&gt;
Run it as root (or with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;) from the unzipped release:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo refractsurvey_server/prereqs.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It interactively walks through:&lt;br /&gt;
&lt;br /&gt;
* Installing Apache, PHP 8.1+ (with the extensions RefractSurvey needs), and Certbot&lt;br /&gt;
* Choosing between a &amp;#039;&amp;#039;&amp;#039;local&amp;#039;&amp;#039;&amp;#039; database (the script installs and hardens MariaDB right there on the box) or a &amp;#039;&amp;#039;&amp;#039;remote&amp;#039;&amp;#039;&amp;#039; one (an existing MySQL/MariaDB server elsewhere &amp;amp;mdash; the script skips local database installation entirely and just helps confirm you can reach it)&lt;br /&gt;
* Setting up a new Apache virtual host for your domain&lt;br /&gt;
* Requesting a free HTTPS certificate from Let&amp;#039;s Encrypt for that domain&lt;br /&gt;
* Copying the RefractSurvey application files into place&lt;br /&gt;
&lt;br /&gt;
== What it deliberately doesn&amp;#039;t do ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;prereqs.sh&amp;lt;/code&amp;gt; stops short of creating the RefractSurvey database itself, the database user, or loading the schema &amp;amp;mdash; on either a local or remote database. That part happens in-browser, through &amp;lt;code&amp;gt;install.php&amp;lt;/code&amp;gt;&amp;#039;s own setup wizard, once this script finishes. The script prints a summary at the end with the database host and admin credentials to feed into that wizard.&lt;br /&gt;
&lt;br /&gt;
In other words: this script gets a server &amp;#039;&amp;#039;&amp;#039;ready&amp;#039;&amp;#039;&amp;#039; to install RefractSurvey onto; the actual install wizard (see [[RefractSurvey_Getting_Started|Getting Started]]) is still a separate, final step.&lt;br /&gt;
&lt;br /&gt;
== Local vs. remote database ==&lt;br /&gt;
&lt;br /&gt;
If you tell the script you&amp;#039;re using a &amp;#039;&amp;#039;&amp;#039;remote&amp;#039;&amp;#039;&amp;#039; database (one you already run elsewhere), it won&amp;#039;t touch MariaDB on the local box at all &amp;amp;mdash; it&amp;#039;ll only help you verify connectivity. Keep in mind a remote database server needs to be configured to accept connections from this machine specifically, both in its network settings and its user grants.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[RefractSurvey_Getting_Started|Getting Started]]&lt;br /&gt;
* [[RefractSurvey_Upgrading|Upgrading]]&lt;br /&gt;
* [[RefractSurvey_Security_Notes|Security Notes]]&lt;br /&gt;
&lt;br /&gt;
[[Category:RefractSurvey]]&lt;/div&gt;</summary>
		<author><name>Nerdofepic</name></author>
	</entry>
</feed>