Skip to main content

Primary links

  • Home
  • AI
  • Kubernetes
  • Incus
  • Ansible
  • Terraform
  • OpenStack
  • Virtualization
  • Linux
  • SmartHome
  • HowTo

Misc

  • Linux
  • Hardware
  • Programming
  • Databases
  • Multimedia
  • Windows

Cloud

  • OpenStack
  • cloud-config
  • nextcloud

Virtualization

  • Virtualization
  • Incus
  • Docker
  • KVM
  • Kubernetes
  • LXC
  • LXD
  • QEMU
  • VMware
  • VirtualBox
  • multipass
  • podman
  • vagrant
  • XEN
    • Domains
      • Endian
      • Fileserver
      • Hylafax
      • IPfire
      • LXC
      • Mailserver
      • Oracle 10 XE
      • PXE Netboot
      • Torrent
      • Webmail
      • Zimbra
    • Installation
    • PCI Delegation

Network

  • DNS
  • Firewall
  • Linux
  • OpenvSwitch
  • SSL
  • VLAN
  • VPN
  • iPXE
  • namespaces
  • nmcli
  • tcpdump

Storage

  • CEPH
  • DRBD
  • LVM
  • S3
  • ZFS
  • btrfs

Automation / CI/CD

  • Install
  • Ansible
  • GitLab
  • LLM
  • Preseed
  • Puppet
  • Terraform
  • Ubuntu autoinstall

Monitoring / Visualisation

  • Grafana
  • Icinga
  • Prometheus
  • Monitoring
  • ELK
  • mermaid
#!/bin/bash

# set domU name
DOMAIN_NAME=srv

# install vm
xen-create-image --hostname=$DOMAIN_NAME --dhcp --mac=00:11:cc:ab:cd:ef \
--lvm=vg01 --dist=jaunty --mirror=http://archive.ubuntu.com/ubuntu/ --size=4Gb --memory=1Gb --swap=1Gb

# rename config file
mv /etc/xen/${DOMAIN_NAME}.cfg /etc/xen/${DOMAIN_NAME}

# add to autostart
ln -s /etc/xen/${DOMAIN_NAME} /etc/xen/auto

# create lvm for home
lvcreate --name ${DOMAIN_NAME}-media --size 200G vg01
mkfs.ext3 /dev/vg01/${DOMAIN_NAME}-media

# configure domU
vi /etc/xen/${DOMAIN_NAME}
(add)
'phy:/dev/vg01/srv-media,xvda3,w'

# start domain
xm create -c ${DOMAIN_NAME}

# set root password
passwd

# add media to fstab
cat <> /etc/fstab
/dev/xvda3 /media ext3 defaults 0 0
EOF

# install and configure dhcp
apt-get install -y dhcp3-server
?? apt-get install winbind
cp /etc/dhcp3/dhcpd.conf /etc/dhcp3/dhcpd.conf.$(date -I)
cp /mnt/etc/dhcp3/dhcpd.conf /etc/dhcp3/dhcpd.conf
/etc/init.d/dhcp3-server restart

# install and configure samba
apt-get install -y samba
cp /etc/samba/smb.conf /etc/samba/smb.conf.$(date -I)
cp /mnt/smb.conf /etc/samba/smb.conf
/etc/init.d/samba restart
smbpasswd -a root

# install and configure pxe server
apt-get install -y tftpd-hpa syslinux openbsd-inetd

# move files to /media/tftpboot
mv /var/lib/tftpboot/ /var/lib/tftpboot.org
mkdir /media/tftpboot
ln -s /media/tftpboot/ /var/lib/tftpboot
/etc/init.d/openbsd-inetd restart

# install and configure new pxe envirement (optional)
apt-get install -y syslinux
cp /usr/lib/syslinux/pxelinux.0 /var/lib/tftpboot/
cp /usr/lib/syslinux/vesamenu.c32 /var/lib/tftpboot/
cp /usr/lib/syslinux/menu.c32 /var/lib/tftpboot/
cp /usr/lib/syslinux/memdisk /var/lib/tftpboot/

# nfs server
apt-get install -y nfs-kernel-server
cp /etc/exports /etc/exports.$(date -I)
cp /mnt/exports /etc/exports
/etc/init.d/nfs-kernel-server restart

# webserver
apt-get -y install apache2 php5
/etc/init.d/apache2 restart
mv /var/www /media/
ln -s /media/www/ /var/

# java
# install debconf-utils
apt-get install debconf-utils

# create answer file
debconf-set-selections <<\EOF
sun-java6-bin shared/accepted-sun-dlj-v1-1    boolean true
msttcorefonts   msttcorefonts/defoma    note
EOF
apt-get install -y sun-java6-jre



# Links
http://wiki.ubuntuusers.de/Samba_Server
Profiles GitHub StackOverflow LinkedIn Xing
Contact Imprint
© panticz 2026

Cookie-Einstellungen

Diese Website nutzt eingebettete Inhalte von Drittanbietern (z.B. YouTube, SoundCloud). Beim Laden dieser Inhalte werden Daten an die jeweiligen Anbieter übermittelt. Datenverarbeitungserklärung