0% found this document useful (0 votes)
84 views4 pages

Install Raspberry

This document provides instructions for setting up various services on a Raspberry Pi including SSH access, SMB file sharing, CUPS printing, Samba, Deluge torrent client, VSFTPD FTP server, and an aria2 download manager with web UI. Key steps include enabling services, configuring files, adding users, and ensuring processes start on reboot.

Uploaded by

Hot Truyen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
84 views4 pages

Install Raspberry

This document provides instructions for setting up various services on a Raspberry Pi including SSH access, SMB file sharing, CUPS printing, Samba, Deluge torrent client, VSFTPD FTP server, and an aria2 download manager with web UI. Key steps include enabling services, configuring files, adding users, and ensuring processes start on reboot.

Uploaded by

Hot Truyen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

sudo apt-get update -y && sudo apt-get upgrade

sudo apt-get install cups samba deluged deluge-web deluge-console python-mako


vsftpd nginx git tmux python3 aria2 -y

AUTO LOGGING SSH


SSHPI:
cd ~
mkdir .ssh
WINDOWS: PowerShell
ssh-keygen -t rsa -b 2048
type $env:USERPROFILE\.ssh\id_rsa.pub | ssh [email protected] "cat >>
.ssh/authorized_keys"

SMB SHARE FOLDERS


sudo addgroup pishare
sudo usermod -a -G pishare pi
sudo smbpasswd -a pi
--------------------------
[Home]
comment=Raspberry Pi Share
path=/media/pi/usbden/pishare
browseable=Yes
writeable=Yes
only guest=no
create mask=0777
directory mask=0777
public=yes
valid users = @pishare
read only = no
--------------------------

CUPS
sudo usermod -a -G lpadmin pi
sudo cupsctl --remote-any
sudo nano /etc/cups/cupsd.conf
--------------------------
DefaultEncryption IfRequested
--------------------------
sudo systemctl restart cups

SAMBA
sudo nano /etc/samba/smb.conf
--------------------------
# CUPS printing.
[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
guest ok = yes
read only = yes
create mask = 0700

# Windows clients look for this share name as a source of downloadable


# printer drivers
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = no
guest ok = no
--------------------------
sudo systemctl restart smbd
https://192.168.1.105:631

DELUGE
sudo nano /etc/systemd/system/deluged.service
--------------------------
[Unit]
Description=Deluge Daemon
After=network-online.target

[Service]
Type=simple
User=debian-deluged
Group=debian-deluged
UMask=002
ExecStart=/usr/bin/deluged -d
Restart=on-failure
TimeoutStopSec=300

[Install]
WantedBy=multi-user.target
--------------------------
sudo systemctl enable deluged.service
sudo nano /etc/systemd/system/deluge-web.service
--------------------------
[Unit]
Description=Deluge Web Interface
After=network-online.target deluged.service
Wants=deluged.service

[Service]
Type=simple
User=debian-deluged
Group=debian-deluged
UMask=002
ExecStart=/usr/bin/deluge-web
Restart=on-failure

[Install]
WantedBy=multi-user.target
--------------------------
sudo systemctl enable deluge-web.service
sudo usermod -aG debian-deluged pi
sudo chown -R debian-deluged:debian-deluged /var/lib/deluged
sudo chmod -R 770 /var/lib/deluged
sudo systemctl start deluged
sudo systemctl start deluge-web
sudo chown debian-deluged:debian-deluged /media/pi
sudo chmod -R 777 /media/pi
sudo reboot

VSFTPD
sudo nano /etc/vsftpd.conf
--------------------------
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
chroot_local_user=YES
user_sub_token=$USER
local_root=/media/pi/usbden/a
allow_writeable_chroot=YES
--------------------------
sudo service vsftpd restart

ARIA2
mkdir aria2
cd aria2
wget https://github.com/mayswind/AriaNg/releases/download/1.2.1/AriaNg-1.2.1.zip
sudo unzip AriaNg-1.2.1.zip
rm AriaNg-1.2.1.zip
touch aria2.session
sudo nano aria2.conf
--------------------------
#directory to save download file
dir=/media/pi/usbden/a/
save-session=/home/pi/aria2/aria2.session
input-file=/home/pi/aria2/aria2.session
#Allow to run in the background
daemon=true
#Replace PPPPP with your password
rpc-secret=123456
enable-rpc=true
#Allow all source to connect
rpc-allow-origin-all=true
#Default port is 6800
#rpc-listen-port=6800
rpc-listen-all=true
max-concurrent-downloads=5
continue=true
max-connection-per-server=5
min-split-size=10M
split=10
max-overall-download-limit=0
max-download-limit=0
max-overall-upload-limit=0
max-upload-limit=0
file-allocation=prealloc
check-certificate=false
save-session-interval=60
--------------------------
cd ~
sudo nano runonstart.sh
--------------------------
#!/bin/sh

# Start aria2 RPC server


tmux new -d -c /home/pi/aria2/ -s aria2rpc 'aria2c --enable-rpc --rpc-listen-all
--allow-overwrite=true --auto-file-renaming=false --continue=true
--dir=/media/pi/usbden/a --max-connection-per-server=8 --max-concurrent-downloads=1
--max-resume-failure-tries=10 --daemon' \;

# Start webui-aria2 HTTP server


tmux new -d -c /home/pi/aria2/ -s aria2webui 'python3 -m http.server 8600' \;
--------------------------
sudo chmod +x runonstart.sh
sudo nano /etc/rc.local
--------------------------
#add before exit 0
su pi -c '/home/pi/runonstart.sh &'
--------------------------
sudo reboot

You might also like