How Linux uses

  
on enterprise servers

Linux systems are important, and ordinary computer users may have a hard time knowing. Because personal computers are usually equipped with Microsoft systems, Linux is widely used in enterprises and large servers. This article will introduce Linux's application on larger servers. Just a few simple examples, you know how important Linux is.

1, the basic command

1.1 file operations

(1) New: touch the file name (for example: establishing a file named d in the tmp directory, Command: touch/tmp/d). (2) Cut: my old file name new file name (example: cut the file d under tmp to the root directory and rename it to e, command: my/tmp/d/root/e) o(3) copy Paste: cp-rf file source copy destination (Example: copy the root directory to the tmp directory, command: cp-rf/root//tmp/. Copy all files in the root directory to the tmp directory, command: cP A rf /root /* /tmp /can complete the operation) 0 (4) delete: rm a rf directory name or file name (example: delete all files in the tmp directory, command: rm arf /tmp /*).

1.2 Find Files

(1) Find by file name: find path name file name (Example: Find the file named grub.conf from the boot directory, command: find/Boot a name grub.conf). (2) According to the owner search: find path a user owner name (example: find all files belonging to the root user from the root directory, command: find /-usr root). (3) Find the currency nd path-size file size according to the file size (Example: Find the file whose file size is less than lOk from the root directory, command: find/-size-1Ok). (4) Comprehensive search: For example, find the files belonging to the root user and larger than l OM from the boot directory, and copy the found files to the tmp directory. Command: findlboot/-user root size l OM-execcp -rf { }/tmp\\.

1.3 compressed file

(1) compression: compressed in tar format (example: compress the file in /root/boot/etc directory to f.tar in the root directory, command: tar - cvf/f.tar/root/boot/etc to complete the operation). Compressed in gaP format (for example: compress the files in the /root/boot/etc directory to f.tar.gz in the root directory, command: tar_zcvf/f.tar.gz/root/boot/etc). Compressed in bzip2 format (example: compress the files in the /root/boot/etc directory to f.tar.bz2 in the root directory, command: tar-jzvf/f.tar.bz2/root/boot/etc) o(2 Decompression: Unzip the tar file (for example: extract f.tar to the }P directory, command: tar_xvf/f.tar-C/tmp). Unzip the file in g}P format (example: extract f.tar.gz to the tmp directory, command: tar_zxvf/f. tar. gz-C/tmp). Unzip the bzip2 format file (for example: extract f.tar.bz2 to the tmP directory, command: tar - jxvf/f .tar. bz2 - C/tmp ).

2, build ftp server

ftp server is a file sharing server, can upload and download files, usually have anonymous login and username and password login two ways.

2.1 Anonymous login

Query whether to install: rpm a qa}grep vsftpd, install: yum install a Yvsftpd, open the service: chkconfig vsftpd on, edit the configuration file: vi /etc /vsftpd /Vsftpd .conf(anonymous_enable=yes; remove ##:#anon_upload_enable remove ##:#anon_mkdir_write_enable=yes), save after editing::w, restart service: service vsftpdrestart, modify permissions: chmod ow/var/ftp/pub, Set selinux permissions: setsebool a Pallow_ftpd_anon_write=1 a chcon a tpublic_content_rw_t/var/ftp/pub.

2.2 authentication login

Edit configuration file: vi/etc/vsftpd/vsftpd .conf (anonymous_enable=no;chroot local_user=YES)Save after editing::w restart service: service vsftpd restart, set selinux permission: setsebool-Pftp_home_dir=1. Previous123Next page Total 3 pages

Copyright © Windows knowledge All Rights Reserved