Sudo and yum settings in Fedora9

Source: Internet
Author: User
After Fedora9 is installed, you should first set sudo. The role of sudo is to allow non-root users to directly add sudo to the command before the command when using commands without permissions, you can enter the password of your current user to complete the root user function, instead of switching the user back and forth every time you use su. The sudo configuration file is located in/etc/sudoers and requires the root permission to read and write data. In fact, you only need a simple line: [weihui @ eric ~] $ Su-[ro

After Fedora9 is installed, you should first set sudo. The role of sudo is to allow non-root users to directly add sudo to the command before the command when using commands without permissions, you can enter the password of your current user to complete the root user function, instead of switching the user back and forth every time you use su. The sudo configuration file is located in/etc/sudoers and requires the root permission to read and write data.

In fact, you only need a simple line:

[Weihui @ eric ~] $ Su-
[Root @ eric pppoe] # echo "weihui ALL = (ALL) ALL">/etc/sudoers

If you do not enter the password of the current user at each input, you can set it as follows:

[Root @ eric pppoe] # echo "weihui ALL = (ALL) NOPSSWD: ALL">/etc/sudoers

After that, you can test whether the operation is successful:

[Weihui @ eric ~] $ More/etc/sudoers
/Etc/sudoers: insufficient Permissions
[Weihui @ eric ~] $ Sudo more/etc/sudoers
# Sudoers allows particle users to run various commands
# The root user, without needing the root password.
......

We recommend that you do not use vi to edit files. This will produce some unrecognized errors. Under F7, I will directly use vi to edit the configuration file. The result will always prompt that there is a specific character error, in fact, I just added a line, but the error is always prompted, so it has been depressing for a long time.

Yum settings:

In the previous article "Fedora yum command details", I have already introduced some yum and yum commands. I will not talk about them much. Now I want to talk about the installation of yum source.

Before installing the yum source, you must introduce the GPG signature. The GPG signature is used to verify the integrity and security of the software package. It is important for system security. Currently, fedora9 integrates all the signatures, under the/etc/pki/rpm-pgp directory:

[Weihui @ eric ~] $ Ls/etc/pki/rpm-gpg
RPM-GPG-KEY RPM-GPG-KEY-fedora-rawhide RPM-GPG-KEY-livna
RPM-GPG-KEY-beta RPM-GPG-KEY-fedora-test RPM-GPG-KEY-rawhide
RPM-GPG-KEY-fedora RPM-GPG-KEY-freshrpms

[Weihui @ eric ~] $ Sudo rpm-import/etc/pki/rpm-gpg /*
[Weihui @ eric yumsoft] $ rpm-ivh livna-release-9.rpm
[Weihui @ eric ~] $ Sudo rpm-import/etc/pki/rpm-gpg/RPM-GPG-KEY-livna
[Weihui @ eric yumsoft] $ rpm-ivh freshrpms-release-1.1-1.fc.noarch.rpm
[Weihui @ eric rpm-gpg] $ sudo rpm-import/etc/pki/rpm-gpg/RPM-GPG-KEY-freshrpms

You need to add a yum plug-in to automatically select the fastest-Performing source. The plug-in name is yum-fastestmirror.

Use the yum command to install:

[Weihui @ eric ~] $ Sudo yum install yum-fastestmirror

In this way, you can use the yum command to install and update the software.

Author: linuxsir
Source: http://han-long.cn/blog/

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.