linux Basic Starter Software Installation rpm, yum and source installation details

8. Software

RPM Package Installation

8.1 rpm Installation

rpm [Options] Package Name
Main Options
-i Installation
-e Uninstall
-U Upgrade
-q lookup
Auxiliary Options
-_Display process
-h --hash
query
-a-all Query all installed packages
-f-file query for packages with <-file
-p Query for a package that is not installed
uninstall

-nodeps Ignore Dependencies

When installing, you need to take the iso file of centos7. Why do you want to take it, because the package inside is the rpm package.

The specific path is/run/media/wangzirui/Centos 7 X86_64/Packages/

Then execute

 rpm -ivh vsftpd-3.0.2-25.el7.x86_64.rpm 

8.2yum Installation

Solve dependency problems,

Configuration of ftp server yum repository

[root@MiWiFi-R3L-srv ftp]# rpm -qa | grep vsftpd
vsftpd-3.0.2-25.el7.x86_64
[root@MiWiFi-R3L-srv ftp]# cd ~
[root@MiWiFi-R3L-srv ~]# systemctl start vsftpd
[root@MiWiFi-R3L-srv ~]# mount /dev/cdrom /var/ftp/pub/
mount: /dev/sr0 Write protected, mounted read-only
[root@MiWiFi-R3L-srv ~]# ll /dev/cdrom
lrwxrwxrwx. 1 root root 3 2 January 1000:07 /dev/cdrom -> sr0

yum source

[root@MiWiFi-R3L-srv etc]# cd /etc/yum.repos.d
[root@MiWiFi-R3L-srv yum.repos.d]# ls
CentOS-Base.repo  CentOS-Debuginfo.repo  CentOS-Media.repo    CentOS-Vault.repo
CentOS-CR.repo    CentOS-fasttrack.repo  CentOS-Sources.repo
[root@MiWiFi-R3L-srv etc]# cd /etc/yum.repos.d
[root@MiWiFi-R3L-srv yum.repos.d]# ls
CentOS-Base.repo  CentOS-Debuginfo.repo  CentOS-Media.repo    CentOS-Vault.repo
CentOS-CR.repo    CentOS-fasttrack.repo  CentOS-Sources.repo
[root@MiWiFi-R3L-srv yum.repos.d]# ^C
[root@MiWiFi-R3L-srv yum.repos.d]# mkdir xx
[root@MiWiFi-R3L-srv yum.repos.d]# mv *.repo xx/
[root@MiWiFi-R3L-srv yum.repos.d]# ls
xx

Then create a new 1.repo in this directory

Content is

[ftp]
name=test
baseurl=ftp://localhost/pub
gpgcheck=0

Now yum is ready

[root@MiWiFi-R3L-srv yum.repos.d]# vim 1.repo
[root@MiWiFi-R3L-srv yum.repos.d]# yum install http
 Plugins loaded: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
ftp                                                      | 3.6 kB     00:00     
(1/2): ftp/group_gz                                        | 165 kB   00:00     
(2/2): ftp/primary_db                                      | 3.2 MB   00:00     
There is no available package http.
Error: No processing required

baseurl can be ftp://

It can also be file://

Content is

[loacl]
name=local
baseurl=file:///mnt/dvd
gpgcheck=0

Three // because the third one means catalog

Install third-party source, epel,aliyun, Tsinghua University source

Yes, just install the file rpm, and then/etc/yum.repos.d contains the repo file from the source you just downloaded.

8.3yum command

Configuration for the yum installation, in the / etc/yum.conf file

[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=5
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=23&ref=http://bugs.centos.org/bug_report_page.php?category=yum
distroverpkg=centos-release

cachedir default download location $basearch is your architecture / second is your version

Keepcache is saved or not after loading

Next Zhu Command

install

update

remove

search

Grouplist

The name of the yum list package

You can see that this package is not packed

8.5 Source Installation

1. Download

Put the source code down first, and then unzip it, because there is a graphical interface, you can just do it directly.

2. Decompression

Next is nginx, then unzip it and open it for viewing.

[wangzirui@laotie ~]$ cd nginx-1.17.8/
[wangzirui@laotie nginx-1.17.8]$ ls
auto     CHANGES.ru  configure  html     man     src
CHANGES  conf        contrib    LICENSE  README

3. Check

The configure inside is an executable file.

[wangzirui@laotie nginx-1.17.8]$ ./configure 
checking for OS
 + Linux 3.10.0-1062.el7.x86_64 x86_64
checking for C compiler ... not found

./configure: error: C compiler cc is not found

Running directly will not work because this file needs to be compiled.

So you need to install gcc

[root@laotie nginx-1.17.8]# yum -y install gcc

Execute when finished

./configure

You'll be prompted that qcre is missing, and then you can install it

[root@laotie nginx-1.17.8]# yum list pcre
//Plugins loaded: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.163.com
//Installed Packages
pcre.x86_64                        8.32-17.el7                         @anaconda
//Installable Packages
pcre.i686                          8.32-17.el7                         base     
[root@laotie nginx-1.17.8]# yum -y install pcre-devel

Once installed, make it and generate the installation file

4. Compile

[root@laotie nginx-1.17.8]# make

Next is make install, which succeeds after execution

5. Installation

[root@laotie nginx-1.17.8]#make install 

Then go to the directory and execute the executable

6. Execution

[root@laotie nginx-1.17.8]# cd /usr/local/nginx
[root@laotie nginx]# ls
conf  html  logs  sbin
[root@laotie nginx]# cd sbin
[root@laotie sbin]# ls
nginx

Then execute

./nginx

Just go to localhost, you can see the html of nginx

Tags: Linux yum CentOS Nginx ftp

Posted on Mon, 10 Feb 2020 09:54:09 -0800 by aaronhall