In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Rpm tool installation compilation installation Yum installation
1.RPM tool installation:
RPM package Manager
A packaging and installation tool for downloading packages from the Internet, included in some Linux distributions. It generates a file with a .RPM extension
Information required for the exact version of the system
View system version
[root@base-server] # uname-r3.10.0-514.el7.x86_64
Other common parameters of RPM include
-vh: show the installation progress;-U: upgrade the package;-qpl: list the file information in the RPM package;-qpi: list the description of the RPM package;-qf: find the RPM package to which the specified file belongs;-Va: verify all RPM packages and find missing files -qa: find the appropriate files, such as rpm-qa mysql-e uninstall rpm package-Q query installed software information-I install rpm package-u upgrade rpm package-replacepkgs reinstall rpm package-justdb upgrade database Do not modify the file system-percent outputs percentage during package installation-help help-version displays version information-c displays all configuration files-d displays all documentation files-h shows installation progress-l lists files in the package-a shows file status-p query / verifies a package file-v shows detailed processing information query whether to install [root@base-] Server ~] # rpm-Q httpdhttpd-2.4.6-89.el7.centos.x86_64 query all installed software packages in the system
[root@base-server ~] # rpm-qa
Count the number of installed software packages [root@base-server ~] # rpm-qa | wc-l1282 query the configuration file of the query software [root@base-server ~] # rpm-qf `which vim`vim-enhanced-7.4.160-1.el7.x86_64 query software by which a file is installed.
[root@base-server ~] # rpm-qc httpd ``
Change the port profile location
[root@base-server ~] # vim / etc/httpd/conf/httpd.conf
What files are installed when a software is installed
[root@base-server ~] # rpm-ql setup
What to do if you want to count how many files are installed?
Root@base-server ~] # rpm-ql httpd | wc-l
Query the information of the installation package
[root@base-server ~] # rpm-qi httpd
Uninstall the installation package
[root@base-server] # rpm-e httpd
Update software package
[root@base-server] # rpm-Uvh httpd-2.4.6-89.el7.centos.x86_64.rpm
If the package is not installed, it is equivalent to-I for installation. if the package has been installed, it is the preparation before installation of the updated version # #. It requires a gcc compiler tool to support the C language.
[root@base-server ~] # rpm-qa gcc
[root@base-server ~] # yum-y install gcc
# make sure that port 80 is not occupied. `[root@base-server ~] # netstat-anpt | grep 80` # # create a user nginx without login permission, and do not specify login directory` [root@base-server ~] # useradd-M-s / sbin/nologin nginx`-M do not create a user's HOME directory-s shell specifies default login shell
[root@base-server ~] # id nginx
Uid=1003 (nginx) gid=1003 (nginx) groups=1003 (nginx)
# # install the required dependency package and extract the tar package `[ root@base-server ~] # yum-y install gcc* zlib pcre-devel openssl openssl-devel zlib- devel`pcre / / supports regular expression openssl encryption, which is usually used in the secondary development of the software with httpd or nginx,devel, including header files, static libraries and even source code. * install nginx process
[root@base-server] # tar-zxf nginx-1.14.0.tar.gz-C / usr/src
[root@base-server ~] # cd / usr/src/nginx-1.14.0/
[root@base-server nginx-1.14.0] # ls
[root@base-server nginx-1.14.0] # / configure-- prefix=/usr/local/nginx-- user=nginx-- group=nginx-- with-http_stub_status_module & & make & & make install
[root@base-server nginx-1.14.0] # ln-s / usr/local/nginx/sbin/* / usr/local/sbin/
[root@base-server nginx-1.14.0] # nginx- t
[root@base-server nginx-1.14.0] # nginx
* use the command to access `[root@base-server nginx-1.14.0] # curl 127.0.0.1`! [] (https://s1.51cto.com/images/blog/201910/31/587351e73c95bd889db66b2ff7bcd48c.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)2.Yum installation yum syntax: yum [options] [command] [package...] options: optional Options include-h (help),-y (when prompted by the installation process to select all "yes"),-Q (do not show the installation process), and so on. Command: the operation to be performed. The object of the package operation. Yum common command 1.```lists all updatable software list command: yum check-update2. Update all software commands: yum update3. Install only the specified software command: yum install 4. Update only the specified software command: yum update 5. Make a list of all installable software commands: yum list6. Delete package command: yum remove
7. Find package command: yum search
8. Clear cache command:
Yum clean packages: clear the packages in the cache directory yum clean headers: clear the headersyum clean oldheaders in the cache directory: clear the old headersyum clean, yum clean all (= yum clean packages) in the cache directory Yum clean oldheaders): clear the software packages in the cache directory and old headers systems come with yumsource [root@base-server] # cd / etc/yum.repos.d/ [root@base-server yum.repos.d] # ls to query whether there is an installation package we need [root@base-server yum.repos.d] # yum search httpd compared to serach, we usually use list [root @ base-server ~] # yum list | grep httpd or kill process [root] @ base-server ~] # netstat-anpt | grep nginxtcp 0 0 0.0.0.0 LISTEN 47957/nginx * LISTEN 47957/nginx: master [root@base-server ~] # kill 47957 [root@base-server ~] # netstat-anpt | grep nginx [root@base-server ~] # nginx-s stop
Link
In addition to NetEase, there are other good yum sources in China, such as China University of Science and Technology and Sohu. Chinese University of Science and Technology's yum source, installation method view: https://lug.ustc.edu.cn/wiki/mirrors/help/centossohu yum source installation method view: http://mirrors.sohu.com/help/centos.html
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: 241
*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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.