Linux usage Notes

Source: Internet
Author: User

I have been in the IT session for several years, still just lost in a primary school students, looking at the many Daniel Jiangshan the text Geitschobs, very envious. But the rice still has a mouthful to eat, since IQ can't keep up, follow up still want to try to do. Recently in the look at the Hadoop system, and the use of the long-lost Linux, the previous command is now as much as the creditors do not remember, had to look at the beginning. Worry about the back of this knowledge become creditors, just remember here, when you learn it.

The CentOS 6.5 virtual machine is installed on the VMware Workstation, which is a little more detailed. The virtual machine is not connected to the network, and the network connection, network adapter, settings, is changed to NAT mode (what is NAT?). Baidu Encyclopedia Link: http://baike.baidu.com/link?url=Bo4238due7OUUfexSs_xVLTel_ NXENHBXMJKT9IS2OLDJ9KMXCC8-CP6CUKGUMDSRBOPOUBSQQKKAZAQSXWVWK).

First installed JDK, the network rotten to explode, even an Oracle official website can not go, had to through the conscience of Sina Micro disk download jdk-7u25-linux-x64.tar.gz, download link: Http://vdisk.weibo.com/s/BJD8pmDP8CUsN

Forget, the current user's permission to improve it, or sudo can not do.  This is mainly to solve the problem that the user may not be in the sudoers file, Bawl, that is, "XXX isn't in the sudoers files. This incident would be reported. " This problem, XXX is the user name. The steps to resolve are as follows.

1. Switch to root, the command is:su root

2. Find/etc/sudoers, can not find the words, the first step after the implementation of the CD directly two. command, LS will be able to see the etc, you can see the sudoers in the

3. See if the profile's permissions are writable:ls-l./sudoers

4. If it is not writable, perform chmod u+w./sudoers

5. Edit sudoers file:vi./sudoers find this line root all= (all) all, add the following xxx all= (all) all, here xxx or user name.

Edit the time by pressing I key can be edited, after editing, press Esc->:wq is saved after the exit.

6. Revoke sudoers Write permission:chmod u-w./sudoers

This is done, ref: Http://www.cnblogs.com/zox2011/archive/2013/05/28/3103824.html

Here is a note, also written by Daniel of this article:

PS: Here you can sudoers add any one of the following four lines
Youuser all= (All) all
%youuser all= (All) all
Youuser all= (All) Nopasswd:all
%youuser all= (All) Nopasswd:all

First line: Allows the user to execute the sudo command youuser (requires a password).
Second line: Allow user group Youuser inside user to execute sudo command (need to enter password).
Line three: Allow the user to execute the sudo command youuser, and do not enter a password at the time of execution.
Line four: Allow user group Youuser inside user to execute sudo command, and do not enter password at execution time.

When finished, return to the user right, the command is: Su XXX

OK, install the JDK now. Reference Link: http://www.centoscn.com/image-text/install/2014/0827/3585.html

Here is a problem, that is, according to the last step described in this article to change the profile file, after the source command is always out of the wrong, I encountered a "not valid identifier" problem, obviously there is no space, I do not know why, this problem can be resolved, I changed the. bash_profile file under the user, and the JDK installation was successful.

(not finished)

Linux usage Notes

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.