diff options
Diffstat (limited to '00_blog/00015_Admin/00005_Notes-on-Hosting')
| -rw-r--r-- | 00_blog/00015_Admin/00005_Notes-on-Hosting/index.md | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/00_blog/00015_Admin/00005_Notes-on-Hosting/index.md b/00_blog/00015_Admin/00005_Notes-on-Hosting/index.md new file mode 100644 index 0000000..1345bf4 --- /dev/null +++ b/00_blog/00015_Admin/00005_Notes-on-Hosting/index.md @@ -0,0 +1,53 @@ +# Miscellanous Notes on Server Hosting specifics + +## LUKS container over sshfs + +* enable user\_allow\_other in /etc/fuse.conf +* sshfs -o allow\_root user@server:/BACKUPS/ ~/mnt/ +* dd if=/dev/urandom of=~/mnt/megaloman bs=1M count=512 +* sudo cryptsetup -y luksFormat ~/mnt/megaloman +* sudo cryptsetup luksOpen ~/mnt/megaloman vol1 +* sudo mkfs.ext4 /dev/mapper/vol1 +* sudo mount /dev/mapper/vol1 /mnt +* df -h | grep vol1 +* sudo umount /mnt +* sudo cryptsetup luksClose vol1 +* fusermount -u ~/mnt + +NOTE: backup your data example use : rsync -a –info=progress2 source dist + +## Ownlcoud + +### Mounting Ownclouds DavFS + + $ apt-get install davfs2 + + * since owncloud seems to have problems with locks, edit /etc/davfs2/davfs2.conf and set use_locks to 0 in order to allow creating files (as well as probably writing) + + $ mount -t davfs https://secure.sf.com/owncloud/remote.php/webdav /mnt/ + +### rescan/rebuild ownlocud files database + + inside ownlcoud directory run: + sudo -u www-owncloud php console.php files:scan –all + +## Postfix + +We want to handle different domains on a single postfix server and have virtual users along real unix users. +For the virtual users we use uid/gid 5000. + +Relevant config files are: + + /etc/postfix/master.cf + /etc/postfix/main.cf + /etc/postfix/smtpd_sender_login_maps (tells which emails belong to which login) + /etc/postfix/vmailbox (sepcifies our VIRTUAL mailboxes and the names of the spoolfiles) + /etc/postfix/virtual (aliases for our local unix users) + /etc/dovecot/users (specifies the logins, passwords, home directories,..) + /etc/dovecot/conf.d/10-mail (set inbox and mailbox dirs) + +Be careful about the permissions of the different folders, so uid/gid 5000, postfix and dovecot can access as relevant. + +A very nice tutorial on setting up postfixadmin can be found here: + + https://lelutin.ca/posts/installing_postfix_-_clamav_-_spamassassin_-_dovecot_-_postfixadmin_on_debian_squeeze/ |
