|
1 | 1 | # CC WordPress 2013
|
2 | 2 |
|
3 |
| -Sample Apache config file, place in /etc/apache* and tweak the paths |
4 |
| -as needed: |
| 3 | +## Set-up |
5 | 4 |
|
6 |
| - Include /var/www/creativecommons.org/apache.conf |
7 |
| - |
8 |
| - <VirtualHost *:8080> |
9 |
| - Use CCVHost creativecommons.org http /var/www/creativecommons.org /var/log/apache2/creativecommons.org |
10 |
| - UseCanonicalName On |
11 |
| - </VirtualHost> |
12 |
| - |
13 |
| - <VirtualHost *:443> |
14 |
| - Use CCVHost creativecommons.org https /var/www/creativecommons.org /var/log/apache2/creativecommons.org |
15 |
| - UseCanonicalName On |
16 |
| - SSLEngine on |
17 |
| - SSLCertificateFile /etc/ssl/private/creativecommons.org.crt |
18 |
| - SSLCertificateKeyFile /etc/ssl/private/creativecommons.org.key |
19 |
| - SSLCACertificateFile /etc/ssl/certs/RapidSSL_CA_bundle.pem |
20 |
| - </VirtualHost> |
| 5 | +There are some handy setup scripts in the <code>scripts</code> |
| 6 | +directory. On a fresh Ubuntu 12 server, you should only need to run |
| 7 | +<code>scripts/bootstrap.sh</code>, which calls other scripts to set |
| 8 | +most things up. See below for some details on the other scripts. |
| 9 | + |
| 10 | +You'll still need to manually configure a few things: |
| 11 | + |
| 12 | +1. Edit <code>docroot/wp-config-local.php</code> and fill in values as |
| 13 | + needed by WordPress. |
| 14 | +2. Set up SSL keys in /etc/ssl/* |
| 15 | +3. Edit /etc/apache2/sites-available/<hostname> if needed (e.g. to |
| 16 | + change SSL key locations) |
| 17 | +4. Load DB data from another WordPress install (see below) |
21 | 18 |
|
22 |
| -The <code>UseCanonicalName</code> option forces URLs to redirect to |
23 |
| -the canonical host name, you can remove it if you want to use other |
24 |
| -names to access the site (e.g., an Amazon EC2 hostname before you get |
25 |
| -DNS set-up). |
| 19 | +### Loading DB data |
26 | 20 |
|
| 21 | +If you want to import DB data from another WordPress install, use the |
| 22 | +<code>mysqldump</code> / <code>mysql</code> utilities to create a |
| 23 | +backup and restore it here: |
| 24 | + |
| 25 | + # on the source machine: |
| 26 | + mysqldump -u root dbname | gzip > backup.sql.gz |
| 27 | + |
| 28 | + # ... copy (eg. with scp) ... |
| 29 | + |
| 30 | + # then on this machine: |
| 31 | + zcat backup.sql.gz | mysql -u root -p dbname |
27 | 32 |
|
| 33 | +### Bootstrap scripts (details) |
28 | 34 |
|
29 |
| -You'll need the <code>macro</code> Apache module. On Debian-like systems you can try: |
| 35 | +Note that the <code>scripts/bootstrap.sh</code> script calls these for |
| 36 | +you. But if something goes wrong / you want to know more: |
30 | 37 |
|
31 |
| - apt-get install libapache2-mod-macro |
32 |
| - a2enmod macro |
| 38 | +* <code>scripts/bootstrap_server_ubuntu.sh</code>: Will configure an |
| 39 | + Ubuntu 12 server (install packages and enable apache modules, etc). |
33 | 40 |
|
34 |
| -There is a setup script, <code>server_bootstrap.sh</code>, in this |
35 |
| -checkout, it primarily sets up the python environment. It should "just |
36 |
| -work", but if it doesn't then give it a read. It requires some basic |
37 |
| -Python utilities like <code>virtualenv</code> and <code>pip</code>. |
| 41 | +* <code>scripts/bootstrap_mysql.sh</code>: Creates a database and user |
| 42 | + with specified password. Use these values in your |
| 43 | + <code>wp-config-local.php</code> file (see below). |
38 | 44 |
|
39 |
| -To configure WordPress, there is a sample config file at |
40 |
| -<code>docroot/wp-config-local.php.sample</code>, copy it to |
41 |
| -<code>docroot/wp-config-local.php</code> and fill in the information |
42 |
| -as needed by the WP install. |
| 45 | +* <code>scripts/bootstrap_checkout.sh</code>: Sets up this checkout by |
| 46 | + downloading git submodules, creating a virtual Python environment, |
| 47 | + etc. |
43 | 48 |
|
44 | 49 | Happy hacking!
|
0 commit comments