nyuuzyou/wikis huggingface dataset:
Howto-lxc-simple

Linux Containers (LXC) provides containers similar BSD Jails, Linux VServer and Solaris Zones. It gives the impression of virtualization, but shares the kernel and resources with the "host".
NOTE: Simple (howto) is meant for using LXC for quick installation of applications using HOSTs networking/ip (container config has, lxc.network.type = none ) and usage of application for development work. Most application have internal settings for PORTs which will be used where multiple versions of that application is needed to install.For production or live environment using bridge (br0) with full networking for container would be ideal, alternate use docker (both requires some experience with container technologies).
Target audience: Developers, Newbies
Tested on: AlpineLinux v3.3x(host+guest)
== Installation (base) ==
Install the required packages:
Create a simple configuration template for the guests, /etc/lxc/simple.conf:
lxc.network.type = none
== Create a guest ==
=== Using Alpine Template ===
This will create a /var/lib/lxc/dev1 directory with a config file and a rootfs directory.
If running on x86_64 architecture, it is possible to create a 32bit guest:
== Starting/Stopping the guest ==
Create a symlink to the /etc/init.d/lxc script for your guest.
You can start your guest with:
Stop it with:
Make it autostart on boot up with:
You can also add to the container config: lxc.start.auto = 1
& 
to autostart containers by the lxc service only.
== Connecting to the guest ==
By default sshd is not installed, so you will have to connect to a virtual console. This is done with:
To disconnect from it, press + 
== Deleting a guest ==
Make sure the guest is stopped before removal:
This will erase everything, without asking any questions. It is equivalent to: 
== Installing applications in simple LXC containers ==
1. Installing LAMP (simple) 
== Advanced ==
see setting bridge (device: br0) with LXC full networking
Category:Security
Category:Virtualization
Hyper-V guest services

== How to install Hyper-V guest services == 
Hyper-V tools is nicely packaged, so the install is simple, as follows:
Then enable the services
Then to ensure these services start on boot
== Hyper-V Settings ==
* When creating the VHDX, use 1MB BlockSizeBytes (from the default 32MB) See Microsoft's official docs on running Hyper-V with Linux Guest VMs . this will reduce host filesystem usage by 75-90%
* If Xorg refuses to start, blacklist the hyperv_drm module by adding it to the /etc/modprobe.d/blacklist.conf file.
category:Virtualization
Hyprland

This wiki page is about Hyprland, a wayland based tiling compositor with all the eyecandy, powerful plugins and much more. 
Refer to hyprland Tutorial to get started on using Hyprland.
The <Code>setup-wayland-base</Code> script installs and enables elogind as seat manager, enables community repository and enables eudev automatically as these are required for Wayland to work.
== Installation ==
Install the package using the command: 
== Troubleshooting ==
=== Black/Magenta checkerboard background: Hyprland failed to load 1 essential asset ===
As of Hyprland 0.45.0, upstream shows a scary message (and an ugly graphic) if you don't have their wallpapers installed.
The ugly graphic goes away when you've launched a wallpaper utility, but the scary message remains.
The canonical way to solve this is to install package using the command:
Or you can just have some file at or and modify your config file to have a line as follows:
=== Hyprland crashes almost immediately ===
Hyprland 0.46 has a bug where the default configuration will crash if Xwayland is not installed. You can either install , or disable in your config:
This should be fixed in the next update.
=== warning message about hyprland-qtutils ===
Hyprland 0.46 and newer suggest you install hyprland-qtutils, which is currently not available in alpine.
Your system does not have hyprland-qtutils installed. This is a runtime dependency for some dialogs. Consider installing it.
You can disable the check in your config like so:
== See Also ==
 
* Official Hyprland wiki
Category:Desktop 
Category:Window Managers
Category:Wayland
Category:compositor
I3wm

i3 is a tiling window manager, primarily targeted at advanced users and developers.
== Installation ==
Install X11 and set it up using the setup-xorg-base script.
Install i3, i3 status bar and terminal packages , , .
=== Install drivers ===
Ensure you have the required drivers.
=== Install fonts ===
Install fonts. If you start i3 without fonts it will be unusable.
=== Install dbus ===
Install dbus and set it up.
== starting i3 ==
Now you can start i3 manually: 
== See also ==
* Legacy Xorg drivers
* i3 user guide
* startup i3 automatically
category: Desktop
category: Window Managers
IGMPproxy

Internet Protocol television (IPTV) is a system through which Internet television services are delivered using the architecture and networking methods of the Internet Protocol Suite over a packet-switched network infrastructure, e.g., the Internet and broadband Internet access networks, instead of being delivered through traditional radio frequency broadcast, satellite signal, and cable television (CATV) formats.
==Installing tools==
Install igmpproxy
 apk add igmpproxy
Install iptables (optional, see troubleshooting)
 apk add iptables
==Setup igmpproxy==
Open /etc/igmpproxy.conf in your favorite editor
 nano /etc/igmpproxy.conf
Set upstream interface to your WAN interface. In my case eth0
 phyint eth0 upstream ratelimit 0 threshold 1
If you know your ISPs multicast sources you should add them here. If not don't worry we'll come back here later.
 altnet 88.222.0.0/16
 altnet 10.0.0.0/8
Set downstream interface to your LAN interface. In my case eth1
 phyint eth1 downstream ratelimit 0 threshold 1
Disable other unused interfaces
 phyint lo disabled
If you haven't added multicast sources yet your igmpproxy.conf should look like this
 quickleave
 phyint eth0 upstream ratelimit 0 threshold 1
 phyint eth1 downstream ratelimit 0 threshold 1
 phyint lo disabled
Launch igmpproxy in debug mode
 igmpproxy -d -v /etc/igmpproxy.conf
You should see output similar to this
 RECV Membership query from 10.253.88.1 to 224.0.0.1
 RECV Membership query from 10.254.88.1 to 224.0.0.1
 RECV V2 member report from 88.222.27.35 to 239.255.255.250
Now we know that ISPs multicast sources are 10.x.x.x (10.0.0.0/8) and 88.222.x.x(88.222.0.0/16). We need to specify them in /etc/igmpproxy.conf right after upstream interface declaration like this
 phyint eth0 upstream ratelimit 0 threshold 1
 altnet 88.222.0.0/16
 altnet 10.0.0.0/8
Your complete igmpproxy.conf should look like this
 quickleave
 phyint eth0 upstream ratelimit 0 threshold 1
 altnet 88.222.0.0/16
 altnet 10.0.0.0/8
 phyint eth1 downstream ratelimit 0 threshold 1
 phyint lo disabled
Launch igmpproxy and enjoy IPTV :)
 igmpproxy /etc/igmpproxy.conf
==Troubleshooting==
* Make sure your local subnet is not same as your ISP's multicast source. 192.168.0.0/24 is probably safe bet.
* You might need to add forwarding rules to iptables
 iptables -I FORWARD -s 88.222.0.0/16 -d 224.0.0.0/4 -j ACCEPT
 iptables -I FORWARD -s 10.0.0.0/8 -d 224.0.0.0/4 -j ACCEPT
 iptables -I INPUT -d 224.0.0.0/4 -j ACCEPT
* If you're using shorewall modify /etc/shorewall/shorewall.conf
 MULTICAST=Yes
Add following rules to /etc/shorewall/rules
 ACCEPT		all		fw:224.0.0.0/4
 ACCEPT		all		net:224.0.0.0/4
 ACCEPT		all		loc:224.0.0.0/4
Category:Multimedia
IP Accounting

This document will show how to configure pmacct for IP accounting. Pmacct will be configured as NetFlow and sFlow collector using PostgreSQL as DB backend.
The following software have been used at the time of writing of this document:
 * pmacct-0.12.4-r3
 * postgresql 8.4
== Install and Configure pmacct ==
 apk add pmacct pmacct-doc
On postgreSQL server launch the following scripts found in /usr/share/doc/pmacct/sql (make sure to change the default password for user "pmacct" in pmacct-create-db.pgsql):
 postgres$ psql -d template1 -f pmacct-create-db.pgsql
 postgres$ psql -d pmacct -f pmacct-create-table_v1.pgsql
=== NetFlow Collector Daemon ===
Edit /etc/nfmacctd.conf, changing "<HOSTNAME>" and "<PASSWORD>" to correct values:
 daemonize: true
 pidfile: /var/run/nfacctd.pid
 syslog: daemon
 
 sql_host: <HOSTNAME>
 sql_passwd: <PASSWORD>
 sql_table_version: 1
 
 plugins: pgsql
 
 sql_optimize_clauses: true
 sql_history: 1m
 sql_history_roundoff: m
 sql_dont_try_update: true
 
 aggregate: src_host,dst_host,src_port,dst_port,proto
 
 nfacctd_sql_log: true
For explanation of the keywords above and full list of options supported by pmacct see here.
Category:Networking
Category:Monitoring
Category:SQL
ISCSI Raid and Clustered File Systems

This document describes how to created a raided file system that is exported to multiple host via ISCSI.
== Raid Configuration ==
Very Similar to Setting up a software RAID array.
 apk install mdadm
 mdadm --create --level=5 --raid-devices=3 /dev/md0 /dev/hda /dev/hdb /dev/hdc
To see the status of the creation of these devices
 cat /proc/mdstat
You Don't have to wait to continue to use the disk.
== iSCSI Target Config ==
SCST is recommended over IET, due to bugfixes, performance and RFC compliance.
== Initiator Config ==
 iscsiadm --mode node --targetname NAME_OF_TARGET --portal IP_OF_TARGET --login
This should then give you a device /dev/sda. Check by dmesg.
 fdisk /dev/sda
Create a partition to use. sda1 file system type 83
Add ocfs2 tools (available in Alpine 2.3 or greater)
 apk add ocfs2-tools
It can take care of starting and stopping services, copying the cluster.conf between nodes,creating the filesystem, and mounting it. 
Need to create a /etc/ocfs2/cluster.conf. 
This configuration file should be the same on all the nodes in the cluster. Should look similar to the following...
node:
 ip_port = 7777
 ip_address = 192.168.1.202
 number = 0
 name = bubba
 cluster = ocfs2
node:
 ip_port = 7777
 ip_address = 192.168.1.102
 number = 1
 name = bobo
 cluster = ocfs2
cluster:
 node_count = 2
 name = ocfs2
Load modules:
 echo ocfs2 >> /etc/modules-load.d/ocfs2.conf
 echo dlm >> /etc/modules-load.d/dlm.conf
 modprobe ocfs2
 modprobe dlm
Mount ocfs2 metafilesystems
 echo none /sys/kernel/config configfs defaults 0 0 >> /etc/fstab
 echo none /sys/kernel/dlm ocfs2_dlmfs defaults 0 0 >> /etc/fstab
Start ocfs2 cluster
 rc-service o2cb start
Run the following command only on one node. 
 mkfs.ocfs2 -L LABELNAME /dev/sda1
Run the following command on both nodes.
 rc-service o2cb enable
 mount /dev/sda1 /media/iscsi1
Now you can create read/write/change on both machines to the one drive at the same time.
Category:Storage
Include:Abuild-configure

Abuild needs to be configured for both the system and user. 
Edit the file as per requirements. Most of the defaults can be left alone, unless you are developing for a custom platform, in which case the comments in the file should guide you. The one field to edit is PACKAGER, so that you can get credit (or blame) for packages you create.
In order to use abuild command The user executing abuild must be a member of the abuild group:
Include:Abuild-keygen

For abuild a public/private rsa key pair is needed. The abuild-keygen command from package generates and configures the security keys.
abuild-keygen options
* -a Set PACKAGER_PRIVKEY=<generated key> in abuild.conf
* -i Install public key into /etc/apk/keys using sudo
* -h Show this help
* -n Non-interactive. Use defaults
* -q Quiet mode
Include:AbuildRootBld

Install package abuild-rootbld:
You may now build your packages from source in an unprivileged sandbox based on bubblewrap with the command: 
rootbld assumes your APKBUILD file is in the whose structure like aports or you need to set environment variable APORTSDIR to current directory. 
If the build process needs network access there has to bet set the net option in APKBUILD.
Note that using rootbld inside a docker container requires additional configuration.
Category: Package Manager
Include:Architecture support matrix

Alpine Linux Hardware Support Matrix	Alpine Linux Hardware Support Matrix	Alpine Linux Hardware Support Matrix 	Alpine Linux Hardware Support Matrix
Architecture 	Port 	Description 	Since
x86 	x86 	32 bit i686 compatible (or later) CPUs with at least CMOV and SSE2 	All
x86 	x86_64 	AMD64 compatible 64-bit x86 instruction set 	All
ARM 	armhf 	32 bit ARM with hard-float ABI - for ARMv6 devices- Raspberry Pi 1, Zero, ZeroW, cm1 (defconfig bcmrpi) 	v3.0
ARM 	armv7 	32 bit ARM - for ARMv7 devices - Raspberry Pi 2, 3, 3+, Zero2W, cm3, cm3+ (defconfig bcm2709) 	v3.9
ARM 	aarch64 	64 bit ARM - for ARMv8+ devices - Raspberry Pi 3, 3+, 4, 400, Zero2W, cm3, cm3+, cm4, 5 (defconfig bcm2711)	v3.5
PowerPC 	ppc64le 	64 bit PowerPC (little-endian) mostly for POWER8 and POWER9 	v3.6
IBM System Z 	s390x 	IBM Z mainframes, especially IBM Z and IBM LinuxONE (z196 minimum) 	v3.6
RISC V 	riscv64 	64 bit RISC V 	v3.20
LoongArch 	loongarch64 	64 bit LoongArch 	v3.21
Include:Buildrepo

buildrepo creates a local package repository for you.
buildrepo options
* -a Set the aports base dir to APORTSDIR instead of $HOME/aports
* -d Set destination repository base dir to REPODIR instead of $HOME/packages
* -h Show this help and exit
* -l Send build to logfile, prefixed by LOGPREFIX
* -p Purge obsolete packages from REPODIR after build
* -r Dependencies are found in DEPREPO
Category:Package Manager Category:Development
Include:Git Basics

=== Stashing ===
 if you want to "hide" your changes. Do this if you think there may be other commits against the same things you are working on and want to refresh your local checkout (using a git pull --rebase) from the master. Use git stash apply to get your stash back. 
=== Reset your local repository ===
 if you think your tree is pretty hopeless, need a kill-and-fill to bring the master into your local repository. You will lose local changes.
=== List the local branch ===
You can now list your local branch by doing
which should ouput
 * master
=== List your local non committed changes ===
 
=== Commit ===
Now you can start to work on your tree. As soon as you feel you have reached a step in development where you can commit your work locally, use
 
or
 
or
 
If you wish to give credit to someone else's work (e.g. you are applying a third party patch):
 
The format of the commit message should be:
 One-line description that's less than 72 chars long
 <second line empty>
 Optional longer description with explanation why changes were made. Links to relevant issues
 in Bugtracker can be done with:
 
 ref #<issuenumber>
 
 It is also possible to resolve issues with:
 
 fixes #<issuenumber>
Think of first line as the subject in an email and the third line and on as the body of the email, describing what the commit does. You don't need the long description but the first line, the short description should be there as it will be showed in the commit log.
=== List your commits ===
To view the list your commits: 
To Check what you are going to push from local to remote: 
=== Keeping your local working branch in sync ===
Pull the changes from upstream (git.alpinelinux.org)
=== Git Tag ===
Create an annotated tag and push it.
=== Git push ===
To push your changes up to the master. 
=== Create a new project ===
Create your own directory that you want to become your new acf-mystuff project.
Create your files and add/commit them to your git-project
=== Rebasing against upstream master ===
It's best to always stay up-to-date with the state of the upstream Alpine Linux repository to ensure that no merge conflicts happen later on. To do that you first have to add a new git remote which points to the upstream repository (instead of your fork): 
Now you can fetch all changes with:
And then you can rebase with:
Category:Development
Category:Git
Include:Installing Alpine see also

Alpine Linux has some special applications that helps you to use it in the way you want.<BR>
Some of the first scripts you are suggested to use is:
* setup-alpine (Configures all basic things on your Alpine Linux)
* setup-acf (was named setup-webconf before Alpine 1.9 beta 4) (Configures ACF (webconfiguration) so you can manage your box through https)
=== Other useful pages ===
* Configure Networking
* Setting up a SSH server (Using ssh is a good way to administer your box remotely)
* Package Management (apk) (How to add/remove packages on your Alpine)
* Init System (rc) (Configure a service to automatically boot at next reboot)
* Alpine local backup (lbu) (Permanently store your modifications in case your box needs reboot)
category:Installation
Include:Newapkbuild

The newapkbuild tool, which is installed as part of the package, can create a new APKBUILD template to start with. It will create a directory with the given package name, place an example/template APKBUILD file to the given directory, and fill some variables if those are provided. Please check the package policies page about naming details. 
newapkbuild options
* -n Set package name to NAME
* -d Set package description (pkgdesc) to DESC
* -l Set package license to LICENSE
* -u Set package URL
* -a Create autotools package (use ./configure ...)
* -C Create CMake package (Assume cmake/ is there)
* -m Create meson package (Assume meson.build is there)
* -p Create perl package (Assume Makefile.PL is there)
* -y Create python package (Assume setup.py is there)
* -s Use sourceforge source URL
* -c Copy a sample init.d, conf.d, and install script to new directory
* -f Force even if directory already exist
* -h Show this help
The manual page (available via man newapkbuild) describes all options for newapkbuild.
Include:Parted

The parted partition editor is needed for advanced partitioning and GPT disklabels. The default fdisk from BusyBox is a very stripped-down version with minimal functionality.
To install Issue the command: 
== Creating the Partition Layout ==
Depending on your motherboard, bios features and configuration we can either use partition table in MBR (legacy BIOS) or GUID Partition Table (GPT).
We'll describe both with example layouts.
=== BIOS/MBR with DOS disklabel ===
=== UEFI with GPT disklabel ===
Include:Parted BIOS with MBR mode with DOS disklabel

We'll be partitioning the storage device using parted utility to have a /boot partition for use with the Syslinux bootloader. Syslinux is meant for use with legacy BIOS and an MSDOS MBR partition table. The root partition in this example takes up the entire remaining space. This can be changed suitably. 
Syslinux does support GPT partition tables but GRUB2 is the better option for UEFI (UEFI is possible only with GPT).
+---------------------------+------------------------+-----------------------+
| Partition name | Partition purpose | Filesystem type |
+---------------------------+------------------------+-----------------------+
| /dev/sda1 | Boot partition | ext4 |
| /dev/sda2 | Root partition | ext4 |
+---------------------------+------------------------+-----------------------+
To create a Boot partition of approximately 100MB to boot from, 
# parted -a optimal
(parted) mklabel msdos
(parted) mkpart primary ext4 0% 100M
(parted) set 1 boot on
(parted) mkpart primary ext4 100M 100%
To view your partition table, type print while still in parted. Your results should look something like this:
(parted) print
Model: ATA TOSHIBA ******** (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
 1 1049kB 99.6MB 98.6MB primary ext4 boot
 2 99.6MB 1000GB 1000GB primary ext4
Include:Parted UEFI with GPT disklabel

We'll be partitioning the storage device using parted utility. The EFI system partition mounted at /boot/efi will remain unencrypted and the remaining disk can be encrypted. This means GRUB2 will decrypt the LUKS volume and load the kernel from there, preventing someone with physical access to your computer from maliciously installing a rootkit (or bootkit) in your boot partition while your computer is not unlocked. The partitioning scheme will look like this:
+---------------------------+------------------------+-----------------------+
| Partition name | Partition purpose | Filesystem type |
+---------------------------+------------------------+-----------------------+
| /dev/sda1 | EFI system partition | fat32 |
| /dev/sda2 | LUKS container | LUKS |
| |-> /dev/mapper/lvmcrypt | LVM container | LVM |
| |-> /dev/vg01/root | Root partition | ext4 |
| |-> /dev/vg01/boot | Boot partition | ext4 |
| |-> /dev/vg01/swap | Swap partition | swap |
+---------------------------+------------------------+-----------------------+
Create an EFI system partition of approximately 200MB, then assign the rest of the space to your LUKS partition.
# parted -a optimal
(parted) mklabel gpt
(parted) mkpart primary fat32 0% 200M
(parted) name 1 esp
(parted) set 1 esp on
(parted) mkpart primary ext4 200M 100%
(parted) name 2 crypto-luks
(parted) print
Model: ATA TOSHIBA ******** (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
 1 1049kB 99.6MB 98.6MB primary ext4 boot
 2 99.6MB 1000GB 1000GB primary ext4
Include:Setup-desktop

Setup-desktop script automatically enables the community repository.
== Installation using setup-desktop ==
The Alpine Linux script for setting up a desktop quickly is setup-desktop. 
On running the above command, you will be prompted to select a desktop environment.
Once you have chosen a desktop environment, this script installs the chosen desktop along with necessary packages, browser and adds the necessary services to run on startup. You can reboot when complete and the system will boot into a graphical login screen with the desktop environment. Depending on the desktop chosen, the script also activates the necessary services like dbus, elogind, login manager etc.. 
To view all the packages that are installed by the script for the chosen desktop you can issue the below command:
Include:Setup your system and account for building packages

The is a metapackage that pulls in the most essential packages used to build new packages. Also install and configure a way to elevate privileges, such as sudo or doas, and an editor, such as vi, nano, micro.
This would be a good time to create a normal user account for you to work in. To make life easier later, it's a good idea to add this user to the wheel group; operations that require superuser privileges can now be done with sudo or doas.
The aports tree is in git so before we clone it, let's configure git.
Refer Development using git to grasp basics of Git operations.
== Configure abuild ==
Include:UpgradeTo2

== Important notes when upgrading from v1.10 ==
* The v2.0 series introduces an ABI-incompatible version of uClibc with NPTL threading support. This means that you cannot mix packages from older releases with v2.0. To upgrade you will need to make sure that you only have v2.0 repositories in your /etc/apk/repositories list and then do: 
* You must remove GNU wget before doing the upgrade and only use busybox wget.
* All .so links moved to -dev package. It might be an idea to remove alpine-sdk and all *-dev packages before doing the upgrade. If you get problems due to a -dev package want overwrite a .so file owned by other package then you might want use the --force option.
Category:Package Manager
Include:Upgrading Alpine environmentvars

=== Setup environment variables ===
To make the documentation a bit more "generic" we start by setting some environment variables.
Make sure that the variable LBU_MEDIA is not commented (by removing the leading '#').
You also need to set a appropriate value for your LBU_MEDIA. The media you choose will be the media where you store your settings/configuration.
Examples:
 LBU_MEDIA=usb
or:
 LBU_MEDIA=sda1
Now that you have your configured for your needs, we will set the environment variables (note the leading .).
You can test if your environment variable was set:
It should output something like usb, sda1, or whatever you just configured.
=== Back up your config ===
Before starting to upgrade, it's wise to save your configuration.
category:Diskless