CentOS 7.2 Considerations for setting up Yum

Source: Internet
Author: User

Recently, a few of the following tests were shared on the Yum local source test:

About security mechanisms (firewalls and selinux):

Under Centos7, the firewall is set under/USR/SBIN/FIREWALLD. Can be used: Systemctl start|stop|restart|status firewalld or service Firewalld start| status| Stop|restart modified. Note View Status: Ps-ef | grep Firewalld. There is also a security mechanism that is selinux. Check the status: Sestatus. Temporary shutdown: Setenforce 0 Permanent shutdown is: Modify the/etc/selinux/config configuration selinux=disabled. (Effective after reboot)

Local testing: Build a Yum source. copy files from CD to/data/

MOUNT/DEV/CDROM/MNT (mounted CD, returned after success: Mount:/dev/sr0 is write-protected, mounting read-only)

Cp-r/mnt/packages/*/data/(Copy the package from CD)

createrepo/data/(Create Yum Warehouse)

You can move the file to the end of the. Repo below the/etc/yum.repos.d/(with commands such as MV) to reconstruct the Yum.repo file as a new Yum source.

Vi/etc/yum.repos.d/yum.repo (edit config file)

[Yum]
Name=centos7
baseurl=file:///data/
Enabled=1
Gpgcheck=0

After the build, you can first empty the original cache yum Clean all

You can then apply the new test source to install the software.


all paths must use the tab key on the keyboard, the tab can not complete the most is wrong or not.


Next, use the HTTPD service to do the Yum configuration of the network.

Yum Server test:

First: Copy the required packages to httpd (CentOS will bring your own httpd service) to the default Web site Directory/var/www/html

MOUNT/DEV/CDROM/MNT (mounted CD, returned after success: Mount:/dev/sr0 is write-protected, mounting read-only)

Cp-r/mnt/*/var/www/html/(if it is the source installation will usually manually specify the path, then the path needs to be copied into the $apache installation path/htdocs/)

Createrepo $apache Installation path/htdocs/or createrepo/var/www/html/(Generate Yum repository)

Test Machine Section configuration:

On the test machine, you can move the file where the/etc/yum.repos.d/below. Repo ends (with commands such as MV) to reconstruct the Yum.repo file as a new Yum source.

Vi/etc/yum.repos.d/yum.repo (edit config file)

[Yum]
Name=centos7
Baseurl=http://yum Server ip# Because the program is placed in the default directory of httpd, only the IP can be filled
Enabled=1
Gpgcheck=0

After the build, you can empty the original cache yum Clean all


There is no workaround for the killall or ifconfig command after the CentOS 7 Lite installation:

Yum Install Psmisc

After you have configured Yum, you want to install killall with Yum but hint that there is no killall package.

Because, Killall is included in the Psmisc package.

The PSMISC package contains three programs that help manage the/proc directory.

Install the following programs: Fuser, Killall,pstree and pstree.x11 (link to Pstree)

Fuser displays the PID of the process using the specified file or file system.

Killall a process that kills a name, signaling to all processes that run the specified command.

The Pstree tree displays the currently running processes.

Pstree.x11 and Pstree function the same, only need to confirm before exiting.

Ifconfig and Killall are similar because. The Net-tools package is included when you change the command.

Yum Install Net-tools

If you want to see the specific information. After the installation is complete:

RPM-QL Net-tools (rpm-ql psmisc)

Handling an error: Existing lock/var/run/yum.pid:another copy is running as PID 5048

Yum supports only one process. If Yum is in the upgrade or update. Yum source is not available.

Workaround:

Rm-f/var/run/yum.pid






CentOS 7.2 Considerations for setting up Yum

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.