文件系统:使用 yum 安装软件包

前些天发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽默,忍不住分享一下给大家。点击跳转到教程。

一、yum命令的基本安装功能

[root@localhost ~]# man yum

command is one of:

 * install package1 [package2] [...]:  install + 包名

yum -y: 安装时自动回答为yes 

 

reinstall package1 [package2] [...]: 重新安装

 

*** 补充rmp命令:rpm -ql + 包名 : 查询包安装生成的文件清单

 rpm -qf + /path/to/file_name: 查询某文件是由哪个软件包生成的

* provides | whatprovides feature1 [feature2] [...]

使用yum来查询软件包生成哪些文件,以及文件是由哪个软件包生成的。

 

update [package1] [package2] [...]: 升级版本,可加多个包

update-to [package1] [package2] [...]: 指定升级到哪个版本

 

downgrade package1 [package2] [...] : 降级

 

check-update: 安装前检查有哪些可以升级的软件包

        

upgrade [package1] [package2] [...]

upgrade-to [package1] [package2] [...]

    这两个命令已经被update取代了

 

remove | erase package1 [package2] [...]

    清除软件包:使用yum来清除包会同时清除它被依赖的包

 

search string1 [string2] [...] : 只记得部分字符,可以进行模糊查询

       

groupinstall group1 [group2] [...] :组安装: 

    1) 针对RHEL 6:

    Development tools + Server Platform Development + Desktop Platform Development 

    2) 针对RHEL 5: 

    Development tools + development libraries

 安装了这些这些组之后,就可以编译rpm包了,即将源码制作成二进制格式包

    * groupupdate group1 [group2] [...] 升级组      

    * groupremove group1 [group2] [...] 移除组      

 

* localinstall yum除了可以自动安装外,也可以将软件包下载到本地,然后手动安装

  1)RHEL 6: 

统一使用yum install 来安装即可

    2)RHEL 5: 

    需要使用yum localinstall 来安装,同样手动升级可以使用yum localupdate,RHEL6处于兼容性需求,也支持这样的用法。

  yum安装软件包最大的优势在于可以自动解决依赖关系

 

-- nogpgcheck : 

对比rpm包,yum即使使用了localinstall,也会检查软件包的来源合法性,如果密钥无法匹配,则下载到本地的软件包也无法使用yum安装,故可以使用长选项 --nogpgcheck来避免检查

 

history : 查看此前的安装卸载等操作历史

 

二、yum命令安装实例演示

/*-------- (1) 基本安装 --------*/

[root@localhost ~]# yum install bind-chroot

1
2
3
4
5
6
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
Setting up Install Process
Package 32:bind-chroot-9.8.2-0.17.rc1.el6_4.6.x86_64 already installed and latest version
Nothing to do
# 已经安装了最新版,无需安装

 

 

现在先卸载这个软件包

[root@localhost ~]# rpm -e bind-chroot

1
grep/etc/sysconfig/named: No such file or directory

 

[root@localhost ~]# rpm -e bind-chroot --force

1
rpm: only installation, upgrading, rmsource and rmspec may be forced

 

[root@localhost ~]# rpm -e bind-chroot

1
error: package bind-chroot is not installed

 

 

[root@localhost ~]# yum install bind-chroot

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package bind-chroot.x86_64 32:9.8.2-0.17.rc1.el6_4.6 will be installed
--> Processing Dependency: bind = 32:9.8.2-0.17.rc1.el6_4.6 for package: 32:bind-chroot-9.8.2-0.17.rc1.el6_4.6.x86_64
--> Running transaction check
---> Package bind.x86_64 32:9.8.2-0.17.rc1.el6_4.6 will be installed
--> Finished Dependency Resolution
#依赖关系自动解决
  
Dependencies Resolved
  
=============================================================================
 Package                  Arch                Version                                  Repository         Size
==============================================================================
Installing:
 bind-chroot              x86_64              32:9.8.2-0.17.rc1.el6_4.6                base               71 k
Installing for dependencies:
 bind                     x86_64              32:9.8.2-0.17.rc1.el6_4.6                base              4.0 M
  
Transaction Summary
=========================================================================
Install       2 Package(s)
  
Total download size: 4.0 M
Installed size: 7.3 M
Is this ok [y/N]: 
  
# 输入y表示安装,N表示不安装,默认为不安装,yum可以使用-y自动回答安装
  
Is this ok [y/N]: y
Downloading Packages:
--------------------------------------------------------------------------------
Total                                                                           42 MB/s | 4.0 MB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : 32:bind-9.8.2-0.17.rc1.el6_4.6.x86_64                                                       1/2 
  Installing : 32:bind-chroot-9.8.2-0.17.rc1.el6_4.6.x86_64                                                2/2 
  Verifying  : 32:bind-9.8.2-0.17.rc1.el6_4.6.x86_64                                                       1/2 
  Verifying  : 32:bind-chroot-9.8.2-0.17.rc1.el6_4.6.x86_64                                                2/2 
  
Installed:
  bind-chroot.x86_64 32:9.8.2-0.17.rc1.el6_4.6                                                                 
  
Dependency Installed:
  bind.x86_64 32:9.8.2-0.17.rc1.el6_4.6                                                                        
  
Complete!

 

 

 

/*-------- (2) 重新安装 --------*/

 

[root@localhost ~]# yum install bind

1
2
3
4
5
6
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
Setting up Install Process
Package 32:bind-9.8.2-0.17.rc1.el6_4.6.x86_64 already installed and latest version
Nothing to do
# 提示已经安装过了

 

[root@localhost ~]# yum reinstall bind

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# 不论是否安装,都会重新安装一遍
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Reinstall Process
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package bind.x86_64 32:9.8.2-0.17.rc1.el6_4.6 will be reinstalled
--> Finished Dependency Resolution
  
Dependencies Resolved
  
============================================================================
 Package             Arch                  Version                                   Repository           Size
===========================================================================
Reinstalling:
 bind                x86_64                32:9.8.2-0.17.rc1.el6_4.6                 base                4.0 M
  
Transaction Summary
===============================================================================
Reinstall     1 Package(s)
  
Total download size: 4.0 M
Installed size: 7.3 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : 32:bind-9.8.2-0.17.rc1.el6_4.6.x86_64                                                       1/1 
  Verifying  : 32:bind-9.8.2-0.17.rc1.el6_4.6.x86_64                                                       1/1 
  
Installed:
  bind.x86_64 32:9.8.2-0.17.rc1.el6_4.6                                                                        
  
Complete!

 

 

 

/*-------- (3) 卸载软件包 --------*/

[root@localhost ~]# yum remove bind

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package bind.x86_64 32:9.8.2-0.17.rc1.el6_4.6 will be erased
--> Processing Dependency: bind = 32:9.8.2-0.17.rc1.el6_4.6 for package: 32:bind-chroot-9.8.2-0.17.rc1.el6_4.6.x86_64
--> Running transaction check
---> Package bind-chroot.x86_64 32:9.8.2-0.17.rc1.el6_4.6 will be erased
--> Finished Dependency Resolution
  
Dependencies Resolved
  
================================================================================
 Package                  Arch                Version                                 Repository          Size
==============================================================================
Removing:
 bind                     x86_64              32:9.8.2-0.17.rc1.el6_4.6               @base              7.3 M
Removing for dependencies:
 bind-chroot              x86_64              32:9.8.2-0.17.rc1.el6_4.6               @base              0.0  
 # 清除bind的同时会清除bind-chroot,因为bind-chroot是依赖于bind的
  
Transaction Summary
==============================================================================
Remove        2 Package(s)
  
Installed size: 7.3 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing    : 32:bind-chroot-9.8.2-0.17.rc1.el6_4.6.x86_64                                            1/2 
  Erasing    : 32:bind-9.8.2-0.17.rc1.el6_4.6.x86_64            2/2 
warning: /etc/sysconfig/named saved as /etc/sysconfig/named.rpmsave
  Verifying  : 32:bind-9.8.2-0.17.rc1.el6_4.6.x86_64                                                       1/2 
  Verifying  : 32:bind-chroot-9.8.2-0.17.rc1.el6_4.6.x86_64                                                2/2 
  
Removed:
  bind.x86_64 32:9.8.2-0.17.rc1.el6_4.6                                                                        
  
Dependency Removed:
  bind-chroot.x86_64 32:9.8.2-0.17.rc1.el6_4.6                                                                 
  
Complete!

 

 

 

/*-------- (4)软件包安装信息查询 --------*/

[root@localhost ~]# rpm -qf /etc/inittab

1
initscripts-9.03.40-2.el6.centos.x86_64

[root@localhost ~]# rpm -qf /etc/fstab

1
setup-2.8.14-20.el6_4.1.noarch

 

  

[root@localhost ~]# yum provides /etc/fstab

1
2
3
4
5
6
7
8
9
10
11
12
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
setup-2.8.14-20.el6_4.1.noarch : A set of system configuration and setup files
# 此包生成了/etc/fstab
Repo        : base
Matched from:
Filename    : /etc/fstab
   
setup-2.8.14-20.el6_4.1.noarch : A set of system configuration and setup files
Repo        : installed
Matched from:
Other       : Provides-match: /etc/fstab

 

 

 

[root@localhost ~]# yum provides /etc/named.conf

1
2
3
4
5
6
7
8
9
#也可以显示没有安装的文件
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
32:bind-9.8.2-0.17.rc1.el6_4.6.x86_64 : The Berkeley Internet Name Domain (BIND) DNS (Domain Name System)
                                      : server
# 这个包之前被卸载了,这里显示的是服务器仓库上的包
Repo        : base
Matched from:
Filename    : /etc/named.conf

 

 

 

/*-------- (5) 模糊匹配查询 --------*/

[root@localhost ~]# yum search init

1
2
3
4
5
6
7
8
9
10
11
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
==============================N/S Matched: init ===============================
initscripts.x86_64 : The inittab file and the /etc/init.d scripts
iscsi-initiator-utils-devel.x86_64 : Development files for 
...
upstart.x86_64 : An event-driven init system
xhtml1-dtds.noarch : XHTML 1.0 document type definitions
xorg-x11-xinit-session.x86_64 : Display manager support for ~/.xsession and ~/.Xclients
  
  Name and summary matches only, use "search all" for everything.

/*-------- (6) 安装包组 --------*/

 

通常安装开发环境,为避免依赖关系,通常需要安装三个组:Development tools; Server Platform Development; Desktop Platform Development

[root@localhost ~]# yum grouplist

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Group Process
Loading mirror speeds from cached hostfile
base/group_gz                                                                | 220 kB     00:00 ... 
Installed Groups:
   Additional Development
   Base
   Debugging Tools
   ...
   Web Server
   X Window System
Installed Language Groups:
   Arabic Support [ar]
   ...
   Venda Support [ve]
Available Groups:
   Backup Client
   ...
   iSCSI Storage Client
Available Language Groups:
   Afrikaans Support [af]
  ...
   Zulu Support [zu]
Done

 

 

[root@localhost~]#yum -y groupinstall "Development tools" "Server Platform Development" "Desktop Platform Development"

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
  
...
 pixman-devel              x86_64         0.26.2-5.el6_4                             base          18 k
 ppl                       x86_64         0.10.2-11.el6                              base         1.3 M
 systemtap-client            x86_64         2.3-3.el6                                  base         3.4 M
 systemtap-devel            x86_64         2.3-3.el6                                  base         1.4 M
 xorg-x11-proto-devel       noarch         7.6-25.el6                                 base         274 k
 yajl                      x86_64         1.0.7-3.el6                                base          27 k
  
Transaction Summary
==============================================================================
Install     115 Package(s)
  
Total download size: 123 M
Installed size: 404 M
...                         
  systemtap-devel.x86_64 0:2.3-3.el6              xorg-x11-proto-devel.noarch 0:7.6-25.el6                    
  yajl.x86_64 0:1.0.7-3.el6                      
  
Complete!

 

 

 

/*-------- (7) 通过yum下载到本地,然后手动安装软件包 --------*/

[root@localhost ~]# cd /media/cdrom/Packages/

[root@localhost Packages]# yum install bind-9.8.2-0.17.rc1.el6_4.6.x86_64.rpm 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# 这个包已经下载到本地了,因此不再从服务器下载
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
Setting up Install Process
Examining bind-9.8.2-0.17.rc1.el6_4.6.x86_64.rpm: 32:bind-9.8.2-0.17.rc1.el6_4.6.x86_64
Marking bind-9.8.2-0.17.rc1.el6_4.6.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package bind.x86_64 32:9.8.2-0.17.rc1.el6_4.6 will be installed
--> Finished Dependency Resolution
  
Dependencies Resolved
  
=========================================================================================
 Package     Arch          Version                            Repository                                  Size
==========================================================================================
Installing:
 bind        x86_64        32:9.8.2-0.17.rc1.el6_4.6          /bind-9.8.2-0.17.rc1.el6_4.6.x86_64        7.3 M
  
Transaction Summary
==========================================================================================
Install       1 Package(s)
  
Total size: 7.3 M
Installed size: 7.3 M
Is this ok [y/N]: N

 

 

 

[root@localhost Packages]# yum localinstall bind-chroot-9.8.2-0.17.rc1.el6_4.6.x86_64.rpm 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Local Package Process
Examining bind-chroot-9.8.2-0.17.rc1.el6_4.6.x86_64.rpm: 32:bind-chroot-9.8.2-0.17.rc1.el6_4.6.x86_64
Marking bind-chroot-9.8.2-0.17.rc1.el6_4.6.x86_64.rpm to be installed
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package bind-chroot.x86_64 32:9.8.2-0.17.rc1.el6_4.6 will be installed
--> Processing Dependency: bind = 32:9.8.2-0.17.rc1.el6_4.6 for package: 32:bind-chroot-9.8.2-0.17.rc1.el6_4.6.x86_64
--> Running transaction check
---> Package bind.x86_64 32:9.8.2-0.17.rc1.el6_4.6 will be installed
--> Finished Dependency Resolution
  
# 可以看到使用localinstall 也会自动解决依赖关系
  
Dependencies Resolved
  
=========================================================================================
 Package         Arch       Version                       Repository                                      Size
==========================================================================================
Installing:
 bind-chroot     x86_64     32:9.8.2-0.17.rc1.el6_4.6     /bind-chroot-9.8.2-0.17.rc1.el6_4.6.x86_64     0.0  
Installing for dependencies:
 bind            x86_64     32:9.8.2-0.17.rc1.el6_4.6     base                                   4.0 M
  
Transaction Summary
==========================================================================================
Install       2 Package(s)
  
Total download size: 4.0 M
Installed size: 7.3 M
Is this ok [y/N]: n
Exiting on user Command

 

 

/*-------- (8) 查看yum命令的历史记录 --------*/

 

[root@localhost ~]# yum history

1
2
3
4
5
6
7
8
9
Loaded plugins: fastestmirror, refresh-packagekit, security
ID     | Login user               | Date and time    | Action(s)      | Altered
-------------------------------------------------------------------------------
     5 | root <root>              | 2014-08-17 06:53 | Install        |  115   
     4 | root <root>              | 2014-08-17 06:37 | Erase          |    2 EE
     3 | root <root>              | 2014-08-17 06:20 | Reinstall      |    1   
     2 | root <root>              | 2014-08-17 06:16 | Install        |    2  <
     1 | System <unset>           | 2014-07-09 21:22 | Install        | 1205 > 
history list

 

 

 

/*-------- (9) 使用yum安装lftp工具包 --------*/

 

现在来安装一个比较常用的ftp工具包 lftp:

 

[root@localhost ~]# rpm -ql lftp

1
2
# 首先检查这个软件包有没有安装
package lftp is not installed

 

[root@localhost ~]# yum install lftp

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package lftp.x86_64 0:4.0.9-1.el6 will be installed
--> Finished Dependency Resolution
  
Dependencies Resolved
  
================================================================================
 Package            Arch                 Version                     Repository                   Size
=================================================================================
Installing:
 lftp               x86_64               4.0.9-1.el6                 cdrom-centos6               753 k
  
Transaction Summary
================================================================================
Install       1 Package(s)
  
Total download size: 753 k
Installed size: 2.5 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : lftp-4.0.9-1.el6.x86_64                                                             1/1 
  Verifying  : lftp-4.0.9-1.el6.x86_64                                                             1/1 
  
Installed:
  lftp.x86_64 0:4.0.9-1.el6                                                                            
  
Complete!

 

安装完成,现在可以使用lftp来ping服务器了:

 

[root@localhost ~]# ifconfig

1
2
3
4
5
6
7
8
9
eth0      Link encap:Ethernet  HWaddr 08:00:27:CA:DF:46  
          inet addr:192.168.56.103  Bcast:192.168.56.255  Mask:255.255.255.0
  # 本机的IP地址
          inet6 addr: fe80::a00:27ff:feca:df46/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:114790 errors:0 dropped:0 overruns:0 frame:0
          TX packets:46931 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:10065569 (9.5 MiB)  TX bytes:12450568 (11.8 MiB)

 

[root@localhost ~]# lftp 192.168.56.103

1
2
3
4
5
6
7
  
lftp 192.168.56.103:~> pwd
ftp://192.168.56.103 
# 查看登陆的站点
lftp 192.168.56.103:~> !pwd
/root
#查看本地目录

 

lftp以使用的基本命令有

get: 下载单个文件

mget:下载多个文件

mirror:镜像一个目录到本地

bye:退出

cd:切换目录

pwd:查看当前位置

 

转自:http://blog.51cto.com/wuyelan/1615130

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/449009.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

elasticsearch全局analyzer声明

2019独角兽企业重金招聘Python工程师标准>>> 问题 elasticsearch从2.4升级到5.6&#xff0c;elasticsearch.yml配置中有一些analyzer配置拷贝到新版本&#xff0c;启动报错 index :analysis :analyzer :lowercase_whitespace :type : customtokenizer : myTokenizer…

Parallels Desktop虚拟机无法关机提示“虚拟机处理器已被操作系统重置”

如果你在使用PD的时候遇到了这样子的弹窗&#xff0c;恭喜你篇博文可以帮助你&#xff0c;因为我刚刚也遇到了这个问题。如果有帮助可以点一下推荐按钮。 针对Windows电脑 启动虚拟机创建快照使用管理员权限运行命令提示符执行powercfg -h off重启试试成功了再删除快照即可修改…

linux下安装 ping 命令

前些天发现了一个巨牛的人工智能学习网站&#xff0c;通俗易懂&#xff0c;风趣幽默&#xff0c;忍不住分享一下给大家。点击跳转到教程。 使用docker仓库下载的ubuntu 14.04 镜像。里面精简的连 ping 命令都没有。google 百度都搜索不到ping 命令在哪个包里。 努力找了半天&…

扬尼斯定律:程序员的开发效率每6年提高一倍

我不断的听到各种关于“软件危机”的警言&#xff0c;以及关于软件开发缺少过程规范的批评。我做编程工作超过15年&#xff0c;我认为这些言论基本上都是错的&#xff1a;我确信我能在很短的时间里用如今的开发工具复制出15年前一个不错的程序员开发出的东西。 模仿摩尔定律和…

ApiBoot - ApiBoot Quartz 使用文档

ApiBoot Quartz ApiBoot内部集成了Quartz&#xff0c;提供了数据库方式、内存方式的进行任务的存储&#xff0c;其中数据库方式提供了分布式集群任务调度&#xff0c;任务自动平滑切换执行节点。 引用ApiBoot Quartz 在pom.xml配置文件内添加&#xff0c;如下配置&#xff1a; …

《算法竞赛进阶指南》0.4二分

102. 最佳牛围栏 农夫约翰的农场由N块田地组成&#xff0c;每块地里都有一定数量的牛,其数量不会少于1头&#xff0c;也不会超过2000头。 约翰希望用围栏将一部分连续的田地围起来&#xff0c;并使得围起来的区域内每块地包含的牛的数量的平均值达到最大。 围起区域内至少需要包…

Hibernate 自动创建表

前些天发现了一个巨牛的人工智能学习网站&#xff0c;通俗易懂&#xff0c;风趣幽默&#xff0c;忍不住分享一下给大家。点击跳转到教程。 1. 在 hibernate.cfg.xml 添加这句话&#xff0c;可以自动生成数据表 : <property name"hibernate.hbm2ddl.auto">upd…

程序员越老越优秀吗?

Peter Knego 向我们展示了一些有趣的东西&#xff1a; 官方数据&#xff1a;程序员年纪越大越出色、越稀有。他使用StackOverflow的声誉值和其它几个指标来印证他的观点。 他的总结是&#xff1a; 随着年龄的增加&#xff0c;程序员的数量急剧下降。程序员数量的峰值出现在2…

小程序学习(一):点击爱心变色 -- 最简单的事件实现

最近在学习小程序&#xff0c;想通过写文章来记录自己的学习历程&#xff0c;希望能做到每周都写…… 如何绑定一个事件 微信小程序中&#xff0c;绑定事件要在标签内写入这两段代码&#xff1a; bindtap"fnActive" data-favourite "{{isLike}}" 复制代码…

安全通信

安全通信 应用层协议大多数自己都没有实现加解密功能&#xff0c;比如http等。http就是直接把数据加载进来然后做简单编码&#xff08;也就是流式化&#xff09;然后响应客户端&#xff0c;然后数据在浏览器展示&#xff0c;这个数据在传输过程是明文的&#xff0c;你截获就可以…

出现 java.lang.NullPointerException 的几种原因、可能情况

前些天发现了一个巨牛的人工智能学习网站&#xff0c;通俗易懂&#xff0c;风趣幽默&#xff0c;忍不住分享一下给大家。点击跳转到教程。一般报 java.lang.NullPointerException的 原因有以下几种&#xff1a;1. 字符串变量未初始化 。 2. 接口类型的对象没有用具体的类初始化…

纯JPA 入门小案例(2)

2019独角兽企业重金招聘Python工程师标准>>> JPA中的主键生成策略 通过annotation&#xff08;注解&#xff09;来映射hibernate实体的,基于annotation的hibernate主键标识为Id, 其生成规则由GeneratedValue设定的.这里的id和GeneratedValue都是JPA的标准用法。 JPA…

spring IoC/DI

一、spring创建对象的三种方式&#xff1a;1、通过构造方法创建无参构造创建&#xff1a;默认情况有参构造创建&#xff1a;需要明确配置<constructor-arg>中配置index&#xff1a;参数索引name&#xff1a;参数名type&#xff1a;参数类型&#xff08;区分基本数据类型和…

并发不是并行,它更好!

原文链接&#xff0c;译文链接&#xff0c;译者&#xff1a;雷哥&#xff0c;饶命&#xff0c;校对&#xff1a;李任 现代社会是并行的&#xff1a;多核、网络、云计算、用户负载&#xff0c;并发技术对此有用。 Go语言支持并发&#xff0c;它提供了&#xff1a;并发执行&…

详解设计模式在Spring中的应用

设计模式作为工作学习中的枕边书&#xff0c;却时常处于勤说不用的尴尬境地&#xff0c;也不是我们时常忘记&#xff0c;只是一直没有记忆。 今天&#xff0c;在IT学习者网站就设计模式的内在价值做一番探讨&#xff0c;并以spring为例进行讲解&#xff0c;只有领略了其设计的思…

开大你的音响,感受HTML5 Audio API带来的视听盛宴

前些天发现了一个巨牛的人工智能学习网站&#xff0c;通俗易懂&#xff0c;风趣幽默&#xff0c;忍不住分享一下给大家。点击跳转到教程。 话说HTML5的炫酷真的是让我爱不释手&#xff0c;即使在这个提到IE就伤心不完的年代。但话又说回来&#xff0c;追求卓越Web创造更美世界…

Microsoft Visual Studio 2010(vs2010) 中文版安装

Microsoft Visual Studio 2010(vs2010) 中文版安装 日期&#xff1a;2019-05-12 时间&#xff1a;20:03:36 编辑&#xff1a;张国富 下载地址 基本简介 Microsoft Visual Studio&#xff08;vs2010是简称&#xff09;是微软公司推出的开发环境。visual studio 2010…

JVM的几点性能优化

HotSpot&#xff0c;家喻户晓的JVM&#xff0c;我们的Java和Scala程序就运行在它上面。年复一年&#xff0c;一次又一次的迭代&#xff0c;经过无数工程师的不断优化&#xff0c;现在它的代码执行的速度和效率已经逼近本地编译的代码了。 它的核心是一个JIT&#xff08;Just-I…

IDEA配置 及 快捷键

出处&#xff1a; https://www.cnblogs.com/hero123/p/10120552.html 快捷键&#xff1a; 格式化代码 CtrlaltL 后退Ctrlalt <- 格式化代码快捷键&#xff1a;Ctrl Alt L 删除整行&#xff1a;CtrlX 实现类 ctrl alt CtrlN 查找类 CtrlShiftN 查找文件 CTRLSHIFTALTN 查找…

LeetCode Decode Ways

123123转载于:https://www.cnblogs.com/ZHONGZHENHUA/p/10854545.html