Server Installation

Richard Gaskin ambassador at fourthworld.com
Fri Jun 16 20:23:36 EDT 2017


Bob Sneidar wrote:

 > <rant>
 > When I read all the crap that has to be done just to get Apache to the
 > point where you can ever run Livecode Server, I remember why I avoid
 > Linux like West Africa during the Ebola outbreak. Even with a GUI,
 > Linux is decidedly unfriendly, requiring I set permissions to every
 > folder and file I touch for starters.

If the system is only used as a server, a GUI will just eat up 
resources. And as you've found, it doesn't provide much that's useful to 
a server, since few servers install a GUI.

There's a general spectrum between usability and security:  the most 
secure systems are often the hardest to use, and the easiest systems to 
use are often easy for hackers too.

I used to hate setting up Apache for the same reasons you noted, but I 
found that on any UNIX-based system the file permissions are very 
powerful and worth learning.  You'll find them on OS X as well, except 
trying to set up Apache on OS X requires editing one more file than most 
Linux servers require.  In many cases you'll find you don't need to 
change permissions and then change them back; you can temporarily raise 
your own permissions with sudo to edit files and leave permissions as 
originally configured.

Many good Linux distros ship with no open ports and strict permissions. 
This is ultimately a good thing, reducing the potential attack surface 
as small as practical.

The good news is that it leaves you in control of what's reachable, and 
by whom.  The bad news is that you're responsible for setting up what's 
reachable and by whom.

It sounds like you're using a VPS or dedicated machine, rather than a 
shared host, yes?

I missed which Linux distro you're using.  Has the Apache install there 
already enabled CGI?

Apache's docs on that may help:
<https://httpd.apache.org/docs/2.4/howto/cgi.html>

If you're using Ubuntu this distro-specific tutorial may be easier to 
follow:
<https://code-maven.com/set-up-cgi-with-apache>


 > Then the torrent of terminal commands any one of which I might type
 > wrong

I started learning bash on OS X, since at the time I was more familiar 
with it. I found that very helpful when I later needed to spend more 
time managing my Linux VPSes.


 > or something else needs to happen first because the writer of
 > the article wasn't working with the partticular flavor or version of
 > Linux or Apache... MY GOD!

Most aspects of setting up Apache are common to all UNIX-based systems, 
but now and then you'll find differences between OS X and Linux, or 
between one Linux distro and another.

One of the benefits of choosing a popular distro is the scope of 
tutorials for it.  If you can tell us which distro and version you're 
using I may be able to find a good one.


 > Can I just get a fricking installer??? No, no I can't. Because it's
 > Linux.

Au contraire, mon ami.  While Linux offers the flexibility to install 
packages individually, you can also have all the LAMP stuff installed in 
one line with TaskSel.  And there are other options, including a vast 
world of provisioning tools for the platform, which is one of the 
reasons Linux has taken over most of the server universe.  No one at AWS 
or Dreamhost or other large facility is hand-editing config files. 
Everything is automatable.

The challenge is that most LAMP installation options assume you want 
LAMP, where the "P" is for "PHP".  We'll need to grow the LiveCode 
platform to see more installation options for LAML.

If someone has time to write a bash script that would be cool, though 
perhaps distro- and maybe even version-specific.  With bash you could 
download the latest LC Server, unzip it, enable CGI on Apache, alter the 
relevant Apache config to use LC Server for ".lc" files, and then test 
it to make sure it works.  It would be handy to have.

Perhaps better might be a more generalized tool like Ansible, which can 
be helpful for deploying services on a server in one line.  I'm sure 
there are Ansible playbooks for enabling CGI; I don't know of a playbook 
for setting up LC Server, but it would be a nice community project.

And containers like Docker are all the rage, both for easy of deployment 
and for containment.  If you're using Docker there's a Docker container 
for LiveCode here:
<https://hub.docker.com/r/techstrategies/livecode/>

 > </rant>


-- 
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  Ambassador at FourthWorld.com                http://www.FourthWorld.com




More information about the use-livecode mailing list