Raspberry Pi2 -getting setup
by tgutwin
Posted on Tuesday Jan 26, 2016 at 08:27PM in Technology
Getting Fedora 21 setup and configured to comfortably work with Java on my new Raspberry Pi2. My last entry desribed the install.
I will describe how I configured things to make it efficient to test and develop Java on my Pi2:
- Boot to multi-user commandline (and how to start the graphical desktop if needed)
- Samba shared directories
- SSH without password from my workstations
multi-user commandline
After a few intial boots into the GUI Fxce deskktop, I set it to boot into a simple commandline (no desktop) by default:
- ">
- sudo systemctl set-default multi-user.target
This is equivalent to RunLevel 3 Multi-User from sysv init.
If I want an Xfce X session, I just type:
- startxfce4
- as opposed to the old startx which does not work
- as opposed to the old startx which does not work
SAMBA Shared Directories
I then started setting up SMB/samba sharing so I could transfer files easier.
- sudo yum install samba
- Edited the /etc/samba/smb.conf
- security = user
- interfaces = lo eth0 10.0.0.232/24
- (Optional) turned OFF the firewall
- sudo systemctl disable firewalld
- sudo systemctl disable firewalld
- (Optional)disabled selinux in the /etc/selinux/config file
samba now works
SSH without password
I want to be able to easily access the Pi2 without having to enter my
password everytime. I am enabling this because it is on my inner
network, it enables calling 'javac' and other programs remotely from scripts and directly; the Pi2 also has no high security items on it.
- Generate a public key on the remote computer/workstation
- ssh-keygen
- answer all the questions
- it creates hte following file:
- ~/.ssh/id_rsa.pub
- ~/.ssh/id_rsa.pub
- Add it to the Pi2 ~/.ssh/authorized_keys file
- ssh-copy-id -i ~/.ssh/id_rsa.pub pi2
I can now access (and call commands) on my Pi2 directly.