nyuuzyou/wikis huggingface dataset:
Setting up an NFS server

This page documents configuring Network File System (NFS) on both server and client side including autofs and Kerberos authentication.
== Installation ==
Install the following package for both NFS client and NFS server service. 
== Configuration ==
Setting up NFS service on Alpine Linux is no different from other Linux distributions.
=== NFS server ===
Setup export dirs in on your server with IP address 10.10.10.1. For example: 
After editing , reload your setting: 
To make NFS server service to autostart on boot: 
To start NFS server service now: 
=== NFS client ===
To mount NFS shares automatically, an entry needs to made to as follows:
To mount nfs share from file at booting of the system:
To mount the nfs shares from /etc/fstab file now:
You can check your boot services:
To use netmount, here are the equivalent commands:
== Using autofs ==
Autofs is another alternative for mounting filesystems like NFS. Autofs aims to provide on-demand mounting and race free automatic unmounting of various other filesystems.
Ensure that package is installed, if not installed already. 
Add an entry in the file that points to a map file to define the mount points for the directory.. For example:
Create the Map File that maps the NFS share to as follows:
Start and Enable autofs:
Eventhough autofs is primarily a client-side tool it can also be used on servers for dynamic mounting if required. For an use case of using Autofs on servers, refer to Sharing a Disk page.
== Kerberos authentication ==
By default, NFS security only validates the IP of the client. You can add user level authentication with a Kerberos authentication protocol. The choices are:
* MIT KRB5 available in package
* Heimdal available in package 
The example given below uses MIT KRB5 syntax. So install the server package on server and package for client machines. 
=== Server configuration ===
Assuming you setup Kerberos in the in the network, create ticket to your NFS machine :
And add it to the machines krb5.keytab file:
Then, edit your , and add sec=krb5 (only authentication), sec=krb5i (also hmac signing) or sec=krb5p (also encryption). For example:
After editing , reload your setting
User id mapping is managed by nfsidmap utility from package.
=== Client configuration ===
In order for the client to connect to NFS via kerberos, enable and start rpc.gssd service.
== See also ==
* NFS in Arch wiki
* NFS in Gentoo Wiki 
* Raspberry_Pi_4_-_Persistent_system_acting_as_a_NAS_and_Time_Machine
Category:Server
Setting up clamsmtp

== Introduction ==
ClamSMTP is a simple, lightweight content filter, written in C, which accepts SMTP connections and can be used to check for viruses and spam using Clamav. The 'DATA' section of the email is scanned before the email is submitted to the queue for delivery.
== Set up ClamSMTP ==
Install ClamSMTP
Configure the clamsmtpd.conf file as follows:
OutAddress: 127.0.0.1:10026
Listen: 127.0.0.1:10025
ClamAddress: /var/run/clamav/clamd.sock
TempDirectory: /tmp
Action: drop
Quarantine: on
User: clamav
## The following line makes it possible to filter an entire network's SMTP traffic.
## If used, remove the OutAddress line above
#TransparentProxy: on
## Uncomment if you wish to use a virus action script to perform further actions on the suspect email
#VirusAction: /etc/postfix/scripts/virus_action.sh
The configuration above supports sending mail to an email address of a mailbox monitored by an Administrator. Remember to treat any mails that come into this box as hostile, as they could contain viruses. Additionally, a notification message
A very nice Virus Action script can be found here at virus_action.sh
== Configure Postfix ==
Add the following line to your postfix main.cf file:
 content_filter = scan:[127.0.0.1]:10025
Add the following lines to the end of your master.cf file:
# AV scan filter (used by content_filter)
 scan unix - - n - 16 smtp
 -o smtp_send_xforward_command=yes
 -o smtp_enforce_tls=no
 # For injecting mail back into postfix from the filter
 127.0.0.1:10026 inet n - n - 16 smtpd
 -o content_filter=
 -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
 -o smtpd_helo_restrictions=
 -o smtpd_client_restrictions=
 -o smtpd_sender_restrictions=
 -o smtpd_recipient_restrictions=permit_mynetworks,reject
 -o mynetworks_style=host
 -o smtpd_authorized_xforward_hosts=127.0.0.0/8
== Start services and save changes ==
Restart postfix and start the clamsmtp service:
Finally, schedule clamsmtp to automatically start on boot up:
Save changes: lbu ci
Category:Mail
Setting up encrypted volumes with LUKS

LUKS allows encrypting a partition and mapping it as a virtual block device, which can then be used as a normal partition. Guides for other Linux distributions should serve as a general references for installing Alpine onto a LUKS encrypted disk.
The installer has built-in support for encryption. The default installer will not encrypt the swap partition and the boot partition. To setup Alpine Linux with an encrypted swap partition, refer to LVM on LUKS. The GRUB bootloader supports BIOS and EFI boot with an encrypted boot partition.
== mkinitfs and LUKS ==
For those familiar with setting up FDE on other Linux distributions, this section contains only Alpine-specific knowledge required is understanding mkinitfs.
First of all, the cryptsetup feature needs to be added to /etc/mkinitfs/mkinitfs.conf. Additionally, the following kernel parameters are required:
* cryptroot kernel parameter should point to the encrypted block device. 
* root kernel parameter should point to the mapped block device (e.g.: the ext4/btrfs volume that is exposed once the encrypted partition is unlocked).
* rootfstype: The filesystem type of the root partition (e.g.: btrfs).
== See also ==
* dm-crypt on ArchWiki
Category:Storage
Category:Security
Setting up lm sensors

This page documents how to set up lm-sensors in Alpine Linux. lm-sensors is a Linux hwmon subsystem that provides tools and drivers for monitoring temperatures, voltage, and fans. 
== Installation == 
Install the neccessary packages.
== Configuration ==
Load the i2c-dev module:
Run sensors detect:
There are multiple types of sensors that you must skip scanning for (answer no to the prompt) because grsec will not allow you to access . If you encounter an error that says something like /dev/port: no such file.., re-run the script and answer no to that question on the next attempt. Examples of ones that you must enter no for: ISA bus, other Super I/O sensors, and IPMI.
Be sure to enter yes (non-default) for the question Do you want to generate /etc/conf.d/lm_sensors?
You will not need perl anymore. Remove it before you forget.
Make services start during next reboot.
Start services:
If you're using Diskless Mode, don't forget to save your new server configuration using 
Category:MonitoringCategory:Desktop
Setting up nsd DNS server

NSD is an authoritative-only DNS server. The following page shows how to setup a single-zone configuration, with one server being a master where updates are made, and a slave which will have changes replicated to it automatically. In the examples 10.1.0.1 is used as the master server's IP address, 10.2.0.1 is the slave address. The IP addresses used here (along with the domain) should be replaced with the IP addresses of your servers.
= Install =
Installation is simple (perform this step on both servers):
= Configure =
First, setup the main configuration file on the master server, /etc/nsd/nsd.conf, replacing the secret with a proper one:
server:
 ip-address: 10.1.0.1
 port: 53
 server-count: 1
 ip4-only: yes
 hide-version: yes
 identity: ""
 zonesdir: "/etc/nsd"
key:
 name: "sec_key"
 algorithm: hmac-md5
 secret: "WhateverSecretYouUse"
zone:
 name: alpinelinux.org
 zonefile: alpinelinux.org.zone
 notify: 10.2.0.1 sec_key
 provide-xfr: 10.2.0.1 sec_key
Next create the zone file for the zone in question (/etc/nsd/alpinelinux.org.zone in this case):
;## alpinelinux.org authoritative zone
$ORIGIN alpinelinux.org.
$TTL 86400
@ IN SOA ns1.alpinelinux.org. webmaster.alpinelinux.org. (
 2011100501 ; serial
 28800 ; refresh
 7200 ; retry
 86400 ; expire
 86400 ; min TTL
 )
 NS ns1.alpinelinux.org.
 MX 10 mail.alpinelinux.org.
lists MX 10 mail.alpinelinux.org.
@ IN A 81.175.82.11
mail IN A 64.56.207.219
www IN A 81.175.82.11
www-prd IN A 74.117.189.132
www-qa IN A 74.117.189.131
wiki IN A 74.117.189.132
lists IN A 64.56.207.219
monitor IN A 213.234.126.133
bugs IN A 81.175.82.11
nl IN A 81.175.82.11
dl-2 IN A 208.74.141.33
dl-3 IN A 74.117.189.132
dl-4 IN A 64.56.207.216
rsync IN A 81.175.82.11
distfiles IN A 91.220.88.29
build-edge IN A 91.220.88.23
build64-edge IN A 204.152.221.26
build-2-2 IN A 91.220.88.34
build64-2-2 IN A 91.220.88.35
build-2-1 IN A 91.220.88.32
build-2-0 IN A 91.220.88.31
build-1-10 IN A 91.220.88.26
On the slave server, set up /etc/nsd/nsd.conf:
server:
 ip-address: 10.2.0.1
 port: 53
 server-count: 1
 ip4-only: yes
 hide-version: yes
 identity: ""
 zonesdir: "/etc/nsd"
key:
 name: "sec_key"
 algorithm: hmac-md5
 secret: "WhateverSecretYouUse"
zone:
 name: alpinelinux.org
 zonefile: alpinelinux.org.zone
 allow-notify: 10.1.0.1 sec_key
 request-xfr: AXFR 10.1.0.1 sec_key
Create the zone file /etc/nsd/alpinelinux.org.zone as well, on the slave.
= Start Server =
First step, make sure you don't have any typos in your configurations (on both boxes):
Then each time a change is made to the zone (including when you first start the server), you need to rebuild the NSD zone databases:
Finally, start the server and set it to auto-start:
Category:Networking
Setting up the build environment on HDD

Install Alpine Linux in System Disk mode i.e traditional or classic harddisk installation to use as build environment. Configure the desktop so that the development system can also be used to daily drive, if required. 
If the existing Alpine Linux installation is on a stable version, upgrade to edge to use as build environment.
Alternates are to setup a clean Alpine Linux build environment inside another system, using a chroot or some form of virtualization. The host system may also be Alpine Linux, or may be something else.
== Upgrade to edge ==
== Setup your system and account ==
== Contribute ==
Proceed to create new package or create and submit patches for Alpine Linux.
Category:Development
Setup-desktop

To use Alpine Linux as a desktop, a desktop environment needs to be installed. Among the Alpine Linux supported Desktop environments and Window managers, the following can be currently installed using setup-desktop script:
* Plasma
* Gnome
* MATE
* Xfce 
* LXQt
* Sway 
== See Also ==
* Alpine Linux - Daily Driver Guide
* Tutorials related to Desktop
* Desktop environments and Window managers
* Post Installation
* :Category:Display Managers
* Desktop environment - Archwiki
* Desktop environment - Gentoo Wiki
Category:Desktop
Setup of DMVPN on Alpine linux

== Setting up mGRE tunnel ==
We start by adding mGRE tunnels to our network configuration.
== Setting up IPSec VPN ==
To encrypt this tunnel, and the traffic in it, we will use strongswan ipsec with its vici plugin.
The vici plugin provides VICI, the Versatile IKE Configuration Interface. As its name indicates, it provides an interface for external applications to not only configure, but also to control and monitor the IKE daemon charon.
for this we also need a modified version of Strongswan which is the default Strongswan in Alpine Linux.
=== Template ===
Template taken from other wiki docs.
=== Spoke 1 ===
=== HUB ===
== Generate PKI certificates ==
First, generate a private key, the default generates a 2048 bit RSA key
Now self-sign a CA certificate using the generated key:
Adjust the distinguished name (DN) to your needs, it will be included in all issued certificates.
For each peer, i.e. for all VPN clients and VPN gateways in your network, generate an individual private key and issue a matching certificate using your new CA:
==Certificate Revocation Lists (CRL) ==
In case end entity certificates have to be revoked, Certificate Revocation Lists (CRLs) may be generated with the ipsec pki --signcrl command:
== Install certificates ==
On each peer store the following certificates and keys in the /etc/ipsec.d/ subdirectory tree:
 /etc/swanctl/rsa/hubKey.der holds the private key of the given peer.
 /etc/swanctl/x509/hubCert.der holds the end entity certificate of the given peer.
 /etc/swanctl/x509ca/caCert.der holds the CA certificate which issued and signed all peer certificates.
== Quagga/NHRP ==
=== adding the required packages ===
=== Sending Traffic Indication (redirect) notifications ===
===Configuring Quagga===
==== General ====
 configure terminal
 log syslog
 debug nhrp common
==== BGP config ====
 router bgp 65000
 bgp router-id 172.16.0.1
 bgp deterministic-med
 network 172.16.0.0/16
 redistribute nhrp
 neighbor spokes-ibgp peer-group
 neighbor spokes-ibgp remote-as 65000
 neighbor spokes-ibgp ebgp-multihop 1
 neighbor spokes-ibgp disable-connected-check
 neighbor spokes-ibgp route-reflector-client
 neighbor spokes-ibgp next-hop-self all
 neighbor spokes-ibgp advertisement-interval 1
 neighbor spokes-ibgp soft-reconfiguration inbound
 exit
==== NHRP config ====
 interface gre1
 tunnel protection vici profile dmvpn
 tunnel source br0
 ip nhrp network-id 1
 ip nhrp shortcut
 ip nhrp registration no-unique
 ip nhrp nhs dynamic nbma hub1.vpn.domain.tld
 ipv6 nd suppress-ra
 no link-detect
 exit
==== Save config ====
 exit
 write mem
==== Adding spokes to hub ====
 conf terminal
 router bgp 65000
 neighbor 172.16.3.1 peer-group spokes-ibgp
 exit
 write mem
= See also =
* Dynamic Multipoint VPN (DMVPN)
* Dynamic Multipoint VPN (DMVPN) Phase 3 with Quagga NHRPd
category: VPN
Silent boot

== What is silent boot? ==
Silent boot means to almost completely remove all kernel and OpenRC messages on boot from your system. This may make it harder to debug issues when booting your computer, but it is also relatively simple to get back a verbose message boot, with this following wiki page guide.
This wiki page guide will remove all OpenRC messages, except login prompt. This will also remove kernel messages at boot.
== Setting up silent-boot ==
=== Disable kernel messages: ===
==== Grub ====
Edit /etc/default/grub and add quiet to the GRUB_CMDLINE_LINUX variable:
==== Kernel-hooks ====
Modify /etc/kernel-hooks.d/secureboot.conf and add quiet to cmdline:
=== Disable OpenRC Boot messages: ===
Make your /etc/inittab similar to this:
Remove the "&> /dev/null" on each line to see OpenRC boot messages again.
=== Logging OpenRC while still keeping a silent boot ===
Enable this option in /etc/rc.conf
This will produce a file /var/log/rc.log so you can read the OpenRC logs
while keeping a clean and silent boot 
==== External sources ====
Alpine Linux Silent Boot with cmatrix (youtube) (not mine)
* https://www.youtube.com/watch?v=HoltBFnu0yo [1]
Category:Security Category:Booting
Sircbot

Sircbot is a Minimalistic IRC bot based in Lua script.
== Install sircbot ==
== Configure sircbot daemon ==
Edit the configuration file located at and change the name, server, and channel:
It is the same to run sirbot directly.
Sircbot would act as "daemon" joining server and channels thus do the following response.
== Sending messages ==
There are two ways to send messages, channel need be specified first in sirbot daemon.
=== sircbot-send ===
=== sircbot lua library ===
== Create sircbot scripts folders and files ==
Sircbot will use an folder for the channel where is logged in. The folder path is: 
For every message that goes to the channel, sircbot will run all scripts in /etc/sircbot.d/#channel/ with sender, message and channel name as arguments.
== Example ==
Lets see an example:
Our bot will be named kumquat and we will join at the #test channel in the irc.ddd.ddd server.
Create folder bot. 
Create the Lua script file for our bot. 
Make the script to be executable
== Giving life to the bot ==
Starting sircbot daemon and adding service to boot.
== Troubleshooting ==
If your bot is not responding as expected, an easy way to troubleshoot is to manually execute the script in /etc/sircbot.d/<#channelname>/<scriptname> with the three agruments.
If your bot responds as expected, then you know that your script works. The problem is that sircbot is not executing the script. Here are two likely causes:
# Sircbot is case-sensitive when looking for the channel directory for a script to execute. For example, if you have a channel named "#Alpine", sircbot will look for /etc/sircbot.d/#Alpine/*. If that pathway isn't exactly right, then sircbot will skip that folder. In our example, if you have /etc/sircbot.d/#alpine/script, sircbot will not execute anything in that folder. To fix, simply rename the folder to /etc/sircbot.d/#Alpine/
# Sircbot doesn't execute scripts that have a '.' in the name. For example a script named 'listen.lua' will not be executed. Simply rename the script to 'listen'.
Category:Networking
SqStat

== What is SqStat ==
SqStat is a script which allows to look through active squid users connections. It use cachemgr protocol to get information from squid proxy server.
== Set up SqStat on Alpine Linux ==
This document will be a quick c/p guide to setup SqStat acive squid log viewer on Alpine linux. What we will install is the following:
* Lighttpd 
* PHP
== Installing Lighthttpd and PHP ==
== Installing SqStat ==
Download SqStat 
	
== Configuring SqStat ==
Unpack and move SqStat
	
Copy and edit the sqstats config file 
	
* Modify this lines with your proxy ip addres and port
	
 /* Squid proxy server ip address or host name */
 $squidhost[0]="127.0.0.1";
 /* Squid proxy server port */
 $squidport[0]=3128;
== Configuring your squid server ==
Note: You need edit your squid.conf to allow cachemgr protocol
Edit squid.conf
 
* Add this lines and replace the ip addres with your webserver IP
 
 acl manager proto cache_object
 # replace 10.0.0.1 with your webserver IP
 acl webserver src 10.0.0.1/255.255.255.255
 http_access allow manager webserver
 http_access deny manager
Restart squid
	
* Browse and see
 http://SQSTAT_IP_NUMBER/sqstat/sqstat.php
Sshguard

sshguard protects hosts from brute-force attacks against SSH and other services. It aggregates system logs and blocks repeat offenders using one of several firewall backends, including iptables, ipfw, and pf.
sshguard can read log messages from standard input (suitable for piping from syslog) or monitor one or more log files. Log messages are parsed, line-by-line, for recognized patterns. If an attack, such as several login failures within a few seconds, is detected, the offending IP is blocked. Offenders are unblocked after a set interval, but can be semi-permanently banned using the blacklist option.
sshguard does not support custom log parsing. Check the website too see which services they support.
== Installation ==
Sshguard can use several backends, you can see them with ls /usr/libexec/sshg-fw*. The easiest backend on Alpine is nftables. After you install sshguard, you will need to create a config file or it won't start.
You can view the rules with nft list ruleset
== Iptables backend ==
To use the iptables backend, you must first create a chain called "sshguard". Enable the iptables-service to save the rules at shutdown and reload them when booting
You can view the rules with iptables -L
category:Security
StatusNet

StatusNet is the open source microblogging platform that helps you share and connect in real-time within your own domain. With StatusNet you can encourage collaboration, build and engage your community, and be in command of your brand.
== Install lighttpd and PHP ==
== MySql and pcre ==
 
== Configuring MySql ==
Create the StatusNet database
== Installing StatusNet ==
Create a directory named 
Download the latest source code archive 
Unpack the archive and delete it afterwards
Creating a file
Change the folder persmissions
Create a symlink to the folder
== Configuring StatusNet ==
Browse to: http://WEBSERVER_IP_ADDRESS/statusnet/install.php and install StatusNet by completing the information as appropriate from the web browser.
StatusNet Installation steps:
Install StatusNet
* Site settings
 
:* Site name
::The name of your site
 
:* Fancy URLsenable
:: disable
::Fancy URL support detection failed, disabling this option. Make sure you renamed htaccess.sample to .htaccess.
 
* Database settings
:* Hostname: localhost
::Database hostname
 
:* TypeMySQL
::Database type
:* Name: statusnet
::Database name
:* DB username: root
::Database username
:* DB password: password
::Database password (optional)
 
* Administrator settings
:* Administrator nickname
::Nickname for the initial StatusNet user (administrator)
 
:* Administrator password
::Password for the initial StatusNet user (administrator)
 
:* Confirm passwordAdministrator e-mail
::Optional email address for the initial StatusNet user (administrator)
* Subscribe to announcements
* Release and security feed from update@status.net (recommended)
After click on Submit button, you will see:
Install StatusNet
 Starting installation...
 Checking database...
 Changing to database...
 Running database script...
 Adding SMS carrier data to database...
 Adding notice source data to database...
 Adding foreign service data to database...
 Writing config file...
 Could not set up subscription to update@status.net.
 An initial user with the administrator role has been created.
 StatusNet has been installed at http://10.69.64.11/statusnet
 DONE! You can visit your new StatusNet site (login as 'danieloc'). If this is your first StatusNet install, you may want to poke around our Getting Started guide.
You have StatusNet microblogin working, to access go to http://WEBSERVER_IP_ADDRESS/statusnet and enjoy!
Category:SQL
Stream a DV-camera using vlc

In this howto we are going to stream the video coming from a DV-camera connected through ie1394 (firewire).<BR>
vlc is used to stream the content.<BR>
We will be using h264 and AAC to transcode the stream (should be fairly easy to change to whatever suits your needs).
= Setup Alpine =
== Initial Setup ==
Follow Installing_Alpine to setup Alpine Linux.
== Install programs ==
== Using ACF to control vlc ==
Setup/install acf (unless it's not already done).
Install acf-package for vlc
We won't describe in this tutorial how you would use ACF to control vlc-daemon (basically because it's so simple it does not need any describing).<BR>
If you installed ACF, just browse https://ip.of.your.box and you would from this tutorial understand what to do.<BR>
= Configure vlc =
Configuration is done by modifying '/etc/conf.d/vlc'.<BR>
Here comes the actual configuration that makes vlc stream the DV-camera.
###############
BITRATE=500
XRES=720
YRES=576
###############
# Chose one of the following 'preset' values depending on how fast your CPU is:
# ultrafast,superfast,veryfast,faster,fast,medium,slow,slower,veryslow,placebo
TVIDEO="venc=x264{preset=ultrafast,vbv-maxrate=${BITRATE},vbv-bufsize=256,keyint=250,min-keyint=25},vcodec=h264,vb=${BITRATE},scale=1,width=${XRES},height=${YRES}"
TAUDIO="acodec=mp4a,ab=96,channels=2,samplerate=44100"
TMISC="deinterlace,audio-sync"
###############
TRANSPORT="std{access=http,mux=ts,dst=:8080}"
VLC_OPTS="--daemon -I dummy dv:///dev/fw0 --rawdv-hurry-up --sout-keep --sout-transcode-audio-sync \
--file-logging --logfile /var/log/vlc/vlc.log \
--sout #transcode{$TVIDEO,$TAUDIO,$TMISC}:$TRANSPORT"
= Start it up =
== Prepare the hardware ==
Here comes the hardest part in this tutorial... Attach the DV-camera to your ie1394/firewire port.<BR>
Well... that wasn't too hard! :-)
== Manual start ==
Start vlc-daemon either from terminal:
or using ACF and just klick [Start].
== Make it start at next reboot ==
You might want to make it automatically start at next reboot
== Debug ==
In case something goes wrong, consider looking at the logfiles.
If you don't find any useful information you could add verbosity by adding '-v' or '-vv' to /etc/conf.d/vlc and restart vlc (you would need to restart vlc-daemon to see more information in the logs).
Category:Multimedia