103 | | === 11: Add Swapfile === |
104 | | You should add swap from a swap file in order to improve performance (especially on a Micro instance): |
105 | | {{{ |
106 | | sudo su - |
107 | | dd if=/dev/zero of=/swapfile1 bs=1024 count=524288 |
108 | | mkswap /swapfile1 |
109 | | chown root:root /swapfile1 |
110 | | chmod 0600 /swapfile1 |
111 | | swapon /swapfile1 |
112 | | # Make persistent across reboots |
113 | | cat << EOF >> "/etc/fstab" |
114 | | /swapfile1 swap swap defaults 0 0 |
115 | | EOF |
116 | | |
117 | | }}} |
118 | | |
119 | | == 3. Install Sahana == |
120 | | * Copy the installation and configuration scripts into the launched instance (assuming [wiki:InstallationGuidelines/Linux/Server/CherokeePostgreSQL Cherokee & PostgreSQL]): |
121 | | {{{ |
122 | | wget --no-check-certificate https://raw.githubusercontent.com/sahana/eden_deploy/master/install-eden-cherokee-postgis.sh |
123 | | chmod a+x install-eden-cherokee-postgis.sh |
124 | | wget --no-check-certificate https://raw.githubusercontent.com/sahana/eden_deploy/master/configure-eden-cherokee-postgis.sh |
125 | | chmod a+x configure-eden-cherokee-postgis.sh |
126 | | |
127 | | }}} |
128 | | |
129 | | * Run the install-eden-cherokee-postgis.sh script. [Note: This step takes about 10min - grab a coffee] |
130 | | {{{ |
131 | | sudo su - |
132 | | ./install-eden-cherokee-postgis.sh |
133 | | |
134 | | }}} |
135 | | |
136 | | If you wish to update your site from an alternate github repo this can be done using: |
137 | | * ConfigurationGuidelines#SwitchtoanalternateGitHubrepo |
138 | | |
139 | | == 4. Configure Sahana == |
140 | | Run configure-eden-cherokee-postgis.sh to configure the instance: |
141 | | {{{ |
142 | | sudo su - |
143 | | ./configure-eden-cherokee-postgis.sh |
144 | | |
145 | | }}} |
146 | | |
147 | | * Add your FQDN to {{{/etc/hosts}}} to ensure emails are accepted by all remote mailers: |
148 | | {{{ |
149 | | vim /etc/hosts |
150 | | 127.0.0.1 host.domain host localhost |
151 | | |
152 | | /etc/init.d/exim4 restart |
153 | | |
154 | | NB On new Amazon instances you may also need to prevent Amazon from auto-updating this file by commenting this aspect: |
155 | | vim /etc/cloud/cloud.cfg |
156 | | # - update_etc_hosts |
157 | | |
158 | | }}} |
| 103 | == 3. Install & Configure Sahana == |
| 104 | This should happen automatically through the user-data.sh script that you used earlier. You can check the progress of this using: |
| 105 | {{{ |
| 106 | tail -f -n 45 /var/log/user-data.log |
| 107 | }}} |
| 108 | |
| 109 | If you are not using the user-data.sh then you can use the older [InstallationGuidelines/Amazon/Manual Manual scripts] |