Common service program configuration in Linux

Source: Internet
Author: User
Tags nfsd
Article Title: common service program configurations in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

NFS:

Nfs composition: rpc. portmapper, rpc. nfsd, rpc. mountd

Nfs installation: sudo aptitude install nfs-kernel-server or nfs-user-server

Start and stop nfs: sudo/etc/init. d/nfs-kernel-server restart | stop | start

Nfs check: ps ax | grep nfsd ps-aux | grep portmap

Nfs configuration: in the/etc/exports file

/Usr 192.168.1.100 (rw)/home/xp 192.168.1.12 (rw, sync) * (ro, async)

Option description:

No_root_squash remote root users have full access permissions to the nfs Directory

Rw read/write, default ro read-only sync Synchronization

Configuration check: exportfs-rv

Client:

View NFS shared content: showmount-e server host name or ip address

Installation: sudo mount 192.168.1.100:/home/share/mnt/nfsdir

Uninstall content: sudo umount/mnt/nfsdir

FTP: port: 21

Install: sudo aptitude install vsftpd

Start and stop: sudo/etc/init. d/vsftd start | stop | restart

Configuration File:/etc/vsftpd. conf

PAM Configuration:/etc/pam. d/vsftpd

User Access Control:/etc/vsftpd. ftpusers local user static login/etc/vsftpd. user_list

Set the idle session interruption time: idle_session_timeout = 600 (second)

Set the idle data connection interruption time: data_connection_timeout = 120

Set the automatic disconnection and activation connection time when the client is idle: accept_timeout = 60 connect_timeout = 60

Vsftpd anonymous upload Configuration:

Anon_upload_enable = Yes

Anon_mkdir_write_enable = Yes

Anon_other_write_enable = Yes

Anon_world_readable_only = No

Configure the speed limit and the number of connections per user:

Local_max_rate

Anon_max_rate

Max_per_ip

Max_clients

Configuration Based on Local Users:

Userlist_enable = Yes

Userlist_deny = Yes

Userlist_file =/etc/vsftpd. user_list

Client operation:

Get remotefile [localfile]

Put localfile [remotefile]

Mget remote-files

Mput local-files

Lftp command:

Mirror [option] [remote [local]

-C resume

-R: Upload the entire directory

-R does not need to be recursive to the directory.

-N: only download newer files


Some service programs require xinetd: sudo aptitude install xinetd

Start xinetd: sudo/etc/init. d/xinetd reload

Test xinetd: ps ax | grep xinetd

The configuration files of xinetd are:/etc/xinetd. conf/etc/xinetd. d /.


TFTP: A non-connection UDP transfer file, which is generally used for small files to achieve simple port: 69

Install: sudo aptitude install tftpd

The installer adds a line in/etc/inetd. conf: tftp dgram udp wait nobody ......

Xinet needs to be converted to: itox-daemon_dir/usr/sbin </etc/inetd. conf

The/etc/xinetd. d/tftp file is the converted tftp segment.

/// // This part is available in tftp ////\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

View server_args =/srv/tftp in the/etc/xinetd. d/tftp file, and create it manually:

Sudo mkdir/srv/tftp

Sudo chmod a + w/srv/tftp

//////////////////////////////////////// /////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\

Restart xinetd to read the configuration file: sudo/etc/init. d/xinetd restart

Client:

Sudo aptitude install atftp

Atftp 127.0.0.1

TELNET: port: 23

Install: sudo aptitude install telnetd

Create a file:/etc/xinetd. d/telnet. The content is the segment converted from/etc/inetd. conf.

Restart xinetd, read the new configuration file, and activate the service.

SSH: port: 22

Install: sudo aptitude install ssh

View: sudo netstat-apn | grep ": 22"

Client Logon: ssh user @ ip Exit: logout

After login, you can use it like operating your computer

Do not log on to the other Party:

Scp localfile user @ ip:/remote_path or remote_file

Scp user @ ip:/remote_file localfile or localpath

/Etc/hosts. deny

Sudo/etc/init. d/ssh start | stop

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.