Changes between Initial Version and Version 1 of intro_to_MFPL_hosting


Ignore:
Timestamp:
Dec 16, 2012, 8:47:52 PM (13 years ago)
Author:
Patrick G
Comment:

created the page

Legend:

Unmodified
Added
Removed
Modified
  • intro_to_MFPL_hosting

    v1 v1  
     1This page explains some things about the MFPL servers and how to use MFPL hosting tools to create and manage websites.
     2
     3This first draft is being written by Patrick Gibbs (and anyone who wants to) in December, 2012.
     4
     5First, appreciation for the MFPL support team! These fantastic humans do much of the nitty-gritty work of keeping this hosting infrastructure running. Learn more about the support team and see who's on it (though the list is a bit outdated) at [wiki:support-team Support Team].
     6
     7So that you get an idea of why I find certain things seem worth mentioning about MFPL hosting -- my experience (says Patrick) includes the following:
     8* setting up a Drupal + CiviCRM + Ubercart instance on cheap ($5/month) shared hosting.
     9* administering a Moodle installation via the web interface.
     10* doing basic command line work in GNU/Linux on my laptop.
     11* writing a shell script once, and refining it.
     12* playing with XAMPP when I used a Mac.
     13I had very little experience with SSH, and had never used IRC. I joined May First / People Link in August 2012.
     14
     15
     16== Understanding May First servers ==
     17
     18=== Start with the Members' Control Panel: ===
     19On previous hosting, I used cPanel. Here, there's custom software called `red` that runs a custom control panel. Look around and see what's possible. Things to notice:
     20* On each page there's a line on the right side that says something like " Your primary host is: `marx.mayfirst.org (216.66.23.57)`". Knowing this enables connecting to the server via `ssh` (more on that later).
     21
     22Each website is a "hosting order": I currently have two hosting orders: one for my personal website, and one for an organization whose website I manage. Hosting orders are made automatically (I think, although maybe the
     23
     24=== Connecting via ssh or ftp: ===
     25There are other pages that explain this in more detail ''(to do: find them and link to them)''. I do this:
     26{{{
     27$ ssh patrickgibbs@marx.mayfirst.org
     28}}}
     29Wondering which server your site lives on? Look in the Members' Control Panel (see section above).
     30
     31I use Filezilla for FTP, and the connection details are the same as for ssh.
     32
     33=== Welcome to your new `/home`: ===
     34Once logged in via ssh or ftp, you can look around and probably see something like this:
     35{{{
     360 patrickgibbs@marx:~$ pwd
     37/home/members/patrick0/sites/patrickgibbs.mayfirst.org/users/patrickgibbs
     380 patrickgibbs@marx:~$ ls -Alh
     39total 88K
     40-rw------- 1 patrickgibbs patrickgibbs 3.6K Dec  7 17:29 .bash_history
     41-rw-r--r-- 1 patrickgibbs patrickgibbs  220 Apr 10  2010 .bash_logout
     42-rw-r--r-- 1 patrickgibbs patrickgibbs 3.2K Jan 30  2012 .bashrc
     43drwxr-xr-x 2 patrickgibbs patrickgibbs 4.0K Nov 29 01:00 .drush
     44drwxr-xr-x 3 patrickgibbs patrickgibbs 4.0K Dec  5 23:57 .emacs.d
     45-rw------- 1 patrickgibbs patrickgibbs 7.2K Dec 14 18:37 .histfile
     46drwxr-xr-x 2 patrickgibbs patrickgibbs 4.0K Jan 30  2012 .monkeysphere
     47lrwxrwxrwx 1 patrickgibbs root           54 Aug 27 12:15 patrickgibbs.mayfirst.org -> /home/members/patrick0/sites/patrickgibbs.mayfirst.org
     48-rw-r--r-- 1 patrickgibbs patrickgibbs  675 Apr 10  2010 .profile
     49drwxr-xr-x 2 patrickgibbs patrickgibbs 4.0K Jan 30  2012 .ssh
     50drwxr-xr-x 3 patrickgibbs patrickgibbs 4.0K Sep 10 20:56 .subversion
     51-rw-r--r-- 1 patrickgibbs patrickgibbs  34K Dec  2 22:14 .zcompdump
     52-rw-r--r-- 1 patrickgibbs patrickgibbs  393 Dec  2 22:14 .zshrc
     530 patrickgibbs@marx:~$
     54}}}
     55You might not have`.drush`, `.emacs.d`, or `.zshrc` until you use emacs, drush, or zsh.
     56
     57Things to notice:
     58* .monkeysphere has something to do with SSH fingerprints and encryption keys, I think. I haven't investigated yet. ''(to do: link to page about ssh connecting and fingerprints)''
     59* the website directory `patrickgibbs.mayfirst.org` is a symlink (symbolic link) that points up a few directories, and right now I'm already inside it, in my home folder, `~`.
     60Let's look inside that website directory:
     61{{{
     620 patrickgibbs@marx:~$ pwd
     63/home/members/patrick0/sites/patrickgibbs.mayfirst.org/users/patrickgibbs
     640 patrickgibbs@marx:~$ cd ../..
     650 patrickgibbs@marx:/home/members/patrick0/sites/patrickgibbs.mayfirst.org$ ls -Alh
     66total 32K
     67drwxr-x---  2 root         patrickgibbs 4.0K Nov  7 04:35 backups
     68drwxr-xr-x  2 patrickgibbs patrickgibbs 4.0K Aug 27 12:15 bin
     69drwxrwxr-x  2 root         patrickgibbs 4.0K Aug 27 12:15 cgi-bin
     70drwxrwxr-x  4 root         patrickgibbs 4.0K Dec 14 16:30 include
     71drwxr-x---  2 root         patrickgibbs 4.0K Dec 16 06:26 logs
     72drwxr-xr-x  3 root         root         4.0K Aug 27 12:15 .red
     73drwxr-xr-x  3 root         root         4.0K Aug 27 12:15 users
     74drwxrwxr-x 14 root         patrickgibbs 4.0K Dec  7 17:15 web
     750 patrickgibbs@marx:/home/members/patrick0/sites/patrickgibbs.mayfirst.org$
     76}}}
     77==== backups ====
     78I don't know what's in here. Probably backups... of what?
     79{{{
     800 patrickgibbs@marx:/home/members/patrick0/sites/patrickgibbs.mayfirst.org$ ls -AlhR backups/
     81backups/:
     82total 508K
     83-rw-r----- 1 root patrickgibbs 190K Dec 16 01:33 patrickgibb_civi.sql.gz
     84-rw-r----- 1 root patrickgibbs  89K Dec 16 01:33 patrickgibb_drup.sql.gz
     85-rw-r----- 1 root patrickgibbs 188K Dec 16 01:33 patrickgibb_wprs.sql.gz
     86-rw-r----- 1 root patrickgibbs  24K Dec 16 01:33 patrickgi_drup1.sql.gz
     870 patrickgibbs@marx:/home/members/patrick0/sites/patrickgibbs.mayfirst.org$
     88}}}
     89MySQL database backups so far. How did they get here? What's the schedule for backups?
     90==== bin ====
     91Don't know when I would use this.
     92{{{
     930 patrickgibbs@marx:/home/members/patrick0/sites/patrickgibbs.mayfirst.org$ ls -AlhR bin/
     94bin/:
     95total 4.0K
     96-rwxr-xr-x 1 patrickgibbs patrickgibbs 123 Aug 27 12:15 php-cgi
     970 patrickgibbs@marx:/home/members/patrick0/sites/patrickgibbs.mayfirst.org$
     98}}}
     99==== cgi-bin ====
     100I know this has something to do with websites. I've seen `cgi-bin` in URLs at other websites. Beyond that, I don't know. It's empty.
     101
     102==== include ====
     103This directory is accessible by the `www-data` user (the Apache web server user, although '''most stuff gets executed by your user, not by www-data or some other Apache user'''). This is the place to put things that you want accessible by that user -- so far, the only thing I've put there is a `.htpasswd` file for a Trac instance. Looks like `php.ini` lives here too, and I remember editing that file a few times during past projects on other servers.
     104{{{
     105127 patrickgibbs@marx:/home/members/patrick0/sites/patrickgibbs.mayfirst.org$ ls -AlhR include/
     106include/:
     107total 8.0K
     108drwxr-xr-x 2 patrickgibbs patrickgibbs 4.0K Aug 27 12:15 php5
     109drwxr-xr-x 2 patrickgibbs patrickgibbs 4.0K Dec 14 16:30 trac
     110
     111include/php5:
     112total 4.0K
     113-rw-r--r-- 1 patrickgibbs patrickgibbs 110 Aug 27 12:15 php.ini
     114
     115include/trac:
     116total 4.0K
     117-rw-r--r-- 1 patrickgibbs patrickgibbs 46 Dec 14 18:19 trac.htpasswd
     1180 patrickgibbs@marx:/home/members/patrick0/sites/patrickgibbs.mayfirst.org$
     119}}}
     120==== logs ====
     121Useful logs and log backups here.
     122{{{
     1230 patrickgibbs@marx:/home/members/patrick0/sites/patrickgibbs.mayfirst.org$ ls -AlhR logs/
     124logs/:
     125total 196K
     126-rw-r--r-- 1 root adm  299 Dec 16 15:30 error.log
     127-rw-r--r-- 1 root adm  16K Dec 16 04:32 error.log.1
     128-rw-r--r-- 1 root adm 1.6K Dec  8 22:27 error.log.2.gz
     129-rw-r--r-- 1 root adm  319 Dec  1 22:13 error.log.3.gz
     130-rw-r--r-- 1 root adm  374 Nov 24 17:48 error.log.4.gz
     131-rw-r--r-- 1 root adm 3.7K Dec 16 15:30 web.log
     132-rw-r--r-- 1 root adm 135K Dec 16 05:49 web.log.1
     133-rw-r--r-- 1 root adm 6.4K Dec  9 04:27 web.log.2.gz
     134-rw-r--r-- 1 root adm 3.7K Dec  2 05:29 web.log.3.gz
     135-rw-r--r-- 1 root adm 4.5K Nov 25 05:54 web.log.4.gz
     1360 patrickgibbs@marx:/home/members/patrick0/sites/patrickgibbs.mayfirst.org$
     137}}}
     138I recently learned this command to use while troubleshooting:
     139{{{
     140$ tail -f ~/patrickgibbs.mayfirst.org/logs/error.log
     141[Sun Dec 16 06:27:46 2012] [error] [client 98.248.101.207] File does not exist: /home/members/patrick0/sites/patrickgibbs.mayfirst.org/web/favicon.ico
     142^C
     143$
     144}}}
     145==== .red ====
     146This has something to do with the Members' Control Panel. I haven't touched anything in here, and it looks like I don't have permissions to anyways.
     147{{{
     1480 patrickgibbs@marx:/home/members/patrick0/sites/patrickgibbs.mayfirst.org$ ls -AlhR .red/
     149.red/:
     150total 4.0K
     151drwxr-xr-x 2 root root 4.0K Dec 14 16:34 apache2
     152
     153.red/apache2:
     154total 12K
     155-rw-r--r-- 1 root root 1.1K Dec 14 16:34 apache.conf
     156-rw-r--r-- 1 root root 1.2K Dec  7 12:58 apache.conf~
     157-rw-r--r-- 1 root root 1.1K Dec 14 16:34 apache.conf.bak
     1580 patrickgibbs@marx:/home/members/patrick0/sites/patrickgibbs.mayfirst.org$
     159}}}
     160==== users ====
     161This is like `home` on my laptop -- it has a directory for each user, and when you login you arrive in that directory by default, for me `users/patrickgibbs` is the `~` directory. We already looked inside.
     162==== web ====
     163This is where websites live! On those $5/month cPanel hosts I've used, this directory was called '''`public_html` or `www`'''. This starts out empty.
     164
     165== future changes to this page ==
     166* add links to the [wiki:participate] page and the "beginners instructions" page
     167* add a section about how to ask questions, or link to an explanatory page if one exists.
     168* add more detailed explanation of Members' Control Panel, with screen shots, and responses to questions like "Where is Fantastico?" (or does a page like that already exist?)