0 Basic Learning Cloud computing and Big Data DBA cluster Architect "Linux system configuration and network configuration December 28, 2015 Monday"

Source: Internet
Author: User

2015.12. -/MonAbstract **************1. User Login Process/ETC/PROFILE/ETC/PROFILE.D/* /ETC/BASHRC ~/.bash_profile ~/.bashrc2.vim Editor Command mode \ edit mode \ Exit Mode 3. Software Installation method source code \ Binary \rpm\yum********** User login process **********1. Role: In the user login process, you need to read some of the parameters of the column, these parameters are stored in some files 2. related files:/etc/profile |/etc/profile.d/*} global profile/ETC/BASHRC |~/.bash_profil e} configuration file for a single user ~/.BASHRC} path: Paths to the command that executes the first matching executable file 3. Read order and include relationship/etc/profile start/etc/profile.d/* start/etc /profile.d/* End/etc/profile End------------------------~/.bash_profile start ~/.BASHRC START/ETC/BASHRC s TART/ETC/BASHRC End ~/.BASHRC End~/.bash_profile ENDSU-on behalf of the standard login, will read to the above 5 configuration files Su represents a non-standard landing, will not be read to some configuration file thinking: 1. If I want to student user's umask value bit 044, and the permanent effect, where should I write? 2. If I want student user's umask value not to be overwritten, where should I write. Detailed interpretation of the relevant documents **********1.    /etc/profile (login shell will read) determines many important variables based on the user identifier (UID), which helps all users to set the overall environment main variables are: path: Depending on the UID determines whether the path variable contains the Sbin directory;    MAIL: According to the account set the user's mailbox is the/var/spool/mail/account name;    User: Set the content of this variable according to users ' account;    HOSTNAME: The variable content is determined according to the HOSTNAME command of the host; Histsize: The history Command records the number of pens.  REDHAT6 is 1000; Call some external programs: under the REDHAT6 version, theseThe data is called in sequence: 1)/etc/profile.d/*.sh the file under this directory is a specification of bash interface color, language, command alias, etc. 2)/etc/sysconfig/i18n by/etc/profile.d/la Ng.sh call, decide what language 2.~/.bash_profile the Bash preset uses (login shell will read) after bash reads the global profile/etc/profile, then the main variable that reads the user's personal profile is: PATH:   Path= $PATH: $HOME/.local/bin: $HOME/bin call some external programs: REDHAT6 version 1) ~/.BASHRC call/ETC/BASHRC3./ETC/BASHRC 1) According to the UID specification Umask 2) According to the UID specification prompt character PS1 3) call/etc/profile.d/*.sh settings **********vim********** Command mode: yy copy a row, copy the current line p paste, paste at the current bit value 3yy copy the current line and the following two lines, Same as P paste DD 1) cut the current line, paste with P 2) Delete the current row 2DD clipping two rows or delete two rows G jumps to the last line GG to the first row 5G jump to line fifth U undo Action ctrl+r Anti-undo v->y p Select Copy paste extension: N<spa Ce> the cursor moves the n characters of this line to the right n<enter> the cursor moves n lines 0/[home] move to the front of the line prompt $/[end] move to the last character of the line expand Search and replace:/word Looking for a string named word under the cursor? Word searches the cursor for a string called word n repeats the previous search action, forward n repeats the previous search action, the reverse command mode switches to insert mode I insert I at the cursor position value at the beginning of the cursor location  Enter o A new line below the position value line of the cursor insert o A new line above the line where the cursor is positioned insert a at the end of the position of the cursor insert a in the location of the position of the next character of the cursor insertion of the exit mode: Enter mode: in command mode press SHIFT +: Exit mode can do 1): W Save : Q Quit:! Force 2): Set Nu View line number: Set Nonu Cancel line number 3): Nohl Cancel HighlightShow 4): N Jump to that line 5) Replace:: S/carol/natasha Replace the first occurrence of the cursor in the row with the carol natasha:s/carol/natasha/g to the row of the cursor all Carol are replaced by Natasha,g to represent the full line substitution :%s/carol/natasha replaces Carol in full text with bit natasha,% for full-text substitution expansion:: n1,n2s/word1/word2/g searches for N1 string between N2 and Word1 lines and replaces the string with bit word2, for example: 10 0,200s/dabao/tom/g: 1, $s/word1/word2/g look for the word1 string from the first line to the last line, and replace that string with bit word2:1, $s/word1/word2/gc looking for word1 string from first line to last line , and replace the string with a bit word2 to display the prompt character to the user before replacing 6)! Command temporarily switch to bash and press any key back to vim. command to insert the result of the command execution into the edited file to expand:: w [filename] Save document as FILENAME:N1,N2 w [filename] Save document N1 to N2 row as filename:r [filename] Read order a document, The document displays the Vim protection from the next line of the light table. When the file is saved, an abnormal exit or someone is editing the document, a prompt interface appears. It is not possible to use VIM to access this file until File.swp (a hidden file with the same name as SWP end) is deleted. Installation mode **********1. Source code Installation Advantages: can be customized shortcomings: complex operation, long compilation time, very prone to error source code installation steps: 1) Download decompression 2) detection Configure check our compilation environment, related library files and configuration parameters, etc.  Test report 3) compile make to compile the source code into an executable binary 4) Install the make install executable that installs the build number 2. Binary Installation 3.rpm:redhat package management Package management mechanism for Redhat system RPM naming specification: Software name-version number-operating system platform libreoffice4.1-calc-4.1.6.2-1.x86_64.rpmzlib-1.2.3-29.el6.x86_64.rpm #install安装1) RPM-IVH [x.rpm] installation v\h show progress bar during installation Verbose\hash#query query 2) rpm-q [software name] View Software Installation 3) Rpm-qi [software name] View software details 4) RPM-QL [software name]       View the files installed on the system by the software 5) RPM-QF [file name] See which package the file is installed from 6) RPM-QA See all installed packages in the system # Uninstall REMOVE6) RPM-E [software name] Uninstall software --nodeps do not uninstall dependencies #update upgrade 7) Rpm-u [software name] upgrade, if not the software installed 7) rpm-f [software name] upgrade, if not the software does not install example:/mnt/rhel6.5/x86_64 /dvd/packagesmount 172.25.254.250:/content/mntvsftpd4.yum function: In order to solve the dependency between packages, a management mechanism, based on the RPM-front-end package management mechanism. 1) Warehouses are used to store dependencies between software and software Repodata directory/mnt/rhel6.5/x86_64/dvd/repodata/#新建仓库/etc/yum.repos.d/* [Test] name = info base   url = local file://[path] Remote http://[host name or ip/path] enable=1 <== whether to enable the warehouse gpgcheck=0 <== whether Detect = 1 o'clock also configure gpgkey= #范例  /etc/yum.repos.d/server.repo [Server] name = rhel6.5 Repos BaseURL =http://classroom.example.com/content/rhel6.5/x86_64/dvd/   enable=1 gpgcheck=02) Installing yum install [software name]yum install-y [software name] Ignore the Is this OK interaction information in the installation process 3) query Yum list to query all packages Yum List Inst alled View installed packages yum Serch [string] lists the related packages containing the string yum info [software name] View package details Yum grouplist [group name] query system all packages Yum GroupInfo [group name] Check See information about specified groups in the system 4) upgrade Yum Update [software name]yum upgrade[software name]5) Uninstall Yum remove [software name] not recommended, will also delete the warehouse, preferably with rpm-e--nodeps do not unload dependency 6) Clean cache yum  Clear all to clean up the cache yum MAKECACHERPM-IHV Createrepo example: 1. Copy the/mnt/software/office to the/tmp directory 2. Generate Repodata directory under/tmp/office Createrepo/tmp/office3. Create a new warehouse under/ETC/YUM.REPOS.D, named Office.repo4. Install the software under the Office directory. ====================================================== Expansion: Installation of Mplaer1. Get the original file: Extract the Tarball file in the/USR/LOCAL/SRC directory; 2. Get the step flow: Go to the newly created directory and check the contents of the relevant files such as INSTALL and README (important steps!); 3. Dependency Properties Software Installation: According to the contents of Install/readme and install some dependent software (not necessary); 4. Establish makefile: detect the working environment with the Automatic detection program (configure or config) and establish the makefile file; 5. Compile: To make this program and use Makefile in this directory as his parameter configuration file for making (compilation and other) action; 6. Install: To make this program, and to Makefile this parameter configuration file, according to install the target of the specified to be installed to the correct path!

0 Basic Learning Cloud computing and Big Data DBA cluster Architect "Linux system configuration and network configuration December 28, 2015 Monday"

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.