04ccdaf86c6773a32ca0f90621208020dcfe8d7c
wiki/info/landscape/creating-ec2-image-for-webserver-from-scratch.md
| ... | ... | @@ -13,7 +13,7 @@ Then carry out these steps: |
| 13 | 13 | * install additional packages: `yum install git mod24_perl perl perl-CGI perl-Template-Toolkit perl-HTML-Template perl-CPAN perl-DBD-MySQL mod24_ssl php71 php71-mysqlnd mod24-ldap ruby24 ruby24-devel rubygems24 rubygems24-devel icu libicu-devel gcc-c++ ncurses-devel geoip-devel` |
| 14 | 14 | * run the following command in order to obtain this feature required by Bugzilla: |
| 15 | 15 | ``` |
| 16 | -cpan install Date::Parse Email::Address Email::Send DBI |
|
| 16 | +cpan install Date::Parse Email::Address Email::Send DBI Geo::IP::PurePerl |
|
| 17 | 17 | ``` |
| 18 | 18 | * make sure `/etc/alternatives/ruby` and `/etc/alternatives/gem` point to `/usr/bin/[ruby|gem]2.4` |
| 19 | 19 | * run the following commands to install gollum and uninstall a too current rack version 2.0.3: |
| ... | ... | @@ -48,7 +48,7 @@ mv welcome.conf welcome.conf.org |
| 48 | 48 | * create `/etc/bugzilla/localconfig` |
| 49 | 49 | * set up crontab for user `wiki` as `*/10 * * * * /home/wiki/syncgit` and make sure the script is in place |
| 50 | 50 | * comment `lbmethod_heartbeat_module` in /etc/httpd/conf.modules.d/00-proxy.conf because we don't need this sort of load balancing across origin servers and it causes a warning message in error_log |
| 51 | -* install awstats to `/usr/share/awstats`, establish `/etc/httpd/conf/passwd.awstats` and create /etc/cron.weekly/awstats as follows: |
|
| 51 | +* install awstats to `/usr/share/awstats`, establish `/etc/httpd/conf/passwd.awstats`, establish a configuration under `/etc/awstats`, establish AWStats data directory under `/var/lib/awstats` and create /etc/cron.weekly/awstats as follows: |
|
| 52 | 52 | ``` |
| 53 | 53 | #!/bin/bash |
| 54 | 54 | su -l -c '/usr/share/awstats/tools/awstats_updateall.pl now -configdir="/etc/awstats" -awstatsprog="/usr/share/awstats/wwwroot/cgi-bin/awstats.pl" >>/var/log/awstats-cron.out 2>>/var/log/awstats-cron.err' |
| ... | ... | @@ -129,7 +129,9 @@ HOME=/ |
| 129 | 129 | * Copy git contents of ssh://trac@sapsailing.com/home/trac/git to /home/trac/git |
| 130 | 130 | * Ensure there is a /home/scores directory with subdirectories `barbados`, `kiwo`, `sailwave`, `scores`, `velum`, and `xrrftp`. |
| 131 | 131 | * Establish the Apache web server configuration, in particular ensure that the SSL certificates are in place (see [here](https://wiki.sapsailing.com/wiki/info/security/ssl-support)) and the following files are set up: `/etc/httpd/conf/httpd.conf`, `/etc/httpd/conf/passwd.awstats`, `/etc/httpd/conf/passwd.git`, and `/etc/httpd/conf/conf.d/*.conf`. |
| 132 | - |
|
| 132 | +* Update the hostname in `/etc/sysconfig/network`: `HOSTNAME=analytics-webserver` |
|
| 133 | +* Run `chkconfig sendmail off; chkconfig postfix on` to make sure that the postfix mail server is the one that will be launched during boot |
|
| 134 | +* Reboot the system, among other things for the hostname change to take effect, and in addition to see whether all services start properly |
|
| 133 | 135 | |
| 134 | 136 | ## Appendix / Resources |
| 135 | 137 | BACKUP_DIRECTORIES="/etc /home/trac/git /home/trac/mailinglists /home/trac/maven-repositories /home/trac/p2-repositories /home/trac/releases /home/trac/sapsailing_layouts.git /var/www/static /home/trac/crontab /home/scores /var/log/old" |