le1t0-deprec 2.1.6.001
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +444 -0
- data/COPYING +19 -0
- data/LICENSE +339 -0
- data/README +154 -0
- data/THANKS +17 -0
- data/bin/depify +139 -0
- data/docs/EXAMPLE-installing_tracks.txt +41 -0
- data/docs/README.nagios +22 -0
- data/docs/README.rails +17 -0
- data/docs/config_gen_explained.txt +39 -0
- data/docs/deprec-1.x/deprec-1.x.quickstart +50 -0
- data/docs/deprec-1.x/notes.txt +12 -0
- data/docs/old/deprec_banner.gif +0 -0
- data/docs/windows_linux.txt +350 -0
- data/docs/xen/traffic_monitoring_with_vnstat.txt +95 -0
- data/docs/xen/xen-tools-notes.txt +31 -0
- data/docs/xen/xen_on_hardy.txt +39 -0
- data/lib/deprec.rb +42 -0
- data/lib/deprec/capistrano_extensions.rb +446 -0
- data/lib/deprec/recipes.rb +7 -0
- data/lib/deprec/recipes/aoe.rb +79 -0
- data/lib/deprec/recipes/app/mongrel.rb +213 -0
- data/lib/deprec/recipes/app/passenger.rb +190 -0
- data/lib/deprec/recipes/ar_sendmail.rb +67 -0
- data/lib/deprec/recipes/aspell.rb +22 -0
- data/lib/deprec/recipes/canonical.rb +68 -0
- data/lib/deprec/recipes/cap.rb +39 -0
- data/lib/deprec/recipes/chef.rb +68 -0
- data/lib/deprec/recipes/collectd.rb +112 -0
- data/lib/deprec/recipes/db/couchdb.rb +107 -0
- data/lib/deprec/recipes/db/mysql.rb +194 -0
- data/lib/deprec/recipes/db/postgresql.rb +104 -0
- data/lib/deprec/recipes/db/sqlite.rb +37 -0
- data/lib/deprec/recipes/ddclient.rb +51 -0
- data/lib/deprec/recipes/deprec.rb +167 -0
- data/lib/deprec/recipes/deprecated.rb +71 -0
- data/lib/deprec/recipes/drbd.rb +137 -0
- data/lib/deprec/recipes/dummy.rb +22 -0
- data/lib/deprec/recipes/example.rb +115 -0
- data/lib/deprec/recipes/git.rb +97 -0
- data/lib/deprec/recipes/gitosis.rb.disabled +55 -0
- data/lib/deprec/recipes/glusterfs.rb +176 -0
- data/lib/deprec/recipes/god.rb +70 -0
- data/lib/deprec/recipes/haproxy.rb +115 -0
- data/lib/deprec/recipes/heartbeat.rb +138 -0
- data/lib/deprec/recipes/imagemagick/imagemagick_bin.rb +24 -0
- data/lib/deprec/recipes/imagemagick/imagemagick_src.rb +39 -0
- data/lib/deprec/recipes/integrity.rb +108 -0
- data/lib/deprec/recipes/iptables.rb +94 -0
- data/lib/deprec/recipes/java.rb +23 -0
- data/lib/deprec/recipes/keepalived.rb +78 -0
- data/lib/deprec/recipes/ldap.rb +52 -0
- data/lib/deprec/recipes/logrotate.rb +56 -0
- data/lib/deprec/recipes/lvm.rb +20 -0
- data/lib/deprec/recipes/memcache.rb +49 -0
- data/lib/deprec/recipes/mongodb.rb +94 -0
- data/lib/deprec/recipes/monit.rb +135 -0
- data/lib/deprec/recipes/mysql_proxy.rb +67 -0
- data/lib/deprec/recipes/nagios.rb +361 -0
- data/lib/deprec/recipes/network.rb +116 -0
- data/lib/deprec/recipes/ntp.rb +103 -0
- data/lib/deprec/recipes/php.rb +58 -0
- data/lib/deprec/recipes/postfix.rb +115 -0
- data/lib/deprec/recipes/profiles.rb +125 -0
- data/lib/deprec/recipes/raid/amcc_3ware.rb +21 -0
- data/lib/deprec/recipes/rails.rb +330 -0
- data/lib/deprec/recipes/redhat_cluster.rb +228 -0
- data/lib/deprec/recipes/redis.rb +90 -0
- data/lib/deprec/recipes/ruby/mri.rb +55 -0
- data/lib/deprec/recipes/ruby/ree.rb +40 -0
- data/lib/deprec/recipes/rvm.rb +32 -0
- data/lib/deprec/recipes/s3utils.rb +63 -0
- data/lib/deprec/recipes/sphinx/thinking_sphinx.rb +105 -0
- data/lib/deprec/recipes/sphinx/ultrasphinx.rb +86 -0
- data/lib/deprec/recipes/ssh.rb +147 -0
- data/lib/deprec/recipes/ssl.rb +56 -0
- data/lib/deprec/recipes/starling.rb +119 -0
- data/lib/deprec/recipes/svn.rb +171 -0
- data/lib/deprec/recipes/syslog.rb +63 -0
- data/lib/deprec/recipes/trac.rb.disabled +277 -0
- data/lib/deprec/recipes/tsung.rb +74 -0
- data/lib/deprec/recipes/ubuntu.rb +90 -0
- data/lib/deprec/recipes/users.rb +90 -0
- data/lib/deprec/recipes/utils.rb +58 -0
- data/lib/deprec/recipes/vnstat.rb +85 -0
- data/lib/deprec/recipes/web/apache.rb +143 -0
- data/lib/deprec/recipes/web/nginx.rb +172 -0
- data/lib/deprec/recipes/wordpress.rb.notworking +96 -0
- data/lib/deprec/recipes/wpmu.rb +103 -0
- data/lib/deprec/recipes/xen.rb +364 -0
- data/lib/deprec/recipes/xentools.rb +101 -0
- data/lib/deprec/recipes_minus_rails.rb +125 -0
- data/lib/deprec/templates/aoe/aoe-init +55 -0
- data/lib/deprec/templates/aoe/fence_aoemask +351 -0
- data/lib/deprec/templates/apache/namevirtualhosts.conf +5 -0
- data/lib/deprec/templates/apache/ports.conf.erb +5 -0
- data/lib/deprec/templates/apache/status.conf.erb +17 -0
- data/lib/deprec/templates/ar_sendmail/logrotate.conf.erb +9 -0
- data/lib/deprec/templates/ar_sendmail/monit.conf.erb +5 -0
- data/lib/deprec/templates/chef/chef.json.erb +1 -0
- data/lib/deprec/templates/chef/solo.rb +2 -0
- data/lib/deprec/templates/collectd/collectd-init.d +153 -0
- data/lib/deprec/templates/collectd/collectd.conf.erb +686 -0
- data/lib/deprec/templates/ddclient/ddclient.conf.erb +11 -0
- data/lib/deprec/templates/ddclient/ddclient.erb +15 -0
- data/lib/deprec/templates/deprec/caprc.erb +14 -0
- data/lib/deprec/templates/drbd/drbd.conf.erb +531 -0
- data/lib/deprec/templates/glusterfs/glusterfsd-init.erb +95 -0
- data/lib/deprec/templates/gnbd_client/cluster.conf.erb +21 -0
- data/lib/deprec/templates/gnbd_client/clvm-default.erb +3 -0
- data/lib/deprec/templates/gnbd_client/cman-default.erb +6 -0
- data/lib/deprec/templates/gnbd_client/gnbdimports.conf.erb +1 -0
- data/lib/deprec/templates/gnbd_server/cluster.conf.erb +20 -0
- data/lib/deprec/templates/gnbd_server/clvm-default.erb +3 -0
- data/lib/deprec/templates/gnbd_server/cman-default.erb +6 -0
- data/lib/deprec/templates/gnbd_server/gnbd-server-default.erb +1 -0
- data/lib/deprec/templates/gnbd_server/gnbdexports.conf.erb +1 -0
- data/lib/deprec/templates/god/god-conf.erb +2 -0
- data/lib/deprec/templates/god/god-init.erb +47 -0
- data/lib/deprec/templates/haproxy/haproxy-init.d +120 -0
- data/lib/deprec/templates/haproxy/haproxy.cfg.erb +31 -0
- data/lib/deprec/templates/heartbeat/authkeys.erb +2 -0
- data/lib/deprec/templates/heartbeat/ha.cf.erb +15 -0
- data/lib/deprec/templates/heartbeat/haresources.erb +1 -0
- data/lib/deprec/templates/integrity/apache_vhost.erb +4 -0
- data/lib/deprec/templates/integrity/config.ru.erb +21 -0
- data/lib/deprec/templates/integrity/config.yml.erb +43 -0
- data/lib/deprec/templates/iptables/firewall-default.erb +13 -0
- data/lib/deprec/templates/iptables/firewall-init.erb +171 -0
- data/lib/deprec/templates/keepalived/keepalived.conf.erb +18 -0
- data/lib/deprec/templates/logrotate/logrotate.conf.erb +32 -0
- data/lib/deprec/templates/mongodb/mongodb-init.d +88 -0
- data/lib/deprec/templates/mongrel/apache_vhost.conf.erb +148 -0
- data/lib/deprec/templates/mongrel/logrotate.conf.erb +11 -0
- data/lib/deprec/templates/mongrel/mongrel_cluster-init-script +54 -0
- data/lib/deprec/templates/mongrel/mongrel_cluster.yml.erb +10 -0
- data/lib/deprec/templates/mongrel/monit.conf.erb +17 -0
- data/lib/deprec/templates/mongrel/nginx_vhost.conf.erb +41 -0
- data/lib/deprec/templates/monit/monit-init-script +104 -0
- data/lib/deprec/templates/monit/monitrc.erb +250 -0
- data/lib/deprec/templates/monit/nothing.monitrc +0 -0
- data/lib/deprec/templates/mysql/create_databases.sql +20 -0
- data/lib/deprec/templates/mysql/database.yml.prod +6 -0
- data/lib/deprec/templates/mysql/database.yml.stage +6 -0
- data/lib/deprec/templates/mysql/my.cnf.erb +140 -0
- data/lib/deprec/templates/mysql/sphinx.conf.prod +542 -0
- data/lib/deprec/templates/mysql/sphinx.conf.stage +542 -0
- data/lib/deprec/templates/mysql_proxy/mysql-proxy-default.erb +4 -0
- data/lib/deprec/templates/nagios/README +32 -0
- data/lib/deprec/templates/nagios/cgi.cfg.erb +357 -0
- data/lib/deprec/templates/nagios/check_linux_free_memory.pl +118 -0
- data/lib/deprec/templates/nagios/check_mongrel_cluster.rb +82 -0
- data/lib/deprec/templates/nagios/htpasswd.users +1 -0
- data/lib/deprec/templates/nagios/mrtg.cfg +180 -0
- data/lib/deprec/templates/nagios/nagios.cfg.erb +1325 -0
- data/lib/deprec/templates/nagios/nrpe.cfg.erb +222 -0
- data/lib/deprec/templates/nagios/nrpe.xinetd.erb +16 -0
- data/lib/deprec/templates/nagios/objects/commands.cfg.erb +265 -0
- data/lib/deprec/templates/nagios/objects/contacts.cfg.erb +89 -0
- data/lib/deprec/templates/nagios/objects/hosts.cfg.erb +114 -0
- data/lib/deprec/templates/nagios/objects/localhost.cfg.erb +116 -0
- data/lib/deprec/templates/nagios/objects/services.cfg.erb +165 -0
- data/lib/deprec/templates/nagios/objects/timeperiods.cfg.erb +94 -0
- data/lib/deprec/templates/nagios/resource.cfg.erb +34 -0
- data/lib/deprec/templates/network/hostname.erb +1 -0
- data/lib/deprec/templates/network/hosts.erb +2 -0
- data/lib/deprec/templates/network/interfaces.erb +18 -0
- data/lib/deprec/templates/network/resolv.conf.erb +6 -0
- data/lib/deprec/templates/nginx/logrotate.conf.erb +13 -0
- data/lib/deprec/templates/nginx/mime.types.erb +70 -0
- data/lib/deprec/templates/nginx/nginx-init-script +62 -0
- data/lib/deprec/templates/nginx/nginx.conf.erb +125 -0
- data/lib/deprec/templates/nginx/nginx.logrotate.d +12 -0
- data/lib/deprec/templates/nginx/nothing.conf +1 -0
- data/lib/deprec/templates/nginx/rails_nginx_vhost.conf.erb +41 -0
- data/lib/deprec/templates/ntp/ntp.conf.erb +42 -0
- data/lib/deprec/templates/passenger/apache_vhost.erb +29 -0
- data/lib/deprec/templates/passenger/logrotate.conf.erb +12 -0
- data/lib/deprec/templates/passenger/passenger.conf.erb +21 -0
- data/lib/deprec/templates/passenger/passenger.load.erb +3 -0
- data/lib/deprec/templates/postfix/aliases.erb +3 -0
- data/lib/deprec/templates/postfix/dynamicmaps.cf.erb +8 -0
- data/lib/deprec/templates/postfix/main.cf.erb +36 -0
- data/lib/deprec/templates/postfix/master.cf.erb +77 -0
- data/lib/deprec/templates/redis/redis-conf.erb +132 -0
- data/lib/deprec/templates/redis/redis-init.erb +50 -0
- data/lib/deprec/templates/s3utils/s3cfg +35 -0
- data/lib/deprec/templates/s3utils/s3config.yml +3 -0
- data/lib/deprec/templates/sphinx/monit.conf.erb +5 -0
- data/lib/deprec/templates/ssh/ssh_config.erb +50 -0
- data/lib/deprec/templates/ssh/sshd_config.erb +78 -0
- data/lib/deprec/templates/ssl/make-ssl-cert +138 -0
- data/lib/deprec/templates/ssl/ssl-cert-snakeoil.key +15 -0
- data/lib/deprec/templates/ssl/ssl-cert-snakeoil.pem +19 -0
- data/lib/deprec/templates/starling/monit.conf.erb +14 -0
- data/lib/deprec/templates/starling/starling-init-script.erb +71 -0
- data/lib/deprec/templates/subversion/svn.apache.vhost.erb +43 -0
- data/lib/deprec/templates/syslog/syslog.conf.erb +71 -0
- data/lib/deprec/templates/syslog/syslogd.erb +13 -0
- data/lib/deprec/templates/trac/apache_vhost.conf.erb +24 -0
- data/lib/deprec/templates/trac/nginx_vhost.conf.erb +26 -0
- data/lib/deprec/templates/trac/trac.ini.erb +169 -0
- data/lib/deprec/templates/trac/trac_deprec.png +0 -0
- data/lib/deprec/templates/trac/tracd-init.erb +43 -0
- data/lib/deprec/templates/trac/users.htdigest.erb +0 -0
- data/lib/deprec/templates/tsung/tsung.xml.erb +47 -0
- data/lib/deprec/templates/vnstat/config.php +57 -0
- data/lib/deprec/templates/wordpress/apache2_wordpress_vhost.conf.erb +31 -0
- data/lib/deprec/templates/wordpress/wp-config.php.erb +31 -0
- data/lib/deprec/templates/wpmu/apache_vhost.conf.erb +13 -0
- data/lib/deprec/templates/xen/network-bridge-wrapper +3 -0
- data/lib/deprec/templates/xen/xend-config.sxp.erb +195 -0
- data/lib/deprec/templates/xen/xend-init.erb +57 -0
- data/lib/deprec/templates/xen/xendomains.erb +137 -0
- data/lib/deprec/templates/xentools/100-ubuntu-setup +26 -0
- data/lib/deprec/templates/xentools/15-disable-hwclock +40 -0
- data/lib/deprec/templates/xentools/30-disable-gettys +57 -0
- data/lib/deprec/templates/xentools/31-ubuntu-setup +32 -0
- data/lib/deprec/templates/xentools/40-setup-networking +145 -0
- data/lib/deprec/templates/xentools/98-custom +17 -0
- data/lib/deprec/templates/xentools/xen-tools.conf.erb +278 -0
- data/lib/deprec/templates/xentools/xm.tmpl.erb +138 -0
- data/lib/deprec_cmd_completion.sh +26 -0
- data/lib/deprec_minus_rails.rb +12 -0
- data/lib/vmbuilder_plugins/all.rb +20 -0
- data/lib/vmbuilder_plugins/apt.rb +93 -0
- data/lib/vmbuilder_plugins/emerge.rb +76 -0
- data/lib/vmbuilder_plugins/gem.rb +100 -0
- data/lib/vmbuilder_plugins/std.rb +203 -0
- metadata +304 -0
@@ -0,0 +1 @@
|
|
1
|
+
# This dir is for vhost config files
|
@@ -0,0 +1,41 @@
|
|
1
|
+
upstream <%= application %> {
|
2
|
+
<% mongrel_servers.times do |counter| -%>
|
3
|
+
<%= "server 127.0.0.1:#{mongrel_port+counter};" %>
|
4
|
+
<% end -%>
|
5
|
+
}
|
6
|
+
|
7
|
+
server {
|
8
|
+
listen 80;
|
9
|
+
server_name <%= domain %> <% 4.times do |counter| %> <%= domain.sub(/.*?\./, "assets#{counter}.") %><% end %>;
|
10
|
+
root <%= deploy_to %>/current/public;
|
11
|
+
access_log <%= deploy_to %>/shared/log/<%= domain %>-access.log;
|
12
|
+
error_log <%= deploy_to %>/shared/log/<%= domain %>-error.log;
|
13
|
+
client_max_body_size <%= nginx_client_max_body_size %>;
|
14
|
+
|
15
|
+
if (-f $document_root/system/maintenance.html){
|
16
|
+
rewrite ^(.*)$ /system/maintenance.html last;
|
17
|
+
break;
|
18
|
+
}
|
19
|
+
location / {
|
20
|
+
proxy_set_header X-Real-IP $remote_addr;
|
21
|
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
22
|
+
proxy_set_header Host $http_host;
|
23
|
+
proxy_redirect false;
|
24
|
+
|
25
|
+
if (-f $request_filename/index.html) {
|
26
|
+
rewrite (.*) $1/index.html break;
|
27
|
+
}
|
28
|
+
if (-f $request_filename.html) {
|
29
|
+
rewrite (.*) $1.html break;
|
30
|
+
}
|
31
|
+
if (!-f $request_filename) {
|
32
|
+
proxy_pass http://<%= application %>;
|
33
|
+
break;
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
error_page 500 502 503 504 /50x.html;
|
38
|
+
location = /50x.html {
|
39
|
+
root html;
|
40
|
+
}
|
41
|
+
}
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# /etc/ntp.conf, configuration for ntpd
|
2
|
+
|
3
|
+
driftfile /var/lib/ntp/ntp.drift
|
4
|
+
|
5
|
+
# Enable this if you want statistics to be logged.
|
6
|
+
#statsdir /var/log/ntpstats/
|
7
|
+
|
8
|
+
statistics loopstats peerstats clockstats
|
9
|
+
filegen loopstats file loopstats type day enable
|
10
|
+
filegen peerstats file peerstats type day enable
|
11
|
+
filegen clockstats file clockstats type day enable
|
12
|
+
|
13
|
+
|
14
|
+
# You do need to talk to an NTP server or two (or three).
|
15
|
+
server ntp.ubuntu.com
|
16
|
+
server 0.pool.ntp.org
|
17
|
+
server 1.pool.ntp.org
|
18
|
+
server 2.pool.ntp.org
|
19
|
+
server pool.ntp.org
|
20
|
+
|
21
|
+
# By default, exchange time with everybody, but don't allow configuration.
|
22
|
+
# See /usr/share/doc/ntp-doc/html/accopt.html for details.
|
23
|
+
restrict -4 default kod notrap nomodify nopeer noquery
|
24
|
+
restrict -6 default kod notrap nomodify nopeer noquery
|
25
|
+
|
26
|
+
# Local users may interrogate the ntp server more closely.
|
27
|
+
restrict 127.0.0.1
|
28
|
+
restrict ::1
|
29
|
+
|
30
|
+
# Clients from this (example!) subnet have unlimited access,
|
31
|
+
# but only if cryptographically authenticated
|
32
|
+
#restrict 192.168.123.0 mask 255.255.255.0 notrust
|
33
|
+
|
34
|
+
# If you want to provide time to your local subnet, change the next line.
|
35
|
+
# (Again, the address is an example only.)
|
36
|
+
#broadcast 192.168.123.255
|
37
|
+
|
38
|
+
# If you want to listen to time broadcasts on your local subnet,
|
39
|
+
# de-comment the next lines. Please do this only if you trust everybody
|
40
|
+
# on the network!
|
41
|
+
#disable auth
|
42
|
+
#broadcastclient
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# Don't cause the server to break if Passenger module not loaded
|
2
|
+
<IfModule passenger_module>
|
3
|
+
<VirtualHost *:80>
|
4
|
+
ServerName <%= domain %>
|
5
|
+
<%- 4.times do |counter| -%>
|
6
|
+
ServerAlias <%= domain.sub(/.*?\./, "assets#{counter}.") %>
|
7
|
+
<%- end %>
|
8
|
+
DocumentRoot "<%= passenger_document_root %>"
|
9
|
+
CustomLog <%= apache_log_dir %>/<%= application %>-access.log combined
|
10
|
+
ErrorLog <%= apache_log_dir %>/<%= application %>-error.log
|
11
|
+
|
12
|
+
RailsEnv <%= rails_env %>
|
13
|
+
# RailsAllowModRewrite <%= passenger_rails_allow_mod_rewrite %>
|
14
|
+
#
|
15
|
+
# Check for maintenance file and redirect all requests
|
16
|
+
RewriteEngine On
|
17
|
+
RewriteCond %{REQUEST_URI} !\.(css|jpg|png|gif)$
|
18
|
+
# allow requests to server-status and server-info, might be needed if you use monitoring services like fiveruns
|
19
|
+
RewriteCond %{REQUEST_URI} !server-(status|info)/?$
|
20
|
+
RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
|
21
|
+
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
|
22
|
+
RewriteRule ^.*$ /system/maintenance.html [L]
|
23
|
+
<Directory "<%= passenger_document_root %>">
|
24
|
+
Order allow,deny
|
25
|
+
Allow from all
|
26
|
+
</Directory>
|
27
|
+
</VirtualHost>
|
28
|
+
</IfModule>
|
29
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# /etc/apache2/mods-available/passenger.conf
|
2
|
+
#
|
3
|
+
# http://www.modrails.com/documentation/Users%20guide.html#_configuring_phusion_passenger
|
4
|
+
<IfModule passenger_module>
|
5
|
+
|
6
|
+
PassengerRoot <%= passenger_install_dir %>
|
7
|
+
PassengerLogLevel <%= passenger_log_level %>
|
8
|
+
PassengerRuby /usr/local/bin/ruby
|
9
|
+
PassengerUserSwitching <%= passenger_user_switching %>
|
10
|
+
PassengerDefaultUser <%= passenger_default_user %>
|
11
|
+
PassengerMaxPoolSize <%= passenger_max_pool_size %>
|
12
|
+
PassengerMaxInstancesPerApp <%= passenger_max_instances_per_app %>
|
13
|
+
PassengerPoolIdleTime <%= passenger_pool_idle_time %>
|
14
|
+
|
15
|
+
# Ruby on Rails Options
|
16
|
+
|
17
|
+
RailsAutoDetect <%= passenger_rails_autodetect %>
|
18
|
+
RailsSpawnMethod <%= passenger_rails_spawn_method %>
|
19
|
+
|
20
|
+
NameVirtualHost *:80
|
21
|
+
</IfModule>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Postfix dynamic maps configuration file.
|
2
|
+
#
|
3
|
+
# The first match found is the one that is used. Wildcards are not supported
|
4
|
+
# as of postfix 2.0.2
|
5
|
+
#
|
6
|
+
#type location of .so file open function (mkmap func)
|
7
|
+
#==== ================================ ============= ============
|
8
|
+
tcp /usr/lib/postfix/dict_tcp.so dict_tcp_open
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
|
2
|
+
|
3
|
+
|
4
|
+
# Debian specific: Specifying a file name will cause the first
|
5
|
+
# line of that file to be used as the name. The Debian default
|
6
|
+
# is /etc/mailname.
|
7
|
+
myorigin = /etc/mailname
|
8
|
+
|
9
|
+
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
|
10
|
+
biff = no
|
11
|
+
|
12
|
+
# appending .domain is the MUA's job.
|
13
|
+
append_dot_mydomain = no
|
14
|
+
|
15
|
+
# Uncomment the next line to generate "delayed mail" warnings
|
16
|
+
#delay_warning_time = 4h
|
17
|
+
|
18
|
+
# TLS parameters
|
19
|
+
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
|
20
|
+
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
|
21
|
+
smtpd_use_tls=yes
|
22
|
+
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
|
23
|
+
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
|
24
|
+
|
25
|
+
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
|
26
|
+
# information on enabling SSL in the smtp client.
|
27
|
+
|
28
|
+
# myhostname =
|
29
|
+
alias_maps = hash:/etc/aliases
|
30
|
+
alias_database = hash:/etc/aliases
|
31
|
+
mydestination = $myhostname localhost.$mydomain $myorigin
|
32
|
+
relayhost = <%= postfix_relayhost %>
|
33
|
+
mynetworks = 127.0.0.0/8
|
34
|
+
mailbox_size_limit = 0
|
35
|
+
recipient_delimiter = +
|
36
|
+
inet_interfaces = loopback-only
|
@@ -0,0 +1,77 @@
|
|
1
|
+
#
|
2
|
+
# Postfix master process configuration file. For details on the format
|
3
|
+
# of the file, see the master(5) manual page (command: "man 5 master").
|
4
|
+
#
|
5
|
+
# ==========================================================================
|
6
|
+
# service type private unpriv chroot wakeup maxproc command + args
|
7
|
+
# (yes) (yes) (yes) (never) (100)
|
8
|
+
# ==========================================================================
|
9
|
+
smtp inet n - - - - smtpd
|
10
|
+
#submission inet n - - - - smtpd
|
11
|
+
# -o smtpd_enforce_tls=yes
|
12
|
+
# -o smtpd_sasl_auth_enable=yes
|
13
|
+
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
|
14
|
+
#smtps inet n - - - - smtpd
|
15
|
+
# -o smtpd_tls_wrappermode=yes
|
16
|
+
# -o smtpd_sasl_auth_enable=yes
|
17
|
+
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
|
18
|
+
#628 inet n - - - - qmqpd
|
19
|
+
pickup fifo n - - 60 1 pickup
|
20
|
+
cleanup unix n - - - 0 cleanup
|
21
|
+
qmgr fifo n - n 300 1 qmgr
|
22
|
+
#qmgr fifo n - - 300 1 oqmgr
|
23
|
+
tlsmgr unix - - - 1000? 1 tlsmgr
|
24
|
+
rewrite unix - - - - - trivial-rewrite
|
25
|
+
bounce unix - - - - 0 bounce
|
26
|
+
defer unix - - - - 0 bounce
|
27
|
+
trace unix - - - - 0 bounce
|
28
|
+
verify unix - - - - 1 verify
|
29
|
+
flush unix n - - 1000? 0 flush
|
30
|
+
proxymap unix - - n - - proxymap
|
31
|
+
smtp unix - - - - - smtp
|
32
|
+
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
|
33
|
+
relay unix - - - - - smtp
|
34
|
+
-o smtp_fallback_relay=
|
35
|
+
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
|
36
|
+
showq unix n - - - - showq
|
37
|
+
error unix - - - - - error
|
38
|
+
retry unix - - - - - error
|
39
|
+
discard unix - - - - - discard
|
40
|
+
local unix - n n - - local
|
41
|
+
virtual unix - n n - - virtual
|
42
|
+
lmtp unix - - - - - lmtp
|
43
|
+
anvil unix - - - - 1 anvil
|
44
|
+
scache unix - - - - 1 scache
|
45
|
+
#
|
46
|
+
# ====================================================================
|
47
|
+
# Interfaces to non-Postfix software. Be sure to examine the manual
|
48
|
+
# pages of the non-Postfix software to find out what options it wants.
|
49
|
+
#
|
50
|
+
# Many of the following services use the Postfix pipe(8) delivery
|
51
|
+
# agent. See the pipe(8) man page for information about ${recipient}
|
52
|
+
# and other message envelope options.
|
53
|
+
# ====================================================================
|
54
|
+
#
|
55
|
+
# maildrop. See the Postfix MAILDROP_README file for details.
|
56
|
+
# Also specify in main.cf: maildrop_destination_recipient_limit=1
|
57
|
+
#
|
58
|
+
maildrop unix - n n - - pipe
|
59
|
+
flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
|
60
|
+
#
|
61
|
+
# See the Postfix UUCP_README file for configuration details.
|
62
|
+
#
|
63
|
+
uucp unix - n n - - pipe
|
64
|
+
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
|
65
|
+
#
|
66
|
+
# Other external delivery methods.
|
67
|
+
#
|
68
|
+
ifmail unix - n n - - pipe
|
69
|
+
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
|
70
|
+
bsmtp unix - n n - - pipe
|
71
|
+
flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
|
72
|
+
scalemail-backend unix - n n - 2 pipe
|
73
|
+
flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
|
74
|
+
mailman unix - n n - - pipe
|
75
|
+
flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
|
76
|
+
${nexthop} ${user}
|
77
|
+
|
@@ -0,0 +1,132 @@
|
|
1
|
+
# Redis configuration file example
|
2
|
+
|
3
|
+
# By default Redis does not run as a daemon. Use 'yes' if you need it.
|
4
|
+
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
|
5
|
+
daemonize yes
|
6
|
+
|
7
|
+
# When run as a daemon, Redis write a pid file in /var/run/redis.pid by default.
|
8
|
+
# You can specify a custom pid file location here.
|
9
|
+
pidfile /var/run/redis.pid
|
10
|
+
|
11
|
+
# Accept connections on the specified port, default is 6379
|
12
|
+
port 6379
|
13
|
+
|
14
|
+
# If you want you can bind a single interface, if the bind option is not
|
15
|
+
# specified all the interfaces will listen for connections.
|
16
|
+
#
|
17
|
+
bind 127.0.0.1
|
18
|
+
|
19
|
+
# Close the connection after a client is idle for N seconds (0 to disable)
|
20
|
+
timeout 300
|
21
|
+
|
22
|
+
# Save the DB on disk:
|
23
|
+
#
|
24
|
+
# save <seconds> <changes>
|
25
|
+
#
|
26
|
+
# Will save the DB if both the given number of seconds and the given
|
27
|
+
# number of write operations against the DB occurred.
|
28
|
+
#
|
29
|
+
# In the example below the behaviour will be to save:
|
30
|
+
# after 900 sec (15 min) if at least 1 key changed
|
31
|
+
# after 300 sec (5 min) if at least 10 keys changed
|
32
|
+
# after 60 sec if at least 10000 keys changed
|
33
|
+
save 900 1
|
34
|
+
save 300 10
|
35
|
+
save 60 10000
|
36
|
+
|
37
|
+
# The filename where to dump the DB
|
38
|
+
dbfilename dump.rdb
|
39
|
+
|
40
|
+
# For default save/load DB in/from the working directory
|
41
|
+
# Note that you must specify a directory not a file name.
|
42
|
+
dir /var/lib/redis
|
43
|
+
|
44
|
+
# Set server verbosity to 'debug'
|
45
|
+
# it can be one of:
|
46
|
+
# debug (a lot of information, useful for development/testing)
|
47
|
+
# notice (moderately verbose, what you want in production probably)
|
48
|
+
# warning (only very important / critical messages are logged)
|
49
|
+
loglevel notice
|
50
|
+
|
51
|
+
# Specify the log file name. Also 'stdout' can be used to force
|
52
|
+
# the demon to log on the standard output. Note that if you use standard
|
53
|
+
# output for logging but daemonize, logs will be sent to /dev/null
|
54
|
+
logfile /var/log/redis/redis-server.log
|
55
|
+
|
56
|
+
# Set the number of databases. The default database is DB 0, you can select
|
57
|
+
# a different one on a per-connection basis using SELECT <dbid> where
|
58
|
+
# dbid is a number between 0 and 'databases'-1
|
59
|
+
databases 16
|
60
|
+
|
61
|
+
################################# REPLICATION #################################
|
62
|
+
|
63
|
+
# Master-Slave replication. Use slaveof to make a Redis instance a copy of
|
64
|
+
# another Redis server. Note that the configuration is local to the slave
|
65
|
+
# so for example it is possible to configure the slave to save the DB with a
|
66
|
+
# different interval, or to listen to another port, and so on.
|
67
|
+
|
68
|
+
# slaveof <masterip> <masterport>
|
69
|
+
|
70
|
+
################################## SECURITY ###################################
|
71
|
+
|
72
|
+
# Require clients to issue AUTH <PASSWORD> before processing any other
|
73
|
+
# commands. This might be useful in environments in which you do not trust
|
74
|
+
# others with access to the host running redis-server.
|
75
|
+
#
|
76
|
+
# This should stay commented out for backward compatibility and because most
|
77
|
+
# people do not need auth (e.g. they run their own servers).
|
78
|
+
|
79
|
+
# requirepass foobared
|
80
|
+
|
81
|
+
################################### LIMITS ####################################
|
82
|
+
|
83
|
+
# Set the max number of connected clients at the same time. By default there
|
84
|
+
# is no limit, and it's up to the number of file descriptors the Redis process
|
85
|
+
# is able to open. The special value '0' means no limts.
|
86
|
+
# Once the limit is reached Redis will close all the new connections sending
|
87
|
+
# an error 'max number of clients reached'.
|
88
|
+
|
89
|
+
# maxclients 128
|
90
|
+
|
91
|
+
# Don't use more memory than the specified amount of bytes.
|
92
|
+
# When the memory limit is reached Redis will try to remove keys with an
|
93
|
+
# EXPIRE set. It will try to start freeing keys that are going to expire
|
94
|
+
# in little time and preserve keys with a longer time to live.
|
95
|
+
# Redis will also try to remove objects from free lists if possible.
|
96
|
+
#
|
97
|
+
# If all this fails, Redis will start to reply with errors to commands
|
98
|
+
# that will use more memory, like SET, LPUSH, and so on, and will continue
|
99
|
+
# to reply to most read-only commands like GET.
|
100
|
+
#
|
101
|
+
# WARNING: maxmemory can be a good idea mainly if you want to use Redis as a
|
102
|
+
# 'state' server or cache, not as a real DB. When Redis is used as a real
|
103
|
+
# database the memory usage will grow over the weeks, it will be obvious if
|
104
|
+
# it is going to use too much memory in the long run, and you'll have the time
|
105
|
+
# to upgrade. With maxmemory after the limit is reached you'll start to get
|
106
|
+
# errors for write operations, and this may even lead to DB inconsistency.
|
107
|
+
|
108
|
+
# maxmemory <bytes>
|
109
|
+
|
110
|
+
############################### ADVANCED CONFIG ###############################
|
111
|
+
|
112
|
+
# Glue small output buffers together in order to send small replies in a
|
113
|
+
# single TCP packet. Uses a bit more CPU but most of the times it is a win
|
114
|
+
# in terms of number of queries per second. Use 'yes' if unsure.
|
115
|
+
glueoutputbuf yes
|
116
|
+
|
117
|
+
# Use object sharing. Can save a lot of memory if you have many common
|
118
|
+
# string in your dataset, but performs lookups against the shared objects
|
119
|
+
# pool so it uses more CPU and can be a bit slower. Usually it's a good
|
120
|
+
# idea.
|
121
|
+
#
|
122
|
+
# When object sharing is enabled (shareobjects yes) you can use
|
123
|
+
# shareobjectspoolsize to control the size of the pool used in order to try
|
124
|
+
# object sharing. A bigger pool size will lead to better sharing capabilities.
|
125
|
+
# In general you want this value to be at least the double of the number of
|
126
|
+
# very common strings you have in your dataset.
|
127
|
+
#
|
128
|
+
# WARNING: object sharing is experimental, don't enable this feature
|
129
|
+
# in production before of Redis 1.0-stable. Still please try this feature in
|
130
|
+
# your development environment so that we can test it better.
|
131
|
+
shareobjects no
|
132
|
+
shareobjectspoolsize 1024
|
@@ -0,0 +1,50 @@
|
|
1
|
+
#! /bin/sh
|
2
|
+
|
3
|
+
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
4
|
+
DAEMON=/usr/local/bin/redis-server
|
5
|
+
DAEMON_ARGS=/etc/redis/redis.conf
|
6
|
+
NAME=redis-server
|
7
|
+
DESC=redis-server
|
8
|
+
PIDFILE=/var/run/redis.pid
|
9
|
+
USER=<%= redis_user %>
|
10
|
+
GROUP=<%= redis_group %>
|
11
|
+
|
12
|
+
test -x $DAEMON || exit 0
|
13
|
+
test -x $DAEMONBOOTSTRAP || exit 0
|
14
|
+
|
15
|
+
set -e
|
16
|
+
|
17
|
+
case "$1" in
|
18
|
+
start)
|
19
|
+
echo -n "Starting $DESC: "
|
20
|
+
touch $PIDFILE
|
21
|
+
chown $USER:$GROUP $PIDFILE
|
22
|
+
if start-stop-daemon --start --quiet --umask 007 --pidfile $PIDFILE --chuid $USER:$GROUP --exec $DAEMON -- $DAEMON_ARGS
|
23
|
+
then
|
24
|
+
echo "$NAME."
|
25
|
+
else
|
26
|
+
echo "failed"
|
27
|
+
fi
|
28
|
+
;;
|
29
|
+
stop)
|
30
|
+
echo -n "Stopping $DESC: "
|
31
|
+
if start-stop-daemon --stop --retry 10 --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON
|
32
|
+
then
|
33
|
+
echo "$NAME."
|
34
|
+
else
|
35
|
+
echo "failed"
|
36
|
+
fi
|
37
|
+
rm -f $PIDFILE
|
38
|
+
;;
|
39
|
+
|
40
|
+
restart|force-reload)
|
41
|
+
${0} stop
|
42
|
+
${0} start
|
43
|
+
;;
|
44
|
+
*)
|
45
|
+
echo "Usage: /etc/init.d/$NAME {start|stop|restart|force-reload}" >&2
|
46
|
+
exit 1
|
47
|
+
;;
|
48
|
+
esac
|
49
|
+
|
50
|
+
exit 0
|