2019.8.20 FTP file transfer service, EPEL source package,

FTP does not create a network of local area network file sharing

[root @ yum ~] # yum -y install vsftpd // install the corresponding
[root @ yum ~] # systemctl start vsftpd // restart package
[root @ yum ~] # systemctl enable vsftpd // set the power automatically mount
[root @yum ~] # netstat -anput | grep vsftpd // port number corresponding to display
package install ftp ftp connection and transmission mode // mounting [the root @ ~ yum] # yum -Y
[the root @ ~ yum] # 192.168 FTP. 2.30 // client test
[root @ yum ~] # mkdir / var / ftp / centos7 // creates a corresponding mount position
[root @ yum ~] # vim /etc/yum.repos.d/local.repo // enter your own yum repository created by the specified mount path
[local]
name = local
baseurl = the FTP: //192.168.2.30/centos7
gpgcheck = 0
Enabled = 1
[root @ yum ~] # umount / dev / SR0 // unload the disc
[root @ yum ~] # mount / dev / sr0 / var / ftp / centos7 / // mount yum repository specified path
[root @ yum ~] # yum clean all // Clear cache
[root @ yum ~] # yum makecache // reconstruction yum warehouse

————————————————————————————————————————————————---------------------------------------------------------------------------

EPEL (Extra Packages for Enterprise Linux) is a Fedora-based project to provide additional package for the operating system, "Red Riding Hood line" for RHEL, CentOS and Scientific Linux.


http://rpm.pbone.net/
http://rpmfind.net/ // extensions yum and rpm package source package

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

————————————————————————————————————————————————-----------------————————————————————————

NFS    Network File System   C / S // more suitable for local area network,

rpc 111 remote procedure call mechanism

S: set up a shared directory

C: Mount the use of the shared directory mount

operating

Host (192.168.2.30 )

        Installation  yum -y install nfs-utils rpcbind

        Establishing a mount point [root @ yum ~] # mkdir / data

        Edit [root @ yum ~] # vim / etc / exports

                                        /data 192.168.2.0/24(rw)

Start Service [root @ yum ~] # systemctl start rpcbind

Boot from the start [root @ yum ~] # systemctl enable rpcbind

Start Service [root @ yum ~] # systemctl start nfs

Boot from the start [root @ yum ~] # systemctl enable nfs

 

The client ( 192.168.2.0 )

 Installation [root @ www ~] # yum -y install nfs-utils

  View provides NFS sharing service directory information      [the WWW root @ ~] #  showmount -e 192.168.2.30

  The other host to mount a shared directory [root @ www ~] # mount 192.168.2.30:/data / opt /

  From the start to mount [root @ www ~] # vim / etc / fstab

      192.168.2.30:/data   /opt nfs defaults,_netdev 0 0

 

After two machines to achieve a shared

Where the mount point is the shared directory

 -----------------——————————————————————————————————————————————————————————————————————————————————————————————

                                                                                             Network installation package download process

 

 

 

 

[root @ ns2 ~] # cd /etc/yum.repos.d/ // cut local repository location yum
[root @ ns2 yum.repos.d] # ll
total volume. 4
drwxr-XR-X. 2 the root. 8 the root 187 A 15:42 May. 17                         
-rw-R & lt -. 65. 8 the root r-- the root. 1 15:45 May xxx.repo. 17             
[the root @ NS2 yum.repos.d] A // # Music Videos xxx.repo the local installation package moving into a folder because the source package yum yum conflict with local networking, when you need to use just take one out and put unneeded into folders.
drwxr-xr-x. 2 root root 203 dated 20 20:25 a. 8

[root @ ns2 yum.repos.d] # rz -E / networking source package to just dragged into the desktop re command pulled the current path
rz waiting to receive.

[root @ ns2 yum.repos.d] # ll
total volume. 4
drwxr XR-2 X-203 the root the root A 20:25 on August 20.
-rw-R & lt -. r-- the root. 1 August 20, 1572 the root. 11 : 10 CentOS7-Base-163.repo

 [Root @ ns2 yum.repos.d] # yum clean all // Clear the cache yum

 After [root @ ns2 yum.repos.d] # yum makecache // create a cache can use the yum

——————————————————————————————————————————————————————————————————————————————————————————————————————————


                                            ftp file sharing

[root @ localhost ~] #yum -y install vsftpd // installation package corresponding to
[root @ localhost ~] # systemctl start vsftpd / restart packet corresponding to
[root @ localhost ~] # systemctl enable vsftpd // start open automatically
Created symlink from / etc / systemd / System / Multi-user.target.wants / vsftpd.service to /usr/lib/systemd/system/vsftpd.service.
[root @ localhost ~] # netstat -anput | grep vsftpd // Check the corresponding port number
0 0 ::: ::: 21 is TCP6 the LISTEN * 3301 / the vsftpd           
[the root @ localhost ~] # grep ftp / etc / view the passwd // ftp home directory corresponding to
ftp: x: 14: 50: FTP User: / var / the FTP: / sbin / nologin
[root @ localhost ~] # LS / var / the FTP / // Check
pub
[root @ localhost ~] # Touch / var / the FTP / pub / the Test // create a shared file in the pub to share files
[root @ localhost ~] # ls / var / ftp / pub / // Check
Test
[the root @ localhost ~] # iptables -F // Close the firewall
[root @ localhost ~] # systemctl stop firewalld.service // turn off the firewall
[ root @ localhost ~] # setenforce 0 // turn off the firewall

    Then another client will need to download ftp package, enter the pub shared directory to download the corresponding file 

——————————————————————————————————————————————————————————————————————————————————————————————

yum-line installation (Netease source, epel source)

yum broaden your search: yum -install epel-release

rpm package and the dependencies yum warehouse

1. Copy the CD files (because sro is a read-only file)

2, the rpm package to copy files into the home directory

3, with a copy of the CD-ROM directory createrepo -v       

Plus Pack absolute path behind the yum -y localinstall

————————————————————————————————————-

                yum package command

Query the list of packages: yum list query package list: yum grouplist

Query installed packages: yum list installed

Queries can be installed (not installed package): yum list availble

Query package descriptions: yum info package names

Queries specify a package: yum search Package

Uninstall: yum -y remove or yum -y erase the package name

Upgrade: yum -y update

        Operation of the installation package for the group

Installation: yum -y groupinstall software group name

Uninstall: yum -y groupremove software group name

Upgrade: yum -y groupdate software group name

   -Y option means no interaction   

         

 

Guess you like

Origin www.cnblogs.com/otherwise/p/11385510.html