Howto cups printserver: Difference between revisions
(25 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
= create installation image = | = create installation image = | ||
https://wiki.vidalinux.org/index.php/Howto_install_archlinux_arm | https://wiki.vidalinux.org/index.php/Howto_install_archlinux_arm | ||
= configure network = | = configure network = | ||
configure wifi: | configure wifi: | ||
wpa_passphrase ssid- | wpa_passphrase ssid-name password > /etc/wpa_supplicant/wpa_supplicant.conf | ||
wpa_supplicant -D wext -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf & | wpa_supplicant -D wext -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf & | ||
dhcpcd wlan0 | dhcpcd wlan0 | ||
Line 20: | Line 13: | ||
echo 'nameserver 4.2.2.1' > /etc/resolv.conf | echo 'nameserver 4.2.2.1' > /etc/resolv.conf | ||
echo 'nameserver 4.2.2.2' >> /etc/resolv.conf | echo 'nameserver 4.2.2.2' >> /etc/resolv.conf | ||
= permanent network configuration = | |||
initialize the pacman keyring and populate signing keys: | |||
pacman-key --init | |||
pacman-key --populate archlinuxarm | |||
install networkmanager: | |||
pacman -Sy --noconfirm networkmanager | |||
start and enable networkmanager: | |||
systemctl start NetworkManager | |||
systemctl enable NetworkManager | |||
configure wireless using nmcli: | |||
nmcli device wifi rescan | |||
nmcli device wifi list | |||
nmcli device wifi connect ssid-name --ask | |||
configure lan using nmcli: | |||
systemctl start NetworkManager && \ | |||
systemctl enable NetworkManager && \ | |||
nmcli con del "Wired connection 1" && \ | |||
nmcli con del eth0 && \ | |||
nmcli con add con-name eth0 ifname eth0 ipv4.method manual ipv4.address 192.168.77.113/24 ipv4.gateway 192.168.77.1 ipv4.dns 4.2.2.1,4.2.2.2 type ethernet autoconnect yes | |||
if your network have dhcp use the following command: | |||
nmcli con add con-name eth0 ifname eth0 ipv4.method auto type ethernet autoconnect yes | |||
= expand sd card = | = expand sd card = | ||
Line 27: | Line 42: | ||
chmod +x /usr/local/bin/expand-sd | chmod +x /usr/local/bin/expand-sd | ||
expand-sd | expand-sd | ||
= initial setup = | |||
list timezone using timedatectl: | |||
timedatectl list-timezones | |||
set timezone: | |||
timedatectl set-timezone America/Puerto_Rico | |||
install chrony to fix date and time: | |||
pacman -S chrony | |||
configure chrony: | |||
cat > /etc/chrony.conf << EOF | |||
pool 2.arch.pool.ntp.org iburst | |||
driftfile /var/lib/chrony/drift | |||
ntsdumpdir /var/lib/chrony | |||
leapsectz right/UT | |||
rtconutc | |||
rtcsync | |||
makestep 1.0 3 | |||
dumponexit | |||
dumpdir /var/lib/chrony | |||
logdir /var/log/chrony | |||
EOF | |||
configure chrony config options: | |||
mkdir /etc/sysconfig | |||
cat > /etc/sysconfig/chronyd << EOF | |||
OPTIONS='-r -s' | |||
EOF | |||
start and enable chronyd service: | |||
systemctl start chronyd | |||
systemctl enable chronyd | |||
= update system = | = update system = | ||
Line 40: | Line 84: | ||
cd yay | cd yay | ||
makepkg -si | makepkg -si | ||
= install cups = | = install cups = | ||
install cups packages: | install cups packages: | ||
pacman -S --noconfirm a2ps cups cups-filters cups-pdf cups-pk-helper bluez-cups hplip foomatic-db \ | pacman -S --noconfirm a2ps cups cups-filters cups-pdf cups-pk-helper bluez-cups hplip foomatic-db \ | ||
foomatic-db-engine foomatic-db-ppds foomatic-db-engine foomatic-db-nonfree colord \ | foomatic-db-engine foomatic-db-ppds foomatic-db-engine foomatic-db-nonfree colord \ | ||
foomatic-db-nonfree-ppds ghostscript gutenprint gsfonts sane sane-airscan splix ipp-usb bluez bluez-utils | foomatic-db-nonfree-ppds ghostscript gutenprint foomatic-db-gutenprint-ppds gsfonts sane sane-airscan splix ipp-usb bluez bluez-utils | ||
install brother printer drivers using yay: | |||
su - alarm | |||
yay -S brlaser | |||
edit cups config /etc/cups/cupsd.conf to allow remote administration: | edit cups config /etc/cups/cupsd.conf to allow remote administration: | ||
#Listen localhost:631 | #Listen localhost:631 | ||
Line 95: | Line 122: | ||
add printer, select The printer that I want isn't listed, then select a shared printer by name: | add printer, select The printer that I want isn't listed, then select a shared printer by name: | ||
http:// | http://server-ip-address:631/printers/printer-name | ||
'''CONFIGURE LINUX CLIENT''' | '''CONFIGURE LINUX CLIENT''' | ||
Line 123: | Line 150: | ||
systemctl start saned | systemctl start saned | ||
install airsane: | install airsane: | ||
yay -S airsane | yay -S airsane-git | ||
start and enable avahi-daemon: | |||
systemctl start avahi-daemon | |||
systemctl enable avahi-daemon | |||
start and enable airsane: | start and enable airsane: | ||
systemctl start airsaned | systemctl start airsaned | ||
systemctl enable airsaned | systemctl enable airsaned | ||
'''CONFIGURE LINUX CLIENT''' | '''CONFIGURE LINUX CLIENT''' | ||
edit sane net config /etc/sane.d/net.conf add server ip address: | edit sane net config /etc/sane.d/net.conf add server ip address: | ||
192.168.77. | 192.168.77.113 | ||
'''CONFIGURE WINDOWS CLIENT''' | '''CONFIGURE WINDOWS CLIENT''' | ||
Line 139: | Line 166: | ||
windows client download: | windows client download: | ||
https://master.dl.sourceforge.net/project/sanewinds/SANEWinDS_0.9.5511.msi?viasf=1 | https://master.dl.sourceforge.net/project/sanewinds/SANEWinDS_0.9.5511.msi?viasf=1 | ||
= references = | |||
* https://github.com/SimulPiscator/AirSane | |||
* http://www.sane-project.org/sane-mfgs.html |
Latest revision as of 04:34, 31 March 2023
create installation image
https://wiki.vidalinux.org/index.php/Howto_install_archlinux_arm
configure network
configure wifi:
wpa_passphrase ssid-name password > /etc/wpa_supplicant/wpa_supplicant.conf wpa_supplicant -D wext -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf & dhcpcd wlan0
configure lan:
ip addr add 192.168.75.55/24 dev eth0 ip link set up eth0 ip route add defualt via 192.168.75.1 echo 'nameserver 4.2.2.1' > /etc/resolv.conf echo 'nameserver 4.2.2.2' >> /etc/resolv.conf
permanent network configuration
initialize the pacman keyring and populate signing keys:
pacman-key --init pacman-key --populate archlinuxarm
install networkmanager:
pacman -Sy --noconfirm networkmanager
start and enable networkmanager:
systemctl start NetworkManager systemctl enable NetworkManager
configure wireless using nmcli:
nmcli device wifi rescan nmcli device wifi list nmcli device wifi connect ssid-name --ask
configure lan using nmcli:
systemctl start NetworkManager && \ systemctl enable NetworkManager && \ nmcli con del "Wired connection 1" && \ nmcli con del eth0 && \ nmcli con add con-name eth0 ifname eth0 ipv4.method manual ipv4.address 192.168.77.113/24 ipv4.gateway 192.168.77.1 ipv4.dns 4.2.2.1,4.2.2.2 type ethernet autoconnect yes
if your network have dhcp use the following command:
nmcli con add con-name eth0 ifname eth0 ipv4.method auto type ethernet autoconnect yes
expand sd card
expand sd card:
pacman -S parted libnewt curl -ko /usr/local/bin/expand-sd https://img.vidalinux.com/files/expand-sd chmod +x /usr/local/bin/expand-sd expand-sd
initial setup
list timezone using timedatectl:
timedatectl list-timezones
set timezone:
timedatectl set-timezone America/Puerto_Rico
install chrony to fix date and time:
pacman -S chrony
configure chrony:
cat > /etc/chrony.conf << EOF pool 2.arch.pool.ntp.org iburst driftfile /var/lib/chrony/drift ntsdumpdir /var/lib/chrony leapsectz right/UT rtconutc rtcsync makestep 1.0 3 dumponexit dumpdir /var/lib/chrony logdir /var/log/chrony EOF
configure chrony config options:
mkdir /etc/sysconfig cat > /etc/sysconfig/chronyd << EOF OPTIONS='-r -s' EOF
start and enable chronyd service:
systemctl start chronyd systemctl enable chronyd
update system
update system:
pacman -Syuuu --noconfirm
install base-devel package:
pacman -S --noconfirm base-devel git sudo usbutils
add alarm user to sudoers:
echo 'alarm ALL=(ALL) ALL' >> /etc/sudoers
installing yay:
su - alarm git clone https://aur.archlinux.org/yay.git cd yay makepkg -si
install cups
install cups packages:
pacman -S --noconfirm a2ps cups cups-filters cups-pdf cups-pk-helper bluez-cups hplip foomatic-db \ foomatic-db-engine foomatic-db-ppds foomatic-db-engine foomatic-db-nonfree colord \ foomatic-db-nonfree-ppds ghostscript gutenprint foomatic-db-gutenprint-ppds gsfonts sane sane-airscan splix ipp-usb bluez bluez-utils
install brother printer drivers using yay:
su - alarm yay -S brlaser
edit cups config /etc/cups/cupsd.conf to allow remote administration:
#Listen localhost:631 Port 631 <Location /> # Allow shared printing and remote administration... Order allow,deny Allow all </Location> <Location /admin> # Allow remote administration... Order allow,deny Allow all </Location> <Location /admin/conf> AuthType Default Require user @SYSTEM # Allow remote access to the configuration files... Order allow,deny Allow all </Location>
start and enable cups:
systemctl enable cups systemctl start cups
access cups admin interface:
https://192.168.77.113:631
CONFIGURE WINDOWS CLIENT
add printer, select The printer that I want isn't listed, then select a shared printer by name:
http://server-ip-address:631/printers/printer-name
CONFIGURE LINUX CLIENT
access cups web administration with your browser:
https://127.0.0.1:631
CONFIGURE MAC CLIENT
mac client configuration, enable cups web administration:
sudo su - cupsctl WebInterface=yes
then access the cups interface:
https://127.0.0.1:631
scanner configuration
CONFIGURE SERVER
edit sane config /etc/sane.d/saned.conf and add your subnet:
192.168.77.0/24
download saned service systemd file:
curl -ko /etc/systemd/system/saned.service https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/sane/trunk/saned.service
start and enable saned service:
systemctl daemon-reload systemctl enable saned systemctl start saned
install airsane:
yay -S airsane-git
start and enable avahi-daemon:
systemctl start avahi-daemon systemctl enable avahi-daemon
start and enable airsane:
systemctl start airsaned systemctl enable airsaned
CONFIGURE LINUX CLIENT
edit sane net config /etc/sane.d/net.conf add server ip address:
192.168.77.113
CONFIGURE WINDOWS CLIENT
windows client download:
https://master.dl.sourceforge.net/project/sanewinds/SANEWinDS_0.9.5511.msi?viasf=1