mirror of
https://github.com/TrentSPalmer/trentdocs_website.git
synced 2024-11-23 08:01:30 -08:00
minor correction docs/debian_nspawn_container_on_arch_for_testing_apache_configurations.md
This commit is contained in:
parent
f9caa6f25c
commit
90ac906169
@ -57,6 +57,7 @@ without dbus. In this case use the following sequence of commands.
|
||||
# start the container and login as root
|
||||
systemd-nspawn -b -D <container name> --network-bridge=br0
|
||||
# bring up networking so you can install dbus
|
||||
systemctl enable/start systemd-networkd
|
||||
# this is also a good time to install and configure locale
|
||||
apt install dbus locales
|
||||
# to configure locale
|
||||
@ -88,7 +89,7 @@ tasksel install web-server
|
||||
# enable mod ssl
|
||||
a2enmod ssl ; systemctl restart apache2
|
||||
# enable the default ssl test page
|
||||
a2ensite /etc/apache2/sites-available/default-ssl.conf
|
||||
a2ensite default-ssl.conf ; systemctl reload apache2
|
||||
```
|
||||
|
||||
You'll be up and running with the default self-signed certs.
|
||||
|
@ -172,6 +172,7 @@ without dbus. In this case use the following sequence of commands.</p>
|
||||
<pre><code class="bash"># start the container and login as root
|
||||
systemd-nspawn -b -D <container name> --network-bridge=br0
|
||||
# bring up networking so you can install dbus
|
||||
systemctl enable/start systemd-networkd
|
||||
# this is also a good time to install and configure locale
|
||||
apt install dbus locales
|
||||
# to configure locale
|
||||
@ -198,7 +199,7 @@ tasksel install web-server
|
||||
# enable mod ssl
|
||||
a2enmod ssl ; systemctl restart apache2
|
||||
# enable the default ssl test page
|
||||
a2ensite /etc/apache2/sites-available/default-ssl.conf
|
||||
a2ensite default-ssl.conf ; systemctl reload apache2
|
||||
</code></pre>
|
||||
|
||||
<p>You'll be up and running with the default self-signed certs.</p>
|
||||
|
@ -192,5 +192,5 @@
|
||||
|
||||
<!--
|
||||
MkDocs version : 0.16.3
|
||||
Build Date UTC : 2017-07-04 21:53:11
|
||||
Build Date UTC : 2017-07-10 03:43:48
|
||||
-->
|
||||
|
@ -182,12 +182,12 @@
|
||||
},
|
||||
{
|
||||
"location": "/debian_nspawn_container_on_arch_for_testing_apache_configurations/",
|
||||
"text": "Debian Nspawn Container On Arch For Testing Apache Configurations\n\n\nBegin by exporting the environmental variable for your squid cacheing \nproxy. If you're deboostrapping Debian file systems, the best way to\nspeed this up is with squid.\n\n\nThe ArchWiki page for nspawn containers has a\n\nDebian/Ubuntu subsection\n\nObviously you're going to want to install debootstrap and debian-archive-keyring.\n\n\n# to create a Stretch Container\ncd /var/lib/machines \nmkdir <container name> \ndeboostrap stretch <container name>\n\n\n\n\nAfter some experimentation, perhaps this is the best time to write\nthe intended hostname into the container, and write any\napt-cacher or apt-cacher-ng proxies into /etc/apt/apt.conf \non the container.\n\n\ncp apt.conf /etc/apt/apt.conf \necho \"<hostname>\" > /var/lib/machines/<container name>/etc/hostname\n\n\n\n\nAnd then start the container, and set the root password.\n\n\n# boot in interactive mode\nsystemd-nspawn -D <container name>\n# set the passwd and logout\npassword \nlogout \n\n\n\n\nNow we can boot the container in non-interactive mode, either\nfrom the command line or using nspawn files. In either case \ndouble check that the your bind mounts have the correct permissions \nfrom inside the container.\n\n\n# for instance attached to a bridge interface br0 \nsystemd-nspawn -b -D <container name> --network-bridge=br0\n# or if you've set up a package cache \nsystemd-nspawn -b -D <container name> --network-bridge=br0 --bind=/var/cache/apt/archives\n\n\n\n\nAlternately, if you use an nspawn file, then you can use a command \nsimilar to the following to start it, you'll first need to \nboot the container from the command line and install dbus,\nbecause \nmachinectl shell\n and \nmachinectl login\n won't work \nwithout dbus. In this case use the following sequence of commands.\n\n\n# start the container and login as root\nsystemd-nspawn -b -D <container name> --network-bridge=br0 \n# bring up networking so you can install dbus\n# this is also a good time to install and configure locale\napt install dbus locales \n# to configure locale \ndpkg-reconfigure locales \npoweroff\n\n\n\n\nAfter this you can start the container with systemd, when \nusing an nspawn file.\n\n\nsystemctl start systemd-nspawn@<container name>\n\n\n\n\n# /etc/systemd/nspawn/<container name>.spawn \n[Files] \n# Bind=/var/cache/apt/archives \n\n[Network] \nbridge=br0 \n\n\n\n\nYou can use tasksel to install a web-server.\n\n\n# apache2 will immediately be listening on port 80\ntasksel install web-server\n# enable mod ssl\na2enmod ssl ; systemctl restart apache2\n# enable the default ssl test page \na2ensite /etc/apache2/sites-available/default-ssl.conf\n\n\n\n\nYou'll be up and running with the default self-signed certs.",
|
||||
"text": "Debian Nspawn Container On Arch For Testing Apache Configurations\n\n\nBegin by exporting the environmental variable for your squid cacheing \nproxy. If you're deboostrapping Debian file systems, the best way to\nspeed this up is with squid.\n\n\nThe ArchWiki page for nspawn containers has a\n\nDebian/Ubuntu subsection\n\nObviously you're going to want to install debootstrap and debian-archive-keyring.\n\n\n# to create a Stretch Container\ncd /var/lib/machines \nmkdir <container name> \ndeboostrap stretch <container name>\n\n\n\n\nAfter some experimentation, perhaps this is the best time to write\nthe intended hostname into the container, and write any\napt-cacher or apt-cacher-ng proxies into /etc/apt/apt.conf \non the container.\n\n\ncp apt.conf /etc/apt/apt.conf \necho \"<hostname>\" > /var/lib/machines/<container name>/etc/hostname\n\n\n\n\nAnd then start the container, and set the root password.\n\n\n# boot in interactive mode\nsystemd-nspawn -D <container name>\n# set the passwd and logout\npassword \nlogout \n\n\n\n\nNow we can boot the container in non-interactive mode, either\nfrom the command line or using nspawn files. In either case \ndouble check that the your bind mounts have the correct permissions \nfrom inside the container.\n\n\n# for instance attached to a bridge interface br0 \nsystemd-nspawn -b -D <container name> --network-bridge=br0\n# or if you've set up a package cache \nsystemd-nspawn -b -D <container name> --network-bridge=br0 --bind=/var/cache/apt/archives\n\n\n\n\nAlternately, if you use an nspawn file, then you can use a command \nsimilar to the following to start it, you'll first need to \nboot the container from the command line and install dbus,\nbecause \nmachinectl shell\n and \nmachinectl login\n won't work \nwithout dbus. In this case use the following sequence of commands.\n\n\n# start the container and login as root\nsystemd-nspawn -b -D <container name> --network-bridge=br0 \n# bring up networking so you can install dbus\nsystemctl enable/start systemd-networkd\n# this is also a good time to install and configure locale\napt install dbus locales \n# to configure locale \ndpkg-reconfigure locales \npoweroff\n\n\n\n\nAfter this you can start the container with systemd, when \nusing an nspawn file.\n\n\nsystemctl start systemd-nspawn@<container name>\n\n\n\n\n# /etc/systemd/nspawn/<container name>.spawn \n[Files] \n# Bind=/var/cache/apt/archives \n\n[Network] \nbridge=br0 \n\n\n\n\nYou can use tasksel to install a web-server.\n\n\n# apache2 will immediately be listening on port 80\ntasksel install web-server\n# enable mod ssl\na2enmod ssl ; systemctl restart apache2\n# enable the default ssl test page \na2ensite default-ssl.conf ; systemctl reload apache2\n\n\n\n\nYou'll be up and running with the default self-signed certs.",
|
||||
"title": "Debian Nspawn Container On Arch For Testing Apache Configurations"
|
||||
},
|
||||
{
|
||||
"location": "/debian_nspawn_container_on_arch_for_testing_apache_configurations/#debian-nspawn-container-on-arch-for-testing-apache-configurations",
|
||||
"text": "Begin by exporting the environmental variable for your squid cacheing \nproxy. If you're deboostrapping Debian file systems, the best way to\nspeed this up is with squid. The ArchWiki page for nspawn containers has a Debian/Ubuntu subsection \nObviously you're going to want to install debootstrap and debian-archive-keyring. # to create a Stretch Container\ncd /var/lib/machines \nmkdir <container name> \ndeboostrap stretch <container name> After some experimentation, perhaps this is the best time to write\nthe intended hostname into the container, and write any\napt-cacher or apt-cacher-ng proxies into /etc/apt/apt.conf \non the container. cp apt.conf /etc/apt/apt.conf \necho \"<hostname>\" > /var/lib/machines/<container name>/etc/hostname And then start the container, and set the root password. # boot in interactive mode\nsystemd-nspawn -D <container name>\n# set the passwd and logout\npassword \nlogout Now we can boot the container in non-interactive mode, either\nfrom the command line or using nspawn files. In either case \ndouble check that the your bind mounts have the correct permissions \nfrom inside the container. # for instance attached to a bridge interface br0 \nsystemd-nspawn -b -D <container name> --network-bridge=br0\n# or if you've set up a package cache \nsystemd-nspawn -b -D <container name> --network-bridge=br0 --bind=/var/cache/apt/archives Alternately, if you use an nspawn file, then you can use a command \nsimilar to the following to start it, you'll first need to \nboot the container from the command line and install dbus,\nbecause machinectl shell and machinectl login won't work \nwithout dbus. In this case use the following sequence of commands. # start the container and login as root\nsystemd-nspawn -b -D <container name> --network-bridge=br0 \n# bring up networking so you can install dbus\n# this is also a good time to install and configure locale\napt install dbus locales \n# to configure locale \ndpkg-reconfigure locales \npoweroff After this you can start the container with systemd, when \nusing an nspawn file. systemctl start systemd-nspawn@<container name> # /etc/systemd/nspawn/<container name>.spawn \n[Files] \n# Bind=/var/cache/apt/archives \n\n[Network] \nbridge=br0 You can use tasksel to install a web-server. # apache2 will immediately be listening on port 80\ntasksel install web-server\n# enable mod ssl\na2enmod ssl ; systemctl restart apache2\n# enable the default ssl test page \na2ensite /etc/apache2/sites-available/default-ssl.conf You'll be up and running with the default self-signed certs.",
|
||||
"text": "Begin by exporting the environmental variable for your squid cacheing \nproxy. If you're deboostrapping Debian file systems, the best way to\nspeed this up is with squid. The ArchWiki page for nspawn containers has a Debian/Ubuntu subsection \nObviously you're going to want to install debootstrap and debian-archive-keyring. # to create a Stretch Container\ncd /var/lib/machines \nmkdir <container name> \ndeboostrap stretch <container name> After some experimentation, perhaps this is the best time to write\nthe intended hostname into the container, and write any\napt-cacher or apt-cacher-ng proxies into /etc/apt/apt.conf \non the container. cp apt.conf /etc/apt/apt.conf \necho \"<hostname>\" > /var/lib/machines/<container name>/etc/hostname And then start the container, and set the root password. # boot in interactive mode\nsystemd-nspawn -D <container name>\n# set the passwd and logout\npassword \nlogout Now we can boot the container in non-interactive mode, either\nfrom the command line or using nspawn files. In either case \ndouble check that the your bind mounts have the correct permissions \nfrom inside the container. # for instance attached to a bridge interface br0 \nsystemd-nspawn -b -D <container name> --network-bridge=br0\n# or if you've set up a package cache \nsystemd-nspawn -b -D <container name> --network-bridge=br0 --bind=/var/cache/apt/archives Alternately, if you use an nspawn file, then you can use a command \nsimilar to the following to start it, you'll first need to \nboot the container from the command line and install dbus,\nbecause machinectl shell and machinectl login won't work \nwithout dbus. In this case use the following sequence of commands. # start the container and login as root\nsystemd-nspawn -b -D <container name> --network-bridge=br0 \n# bring up networking so you can install dbus\nsystemctl enable/start systemd-networkd\n# this is also a good time to install and configure locale\napt install dbus locales \n# to configure locale \ndpkg-reconfigure locales \npoweroff After this you can start the container with systemd, when \nusing an nspawn file. systemctl start systemd-nspawn@<container name> # /etc/systemd/nspawn/<container name>.spawn \n[Files] \n# Bind=/var/cache/apt/archives \n\n[Network] \nbridge=br0 You can use tasksel to install a web-server. # apache2 will immediately be listening on port 80\ntasksel install web-server\n# enable mod ssl\na2enmod ssl ; systemctl restart apache2\n# enable the default ssl test page \na2ensite default-ssl.conf ; systemctl reload apache2 You'll be up and running with the default self-signed certs.",
|
||||
"title": "Debian Nspawn Container On Arch For Testing Apache Configurations"
|
||||
},
|
||||
{
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<url>
|
||||
<loc>/</loc>
|
||||
<lastmod>2017-07-04</lastmod>
|
||||
<lastmod>2017-07-09</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
<url>
|
||||
<loc>/serve_and_share_apps_from_your_phone_with_fdroid/</loc>
|
||||
<lastmod>2017-07-04</lastmod>
|
||||
<lastmod>2017-07-09</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
<url>
|
||||
<loc>/nspawn/</loc>
|
||||
<lastmod>2017-07-04</lastmod>
|
||||
<lastmod>2017-07-09</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
|
||||
<url>
|
||||
<loc>/debian_nspawn_container_on_arch_for_testing_apache_configurations/</loc>
|
||||
<lastmod>2017-07-04</lastmod>
|
||||
<lastmod>2017-07-09</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
|
||||
<url>
|
||||
<loc>/dynamic_cacheing_nginx_reverse_proxy_for_pacman/</loc>
|
||||
<lastmod>2017-07-04</lastmod>
|
||||
<lastmod>2017-07-09</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
|
||||
<url>
|
||||
<loc>/arch_redis_nspawn/</loc>
|
||||
<lastmod>2017-07-04</lastmod>
|
||||
<lastmod>2017-07-09</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
@ -52,7 +52,7 @@
|
||||
|
||||
<url>
|
||||
<loc>/arch_postgresql_nspawn/</loc>
|
||||
<lastmod>2017-07-04</lastmod>
|
||||
<lastmod>2017-07-09</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
@ -60,7 +60,7 @@
|
||||
|
||||
<url>
|
||||
<loc>/self_signed_certs/</loc>
|
||||
<lastmod>2017-07-04</lastmod>
|
||||
<lastmod>2017-07-09</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user