Using openSUSE's YaST on the Raspberry Pi

Chudomir Tsankov, 123RF

Several Servers

The almighty YaST configuration tool makes it much easier to transform your Raspberry Pi running openSUSE into a file server.

There are plenty of good reasons to deploy openSUSE on a Raspberry Pi. Probably the most compelling one is the YaST configuration tool. It acts as a graphical control center that gives you the ability to configure and manage practically all system settings without fiddling with arcane terminal commands. Of course, you might argue that some tasks are easier to accomplish from the command line. Indeed, installing and managing packages with the zypper command-line tool is much faster than going through the required steps in YaST. However, there are situations where you'd prefer to use YaST instead of the terminal. Deploying and configuring various servers is one scenario where YaST can prove its worth. As server deployment is one of the most common uses for the Raspberry Pi, using YaST can save you a lot of time and effort.

Figure 1: ncurses based version of YaST is fast and functional.
Figure 2: File Server pattern installs all required packages in one go.
Figure 3: Configuring the NFS server.

GUI vs ncurses

In addition to a regular GUI, YaST also features an ncurses based interface which runs in text mode but offers a rudimentary graphical interface. While its appearance can be charitably described as retro, it does offer several advantages compared to the conventional GUI. First of all, you can navigate the ncurses interface using the keyboard, and there are keyboard shortcuts for practically all interface elements. In addition to this, the ncurses interface is light on resources and runs fast even on modest hardware, which makes it ideal for use on a Raspberry Pi. More importantly, you can run the ncurses based version of YaST via an SSH connection. This can be particularly useful when accessing and configuring a remote or headless Raspberry Pi (i.e. without a screen).

To launch the ncurses based version of YaST, launch the terminal and run the

sudo yast

command. Use the [Tab] or arrow keys to navigate between interface elements like menu items, fields, and buttons. As mentioned above, all menu items and buttons in YaST can be accessed using the appropriate function keys or keyboard shortcuts. For example, you can cancel the current operation by pressing [F9], while the [F10] key can be used to accept the changes. When working with the ncurses version of YaST, you'll also notice that each menu item and button has a highlighted letter. This letter represents a keyboard shortcut assigned to the interface. For example, the letter Q is highlighted in the Quit button. This means that you can activate the button by pressing [Alt]+[Q].

Figure 4: Modifying the default host options.
Figure 5: Configuring the NFS client.
Figure 6: Deploying the Samba server.

NFS Server

NFS stands for Network File System. As the name suggests, NFS is a protocol that allows the client machine to access a remote file system as local storage. In practical terms, this means that you can use an NFS client to mount a directory or directories from an NFS server on your local machine and work with the mounted file system in a normal manner. All of this is done transparently and automatically. Better still, using YaST you can deploy and configure an NFS server and clients very easily. The following description assumes that the Raspberry Pi running openSUSE will act as an NFS server, while your desktop machine and laptop will run the NFS clients.

The first order of business is to install the required packages. YaST has a clever feature that makes it possible to install all the necessary components in one fell swoop. On the Raspberry Pi, open the terminal and run the sudo yast command to launch YaST. Use the [Tab] or arrow keys to navigate to the Software | Software Management section. Press [Alt]+[F] to activate the Filter menu and select the Patterns items from the list. You can think of patterns as installation profiles that install all the packages required for a specific task or function. The File Server pattern automatically installs all the packages required for running various file servers, including NFS. To mark this pattern for installation, use the arrow keys to select the File Server pattern and press the space bar. You should see the + sign next to the pattern indicating that it's ready to be installed. Next, press [F10] or [Alt]+[A] to apply changes and install the selected pattern.

NFSv3 vs NFSv4

While you don't have to enable NFSv4, using the latest version of the protocol provides several important benefits. These include improved performance, better file locking and security as well as improved support for non-UNIX clients.

Restart YaST then switch to the Network Services section. Select the NFS Server item and press [Enter]. Starting the NFS server is a matter of choosing Start in the NFS Server section. If you already have the SuSEfirewall2 running on the Raspberry Pi, enable the Open Port in Firewall option, and YaST will automatically adjust the configuration. Make sure that the Enable NFSv4 option is activated and change the default domain name, if desired. Press Next and specify the directory or directories you want to share (these directories are called exports in NFS terminology). Once you've done that, you'll be prompted to configure which hosts are allowed to access the exports. You may prefer to accept the default configuration, which grants access to all hosts.

Before you press OK you need to make a small but important adjustment to the sharing options. By default the shared directory will be served as read-only, which is not very practical if you plan to move files back and forth between the Raspberry Pi and your client machines. To solve this problem, press [Alt]+[P] or use the [Tab] key to enter the Options field. Now replace the ro option with rw. Press Finish to apply the changes and start the NFS server.

The NFS Client module in YaST makes it easy to access and mount the NFS shares on another machine on the same network. Switch to Network Services | NFS Client. Choose NFS Settings, activate the Enable NFSv4 option, and enter the domain name in the NFSv4 Domain Name field (the domain name must match the name specified on the NFS server). Press OK to save the changes and close the NFS Settings section. Press Add to add a new NFS share. Specify the host name of the NFS server, or use the Choose button to detect and select the NFS server. Next choose the directory to import and the point to mount this directory locally. Press OK, reboot your machine, and YaST should mount the remote directory in the specified path.

Figure 7: Enabling the FTP server.
Figure 8: Adding ftp to the users group.

Buy this article as PDF

Express-Checkout as PDF

Pages: 4

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content