Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to find, decompress and package, sed, RPM, yum in linux

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you how to achieve linux search, decompression and packaging, sed, RPM, yum, I believe that most people do not know much, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

1. Find all the files in the / var directory that do not belong to root, lp, gdm,

Find-not-user root-a-not-user lp-a-not-user gdm

2. Count and sort the number of occurrences of each word in / etc/init.d/functions file (using grep and sed)

Grep-o "\" / etc/init.d/functions | sort | uniq-c | wc-l

Grep-o "\" / etc/init.d/functions | sort-u | wc-l

Sed-nr'/\ / p' / etc/init.d/functions | sort-u | wc-l

But the statistics of sed and grep are not the same, it is not very clear, please solve the problem.

3. Use sed to retrieve the IPv4 address of the local machine in the ifconfig command

Ifconfig ens33 | sed-n '2p' | sed's Uniq.inetUniple' | sed slots / netmask.$//'

Ifconfig ens33 | sed-nr '2s/.t (.) net.*$/\ 1Universe p'

Ifconfig ens33 | sed-nr '2s/ (^ .inet) (.) (netmask.*$) /\ 2Universe p'

Ifconfig ens33 | sed-nr '2s/ ^ .inet (.) net.*$/\ 1Universe

4. Summarize the configuration and use of yum, including the creation of yum repository.

Yum install tree-y

Yum repolist

Yum clean all

Yum reinstall tree

Yum remove tree

Yum Local Warehouse creates Network Source

Cd yum.repos.d

Vim base.repo

[epel]

Name=epel

Baseurl= https://mirros.tuna.tsinghua.edu.cn/epel/$releasever/$basearch

Gpgcheck=0

5. Write initialization script reset.sh including alias, prompt color, yum repository configuration file

6. Install tree, ftp, lftp, telnet

Yum-y install tree yum-y install ftp yum-y install lftp yum-y install telnet

7. Compile and install the apache2.4 source package on centos7, and start the service

Rz doesn't seem to work.

Steps:

1 tar xf httpd-2.4.25.tar.bz2

2 cd httpd-2.4.25/

3 yum groupinstall "development tools"

4 cat readme 、 cat install

5. / configure-prefix / app/httpd-enable-ssl

6 yum install-y apr-devel, yum install-y apr-util-devel, yum install-y pcre-devel yum install-y openssl-devel

7. / configure-prefix / app/httpd-enable-ssl

8 make

9 make install

10 echo 'PATH=/app/httpd/bin:$PATH' > / etc/profile.d/httpd.sh

11. / etc/profile.d/httpd.sh

12 apachectl start

Or

10 cd / app/httpd/bin

11. / apachectl start

These are all the contents of the article "how to find, decompress and package linux, sed, RPM, yum". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report