nyuuzyou/wikis huggingface dataset:
Alpine kernel module support

Alpine Kernel Module Support (AKMS) is a tool that enables building out-of-tree (external) Linux kernel modules from source for each installed kernel on the user’s system in an automated and organized fashion. The concept is to have kernel modules automatically rebuilt when a new kernel version is installed.
AKMS is inspired by Dynamic Kernel Module Support (DKMS) used on many Linux distributions. It has been designed specifically for Alpine Linux and APK; implemented with simplicity, reliability, and security in mind.
Builds are always executed under an unprivileged user inside a sandbox (using Bubblewrap) with isolated Mount, IPC, PID, Network, UTS, Cgroup, and User (if possible) namespaces.
The built kernel objects are automatically compressed with the same compression format as other modules installed with the given kernel. The supported formats are: “gz”, “xz” (requires tool), and “zst” (requires tool).
Another advantage of AKMS over DKMS is that you don’t need to have all the dependencies for building modules permanently installed on the system. If some dependencies are missing, they are automatically installed in a disposable overlay over your real root filesystem (using OverlayFS and bubblewrap). The original reason for using overlay was to avoid the limitation of the APK triggers — they are executed inside a “transaction” that holds an exclusive repository lock. This means that no packages could be installed if akms was executed by a trigger. Mounting a disposable overlay on top of “/” for building the modules overcomes this limitation and also provides other benefits.
== Overview ==
AKMS has following actions with associated options and arguments.
install 	Build and install module(s) into /lib/modules, unless already built (or -r is specified) or installed.
build 	Build module(s), unless already built (or -r is specified), without installing them.
uninstall	Uninstall module(s) from /lib/modules.
unbuild 	Remove built module(s) version(s) from the state directory.
status 	Show status of modules.
== Example ==
* Broadcom Wi-Fi chipset wl AKMS Driver
== See also ==
* official github page
* akms(8) man page
Alpine mini

Alpine Mini contains only a very limited set of packages.
== Basics ==
Name 	Description 	URL
alpine-base 	Alpine base package 	https://pkgs.alpinelinux.org/packages?name=alpine-base
alpine-mirrors	List of Alpine Linux Mirrors	https://dl-cdn.alpinelinux.org/alpine/MIRRORS.txt
 	Binary keymaps for busybox 	https://dev.alpinelinux.org/bkeymaps/
== Tools ==
Name 	Description 	URL
network-extras	Meta package to pull in vlan, bonding, bridge and wifi support	https://alpinelinux.org
openssl 	Toolkit for TLS. 	https://openssl.org/
tzdata 	Timezone data 	https://www.iana.org/time-zones
Category:ISO
Alpine rescue

== Basics ==
Name 	Description 	URL
alpine-base 	Alpine base package 	https://pkgs.alpinelinux.org/packages?name=alpine-base
alpine-mirrors	List of Alpine Linux Mirrors	https://dl-cdn.alpinelinux.org/alpine/MIRRORS.txt
bkeymaps 	Binary keymaps for busybox 	https://dev.alpinelinux.org/bkeymaps/
== Misc ==
Name 	Description 	URL
openssh 	Port of OpenBSD's free SSH 	https://www.openssh.com/portable.html
e2fsprogs 	Standard Ext2/3/4 filesystem utilities 	https://e2fsprogs.sourceforge.net/
mdadm 	A tool for managing Linux Software RAID arrays 	https://raid.wiki.kernel.org/index.php/A_guide_to_mdadm
lvm2 	Logical Volume Manager 2 utilities 	https://sourceware.org/lvm2/
parted 	Utility to create, destroy, resize, check and copy partitions	https://www.gnu.org/software/parted/parted.html
debootstrap	Debian/Ubuntu bootstrap scripts 	https://tracker.debian.org/pkg/debootstrap
ntfs-3g 	A userspace ntfs driver with write support 	https://github.com/tuxera/ntfs-3g
tzdata 	Timezone data 	https://www.iana.org/time-zones
p7zip 	A command-line port of the 7zip compression utility 	https://p7zip.sourceforge.net/
nano 	A simple ncurses text editor 	https://www.nano-editor.org/
== Backup ==
Name 	Description 	URL
rdiff-backup	A backup utility that maintains extra reverse diffs so that files can be restored from previous backups.	https://rdiff-backup.net/
rsync 	A file transfer program to keep remote files in sync 	https://rsync.samba.org/
partclone 	Back up and restore used-blocks of a partition 	https://partclone.org
== Data recovery tools ==
Name 	Description 	URL
dc3dd 	Patched version of GNU dd for use in computer forensics	https://sourceforge.net/projects/dc3dd/
testdisk	A powerful free data recovery software 	https://www.cgsecurity.org/wiki/TestDisk
scrub 	Disk scrubbing program 	https://code.google.com/archive/p/diskscrub/
Category:ISO
Ansible

Ansible is a simple configuration management, deployment, task-execution, and multinode orchestration framework.
It uses SSH for the communication between the involved systems, no server or client daemons are needed, and no additional software beside Python on managed nodes is required.
== Installation ==
On the control node (master host), you can install the package and/or the package, which is a "batteries included" package that brings in along with a set of curated collections. Both are available from the community repository:
=== Create a SSH key ===
Generate a SSH key for the managed node. It's recommended to use a key which is protected with a password.
== Managed nodes ==
There are only minimal requirements for the clients. For every system you want to manage, you need to have the client's SSH key in the authorized_keys file of the management system and Python.
Install the Python package:
=== Transfer the SSH key ===
There are two ways to do it. From a default Alpine installation you can use ssh and cat to do it.
If you are planning to use additional features of SSH. ssh-copy-id, which is provided by the openssh-client package, can help you with the key setup. 
== Usage ==
=== Configuration ===
=== Inventory ===
The inventory is the list of managed nodes or "hosts". The default location is /etc/ansible/hosts. You can specify a different inventory file using -i PATH on the command line.
See How to build your inventory for more information.
=== Ping ===
Check that you can reach all nodes:
=== Playbooks ===
When writing playbooks for Alpine Linux there are some things to keep in mind:
There is support for OpenRC, the Init System, in the service module.
- name: Make "lighttpd" start on boot and start now, if not started.
 ansible.builtin.service:
 name: lighttpd
 enabled: true
 state: started
There is support for APK as of Ansible 2.0, in the apk module.
- name: Ensure lighttpd is installed, update cache and install if not.
 community.general.apk:
 name: lighttpd
 state: present
 update_cache: yes
There is support for the Awall firewall as of Ansible 2.4, in the awall module.
- name: Enable "foobar" policy
 community.general.awall:
 name: foobar
 state: enabled
 activate: true
If you are going to re-use playbooks from other Linux distributions, please keep in mind that Alpine Linux uses different paths for the binaries. For example rm is /bin/rm.
=== Vault ===
=== ansible-lint ===
You can check if you're using "proven practices",
by installing the package and running:
== See Also ==
* https://docs.ansible.com/ansible/latest/collections/community/general/apk_module.html - Official documentation for the apk module.
* ArchWiki: Ansible
Category:Installation
Category:System_Administration
Apache

The Apache HTTP Server Project is an effort to develop and maintain an open-source HTTP server for modern operating systems including UNIX and Windows.
== Simple Setup ==
Add the package:
Start the service:
Navigate a browser to the machine's address; there you should see the default "It works" page.
Enable apache on startup (if needed):
Edit the configuration in and run 
to enable your changes
== Additional Guides ==
* Apache with php-fpm
* Apache authentication: NTLM Single Signon
== See Also ==
* Apache Homepage
Category:Web Server
Apache authentication: NTLM Single Signon

NTLM single sign on under Apache
== Installation and Configuration ==
Install needed packages:
 
Add apache user to winbind group:
add to httpd.conf (virtual host):
Ensure that all users requiring authentication are added to the last line.
Alternatively, allow all valid users who are members of the winbind domain with the following:
Restart Apache and test:
Category:Authentication
Category:Web Server
Apache with php-fpm

PHP-FPM is the Fast Process Manager for PHP which runs as a service that spawns PHP processes as needed when files files are requested through the FastCGI interface. Passing this off to the PHP-FPM results in interpreting the PHP files much faster than having Apache spawn new processes each time a page is requested. You can read more about it here.
== Instructions ==
=== Installation ===
Install required packages
Run and add services to startup
=== Configure ===
==== Configure Apache ====
Uncomment the mpm_event module and comment the mpm_prefork module like so:
 LoadModule mpm_event_module modules/mod_mpm_event.so
 #LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
Add the following lines to :
 <FilesMatch \.php$>
 SetHandler "proxy:fcgi://127.0.0.1:9000"
 </FilesMatch>
Comment out the following lines in :
 #LoadModule php_module modules/mod_php8.so
 
 #DirectoryIndex index.php index.html
 
 #<FilesMatch \.php$>
 # SetHandler application/x-httpd-php
 #</FilesMatch>
==== Configure PHP-FPM ====
Edit the file to suit your needs.
In the configuration you may need to change the default user and group from nobody to another user such as apache:
 user = apache
 group = apache
Restart apache2 and PHP-FPM after editing the configuration:
== See Also ==
* Apache
* Apache Wiki entry on PHP-FPM
* PHP-FPM Manual
Category:Web Server
Category:PHP
Apk.lua

Functions to load/unload apk packages
=Functions=
==delete()==
Deletes a package
<BR>Input:
*package - string name of package
==install()==
Installs a package
<BR>Input:
*package - string name of package
==version()==
Checks a package's installed version
<BR>Input:
*package - string name of package
Category:ACF Category:Package Manager Category:Lua
Aports tree

The aports tree is a repository which contains APKBUILD files for every Alpine package. An APKBUILD file contains a "recipe" instructing how a given software package should be built/compiled and packaged. These files are used when building Alpine from source.
The abuild script reads an APKBUILD and executes the steps needed to create a package. Once Alpine Linux is compiled, you will no longer see (or have use of) the APKBUILD. It is not included in the 'iso' or 'tar.gz'.
== Directories ==
There are some directories placed in the aports tree. Each directory represent a single package repository. As of 2024-07-07, the aports tree contains the following directories:
=== main ===
main contains the basic set of packages for Alpine Linux.
=== community ===
community contain additional community maintained packages. For various reasons, these are not guaranteed to be supported beyond six months.
=== testing ===
All new packages go to testing first. Package will be moved to main or community if there is positive feedback or for other good reasons. Packages in testing are not included in stable builds, but are only built for edge.
== Fetch latest APKBUILD files == 
While inside your build environment you need to install some needed packages and you need to fetch the APKBUILD's from the server (fetch the aports tree).<BR>
Note: You only need to do these 2 steps once! Next time you can skip this part.
When the above is done, you might be interested in fetching the latest updates:
=See Also=	
*What is edge
Category:Development
AwesomeWM

thumb |Screenshot
Awesome is a highly configurable, next generation framework window manager for X. It is primarily targeted at power users, developers and any people dealing with every day computing tasks and who want to have fine-grained control on their graphical environment.
== Installation ==
Install X11 and set it up using the setup-xorg-base script.
Install awesome, xterm and terminus font. 
=== Video and Input packages ===
You might want to install a package suitable for your video chipset and input devices.<BR>
For example:
Run to see available xf86-video packages.<BR>
Run to see available xf86-input packages.<BR>
=== VMWare Users ===
and/or
=== acpid ===
If you installed your Alpine Linux as a VirtualBox or VMWare guest, you might find it handy to be able execute an ACPI shutdown.<BR>
== Start your desktop ==
Start awesome.
== Troubleshooting ==
D-Bus problems:
If startx fails and returns an error about D-Bus failed to read machine uuid, as shown above, proceed as follows:
Install dbus from apk (you must be logged in as root for the step shown below)
Log in or su to the root account, then launch the following command (Note: sudo does not work for this step):
Now if startx is launched, it should load the desktop correctly
== See also ==
* Xorg 
* Official Documentation
Category:Desktop
Category:Window Managers
Awstats

AWStats is a powerful tool which generates server statistics. AWstats works as a CGI or from command line and shows you all possible information your log contains in a graphical way.
== Installing Lighthttpd and Awstats ==
Installing Awstats
In :
== Configuting Awstats ==
Run awstats_configure.pl
 -----> Running OS detected: Linux, BSD or Unix
 Do you want to continue setup from this NON standard directory [yN] ? y
 
 -----> Check for web server install
 Config file path ('none' to skip web server setup): none
 -----> Need to create a new config file ? y
 
 -----> Define config file name to create
 Example: www.mysite.com
 Example: demo
 Your web site, virtual server or profile name: awstats
 
 -----> Define config file path
 >/etc/awstats 
 
 Press ENTER to continue...
 Press ENTER to finish...
Edit awstats.awstats.conf 
 nano /etc/awstats/awstats.awstats.conf 
 Search the line LogFile=" " and configure your log path and file. e.g. LogFile="/var/log/messages"
Start http server and add to boot
Browse 
 http://AWSTATS_IP_NUMBER/cgi-bin/awstats.pl?config=awstats
Note: Awstats is not working yet with dansguardian logs.
Category:Monitoring
BWAPP

bWAPP or a buggy web application is a vulnerable web application.
== Install lighttpd, PHP, and MySql ==
Install extra packages:
== Installing and configuring SQLol ==
Create a folder named 
Switch to the folder and download the source files
Unpack the archive and delete it 
Rename the folder
Change the folder permissions
Create a symlink to the folder
== Configuration and start MySQL ==
== bWAPP configuration ==
Please add the MySQL configuration details to the bWAPP config file.
Browse to http://WEBSERVER_IP_ADDRESS/install.php for the installation.
Category:SQL Category:Security
Back Up a Flash Memory Installation

If you have installed Alpine Linux on flash memory, such as a CF card or USB stick, you may wish to create a backup. 
This procedure may also be used to migrate an Alpine Linux installation from one form of flash media to another.
== Make the backup medium bootable ==
The backup device may be made bootable by following the instructions for setup-bootable.
Alternatively, you can boot an installation image of the same version of Alpine Linux that is to be backed up. (The version can be determined using the command "cat /etc/alpine-release".) Follow the instructions at Create a Bootable Device to install the boot system on the backup medium (CF/USB).
== Copy the cache directory ==
If you have enabled APK caching for packages downloaded from the Internet, then you should copy the "cache" directory from the running system to your backup medium.
For example, if the backup medium is labeled "sdb" (use the command "dmesg" to see what name your recently inserted device has received), and the system is booted from USB, you would run:
== Copy the configuration overlay file (apkovl) ==
The custom configuration of your system is stored in a file named HOSTNAME.apkovl.tar.gz, where HOSTNAME is the locally configured hostname of the system (see the file /etc/hostname).
Simply copy this file to the root of your backup medium.
For example, if the backup medium is labeled "sdb" (use the command "dmesg" to see what name your recently inserted device has received), and the system is booted from USB, you would run:
category:Diskless
Category:Installation
Backlight

Backlight control of liquid-crystal displays (LCDs) screen is covered in this page. Controlling display backlight requires either the proper udev rules, or using some form of privilege escalation. 
There are multiple utilities available for this purpose. 
== Brightnessctl ==
The brightnessctl utility available in package is one popular and reliable alternative, although its default udev rules require too wide permissions (see ). You may need your own rules, or configure doas to allow running it as an unprivileged user.
Optionally enable brightnessctl service to restore brightness settings on reboot:
To use <Code>brightnessctl</Code> to control external monitors, the ddcci-driver-linux is needed. The relevant package is available in testing repository. This driver requires Alpine Kernel Module Support .
== Ddcutil ==
The ddcutil utility available in the package can be used to control brightness in external monitors, if your hardware supports it. 
Once the package is installed, check the current brightness of your monitor by issuing the command 
To set brightness of your monitor to 50% issue the command: 
== Troubleshooting ==
=== No /dev/i2c devices exist ===
The command <Code>ddcutil</Code> may generate the below error:
Unexpected error. Unable to open sysfs directory /sys/class/drm/card1-HDMI-A-1/ddc/i2c-dev: No such file or directory
Unexpected error. Unable to open sysfs directory /sys/class/drm/card1-HDMI-A-2/ddc/i2c-dev: No such file or directory
No /dev/i2c devices exist.
ddcutil requires module i2c-dev.
If you receive the above error, on running <Code>ddcutil</Code>, then load the <Code>i2c-dev</Code> kernel module:
Rebooting the computer after installing should automatically load the above module based on .
== See Also ==
* Alpine Kernel Module Support(AKMS) official website 
Category:Desktop
Bonding

This article shows how to bond (or aggregate) multiple ethernet interfaces into a bond0 interface.
==Installation==
First, install the bonding package. This will give you support for bonding in the /etc/network/interfaces file.
And if you want to setup a LACP setup with a bridge interface you also need to install:
==Configuration==
Edit the /etc/network/interfaces file:
auto bond0
iface bond0 inet static
	address 192.168.0.2
	netmask 255.255.255.0
	gateway 192.168.0.1
	# specify the ethernet interfaces that should be bonded
	bond-slaves eth0 eth1 eth2 eth3
The keyword is bond-slaves that will make ifup add the slaves to the bond0 interface.
References: https://www.kernel.org/doc/Documentation/networking/bonding.txt
Category:Networking
Bonding with br0 (LACP)
auto bond0
iface bond0 inet manual
 bond-slaves eth0 eth1
 bond-mode 802.3ad
 bond-xmit-hash-policy layer2+3
auto br0
iface br0 inet dhcp
 bridge-ports bond0
 bridge-stp 0
 hostname alpine
Bootstrapping Alpine Linux

= VPS =
This section is to provide a means to bootstrap Alpine Linux on any VPS.
== Process ==
 
=== Prepare ===
Download apk binary file for your architecture or boot from an Alpine live ISO.
Hint to download apk :
wget https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic/v2.14.6/x86_64/apk.static
=== Install ===
Assuming your alpine rootfs is mounted in /tmp/target and you downloaded apk binary (not using the live ISO).
You may want to replace "latest-stable" from the URL by a specific version of Alpine (e.g. v3.20, v3.21).
sudo ./apk.static --arch $(arch) -X http://dl-cdn.alpinelinux.org/alpine/latest-stable/main/ -U --allow-untrusted --root /tmp/target --initdb add alpine-base
* edit /tmp/target/etc/fstab
* edit /tmp/target/etc/inittab
* edit /tmp/target/etc/resolv.conf
* mount proc/sys/dev
for a in proc sys dev; do mount -o bind /$a /tmp/target/$a; done
* chroot into your new installation
chroot /tmp/target /bin/sh
* setup hostname
setup-hostname
* setup network
setup-interfaces
* setup repos
setup-apkrepos -f
* add a few base packages
apk update
apk add linux-lts linux-firmware-none acpi mkinitfs
* add services to boot
rc-update add acpid default
rc-update add bootmisc boot
rc-update add crond default
rc-update add devfs sysinit
rc-update add dmesg sysinit
rc-update add hostname boot
rc-update add hwclock boot
rc-update add hwdrivers sysinit
rc-update add killprocs shutdown
rc-update add mdev sysinit
rc-update add modules boot
rc-update add mount-ro shutdown
rc-update add networking boot
rc-update add savecache shutdown
rc-update add seedrng boot
rc-update add swap boot
=== Bootloader ===
=== Notes ===
If you have bootstrapped Alpine Linux from an existing system in a different partition and intend to boot into it, you should always include the root filesystem type (rootfstype) in the kernel parameter (bootloader option), since by default kernel does not automatically load any filesystem modules for root partition, unless specified. That way mount will not complain about being unable to mount root partition on /sysroot.
Example bootloader option:
root=UUID=AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE rw rootfstype=ext4 vfat
== References ==
* Running a Custom Linux Distribution on a Linode
* Run a Custom Compiled Kernel with PV-GRUB
* Replacing non-Alpine Linux with Alpine remotely
* Install Alpine on Amazon EC2
* Alpine setup scripts
* How do I chain boot from grub to syslinux?
* Alpine Linux on Linode
* Installing Alpine Linux in a chroot
Category:Installation
Category:Virtualization
Bootstrapping Alpine on PC Engines ALIX.3

Category:Installation
Experience with bootstrapping 1.7.17 Alpine Linux on a CF card for PC Engines ALIX.3C2 LX800 (This information is based on the Soekris instructions)
We assume our CF reader is at /dev/sdb, with a 512+ MB CF formatted card loaded and will be mounted on /mnt/flash. We also assume root priviledges.
 export FLASHDEVICE=/dev/sdb1
 export MNT=/mnt/flash
First, we download the latest usbdrive tarball
 wget http://dev.alpinelinux.org/alpine/v1.7/usbdrive/alpine-1.7.17-i386.tar.gz
and unpack it on our CF card
 mount $FLASHDEVICE $MNT
 tar xzf ../alpine-1.7.17-i386.tar.gz -C $MNT
Next step is to tell syslinux and the kernel we are using a serial console. We do so by creating a custom syslinux.cfg
 cat > $MNT/syslinux.cfg <<EOF
 serial 0 115200
 timeout 0
 default generic-alix
 
 label generic-alix
 kernel /kernel/generic/bzImage
 append initrd=/kernel/generic/hd-ext3.gz rw alpine_dev=hda1:vfat root_dev=none:tmpfs alpine_base=base.tar.bz2 pkg_dev=hda1:vfat pkg_subdir=/apks cfg_dev=hda1:vfat modloop=/kernel/generic/modloop.cmg console=ttyS0,115200
 EOF
Finally, we make the CF bootable
 syslinux $FLASHDEVICE
 umount alpine
Insert the flash card, and boot:
 Linux 2.6.23-hardened-r7 #3 Thu Apr 24 09:11:33 UTC 2008 i586 unknown
 # cat /proc/cpuinfo
 processor : 0
 vendor_id : AuthenticAMD
 cpu family : 5
 model : 10
 model name : Geode(TM) Integrated Processor by AMD PCS
 stepping : 2
 cpu MHz : 498.049
 cache size : 128 KB
 fdiv_bug : no
 hlt_bug : no
 f00f_bug : no
 coma_bug : no
 fpu : yes
 fpu_exception : yes
 cpuid level : 1
 wp : yes
 flags : fpu de pse tsc msr cx8 pge cmov clflush mmx mmxext 3dnowext 3dnow
 bogomips : 997.58
 clflush size : 32