Ubuntu12.04: samba, tftp, and nfs configuration, ubuntu12.04samba
1. samba setting
1> apt-get install samba
Apt-get install smbfs
2> mkdir/home/linux/Upload File
Chmod 777/home/linux/partition File
3> vim/etc/samba/smb. conf
Add as follows:
[Share]
Path =/home/linux/Upload File
Public = yes
Writable = yes
Read = yes
4>/etc/init. d/samba restart
2. tftp setting
1> check if tftp installed:
Dpkg-s tftp-hpa
2> apt-get install tftp-hpa
Apt-get install tftpd-hpa
3> sudo vim/etc/default/tftpd-hpa
Change as follows:
TFTP_USERNAME = "tftp"
TFTP_DIRECTORY = "/home/linux/tftpfile"
TFTP_ADDRESS = "0.0.0.0: 69"
TFTP_OPTIONS = "-c-s-l"
4> sudo service tftpd-hpa restart
5> test:
Tftp 127.0.0.1
Tftp> get file
Tftp> put file
Tftp> q
3. nfs setting
1> apt-get install nfs-kernel-server
2> vim/etc/exports
Add as follows:
/Home/linux/nfsfile * (rw, sync, no_root_squash, no_subtree_check)
3>/etc/init. d/nfs-kernel-server restart
4> test:
Mkdir/mnt/nfs
Monut-t nfs 127.0.0.1:/home/linux/nfsfile/mnt/nfs
How does RHEL60 install and configure tftp, samba, and nfs?
The following command is used to install the TFTP Server. If the TFTP Server is started, [root @ localhost Server] # netstat-a | grep tftp is not required.
Udp 0 0 *: tftp *: * If not, the RPM installation package is included in the Redhat Enterprise Linux 5 installation disc. After hanging on the disc, go to the folder and find the corresponding installation package. [Root @ localhost user] # cd/media/
[Root @ localhost media] # ls
RHEL_5.1 i386 DVD
[Root @ localhost media] # cd RHEL_5.1 \ i386 \ DVD/
[Root @ localhost RHEL_5.1 i386 DVD] # ls
[Root @ localhost RHEL_5.1 i386 DVD] # cd Server/[root @ localhost Server] # ls tftp *
Tftp-0.42-3.1.i386.rpm tftp-server-0.42-3.1.i386.rpm execute installation command
[Root @ localhost Server] # rpm-ivh tftp-server-0.42-3.1.i386.rpm
Configuration of several servers in linux: nfs tftp
Hide does not share its subdirectory in the NFS shared directory. no_hide shares the subdirectory subtree_check of the NFS directory. If you share a subdirectory such as/usr/bin, force NFS to check the permissions of the parent directory (default) no_subtree_check is relative to the preceding one. If you do not check the permission of the parent directory all_squash, the UID and GID of the shared file are mapped to the anonymous user anonymous, which is suitable for public directories. No_all_squash retains the UID and GID of the shared file (default). All requests of the root_squash root user are mapped to the same permissions as those of the anonymous user (default) the no_root_squas root user has full management access permissions to the root directory. anonuid = xxx specifies the NFS server/etc/passwd file. The UID anongid = xxx specifies that the NFS server/etc/passwd file is anonymous. the contents of your GID configuration file/etc/exports are as follows: $ gedit/etc/exports/home/share 192.168.1.1 (rw, sync) * (ro) configuration Description: grant read and write permissions to 192.168.1.1. Other machines only have read-only permissions. * Indicates all. 3. Usage: Load shared resources on client 192.168.1.1 # mount-t nfs 192.168.1.4:/home/share/mnt # cd/mnt tftp service installation configuration (redhat9.0 ): for the installation of the tftp service, for RedHat9.0, the tftp RPM package is on the third Disk of the installation disc, you can mount it with mount/dev/cdrom mnt/cdrom, copy to the/home/work directory and install the rpm-ivh tftp-server-0.32 ******** rpm-ivh tftp-0.32 ******* (this package is a client login to the tftp Server required) after installation, configure and enable the Service in linux. No matter which super-server, inetd, or xinetd is used, the TFTP service is disabled by default, therefore, you must modify the file to enable the Service. Switch to the cd/etc directory and open the configuration file command of the tftp service as emacs xinedt. d/tftp: service tftp {socket_type = dgram protocol = udp wait = yes user = root server =/usr/sbin/in. tftpd server_args =-s/home/work/tftpboot-c disable = no per_source = 11 cps = 100 2 flags = IPv4}, here, you can change it to the root directory of your tftp-server. The parameter-s specifies the chroot, -c indicates that you can create a file and save it. Then, exit the switch directory cd/home/work and create the tftpboot startup directory tftpboot mkdir tftpboot. Then, enable tft again. The p service command is service xinetd restart, and tftp-server is started. You can use the query command to check whether the tftp service has enabled netstat-a | grep tftp ...... the remaining full text>