Software Testing Professional Technology Linux Chapter __linux

Source: Internet
Author: User

Basic commands for Linux learning from deploying test environments, the main Linux commands used to deploy the test environment are:

1. Copy files from afar to local directory:

SCP [parameters] [Original path] [Target path]

SCP remote User name @IP address: filename Local user name @IP address: filename 1


-V is the same as the-V meaning in most Linux commands, and is used to show progress. Can be used to view connections, authentication, or configuration errors.

-C enables compression options.

-P Select the port. Note-P has been used by RCP.

-4 forcibly use IPV4 address.

-6 forcibly use IPV6 address.

Example:

SCP root@***.***.***.***:/opt/soft/nginx-0.5.38.tar.gz/opt/soft/This input does not require a username and password

2. Create a table of contents

Mkdir/mnt/vcdrom

3. Mounting a mirrored file

Mount [-t vfstype] [-O options] Device dir

A.-t vfstype Specifies the type of file system, which is not usually specified. Mount will automatically select the correct type

DOS FAT16 file system: MSDOS

Windows 9x FAT32 file system: VFAT

Windows NT NTFS file system: NTFS

Mount Windows file network share: SMBFS

UNIX (LINUX) file network share: NFS B.-o options are primarily used to describe how devices or files are hooked up

Loop: Used to mount a file as a hard disk partition to connect the system

RO: Use read-only way to hook up equipment

RW: Hook up device with read-write mode

Iocharset: Specifies the character set used to access the file system

C.device the device to hook up (Mount).

D.dir (mount point) of the device on the system.

For example:

Mount-t Iso9660-o loop/root/rhel-5.10-x86_64-dvd.iso/mnt/vcdrom/

4. See if the mount was successful

Df–lh

5. Install Dependency Pack

Yum Install * * *

6. See if the dependent package installation was successful

RPM-Q * * *

7. Edit the contents of the file

Vi/etc/yum.repos.d/cluster.repo

8. Set up a user group * *

Groupadd * * 9. Add User

Useradd option User Name

-C Comment Specifies a section of an annotation description.

The-D directory specifies the home directory, and if this directory does not exist, the-m option can be used to create the main catalog.

The-G user group specifies the user group to which the user belongs.
-G user group, where the user group specifies the additional group to which the user belongs.
-S Shell file specifies the user's login shell.
The-u user number specifies the user's user number, and if the-o option is available, the other user's identification number can be reused.
User name Specifies the login name of the new account.

Example:

Useradd-g oinstall-g dba-d/home/oracle Oracle

10. Set User Password

passwd Oracle

Enter Password: * * *

11. Set Permissions

chown [Options] ... Owner [: [Group]] file ...

-C Displays information about the changed part

-F ignores error messages

-H Repair Symbolic link

-R handles all files in the specified directory and its subdirectories

-V Display detailed processing information

-deference to the point of the symbolic link, not to the linked file itself

Example:

Chown-r oracle:oinstall/home/oracle– changes the/home/oracle directory and the owner of its subdirectories to Oracle, and the group to which it belongs is Oinstall.

12. Reboot after modifying configuration file:

Source file name

source. bash_profile

13. Delete Files

RM file Name

14. View current Working directory

Pwd

15. Go back to the parent directory of the current directory

Cd..

16. Return to the root directory of the current directory

CD/























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.