1. Install SSH:
Type the following two command to install both ssh client and server:
#sudo apt-get install openssh-server openssh-client
Start SSH Server:
# sudo /etc/init.d/ssh start
Stop SSH Server:
# sudo /etc/init.d/ssh stop
Restart SSH Server:
# sudo /etc/init.d/ssh restart
2. Installing and setting TFTPD in Ubuntu
- Install tftpd and related packages.
$ sudo apt-get install xinetd tftpd tftp
- Create /etc/xinetd.d/tftp and put this entry:
service tftp
{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = /tftpboot
disable = no
}
- Make /tftpboot directory
$ sudo mkdir /tftpboot
$ sudo chmod -R 777 /tftpboot
$ sudo chown -R nobody /tftpboot
- Start tftpd through xinetd
$ sudo /etc/init.d/xinetd start
Or
$ sudo /etc/init.d/xinetd restart
3. NFS Server
- In order to set NFS server you need to install the following packages:
=> nfs-kernel-server - Linux NFS Server
=> nfs-common - NFS Common programs
=> portmap - The RPC portmapper
- Use apt-get command to install all required packages:
$ sudo apt-get install nfs-kernel-server portmap nfs-common
- Sharing directory with /etc/exports
$ sudo vi /etc/exports
To export /data directory to 192.168.1.0/24 network enter the following
in /etc/exports file:
/data 192.168.1.0/24(rw,rsync)
To export /sales to hostname tom and jerry, enter:
/sales tom(ro,sync) jerry(ro,sync)
To export /users to 192.168.1.0/24 in read write format, enter:
/users 192.168.1.0/24(ro,sync) jerry(rw,fsid=0,insecure,no_subtree_check,async)
/AMCC/ppc_4xx *(rw,no_root_squash,no_all_squash,sync,no_subtree_check)
Where,
* rw : Allow clients to read as well as write access
* ro : Read only access
* insecure : Tells the NFS server to use unpriveledged ports (ports > 1024).
* no_subtree_check : If the entire volume (/users) is exported, disabling
this check will speed up transfers.
* async : async will speed up transfers.
Save and close the file. Just restart nfs-server:
$ sudo /etc/init.d/nfs-kernel-server restart
Now your NFS sever is sharing /sales and /data directories.
Sunday, July 4, 2010
Ubuntu Server
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment