Linux network configuration and RAM packages

Source: Internet
Author: User

Linux Network

Making a Swap partition

swapon-s Viewing the active state of the partition

free-m View partition information in M units

Swapoff to close an active partition

mkswap making swap partitions

Network configuration

ifconfig (View the active NIC information) install the Yum install Net-tools-y

iptables-f shutting down the firewall

Setenforce 0 Close Seliunx

ifconfig network card name 192.168.1.1/24 temporarily set IP

ifconfig Network card name: 0 (number for the first few pieces) 192.168.1.1/24 new virtual network card

ifconfig Network card name down off network card up active

Permanently set fixed IP

Storage directory for network configuration files etc/sysconfig/network-scrips/

To modify the vim/etc/sysconfig/network-scrips/NIC name using the editor

Bootproto Static

IPADDR IP Address

NETMASK Subnet Mask

Gateway Webmaster Address

DNS1 Primary DNS Address

DNS2 Secondary DNS Address

...                        ...

Onboot Yes

Srevice Net work status start network card

Srevice net work stop stops the NIC

Srevice Net work restart restart NIC Service

Systemctl (version 7)

View status

Turn off

Route-n View Gateway

No Gateway Route-n View

Resolve problem, domain name cannot communicate, go to config file solve parsing problem

Specify to resolve DNS nameserver

Specify local resolution (priority higher than resolv.conf) vim/etc/hosts IP address + domain name

Add a Gateway

You can specify the NIC Dev (Nic name) later

Remove Gateway Routr del default GW (Gateway)

Package Management

DF Displays the available disk space on the disk partition, and you can see the default mount point of the disc

Mount your own disc

Mount (PATH) set mount point

PACKAGSE Storage RPM Package

RPM-IVH (package name) (plus. RPM): Installation package

Rpm-q (package name): View installation package

Rpm-qa (View all) | GERP Package Name (view specified package from all packages)

RPM-E (package name): Unload Package

RPM-QL (package name): View Package Installation Location

Rpm-qi (Package name): Package Installation Details

RPM-QF (Command file absolute path): Check which package the command was created in

RPM installation has a dependency problem

Yum command

Yum list: What RPM packages are listed

Yum grouplist: What package groups are listed

Yun Groupinstall group name-y: Install package Group

Yum management rpm has no dependency problem

Can be matched with-*.

Yum Erase (package name): Delete Package

Yum Install (package name): Installation package

The Yum source is a network source in the/etc/yum.repos.d/path.

Configure the local source yourself:

The source needs to include the RPM package folder and the configuration file to resolve the dependency, the simple RPM source is meaningless

/opt/repodata in CD-ROM with dependencies

The specified directory must be in the/OPT directory, the package + dependency

Under/ETC/YUM.REPOS.D, write a file ending in. Repo, divided into five paragraphs:

1. Title

2. name= Yum Source Name

3.baserul=http://URL Network source

file://Source Path Local source

4.enabled=1 Open Yum Source 0 off

5.gpgcheck=0 does not detect key

Yum Makechche-y does the detection cache, and after the cache is downloaded, the clearout cache is not retrieved than the Yum source detection

Note: The yum source will automatically update the software, causing the environment software not unified! Will erase the updated package!

Edit in/etc/yum.conf

Cacahedir = Cached Directory

Keepcache = Download package retention is changed to 1, default is 0

Under this file, the default software update is that it will automatically download updates, set to no shutdown

Copy the downloaded package to your own directory as the source

Install the Creatrepo command

Dependency relationship to Source

More Repodata dependent.

Successfully completed Yum source

Delete Default source

Baseurl= own source Path

Configuration Complete!

Compile and install, install source code, such as Python

Download Surce Tarball's tar Package

Yum Install Lrzsz (this package can be dragged directly)

Unzip the TAR package

Go to python3.** Directory

./configure to compile the pre-installation configuration, specify the installation path:

Make compilation must have development tools installed

Make compile in the python3.** directory and install and complete after making the installation.

Linux network configuration and RAM packages

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.