/etc/ntp.conf:server 0.north-america.pool.ntp.org server 1.north-america.pool.ntp.org server 2.north-america.pool.ntp.org server 3.north-america.pool.ntp.org restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
useradd -M -N -g users -s /bin/false <username>smbpasswd -a <username>/etc/httpd/httpd.conf to match desired configuration.
- Uncomment mod_ssl
- Fill in
ServerAdmin and ServerName
openssl genrsa -des3 -out server.key 1024openssl req -new -key server.key -out server.csrcp server.key server.key.org
openssl rsa -in server.key.org -out server.keyopenssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crtcp server.crt /etc/httpd/
cp server.key /etc/httpd/
chmod 600 /etc/httpd/server.key (make sure server.key is owned and readable by root only)groupadd -g 208 -r lighttpduseradd -M -N -g lighttpd -s /bin/false -r -u 208 lighttpd/etc/rc.d/rc.local:if [ -x /etc/rc.d/rc.lighttpd ]; then /etc/rc.d/rc.lighttpd start fi
/etc/rc.d/rc.local_shutdown:if [ -x /etc/rc.d/rc.lighttpd ]; then /etc/rc.d/rc.lighttpd stop fi
/etc/httpd to /etc/lighttpd
chgrp lighttpd /var/lib/phpopenssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodeschmod 400 server.pem/etc/lighttpd/lighttpd.conf:fastcgi.server = ( ".php" => ( "localhost" => ( "socket" => "/var/run/lighttpd/php-fastcgi.socket", "bin-path" => "/usr/bin/php-cgi -c /etc/lighttpd/php.ini" "allow-x-send-file" => "enable" ) ) )
$SERVER["socket"] == ":443" {
ssl.engine = "enable"
ssl.pemfile = "server.pem"
server.document-root = "/path/to/www/"
$HTTP["url"] =~ "\.html$" {
setenv.add-response-header = ( "Cache-Control" => "no-store, no-cache, must-revalidate, post-check=0, pre-check=0" )
etag.use-inode = "disable"
etag.use-mtime = "disable"
etag.use-size = "disable"
}
url.rewrite-once = (
"^/1stdir/(.*)$" => "/1st.php/$1",
"^/2nddir/(.*)$" => "/2nd.php/$1"
)
url.redirect = (
"^/1stdir$" => "/1stdir/",
"^/2nddir$" => "/2nddir/"
)
auth.require = (
"/admin/" => (
"method" => "basic",
"realm" => "Administrators Only",
"require" => "user=admin"
)
)
}auth.backend = "plain" auth.backend.plain.userfile = "/etc/lighttpd/lighttpd.users"
/etc/lighttpd/lighttpd.usersuser:password
my.cnfmysql_install_db --user=mysqlmysql_secure_installationopenssl genrsa 2048 > ca-key.pemopenssl req -new -x509 -nodes -days 3600 -key ca-key.pem > ca-cert.pemopenssl req -newkey rsa:2048 -days 3600 -nodes -keyout server-key.pem > server-req.pemopenssl x509 -req -in server-req.pem -days 3600 -CA ca-cert.pem -CAkey ca-key.pem -set_serial 01 > server-cert.pemopenssl req -newkey rsa:2048 -days 3600 -nodes -keyout client-key.pem > client-req.pemopenssl x509 -req -in client-req.pem -days 3600 -CA ca-cert.pem -CAkey ca-key.pem -set_serial 01 > client-cert.pemsu - postgrespsql postgresCREATE DATABASE <db>;CREATE USER <user> WITH PASSWORD <password>;GRANT ALL PRIVILEGES ON DATABASE <db> TO <user>;$conf['servers'][0]['defaultdb'] = 'postgres'; to phpPgAdmin/conf/config.inc.phpgit clone git://github.com/sitaramc/gitolitegitolite/install -ln /usr/local/bingitolite setup -pk /tmp/<name>.pubgit clone git@<server>:gitolite-admin.gitconf/gitolite.conf.git clone git@<server>:<repo>.gitcd <repo>git commit -m "Initial gitolite repository setup."git remote add -f wip <path to old repo>git merge -s ours wip/<branch>git read-tree --prefix=/ -u wip/<branch>git commit -m "Subtree merge in wip"git update-index --assume-unchanged <file>git config --global core.excludesfile ~/.gitignore and create ~/.gitignore:*~
groupadd -g 202 dovecotuseradd -d /dev/null -s /bin/false -u 202 -g 202 dovecotgroupadd -g 201 dovenulluseradd -d /dev/null -s /bin/false -u 201 -g 201 dovenullgroupadd -g 500 vmailuseradd -d /dev/null -s /bin/false -u 500 -g 500 vmail/etc/rc.d/rc.local:
# Start Dovecot mail server: if [ -x /etc/rc.d/rc.dovecot ]; then . /etc/rc.d/rc.dovecot start fi
/etc/rc.d/rc.local_shutdown:
# Stop the Dovecot mail server: if [ -x /etc/rc.d/rc.dovecot ]; then /etc/rc.d/rc.dovecot stop fi
/usr/local/src/python setup.py buildpython setup.py installpython setup.py buildpython setup.py install/etc/rc.d/rc.local:
# Start sabnzbd usenet downloader server: if [ -x /etc/rc.d/rc.sabnzbd ]; then . /etc/rc.d/rc.sabnzbd start fi
/etc/rc.d/rc.local_shutdown:
# Stop sabnzbd usenet downloader server: if [ -x /etc/rc.d/rc.sabnzbd ]; then /etc/rc.d/rc.sabnzbd stop fi
/etc/rc.d/rc.sabnzbd and give it execute permissions:
#!/bin/sh
case "$1" in
start)
echo "Starting SABnzbd..."
/usr/bin/sudo -u server -H /usr/local/src/sabnzbd/SABnzbd.py -d -f /home/server/sabnzbd/sabnzbd.ini
;;
stop)
echo "Shutting down SABnzbd."
/usr/bin/wget -q --delete-after "http://localhost:8080/sabnzbd/api?mode=shutdown&apikey=0314c8531cf082cb1a5f5b634555931a"
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
exit 0