Linux Linpus home network - made easy

Discussion in 'Linux' started by qbic2005, Jul 28, 2008.

Thread Status:
Not open for further replies.
  1. qbic2005

    qbic2005

    Joined:
    Jul 24, 2008
    Messages:
    42
    Likes Received:
    0
    What is a netbook without networking? So that is why I think there should be a guide to setup the most common network stuff.

    (This will be a guide that is supposed to grow as I get things working on my machine ...)
    Index:
    1. Hostname
    2. NFS client
    3. Samba
    4. Printing

    1. Hostname
    [EDIT : just got solved with a little help from shihan]
    You'll have to set your hostname in "/etc/sysconfig/network", you can't edit "/etc/hosts" because that gets overwritten on every reboot.
    Also you have to command out the line : "HOSTNAME='/bin/hostname'
    Code:
    #mousepad /etc/sysconfig/network
    HOSTNAME=[your hostname without domain name!!]
    Reboot and that should do the job....

    2. NFS client

    (To setup the server, please follow a guide specific for your distro or OS)

    Install the following from the package manager:
    rpcbind - 0.1.4
    nfs-utils - 1:1.1.1

    Create this directory:
    Code:
    #mkdir /var/lock/subsys
    Execute these commands:
    Code:
    # service rpcbind start      (this rpcbind seems to be the replacement for portmap)
      # service nfslock start 
      # service netfs start
      # chkconfig rpcbind on
      # chkconfig nfslock on
      # chkconfig netfs on
    To check that the appropriate services are running you can execute rpcinfo:
    Code:
    # rpcinfo -p
       program vers proto   port  service
        100000    4   tcp    111  portmapper
        100000    3   tcp    111  portmapper
        100000    2   tcp    111  portmapper
        100000    4   udp    111  portmapper
        100000    3   udp    111  portmapper
        100000    2   udp    111  portmapper
        100000    4     0    111  portmapper
        100000    3     0    111  portmapper
        100000    2     0    111  portmapper
        100024    1   udp  32792  status
        100024    1   tcp  44507  status
        100021    1   tcp  50882  nlockmgr
        100021    3   tcp  50882  nlockmgr
    Now with the following you can check which shares are available on your server:
    Code:
    #showmount -e [server ip/name]
    Mount the drive wherever you want with the following command:
    Code:
    #mount -o nfsvers=2 [server ip/name]:/home Network/home
    (I had to add the 'nfsvers' option because my nfs server is version 2 and linpus defaults to version 3, but this depends entirely on your distro and setup)

    To have that mount automated, you'll have to edit /etc/fstab, my entry looks like:
    Code:
    [server]:/home        /home/user/Network/home nfs     auto,nfsvers=22ro,user  0 0 
    4. Samba (clientside)
    I don't think such a guide could do without the setup instructions for this app ... but I don't have any direct use for this, so it would be super if someone would feel the need to fill this gap ;-)

    5. Printing
    A) to windows print server

    B) to linux print server
    (my next item I will try to get to work through cups)


    Addendum:
    Please feel free to add any useful information or correct me where I made mistakes. English is not my primary language, my excuses if there are some (to many) mistakes in the text...
     
    qbic2005, Jul 28, 2008
    #1
  2. qbic2005

    drvolk

    Joined:
    Jul 31, 2008
    Messages:
    5
    Likes Received:
    0
    Thanks for this little HowTo.

    I still have the problem that my NFS connection will not be established automaticly when booting the system. I think the reason is that the nfslock service could not be started because there is no network device with an ip adress at this time (in my case it is an wlan connection which takes longer to be activated as the rest).

    Is there a way to make the NFS connection dependent on a successfull established wlan connection ?
     
    drvolk, Aug 1, 2008
    #2
  3. qbic2005

    jrs

    Joined:
    Jul 31, 2008
    Messages:
    35
    Likes Received:
    0
    I'll fill in item 4, How to Connect to a Samba Share as a client --

    No additional software is needed. Given you already know the name and shared drive on the server, you can jump right to mounting the share through fstab (from the terminal):

    1. Create your mount point.
    Code:
    sudo mkdir /mnt/share
    2. Edit the fstab:
    Code:
    sudo mousepad /etc/fstab
    3. Add the share in fstab by going to the bottom of the file and adding on a new line:
    Code:
    //remoteserver/sharename /mnt/share cifs user=Username,pass=Password,uid=1000,iocharset=cp850,unicode 0 0
    Save and exit.

    4. Mount the drives.
    Code:
    sudo mount -a
    Obviously change Username and Password based on your install. This is all plaintext, if you want security you'll need a credential file. Your iocharset may vary, cp850 seems to work well with my Buffalo Linkstation. Best of luck!
     
    jrs, Aug 2, 2008
    #3
  4. qbic2005

    qbic2005

    Joined:
    Jul 24, 2008
    Messages:
    42
    Likes Received:
    0
    Thank you @ jrs !!! ;)

    Concerning NFS:
    I'll have to confirm that you have to start nfslock and netnfs manually (or script) after a reboot, because nfslock can not be initialized without ip address. I'm currently searching for a solution.
    :roll:
     
    qbic2005, Aug 2, 2008
    #4
  5. qbic2005

    axcairns

    Joined:
    Aug 8, 2008
    Messages:
    92
    Likes Received:
    0
    I got the samba shares on my server mounting fine but they drop out after suspend/resume. Any suggestions?

    Allan
     
    axcairns, Aug 9, 2008
    #5
  6. qbic2005

    jrs

    Joined:
    Jul 31, 2008
    Messages:
    35
    Likes Received:
    0
    Allan, I have a hunch you'll need to modify /etc/sysconfig/network-scripts/ifup to remount the volume. I'd look around or ask on a Fedora forum before digging in. Let us know when you get it working.
     
    jrs, Aug 9, 2008
    #6
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Thread Status:
Not open for further replies.