This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tech:lxc:start [2017/04/10 03:12] rk4n3 |
tech:lxc:start [2018/02/20 18:23] (current) rk4n3 |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== LXC - Linux Containers ====== | ====== LXC - Linux Containers ====== | ||
+ | [[tech:linux:ubuntu:start#lxc_ubuntu-specifics|Ubuntu-specific LXC info]] | ||
==== Resources ==== | ==== Resources ==== | ||
Line 10: | Line 11: | ||
lxc.network.link=br0 | lxc.network.link=br0 | ||
lxc.network.flags=up</code> | lxc.network.flags=up</code> | ||
- | * Create container: ''lxc-create -n lxcguest -t /usr/share/lxc/templates/lxc-slackware'' | + | * If using OpenVPN in container, config also needs:<code>lxc.hook.autodev = sh -c "modprobe tun ; cd ${LXC_ROOTFS_MOUNT}/dev ; mkdir net ; mknod net/tun c 10 200 ; chmod 0666 net/tun" |
- | * Edit container's ''config'' and set MAC for virtual NIC: ''lxc.network.hwaddr = DE:AD:BE:EF:00:00'' | + | lxc.cgroup.devices.allow = c 10:200 rwm</code> |
+ | * Create container: ''lxc-create -n lxcguest -t /usr/share/lxc/templates/lxc-freeslack'' | ||
+ | * Edit container's ''config'' and: | ||
+ | * Set MAC for virtual NIC: ''lxc.network.hwaddr = DE:AD:BE:EF:00:00'' | ||
+ | * Change location(s) of mount(s), if needed | ||
+ | * Change container's ''/etc/rc.d/rc.inet1.conf'' | ||
* Start container: ''lxc-start -n lxcguest -d'' | * Start container: ''lxc-start -n lxcguest -d'' | ||
- | * Connect to container's console: ''lxc-console -n lxcguest'' \\ // Default login/password is root/root // | + | * Connect to container's console: ''lxc-console -n lxcname'' \\ // Default login/password is root/root // |
- | * In guest, set up networking as usual | + | |
* Packages to add: | * Packages to add: | ||
- | * perl | + | * glibc-i18n |
- | * python | + | * groff |
- | * python-setuptools | + | * man |
+ | * ksh93 | ||
* vim | * vim | ||
* less | * less | ||
* rsync | * rsync | ||
+ | * perl | ||
+ | * python | ||
+ | * python-setuptools | ||
* sudo | * sudo | ||
- | * make | + | * db48 |
+ | * gnupg | ||
+ | * gnupg2 | ||
+ | * curl | ||
* guile | * guile | ||
* gc | * gc | ||
+ | * make | ||
+ | * nmap | ||
+ | * libunistring | ||
* libffi | * libffi | ||
+ | * git | ||
==== Unprivileged ==== | ==== Unprivileged ==== | ||
- | See: | ||
- | * [[http://www.darlo.tv/lxc/run-unpriv-slackware.html|Unprivileged containers in Slackware]] | ||
- | * [[https://stgraber.org/2014/01/17/lxc-1-0-unprivileged-containers/|Stephane Graber's blog]] | ||
- | |||
- Prerequisites | - Prerequisites | ||
- Create standard root-privileged container | - Create standard root-privileged container | ||
Line 97: | Line 109: | ||
==== Extra Setup ==== | ==== Extra Setup ==== | ||
+ | |||
+ | === lighttpd === | ||
+ | * Packages to install for ''lighttpd'' //(preferred)// | ||
+ | * php | ||
+ | * Packages to install for ''lighttpd2'' //(experimental)// | ||
+ | * lua | ||
+ | * colm | ||
+ | * kelbt | ||
+ | * ragel | ||
+ | * libev | ||
+ | * libunwind //(optional: pass ''UNWIND=yes'' to lighttpd2 slackbuild)// | ||
+ | * libiodbc | ||
+ | * libmcrypt | ||
+ | * libxml2 | ||
+ | * cyrus-sasl | ||
+ | * enchant | ||
+ | * aspell | ||
+ | * aspell-en | ||
+ | * t1lib | ||
+ | * icu4c | ||
+ | * sqlite | ||
+ | * net-snmp | ||
+ | * libxslt | ||
+ | * libgcrypt | ||
+ | * libnl3 | ||
+ | * libgpg-error | ||
+ | * lighttpd2 | ||
=== MySQL === | === MySQL === | ||
Line 102: | Line 141: | ||
* Prerequisites in addition to template's packages: ''libaio'' and ''jemalloc'' | * Prerequisites in addition to template's packages: ''libaio'' and ''jemalloc'' | ||
+ | === Minimal X Footprint === | ||
+ | * libXaw | ||
+ | * libXft | ||
+ | * libXmu | ||
+ | * libXt | ||
+ | * libX11 | ||
+ | * libXpm | ||
+ | * libXau | ||
+ | * libXdmcp | ||
+ | * libxcb | ||
+ | * libXrender | ||
+ | * libXext | ||
+ | * libXfont | ||
+ | * libXcursor | ||
+ | * libXfixes | ||
+ | * xsetroot | ||
+ | * xcursorgen | ||
+ | * libSM | ||
+ | * libICE | ||
+ | * libXinerama | ||
+ | * xauth | ||
+ | * xdm | ||
+ | * rgb | ||
+ | * utempter | ||
+ | * harfbuzz | ||
+ | * freetype | ||
+ | * fontconfig | ||
+ | * dejavu-fonts-ttf | ||
+ | * font-misc-misc | ||
+ | * libsecret | ||
+ | * libnotify | ||
+ | * glibmm | ||
+ | * | ||
+ | * xterm | ||
+ | * twm | ||
+ | |||
+ | ==== FreeSlack Template ==== | ||
+ | [[:tech:lxc:freeslacktemplate|Full text here ...]] | ||
+ | === Full Package Set === | ||
+ | * flex | ||
+ | * procmail | ||
+ | * db48 | ||
+ | * sendmail-cf | ||
+ | * sendmail | ||
+ | * mailx | ||
+ | * libffi | ||
+ | * cyrus-sasl | ||
+ | * less | ||
+ | * libunistring | ||
+ | * amanda | ||
+ | * xz | ||
+ | * which | ||
+ | * wget | ||
+ | * vim | ||
+ | * util-linux | ||
+ | * tar | ||
+ | * sysvinit-scripts | ||
+ | * sysvinit-functions | ||
+ | * sysvinit | ||
+ | * sysklogd | ||
+ | * sudo | ||
+ | * slackpkg | ||
+ | * sharutils | ||
+ | * shadow | ||
+ | * sed | ||
+ | * rsync | ||
+ | * python | ||
+ | * procps-ng | ||
+ | * pkgtools | ||
+ | * perl | ||
+ | * openssl-solibs | ||
+ | * openssh | ||
+ | * network-scripts | ||
+ | * net-tools | ||
+ | * ncurses | ||
+ | * mpfr | ||
+ | * logrotate | ||
+ | * iputils | ||
+ | * gzip | ||
+ | * grep | ||
+ | * gnupg | ||
+ | * glibc-solibs | ||
+ | * gawk | ||
+ | * findutils | ||
+ | * eudev | ||
+ | * etc | ||
+ | * e2fsprogs | ||
+ | * diffutils | ||
+ | * dialog | ||
+ | * dhcpcd | ||
+ | * dcron | ||
+ | * coreutils | ||
+ | * bzip2 | ||
+ | * bin | ||
+ | * bash | ||
+ | * aaa_terminfo | ||
+ | * aaa_elflibs | ||
+ | * aaa_base | ||
+ | |||
+ | ====== CentOS/RHEL Specifics ====== | ||
+ | To see available templates: ''ls -alh /usr/share/lxc/templates/'' \\ | ||
+ | See [[https://wiki.centos.org/HowTos/LXC-on-CentOS6|official CentOS topic]] for further detail \\ | ||