Changes

Jump to: navigation, search

Debian template creation

1,437 bytes added, 00:20, 19 May 2015
Customizing the installation: for Jessie -- create vzfifo script, disable services
=== Remove some unneeded packages ===
If you have any packages you'd like to remove, now's the time for it. Here's an example — note that not all of those packages are installed by default in Debian Squeeze (although they were in earlier versions):
 
dpkg --purge modutils ppp pppoeconf pppoe pppconfig module-init-tools
=== Disable services ===
Do not start some services, stick to bare minimum:
update-rc.d -f klogd remove
update-rc.d -f quotarpc remove
update-rc.d -f exim4 remove
update-rc.d -f inetd remove
For dependencyDo not start some services, stick to bare minimum. This step is release dependent. ==== for Jessie ==== <source lang="bash"># turn off and stop some servicesfor i in bind9 quotarpc fetchmail ondemand rsync uuidd wide-based boot sequence introduced with dhcpv6-client; do systemctl stop $i systemctl disable $idone # for upstart services comment out the start on in confsfor i in nmbd smbd samba-ad-dc rpcbind; do systemctl disable $idone</source> ==== for Squeeze type:====
update-rc.d-insserv -f klogd remove
update-rc.d-insserv -f exim4 remove
update-rc.d-insserv -f inetd remove
 
==== for older releases (Lenny, Sarge etc.) ====
 
update-rc.d -f klogd remove
update-rc.d -f quotarpc remove
update-rc.d -f exim4 remove
update-rc.d -f inetd remove
=== Fix SSH host keys ===
<source lang="bash">
dpkg-reconfigure tzdata
</source>
 
=== Create vzfifo script (for Jessie only) ===
 
This step is required '''for Jessie only''' (and is handled automatically by vzctl for earlier Debian releases). It ensures that <code>vzctl start --wait</code> works as expected.
 
<source lang="bash">
# Create vzfifo service
cat >> /lib/systemd/system/vzfifo.service << EOF
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
 
[Unit]
Description=Tell that Container is started
ConditionPathExists=/proc/vz
ConditionPathExists=!/proc/bc
After=multi-user.target quotaon.service quotacheck.service
 
[Service]
Type=forking
ExecStart=/bin/touch /.vzfifo
TimeoutSec=0
RemainAfterExit=no
SysVStartPriority=99
 
[Install]
WantedBy=multi-user.target
EOF
 
# Enable service
for service in vzfifo; do
systemctl enable $service > /dev/null 2>&1
done
</source>

Navigation menu