Join Chaim Krause for an in-depth discussion in this video File sharing, part of SUSE Linux Enterprise Server Essential Training.
- [Voiceover] We're now going to take a look at network file sharing. I'm coming into this with the assumption that you've used these services before, at least as a client. So for FTP, NFS, and Samba, we're going to get them up and running as servers so that you can use them with your clients. I'm not going to set up the NFS server. The first choice we need to make is whether we want it to start up when we boot up, or whether we want to start it up manually. I'm gonna choose to start it.
The next choice is to decide whether you want to use version four of NFS. I would suggest if you're setting up a new server that you go ahead and leave that enabled. If you have a reason not to enable, it's probably because you're using version three and you'll know it at the time so you can disable it. Enabling GSS security is an old security method and there are newer ones so we're not going to enable that. Okay, so now we are on this page where we choose which directories we want to export.
So we click on "add directory" and we can browse and just for demonstration purposes, I'm going to pick "home directory" and "documents." Now this is which host you want to allow to connect. The default is a wild card and unless you have a reason to narrow it down, leave it with the wild card. We now hit finish, and it starts up.
So let's take a look, make sure our server is running. We'll switch to a terminal and we'll use "system control status." We've got some choices for NFS here. We're gonna choose the server. And we can see that the server is loaded and active. And because SUSE uses YaST to work with the standard configuration files, we can take a look at the "etc" export file and we can see that yes, in fact, "home user" documents is shared.
Let's take a look at FTP. Enlarge this so we've got more screen space. And it's reading in the configuration files for the default setup. The choices you have to make here are whether you want the service to start when it's booting, when it's "via xinetd," which is a method of basically port-knocking. You request FTP and then it becomes available to you, or manually. Most cases, you're gonna want to start it up on booting, so let's make that change. And then whether we want it started now, and we'll go ahead and we will say "yes." General tab, this is where you can do things like setting up where you want the files to be stored.
The default is the server folder, FTP. We'll leave it there. Performance, you can set your "timeouts" here, depending on your load. Authentication, the default is for both anonymous and for authenticated users. So there are a lot of other things these days like single sign-on servers which handle those things now. But it's good to at least have authenticated users only unless you have a specific reason to serve something up anonymously.
And let's go ahead and hit "finish." And now to make sure that's up and running, let's switch to our terminal. So we'll use system control, we'll check the status of "very secure FTP daemon." And we can see that we've got it active, loading and running. Let me show you another way to check if the servers are up and running. Let's clear our screen. And there is a tool, "netstat," that we can use and we can say that we want to find out what's listening on what port number.
And if we then go through these, we can see which ports are open and which ports are not open. So for example, at this point we've got Port 80 open, so we can see we've already got our web server running, and now on Port 21, we've now got our FTP server running. If you need your network environment to be interoperable with Windows for file sharing, you're gonna need to run Samba Server. We'll see what that takes.
The first thing you need to choose is a group or domain name. In almost all cases you're simply gonna go with the workgroup "WORKGROUP." It's the default of everything. So unless you specifically have changed it somewhere else, you're gonna want to leave it as "WORKGROUP." If you need to run a primary domain controller or a backup domain controller, you can make those choices. In most cases in a Linux environment you're going to be running something like an LDAP server instead so you'll leave the default which is not a domain controller.
We do want this to start up at boot, so I'll make that choice, Shares, there's going to be defaults for things like home directories, temp directories for printers, let's go with those defaults. Again, we're going to keep with the "WORKGROUP." We don't need to worry about NetBIOS, that's not used really on networks anymore. Trusted domains, this is one of those things where if you don't know what a trusted domain is, you don't need it. It's if you have a Windows environment and you've got various different domains and they have different statuses of trust, then you would add those here.
LDAP, if you've got LDAP on your network that you're going to be using for authentication, this is where you'd fill in the information. Let's go ahead and click "OK." And it looks like that started up. Let's bring up a terminal to see if that's running. As you can see, our SMB Daemon is up and running and serving shares.
- What is SUSE Linux Enterprise?
- Installing SLES
- Linux file types
- Working at the command line
- Managing processes
- Working with background processes
- Managing users and groups
- Changing file permissions
- Configuring network interfaces
- Displaying hardware information
- Managing drivers