游戏淘宝湾

 找回密码
 立即注册
开启左侧

[电脑] Snipe-IT 开源资产管理系统 安装全过程

  [复制链接]
--M_g-- 发表于 2021-1-18 04:09:36 | 显示全部楼层 |阅读模式
软件简介
Snipe-IT 是一个开源的资产管理系统。Snipe-IT 用于IT资产管理,IT部门通过它能够跟踪谁拥有哪台笔记本电脑、何时购买、包含哪些软件许可证和可用的附件等等。功能特性
  • 托管在云主机
  • 强大的 REST API
  • 快速更新
  • 保证 App 和 Platform 的安全性
  • 一键备份
  • LDAP 登录/用户同步
运行截图
112543_oXcg_2720166.png 112636_mCls_2720166.png 安装开始:一、环境准备
CentOS 7 + Apache + PHP +Mariadb
CentOS 7 (
阿里云):http://mirrors.aliyun.com/centos/7.7.1908/isos/x86_64/CentOS-7-x86_64-DVD-1908.iso   这个自行选择吧,我提供下版本,链接不一定有效.....


  1. [root@snipeit ~]##开始系统更新
  2. [root@snipeit ~]# yum -y install epel-release
  3. 已加载插件:fastestmirror, langpacks
  4. Loading mirror speeds from cached hostfile
  5. * base: mirrors.ustc.edu.cn
  6. * extras: mirrors.163.com
  7. * updates: mirrors.aliyun.com
  8. 正在解决依赖关系
  9. --> 正在检查事务
  10. ---> 软件包 epel-release.noarch.0.7-11 将被 安装
  11. --> 解决依赖关系完成

  12. 依赖关系解决

  13. ========================================================================================================================================
  14. Package                              架构                           版本                          源                              大小
  15. ========================================================================================================================================
  16. 正在安装:
  17. epel-release                         noarch                         7-11                          extras                          15 k

  18. 事务概要
  19. ========================================================================================================================================
  20. 安装  1 软件包

  21. 总下载量:15 k
  22. 安装大小:24 k
  23. Downloading packages:
  24. 警告:/var/cache/yum/x86_64/7/extras/packages/epel-release-7-11.noarch.rpm: 头V3 RSA/SHA256 Signature, 密钥 ID f4a80eb5: NOKEY
  25. epel-release-7-11.noarch.rpm 的公钥尚未安装
  26. epel-release-7-11.noarch.rpm                                                                                     |  15 kB  00:00:00     
  27. 从 file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 检索密钥
  28. 导入 GPG key 0xF4A80EB5:
  29. 用户ID     : "CentOS-7 Key (CentOS 7 Official Signing Key) <[url=mailto:[email protected]][email protected][/url]>"
  30. 指纹       : 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
  31. 软件包     : centos-release-7-7.1908.0.el7.centos.x86_64 (@anaconda)
  32. 来自       : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
  33. Running transaction check
  34. Running transaction test
  35. Transaction test succeeded
  36. Running transaction
  37.   正在安装    : epel-release-7-11.noarch                                                                                            1/1
  38.   验证中      : epel-release-7-11.noarch                                                                                            1/1

  39. 已安装:
  40.   epel-release.noarch 0:7-11                                                                                                            

  41. 完毕!
  42. [root@snipeit ~]# yum update –y
  43. 已加载插件:fastestmirror, langpacks
  44. Loading mirror speeds from cached hostfile
  45. epel/x86_64/metalink                                                                                             | 6.3 kB  00:00:00     
  46. * base: mirrors.ustc.edu.cn
  47. * epel: mirrors.aliyun.com
  48. * extras: mirrors.163.com
  49. * updates: mirrors.aliyun.com
  50. epel                                                                                                             | 5.3 kB  00:00:00     
  51. (1/3): epel/x86_64/group_gz                                                                                      |  90 kB  00:00:00     
  52. (2/3): epel/x86_64/updateinfo                                                                                    | 1.0 MB  00:00:00     
  53. (3/3): epel/x86_64/primary_db                                                                                    | 6.7 MB  00:00:00     
  54. 参数 –y 没有匹配
  55. No packages marked for update
  56. [root@snipeit ~]# #使用yum安装Apache
  57. [root@snipeit ~]# yum install -y httpd httpd-devel
  58. 已加载插件:fastestmirror, langpacks
  59. Loading mirror speeds from cached hostfile
  60. * base: mirrors.ustc.edu.cn
  61. * epel: mirrors.aliyun.com
  62. * extras: mirrors.163.com
  63. * updates: mirrors.aliyun.com
  64. 正在解决依赖关系
  65. --> 正在检查事务
  66. ---> 软件包 httpd.x86_64.0.2.4.6-90.el7.centos 将被 安装
  67. --> 正在处理依赖关系 httpd-tools = 2.4.6-90.el7.centos,它被软件包 httpd-2.4.6-90.el7.centos.x86_64 需要
  68. --> 正在处理依赖关系 /etc/mime.types,它被软件包 httpd-2.4.6-90.el7.centos.x86_64 需要
  69. ---> 软件包 httpd-devel.x86_64.0.2.4.6-90.el7.centos 将被 安装
  70. --> 正在处理依赖关系 apr-util-devel,它被软件包 httpd-devel-2.4.6-90.el7.centos.x86_64 需要
  71. --> 正在处理依赖关系 apr-devel,它被软件包 httpd-devel-2.4.6-90.el7.centos.x86_64 需要
  72. --> 正在检查事务
  73. ---> 软件包 apr-devel.x86_64.0.1.4.8-5.el7 将被 安装
  74. ---> 软件包 apr-util-devel.x86_64.0.1.5.2-6.el7 将被 安装
  75. --> 正在处理依赖关系 openldap-devel(x86-64),它被软件包 apr-util-devel-1.5.2-6.el7.x86_64 需要
  76. --> 正在处理依赖关系 libdb-devel(x86-64),它被软件包 apr-util-devel-1.5.2-6.el7.x86_64 需要
  77. --> 正在处理依赖关系 expat-devel(x86-64),它被软件包 apr-util-devel-1.5.2-6.el7.x86_64 需要
  78. ---> 软件包 httpd-tools.x86_64.0.2.4.6-90.el7.centos 将被 安装
  79. ---> 软件包 mailcap.noarch.0.2.1.41-2.el7 将被 安装
  80. --> 正在检查事务
  81. ---> 软件包 expat-devel.x86_64.0.2.1.0-10.el7_3 将被 安装
  82. ---> 软件包 libdb-devel.x86_64.0.5.3.21-25.el7 将被 安装
  83. ---> 软件包 openldap-devel.x86_64.0.2.4.44-21.el7_6 将被 安装
  84. --> 正在处理依赖关系 cyrus-sasl-devel(x86-64),它被软件包 openldap-devel-2.4.44-21.el7_6.x86_64 需要
  85. --> 正在检查事务
  86. ---> 软件包 cyrus-sasl-devel.x86_64.0.2.1.26-23.el7 将被 安装
  87. --> 解决依赖关系完成

  88. 依赖关系解决

  89. ========================================================================================================================================
  90. Package                              架构                       版本                                    源                        大小
  91. ========================================================================================================================================
  92. 正在安装:
  93. httpd                                x86_64                     2.4.6-90.el7.centos                     base                     2.7 M
  94. httpd-devel                          x86_64                     2.4.6-90.el7.centos                     base                     197 k
  95. 为依赖而安装:
  96. apr-devel                            x86_64                     1.4.8-5.el7                             base                     188 k
  97. apr-util-devel                       x86_64                     1.5.2-6.el7                             base                      76 k
  98. cyrus-sasl-devel                     x86_64                     2.1.26-23.el7                           base                     310 k
  99. expat-devel                          x86_64                     2.1.0-10.el7_3                          base                      57 k
  100. httpd-tools                          x86_64                     2.4.6-90.el7.centos                     base                      91 k
  101. libdb-devel                          x86_64                     5.3.21-25.el7                           base                      39 k
  102. mailcap                              noarch                     2.1.41-2.el7                            base                      31 k
  103. openldap-devel                       x86_64                     2.4.44-21.el7_6                         base                     804 k

  104. 事务概要
  105. ========================================================================================================================================
  106. 安装  2 软件包 (+8 依赖软件包)

  107. 总下载量:4.5 M
  108. 安装大小:16 M
  109. Downloading packages:
  110. (1/10): apr-devel-1.4.8-5.el7.x86_64.rpm                                                                         | 188 kB  00:00:00     
  111. (2/10): apr-util-devel-1.5.2-6.el7.x86_64.rpm                                                                    |  76 kB  00:00:00     
  112. (3/10): cyrus-sasl-devel-2.1.26-23.el7.x86_64.rpm                                                                | 310 kB  00:00:00     
  113. (4/10): expat-devel-2.1.0-10.el7_3.x86_64.rpm                                                                    |  57 kB  00:00:00     
  114. (5/10): httpd-tools-2.4.6-90.el7.centos.x86_64.rpm                                                               |  91 kB  00:00:00     
  115. (6/10): httpd-2.4.6-90.el7.centos.x86_64.rpm                                                                     | 2.7 MB  00:00:01     
  116. (7/10): libdb-devel-5.3.21-25.el7.x86_64.rpm                                                                     |  39 kB  00:00:00     
  117. (8/10): mailcap-2.1.41-2.el7.noarch.rpm                                                                          |  31 kB  00:00:00     
  118. (9/10): openldap-devel-2.4.44-21.el7_6.x86_64.rpm                                                                | 804 kB  00:00:00     
  119. (10/10): httpd-devel-2.4.6-90.el7.centos.x86_64.rpm                                                              | 197 kB  00:00:01     
  120. ----------------------------------------------------------------------------------------------------------------------------------------
  121. 总计                                                                                                    1.6 MB/s | 4.5 MB  00:00:02     
  122. Running transaction check
  123. Running transaction test
  124. Transaction test succeeded
  125. Running transaction
  126.   正在安装    : apr-devel-1.4.8-5.el7.x86_64                                                                                       1/10
  127.   正在安装    : cyrus-sasl-devel-2.1.26-23.el7.x86_64                                                                              2/10
  128.   正在安装    : openldap-devel-2.4.44-21.el7_6.x86_64                                                                              3/10
  129.   正在安装    : expat-devel-2.1.0-10.el7_3.x86_64                                                                                  4/10
  130.   正在安装    : libdb-devel-5.3.21-25.el7.x86_64                                                                                   5/10
  131.   正在安装    : apr-util-devel-1.5.2-6.el7.x86_64                                                                                  6/10
  132.   正在安装    : httpd-tools-2.4.6-90.el7.centos.x86_64                                                                             7/10
  133.   正在安装    : mailcap-2.1.41-2.el7.noarch                                                                                        8/10
  134.   正在安装    : httpd-2.4.6-90.el7.centos.x86_64                                                                                   9/10
  135.   正在安装    : httpd-devel-2.4.6-90.el7.centos.x86_64                                                                            10/10
  136.   验证中      : httpd-devel-2.4.6-90.el7.centos.x86_64                                                                             1/10
  137.   验证中      : mailcap-2.1.41-2.el7.noarch                                                                                        2/10
  138.   验证中      : httpd-tools-2.4.6-90.el7.centos.x86_64                                                                             3/10
  139.   验证中      : libdb-devel-5.3.21-25.el7.x86_64                                                                                   4/10
  140.   验证中      : httpd-2.4.6-90.el7.centos.x86_64                                                                                   5/10
  141.   验证中      : openldap-devel-2.4.44-21.el7_6.x86_64                                                                              6/10
  142.   验证中      : apr-devel-1.4.8-5.el7.x86_64                                                                                       7/10
  143.   验证中      : apr-util-devel-1.5.2-6.el7.x86_64                                                                                  8/10
  144.   验证中      : expat-devel-2.1.0-10.el7_3.x86_64                                                                                  9/10
  145.   验证中      : cyrus-sasl-devel-2.1.26-23.el7.x86_64                                                                             10/10

  146. 已安装:
  147.   httpd.x86_64 0:2.4.6-90.el7.centos                              httpd-devel.x86_64 0:2.4.6-90.el7.centos                             

  148. 作为依赖被安装:
  149.   apr-devel.x86_64 0:1.4.8-5.el7            apr-util-devel.x86_64 0:1.5.2-6.el7            cyrus-sasl-devel.x86_64 0:2.1.26-23.el7      
  150.   expat-devel.x86_64 0:2.1.0-10.el7_3       httpd-tools.x86_64 0:2.4.6-90.el7.centos       libdb-devel.x86_64 0:5.3.21-25.el7           
  151.   mailcap.noarch 0:2.1.41-2.el7             openldap-devel.x86_64 0:2.4.44-21.el7_6      

  152. 完毕!
  153. [root@snipeit ~]##使用yum安装Mariadb
  154. [root@snipeit ~]# yum install -y mariadb mariadb-server
  155. 已加载插件:fastestmirror, langpacks
  156. Loading mirror speeds from cached hostfile
  157. * base: mirrors.ustc.edu.cn
  158. * epel: mirrors.aliyun.com
  159. * extras: mirrors.163.com
  160. * updates: mirrors.aliyun.com
  161. 正在解决依赖关系
  162. --> 正在检查事务
  163. ---> 软件包 mariadb.x86_64.1.5.5.64-1.el7 将被 安装
  164. ---> 软件包 mariadb-server.x86_64.1.5.5.64-1.el7 将被 安装
  165. --> 正在处理依赖关系 perl-DBI,它被软件包 1:mariadb-server-5.5.64-1.el7.x86_64 需要
  166. --> 正在处理依赖关系 perl-DBD-MySQL,它被软件包 1:mariadb-server-5.5.64-1.el7.x86_64 需要
  167. --> 正在处理依赖关系 perl(DBI),它被软件包 1:mariadb-server-5.5.64-1.el7.x86_64 需要
  168. --> 正在检查事务
  169. ---> 软件包 perl-DBD-MySQL.x86_64.0.4.023-6.el7 将被 安装
  170. ---> 软件包 perl-DBI.x86_64.0.1.627-4.el7 将被 安装
  171. --> 正在处理依赖关系 perl(RPC::PlServer) >= 0.2001,它被软件包 perl-DBI-1.627-4.el7.x86_64 需要
  172. --> 正在处理依赖关系 perl(RPC::PlClient) >= 0.2000,它被软件包 perl-DBI-1.627-4.el7.x86_64 需要
  173. --> 正在检查事务
  174. ---> 软件包 perl-PlRPC.noarch.0.0.2020-14.el7 将被 安装
  175. --> 正在处理依赖关系 perl(Net::Daemon) >= 0.13,它被软件包 perl-PlRPC-0.2020-14.el7.noarch 需要
  176. --> 正在处理依赖关系 perl(Net::Daemon::Test),它被软件包 perl-PlRPC-0.2020-14.el7.noarch 需要
  177. --> 正在处理依赖关系 perl(Net::Daemon::Log),它被软件包 perl-PlRPC-0.2020-14.el7.noarch 需要
  178. --> 正在处理依赖关系 perl(Compress::Zlib),它被软件包 perl-PlRPC-0.2020-14.el7.noarch 需要
  179. --> 正在检查事务
  180. ---> 软件包 perl-IO-Compress.noarch.0.2.061-2.el7 将被 安装
  181. --> 正在处理依赖关系 perl(Compress::Raw::Zlib) >= 2.061,它被软件包 perl-IO-Compress-2.061-2.el7.noarch 需要
  182. --> 正在处理依赖关系 perl(Compress::Raw::Bzip2) >= 2.061,它被软件包 perl-IO-Compress-2.061-2.el7.noarch 需要
  183. ---> 软件包 perl-Net-Daemon.noarch.0.0.48-5.el7 将被 安装
  184. --> 正在检查事务
  185. ---> 软件包 perl-Compress-Raw-Bzip2.x86_64.0.2.061-3.el7 将被 安装
  186. ---> 软件包 perl-Compress-Raw-Zlib.x86_64.1.2.061-4.el7 将被 安装
  187. --> 解决依赖关系完成

  188. 依赖关系解决

  189. ========================================================================================================================================
  190. Package                                    架构                      版本                                源                       大小
  191. ========================================================================================================================================
  192. 正在安装:
  193. mariadb                                    x86_64                    1:5.5.64-1.el7                      base                    8.7 M
  194. mariadb-server                             x86_64                    1:5.5.64-1.el7                      base                     11 M
  195. 为依赖而安装:
  196. perl-Compress-Raw-Bzip2                    x86_64                    2.061-3.el7                         base                     32 k
  197. perl-Compress-Raw-Zlib                     x86_64                    1:2.061-4.el7                       base                     57 k
  198. perl-DBD-MySQL                             x86_64                    4.023-6.el7                         base                    140 k
  199. perl-DBI                                   x86_64                    1.627-4.el7                         base                    802 k
  200. perl-IO-Compress                           noarch                    2.061-2.el7                         base                    260 k
  201. perl-Net-Daemon                            noarch                    0.48-5.el7                          base                     51 k
  202. perl-PlRPC                                 noarch                    0.2020-14.el7                       base                     36 k

  203. 事务概要
  204. ========================================================================================================================================
  205. 安装  2 软件包 (+7 依赖软件包)

  206. 总下载量:21 M
  207. 安装大小:110 M
  208. Downloading packages:
  209. (1/9): mariadb-server-5.5.64-1.el7.x86_64.rpm                                                                    |  11 MB  00:00:01     
  210. (2/9): perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64.rpm                                                            |  32 kB  00:00:00     
  211. (3/9): perl-Compress-Raw-Zlib-2.061-4.el7.x86_64.rpm                                                             |  57 kB  00:00:00     
  212. (4/9): perl-DBD-MySQL-4.023-6.el7.x86_64.rpm                                                                     | 140 kB  00:00:00     
  213. (5/9): perl-DBI-1.627-4.el7.x86_64.rpm                                                                           | 802 kB  00:00:00     
  214. (6/9): perl-IO-Compress-2.061-2.el7.noarch.rpm                                                                   | 260 kB  00:00:00     
  215. (7/9): perl-Net-Daemon-0.48-5.el7.noarch.rpm                                                                     |  51 kB  00:00:00     
  216. (8/9): perl-PlRPC-0.2020-14.el7.noarch.rpm                                                                       |  36 kB  00:00:00     
  217. (9/9): mariadb-5.5.64-1.el7.x86_64.rpm                                                                           | 8.7 MB  00:00:02     
  218. ----------------------------------------------------------------------------------------------------------------------------------------
  219. 总计                                                                                                    8.5 MB/s |  21 MB  00:00:02     
  220. Running transaction check
  221. Running transaction test
  222. Transaction test succeeded
  223. Running transaction
  224.   正在安装    : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64                                                                          1/9
  225.   正在安装    : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64                                                                         2/9
  226.   正在安装    : perl-IO-Compress-2.061-2.el7.noarch                                                                                 3/9
  227.   正在安装    : 1:mariadb-5.5.64-1.el7.x86_64                                                                                       4/9
  228.   正在安装    : perl-Net-Daemon-0.48-5.el7.noarch                                                                                   5/9
  229.   正在安装    : perl-PlRPC-0.2020-14.el7.noarch                                                                                     6/9
  230.   正在安装    : perl-DBI-1.627-4.el7.x86_64                                                                                         7/9
  231.   正在安装    : perl-DBD-MySQL-4.023-6.el7.x86_64                                                                                   8/9
  232.   正在安装    : 1:mariadb-server-5.5.64-1.el7.x86_64                                                                                9/9
  233.   验证中      : perl-Net-Daemon-0.48-5.el7.noarch                                                                                   1/9
  234.   验证中      : 1:mariadb-5.5.64-1.el7.x86_64                                                                                       2/9
  235.   验证中      : perl-DBD-MySQL-4.023-6.el7.x86_64                                                                                   3/9
  236.   验证中      : perl-IO-Compress-2.061-2.el7.noarch                                                                                 4/9
  237.   验证中      : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64                                                                         5/9
  238.   验证中      : 1:mariadb-server-5.5.64-1.el7.x86_64                                                                                6/9
  239.   验证中      : perl-DBI-1.627-4.el7.x86_64                                                                                         7/9
  240.   验证中      : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64                                                                          8/9
  241.   验证中      : perl-PlRPC-0.2020-14.el7.noarch                                                                                     9/9

  242. 已安装:
  243.   mariadb.x86_64 1:5.5.64-1.el7                                   mariadb-server.x86_64 1:5.5.64-1.el7                                 

  244. 作为依赖被安装:
  245.   perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7    perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7    perl-DBD-MySQL.x86_64 0:4.023-6.el7   
  246.   perl-DBI.x86_64 0:1.627-4.el7                   perl-IO-Compress.noarch 0:2.061-2.el7          perl-Net-Daemon.noarch 0:0.48-5.el7   
  247.   perl-PlRPC.noarch 0:0.2020-14.el7              

  248. 完毕!
  249. [root@snipeit ~]##为了防止CentOS上面发生php冲突,所以,这个命令还是先执行一下更好些
  250. [root@snipeit ~]# yum -y remove php*
  251. 已加载插件:fastestmirror, langpacks
  252. 参数 php* 没有匹配
  253. 不删除任何软件包
  254. [root@snipeit ~]# #安装PHP依赖环境
  255. [root@snipeit ~]# yum install -y make gcc wget openssl readline-devel openssl-devel libxslt-devel gmp-devel bzip2-devel freetype-devel libjpeg-devel php-mcrypt libmcrypt libmcrypt-devel  autoconf  freetype gd jpegsrc libmcrypt libpng libpng-devel libjpeg libxml2 libxml2-devel zlib curl curl-devel
  256. 已加载插件:fastestmirror, langpacks
  257. Loading mirror speeds from cached hostfile
  258. * base: mirrors.ustc.edu.cn
  259. * epel: mirrors.aliyun.com
  260. * extras: mirrors.163.com
  261. * updates: mirrors.aliyun.com
  262. 软件包 1:make-3.82-24.el7.x86_64 已安装并且是最新版本
  263. 软件包 gcc-4.8.5-39.el7.x86_64 已安装并且是最新版本
  264. 软件包 wget-1.14-18.el7_6.1.x86_64 已安装并且是最新版本
  265. 软件包 1:openssl-1.0.2k-19.el7.x86_64 已安装并且是最新版本
  266. 软件包 autoconf-2.69-11.el7.noarch 已安装并且是最新版本
  267. 软件包 freetype-2.8-14.el7.x86_64 已安装并且是最新版本
  268. 软件包 gd-2.0.35-26.el7.x86_64 已安装并且是最新版本
  269. 没有可用软件包 jpegsrc。
  270. 软件包 2:libpng-1.5.13-7.el7_2.x86_64 已安装并且是最新版本
  271. 软件包 libjpeg-turbo-1.2.90-8.el7.x86_64 已安装并且是最新版本
  272. 软件包 libxml2-2.9.1-6.el7_2.3.x86_64 已安装并且是最新版本
  273. 软件包 zlib-1.2.7-18.el7.x86_64 已安装并且是最新版本
  274. 正在解决依赖关系
  275. --> 正在检查事务
  276. ---> 软件包 bzip2-devel.x86_64.0.1.0.6-13.el7 将被 安装
  277. ---> 软件包 curl.x86_64.0.7.29.0-54.el7 将被 升级
  278. ---> 软件包 curl.x86_64.0.7.29.0-54.el7_7.2 将被 更新
  279. --> 正在处理依赖关系 libcurl = 7.29.0-54.el7_7.2,它被软件包 curl-7.29.0-54.el7_7.2.x86_64 需要
  280. ---> 软件包 freetype-devel.x86_64.0.2.8-14.el7 将被 安装
  281. --> 正在处理依赖关系 pkgconfig(zlib),它被软件包 freetype-devel-2.8-14.el7.x86_64 需要
  282. ---> 软件包 gmp-devel.x86_64.1.6.0.0-15.el7 将被 安装
  283. ---> 软件包 libcurl-devel.x86_64.0.7.29.0-54.el7_7.2 将被 安装
  284. epel/x86_64/filelists_db                                                                                         |  11 MB  00:00:01     
  285. base/7/x86_64/filelists_db                                                                                       | 7.3 MB  00:00:00     
  286. updates/7/x86_64/filelists_db                                                                                    | 4.0 MB  00:00:00     
  287. ---> 软件包 libjpeg-turbo-devel.x86_64.0.1.2.90-8.el7 将被 安装
  288. ---> 软件包 libmcrypt.x86_64.0.2.5.8-13.el7 将被 安装
  289. ---> 软件包 libmcrypt-devel.x86_64.0.2.5.8-13.el7 将被 安装
  290. ---> 软件包 libpng-devel.x86_64.2.1.5.13-7.el7_2 将被 安装
  291. ---> 软件包 libxml2-devel.x86_64.0.2.9.1-6.el7_2.3 将被 安装
  292. --> 正在处理依赖关系 xz-devel,它被软件包 libxml2-devel-2.9.1-6.el7_2.3.x86_64 需要
  293. ---> 软件包 libxslt-devel.x86_64.0.1.1.28-5.el7 将被 安装
  294. --> 正在处理依赖关系 libgcrypt-devel,它被软件包 libxslt-devel-1.1.28-5.el7.x86_64 需要
  295. ---> 软件包 openssl-devel.x86_64.1.1.0.2k-19.el7 将被 安装
  296. --> 正在处理依赖关系 krb5-devel(x86-64),它被软件包 1:openssl-devel-1.0.2k-19.el7.x86_64 需要
  297. ---> 软件包 php-mcrypt.x86_64.0.5.4.16-9.el7 将被 安装
  298. --> 正在处理依赖关系 php(zend-abi) = 20100525-64,它被软件包 php-mcrypt-5.4.16-9.el7.x86_64 需要
  299. --> 正在处理依赖关系 php(api) = 20100412-64,它被软件包 php-mcrypt-5.4.16-9.el7.x86_64 需要
  300. ---> 软件包 readline-devel.x86_64.0.6.2-11.el7 将被 安装
  301. --> 正在处理依赖关系 ncurses-devel,它被软件包 readline-devel-6.2-11.el7.x86_64 需要
  302. --> 正在检查事务
  303. ---> 软件包 krb5-devel.x86_64.0.1.15.1-37.el7_7.2 将被 安装
  304. --> 正在处理依赖关系 libkadm5(x86-64) = 1.15.1-37.el7_7.2,它被软件包 krb5-devel-1.15.1-37.el7_7.2.x86_64 需要
  305. --> 正在处理依赖关系 krb5-libs(x86-64) = 1.15.1-37.el7_7.2,它被软件包 krb5-devel-1.15.1-37.el7_7.2.x86_64 需要
  306. --> 正在处理依赖关系 libverto-devel,它被软件包 krb5-devel-1.15.1-37.el7_7.2.x86_64 需要
  307. --> 正在处理依赖关系 libselinux-devel,它被软件包 krb5-devel-1.15.1-37.el7_7.2.x86_64 需要
  308. --> 正在处理依赖关系 libcom_err-devel,它被软件包 krb5-devel-1.15.1-37.el7_7.2.x86_64 需要
  309. --> 正在处理依赖关系 keyutils-libs-devel,它被软件包 krb5-devel-1.15.1-37.el7_7.2.x86_64 需要
  310. ---> 软件包 libcurl.x86_64.0.7.29.0-54.el7 将被 升级
  311. ---> 软件包 libcurl.x86_64.0.7.29.0-54.el7_7.2 将被 更新
  312. ---> 软件包 libgcrypt-devel.x86_64.0.1.5.3-14.el7 将被 安装
  313. --> 正在处理依赖关系 libgpg-error-devel,它被软件包 libgcrypt-devel-1.5.3-14.el7.x86_64 需要
  314. ---> 软件包 ncurses-devel.x86_64.0.5.9-14.20130511.el7_4 将被 安装
  315. ---> 软件包 php-common.x86_64.0.5.4.16-46.1.el7_7 将被 安装
  316. --> 正在处理依赖关系 libzip.so.2()(64bit),它被软件包 php-common-5.4.16-46.1.el7_7.x86_64 需要
  317. ---> 软件包 xz-devel.x86_64.0.5.2.2-1.el7 将被 安装
  318. ---> 软件包 zlib-devel.x86_64.0.1.2.7-18.el7 将被 安装
  319. --> 正在检查事务
  320. ---> 软件包 keyutils-libs-devel.x86_64.0.1.5.8-3.el7 将被 安装
  321. ---> 软件包 krb5-libs.x86_64.0.1.15.1-37.el7_6 将被 升级
  322. --> 正在处理依赖关系 krb5-libs(x86-64) = 1.15.1-37.el7_6,它被软件包 krb5-workstation-1.15.1-37.el7_6.x86_64 需要
  323. ---> 软件包 krb5-libs.x86_64.0.1.15.1-37.el7_7.2 将被 更新
  324. ---> 软件包 libcom_err-devel.x86_64.0.1.42.9-16.el7 将被 安装
  325. ---> 软件包 libgpg-error-devel.x86_64.0.1.12-3.el7 将被 安装
  326. ---> 软件包 libkadm5.x86_64.0.1.15.1-37.el7_6 将被 升级
  327. ---> 软件包 libkadm5.x86_64.0.1.15.1-37.el7_7.2 将被 更新
  328. ---> 软件包 libselinux-devel.x86_64.0.2.5-14.1.el7 将被 安装
  329. --> 正在处理依赖关系 libsepol-devel(x86-64) >= 2.5-10,它被软件包 libselinux-devel-2.5-14.1.el7.x86_64 需要
  330. --> 正在处理依赖关系 pkgconfig(libsepol),它被软件包 libselinux-devel-2.5-14.1.el7.x86_64 需要
  331. --> 正在处理依赖关系 pkgconfig(libpcre),它被软件包 libselinux-devel-2.5-14.1.el7.x86_64 需要
  332. ---> 软件包 libverto-devel.x86_64.0.0.2.5-4.el7 将被 安装
  333. ---> 软件包 libzip.x86_64.0.0.10.1-8.el7 将被 安装
  334. --> 正在检查事务
  335. ---> 软件包 krb5-workstation.x86_64.0.1.15.1-37.el7_6 将被 升级
  336. ---> 软件包 krb5-workstation.x86_64.0.1.15.1-37.el7_7.2 将被 更新
  337. ---> 软件包 libsepol-devel.x86_64.0.2.5-10.el7 将被 安装
  338. ---> 软件包 pcre-devel.x86_64.0.8.32-17.el7 将被 安装
  339. --> 解决依赖关系完成

  340. 依赖关系解决

  341. ========================================================================================================================================
  342. Package                               架构                     版本                                    源                         大小
  343. ========================================================================================================================================
  344. 正在安装:
  345. bzip2-devel                           x86_64                   1.0.6-13.el7                            base                      218 k
  346. freetype-devel                        x86_64                   2.8-14.el7                              base                      447 k
  347. gmp-devel                             x86_64                   1:6.0.0-15.el7                          base                      181 k
  348. libcurl-devel                         x86_64                   7.29.0-54.el7_7.2                       updates                   303 k
  349. libjpeg-turbo-devel                   x86_64                   1.2.90-8.el7                            base                       99 k
  350. libmcrypt                             x86_64                   2.5.8-13.el7                            epel                       99 k
  351. libmcrypt-devel                       x86_64                   2.5.8-13.el7                            epel                       13 k
  352. libpng-devel                          x86_64                   2:1.5.13-7.el7_2                        base                      122 k
  353. libxml2-devel                         x86_64                   2.9.1-6.el7_2.3                         base                      1.0 M
  354. libxslt-devel                         x86_64                   1.1.28-5.el7                            base                      309 k
  355. openssl-devel                         x86_64                   1:1.0.2k-19.el7                         base                      1.5 M
  356. php-mcrypt                            x86_64                   5.4.16-9.el7                            epel                       20 k
  357. readline-devel                        x86_64                   6.2-11.el7                              base                      139 k
  358. 正在更新:
  359. curl                                  x86_64                   7.29.0-54.el7_7.2                       updates                   270 k
  360. 为依赖而安装:
  361. keyutils-libs-devel                   x86_64                   1.5.8-3.el7                             base                       37 k
  362. krb5-devel                            x86_64                   1.15.1-37.el7_7.2                       updates                   272 k
  363. libcom_err-devel                      x86_64                   1.42.9-16.el7                           base                       32 k
  364. libgcrypt-devel                       x86_64                   1.5.3-14.el7                            base                      129 k
  365. libgpg-error-devel                    x86_64                   1.12-3.el7                              base                       16 k
  366. libselinux-devel                      x86_64                   2.5-14.1.el7                            base                      187 k
  367. libsepol-devel                        x86_64                   2.5-10.el7                              base                       77 k
  368. libverto-devel                        x86_64                   0.2.5-4.el7                             base                       12 k
  369. libzip                                x86_64                   0.10.1-8.el7                            base                       48 k
  370. ncurses-devel                         x86_64                   5.9-14.20130511.el7_4                   base                      712 k
  371. pcre-devel                            x86_64                   8.32-17.el7                             base                      480 k
  372. php-common                            x86_64                   5.4.16-46.1.el7_7                       updates                   565 k
  373. xz-devel                              x86_64                   5.2.2-1.el7                             base                       46 k
  374. zlib-devel                            x86_64                   1.2.7-18.el7                            base                       50 k
  375. 为依赖而更新:
  376. krb5-libs                             x86_64                   1.15.1-37.el7_7.2                       updates                   805 k
  377. krb5-workstation                      x86_64                   1.15.1-37.el7_7.2                       updates                   816 k
  378. libcurl                               x86_64                   7.29.0-54.el7_7.2                       updates                   223 k
  379. libkadm5                              x86_64                   1.15.1-37.el7_7.2                       updates                   178 k

  380. 事务概要
  381. ========================================================================================================================================
  382. 安装  13 软件包 (+14 依赖软件包)
  383. 升级   1 软件包 (+ 4 依赖软件包)

  384. 总计:9.3 M
  385. 总下载量:7.1 M
  386. Downloading packages:
  387. (1/27): bzip2-devel-1.0.6-13.el7.x86_64.rpm                                                                      | 218 kB  00:00:00     
  388. (2/27): freetype-devel-2.8-14.el7.x86_64.rpm                                                                     | 447 kB  00:00:00     
  389. (3/27): gmp-devel-6.0.0-15.el7.x86_64.rpm                                                                        | 181 kB  00:00:00     
  390. (4/27): libcom_err-devel-1.42.9-16.el7.x86_64.rpm                                                                |  32 kB  00:00:00     
  391. (5/27): keyutils-libs-devel-1.5.8-3.el7.x86_64.rpm                                                               |  37 kB  00:00:00     
  392. (6/27): libgpg-error-devel-1.12-3.el7.x86_64.rpm                                                                 |  16 kB  00:00:00     
  393. (7/27): libgcrypt-devel-1.5.3-14.el7.x86_64.rpm                                                                  | 129 kB  00:00:00     
  394. (8/27): krb5-devel-1.15.1-37.el7_7.2.x86_64.rpm                                                                  | 272 kB  00:00:00     
  395. (9/27): libjpeg-turbo-devel-1.2.90-8.el7.x86_64.rpm                                                              |  99 kB  00:00:00     
  396. (10/27): libcurl-devel-7.29.0-54.el7_7.2.x86_64.rpm                                                              | 303 kB  00:00:00     
  397. warning: /var/cache/yum/x86_64/7/epel/packages/libmcrypt-2.5.8-13.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
  398. libmcrypt-2.5.8-13.el7.x86_64.rpm 的公钥尚未安装
  399. (11/27): libmcrypt-2.5.8-13.el7.x86_64.rpm                                                                       |  99 kB  00:00:00     
  400. (12/27): libmcrypt-devel-2.5.8-13.el7.x86_64.rpm                                                                 |  13 kB  00:00:00     
  401. (13/27): libpng-devel-1.5.13-7.el7_2.x86_64.rpm                                                                  | 122 kB  00:00:00     
  402. (14/27): libselinux-devel-2.5-14.1.el7.x86_64.rpm                                                                | 187 kB  00:00:01     
  403. (15/27): libsepol-devel-2.5-10.el7.x86_64.rpm                                                                    |  77 kB  00:00:00     
  404. (16/27): libverto-devel-0.2.5-4.el7.x86_64.rpm                                                                   |  12 kB  00:00:00     
  405. (17/27): libxml2-devel-2.9.1-6.el7_2.3.x86_64.rpm                                                                | 1.0 MB  00:00:00     
  406. (18/27): libxslt-devel-1.1.28-5.el7.x86_64.rpm                                                                   | 309 kB  00:00:00     
  407. (19/27): libzip-0.10.1-8.el7.x86_64.rpm                                                                          |  48 kB  00:00:00     
  408. (20/27): ncurses-devel-5.9-14.20130511.el7_4.x86_64.rpm                                                          | 712 kB  00:00:00     
  409. (21/27): openssl-devel-1.0.2k-19.el7.x86_64.rpm                                                                  | 1.5 MB  00:00:00     
  410. (22/27): pcre-devel-8.32-17.el7.x86_64.rpm                                                                       | 480 kB  00:00:00     
  411. (23/27): php-common-5.4.16-46.1.el7_7.x86_64.rpm                                                                 | 565 kB  00:00:00     
  412. (24/27): readline-devel-6.2-11.el7.x86_64.rpm                                                                    | 139 kB  00:00:00     
  413. (25/27): xz-devel-5.2.2-1.el7.x86_64.rpm                                                                         |  46 kB  00:00:00     
  414. (26/27): zlib-devel-1.2.7-18.el7.x86_64.rpm                                                                      |  50 kB  00:00:00     
  415. (27/27): php-mcrypt-5.4.16-9.el7.x86_64.rpm                                                                      |  20 kB  00:00:00     
  416. ----------------------------------------------------------------------------------------------------------------------------------------
  417. 总计                                                                                                    2.1 MB/s | 7.1 MB  00:00:03     
  418. 从 file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 检索密钥
  419. 导入 GPG key 0x352C64E5:
  420. 用户ID     : "Fedora EPEL (7) <[url=mailto:[email protected]][email protected][/url]>"
  421. 指纹       : 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5
  422. 软件包     : epel-release-7-11.noarch (@extras)
  423. 来自       : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
  424. Running transaction check
  425. Running transaction test
  426. Transaction test succeeded
  427. Running transaction
  428.   正在安装    : zlib-devel-1.2.7-18.el7.x86_64                                                                                     1/37
  429.   正在更新    : krb5-libs-1.15.1-37.el7_7.2.x86_64                                                                                 2/37
  430.   正在更新    : libcurl-7.29.0-54.el7_7.2.x86_64                                                                                   3/37
  431.   正在更新    : libkadm5-1.15.1-37.el7_7.2.x86_64                                                                                  4/37
  432.   正在安装    : libmcrypt-2.5.8-13.el7.x86_64                                                                                      5/37
  433.   正在安装    : 2:libpng-devel-1.5.13-7.el7_2.x86_64                                                                               6/37
  434.   正在安装    : libzip-0.10.1-8.el7.x86_64                                                                                         7/37
  435.   正在安装    : php-common-5.4.16-46.1.el7_7.x86_64                                                                                8/37
  436.   正在安装    : libgpg-error-devel-1.12-3.el7.x86_64                                                                               9/37
  437.   正在安装    : libgcrypt-devel-1.5.3-14.el7.x86_64                                                                               10/37
  438.   正在安装    : xz-devel-5.2.2-1.el7.x86_64                                                                                       11/37
  439.   正在安装    : libxml2-devel-2.9.1-6.el7_2.3.x86_64                                                                              12/37
  440.   正在安装    : libsepol-devel-2.5-10.el7.x86_64                                                                                  13/37
  441.   正在安装    : ncurses-devel-5.9-14.20130511.el7_4.x86_64                                                                        14/37
  442.   正在安装    : libverto-devel-0.2.5-4.el7.x86_64                                                                                 15/37
  443.   正在安装    : keyutils-libs-devel-1.5.8-3.el7.x86_64                                                                            16/37
  444.   正在安装    : pcre-devel-8.32-17.el7.x86_64                                                                                     17/37
  445.   正在安装    : libselinux-devel-2.5-14.1.el7.x86_64                                                                              18/37
  446.   正在安装    : libcom_err-devel-1.42.9-16.el7.x86_64                                                                             19/37
  447.   正在安装    : krb5-devel-1.15.1-37.el7_7.2.x86_64                                                                               20/37
  448.   正在安装    : 1:openssl-devel-1.0.2k-19.el7.x86_64                                                                              21/37
  449.   正在安装    : readline-devel-6.2-11.el7.x86_64                                                                                  22/37
  450.   正在安装    : libxslt-devel-1.1.28-5.el7.x86_64                                                                                 23/37
  451.   正在安装    : php-mcrypt-5.4.16-9.el7.x86_64                                                                                    24/37
  452.   正在安装    : freetype-devel-2.8-14.el7.x86_64                                                                                  25/37
  453.   正在安装    : libmcrypt-devel-2.5.8-13.el7.x86_64                                                                               26/37
  454.   正在更新    : krb5-workstation-1.15.1-37.el7_7.2.x86_64                                                                         27/37
  455.   正在更新    : curl-7.29.0-54.el7_7.2.x86_64                                                                                     28/37
  456.   正在安装    : libcurl-devel-7.29.0-54.el7_7.2.x86_64                                                                            29/37
  457.   正在安装    : bzip2-devel-1.0.6-13.el7.x86_64                                                                                   30/37
  458.   正在安装    : libjpeg-turbo-devel-1.2.90-8.el7.x86_64                                                                           31/37
  459.   正在安装    : 1:gmp-devel-6.0.0-15.el7.x86_64                                                                                   32/37
  460.   清理        : krb5-workstation-1.15.1-37.el7_6.x86_64                                                                           33/37
  461.   清理        : libkadm5-1.15.1-37.el7_6.x86_64                                                                                   34/37
  462.   清理        : curl-7.29.0-54.el7.x86_64                                                                                         35/37
  463.   清理        : libcurl-7.29.0-54.el7.x86_64                                                                                      36/37
  464.   清理        : krb5-libs-1.15.1-37.el7_6.x86_64                                                                                  37/37
  465.   验证中      : libxml2-devel-2.9.1-6.el7_2.3.x86_64                                                                               1/37
  466.   验证中      : krb5-devel-1.15.1-37.el7_7.2.x86_64                                                                                2/37
  467.   验证中      : krb5-libs-1.15.1-37.el7_7.2.x86_64                                                                                 3/37
  468.   验证中      : 1:gmp-devel-6.0.0-15.el7.x86_64                                                                                    4/37
  469.   验证中      : libcom_err-devel-1.42.9-16.el7.x86_64                                                                              5/37
  470.   验证中      : libjpeg-turbo-devel-1.2.90-8.el7.x86_64                                                                            6/37
  471.   验证中      : pcre-devel-8.32-17.el7.x86_64                                                                                      7/37
  472.   验证中      : krb5-workstation-1.15.1-37.el7_7.2.x86_64                                                                          8/37
  473.   验证中      : libmcrypt-devel-2.5.8-13.el7.x86_64                                                                                9/37
  474.   验证中      : libmcrypt-2.5.8-13.el7.x86_64                                                                                     10/37
  475.   验证中      : keyutils-libs-devel-1.5.8-3.el7.x86_64                                                                            11/37
  476.   验证中      : bzip2-devel-1.0.6-13.el7.x86_64                                                                                   12/37
  477.   验证中      : libverto-devel-0.2.5-4.el7.x86_64                                                                                 13/37
  478.   验证中      : zlib-devel-1.2.7-18.el7.x86_64                                                                                    14/37
  479.   验证中      : ncurses-devel-5.9-14.20130511.el7_4.x86_64                                                                        15/37
  480.   验证中      : php-common-5.4.16-46.1.el7_7.x86_64                                                                               16/37
  481.   验证中      : freetype-devel-2.8-14.el7.x86_64                                                                                  17/37
  482.   验证中      : 2:libpng-devel-1.5.13-7.el7_2.x86_64                                                                              18/37
  483.   验证中      : libxslt-devel-1.1.28-5.el7.x86_64                                                                                 19/37
  484.   验证中      : php-mcrypt-5.4.16-9.el7.x86_64                                                                                    20/37
  485.   验证中      : curl-7.29.0-54.el7_7.2.x86_64                                                                                     21/37
  486.   验证中      : 1:openssl-devel-1.0.2k-19.el7.x86_64                                                                              22/37
  487.   验证中      : libcurl-devel-7.29.0-54.el7_7.2.x86_64                                                                            23/37
  488.   验证中      : libsepol-devel-2.5-10.el7.x86_64                                                                                  24/37
  489.   验证中      : libgcrypt-devel-1.5.3-14.el7.x86_64                                                                               25/37
  490.   验证中      : readline-devel-6.2-11.el7.x86_64                                                                                  26/37
  491.   验证中      : xz-devel-5.2.2-1.el7.x86_64                                                                                       27/37
  492.   验证中      : libcurl-7.29.0-54.el7_7.2.x86_64                                                                                  28/37
  493.   验证中      : libkadm5-1.15.1-37.el7_7.2.x86_64                                                                                 29/37
  494.   验证中      : libgpg-error-devel-1.12-3.el7.x86_64                                                                              30/37
  495.   验证中      : libselinux-devel-2.5-14.1.el7.x86_64                                                                              31/37
  496.   验证中      : libzip-0.10.1-8.el7.x86_64                                                                                        32/37
  497.   验证中      : krb5-workstation-1.15.1-37.el7_6.x86_64                                                                           33/37
  498.   验证中      : krb5-libs-1.15.1-37.el7_6.x86_64                                                                                  34/37
  499.   验证中      : libcurl-7.29.0-54.el7.x86_64                                                                                      35/37
  500.   验证中      : curl-7.29.0-54.el7.x86_64                                                                                         36/37
  501.   验证中      : libkadm5-1.15.1-37.el7_6.x86_64                                                                                   37/37

  502. 已安装:
  503.   bzip2-devel.x86_64 0:1.0.6-13.el7            freetype-devel.x86_64 0:2.8-14.el7            gmp-devel.x86_64 1:6.0.0-15.el7           
  504.   libcurl-devel.x86_64 0:7.29.0-54.el7_7.2     libjpeg-turbo-devel.x86_64 0:1.2.90-8.el7     libmcrypt.x86_64 0:2.5.8-13.el7           
  505.   libmcrypt-devel.x86_64 0:2.5.8-13.el7        libpng-devel.x86_64 2:1.5.13-7.el7_2          libxml2-devel.x86_64 0:2.9.1-6.el7_2.3   
  506.   libxslt-devel.x86_64 0:1.1.28-5.el7          openssl-devel.x86_64 1:1.0.2k-19.el7          php-mcrypt.x86_64 0:5.4.16-9.el7         
  507.   readline-devel.x86_64 0:6.2-11.el7         

  508. 作为依赖被安装:
  509.   keyutils-libs-devel.x86_64 0:1.5.8-3.el7        krb5-devel.x86_64 0:1.15.1-37.el7_7.2     libcom_err-devel.x86_64 0:1.42.9-16.el7   
  510.   libgcrypt-devel.x86_64 0:1.5.3-14.el7           libgpg-error-devel.x86_64 0:1.12-3.el7    libselinux-devel.x86_64 0:2.5-14.1.el7   
  511.   libsepol-devel.x86_64 0:2.5-10.el7              libverto-devel.x86_64 0:0.2.5-4.el7       libzip.x86_64 0:0.10.1-8.el7              
  512.   ncurses-devel.x86_64 0:5.9-14.20130511.el7_4    pcre-devel.x86_64 0:8.32-17.el7           php-common.x86_64 0:5.4.16-46.1.el7_7     
  513.   xz-devel.x86_64 0:5.2.2-1.el7                   zlib-devel.x86_64 0:1.2.7-18.el7         

  514. 更新完毕:
  515.   curl.x86_64 0:7.29.0-54.el7_7.2                                                                                                      

  516. 作为依赖被升级:
  517.   krb5-libs.x86_64 0:1.15.1-37.el7_7.2       krb5-workstation.x86_64 0:1.15.1-37.el7_7.2       libcurl.x86_64 0:7.29.0-54.el7_7.2      
  518.   libkadm5.x86_64 0:1.15.1-37.el7_7.2      

  519. 完毕!
复制代码
安装php72w,是需要配置额外的yum源地址(连接不一定长期有效,如果无效自行查找)的,否则会报错不能找到相关软件包。php高版本的yum源地址,有两部分,其中一部分是epel-release,另外一部分来自webtatic。如果跳过epel-release的话,安装webtatic的时候,会有错误爆出。所以,这里需要的命令是:


  1. [root@snipeit ~]# rpm -Uvh https://dl.Fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-13.noarch.rpm
  2. 获取https://dl.Fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-13.noarch.rpm
  3. [root@snipeit ~]# rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
  4. 获取https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
  5. 警告:/var/tmp/rpm-tmp.eZI4LC: 头V4 RSA/SHA1 Signature, 密钥 ID 62e74ca5: NOKEY
  6. 准备中...                          ################################# [100%]
  7.         软件包 webtatic-release-7-3.noarch 已经安装
  8. [root@snipeit ~]# #安装扩展包,事实上,这里面的对应扩展库很多,这里大家一定要注意cli和fpm这两个包,而其它的相关包就看您需要了。
  9. [root@snipeit ~]# yum -y install php72w php72w-cli php72w-fpm php72w-common php72w-devel php72w-embedded php72w-gd php72w-mbstring php72w-mysqlnd php72w-opcache php72w-pdo php72w-xml
  10. 已加载插件:fastestmirror, langpacks
  11. Loading mirror speeds from cached hostfile
  12. * base: mirrors.ustc.edu.cn
  13. * epel: mirrors.aliyun.com
  14. * extras: mirrors.163.com
  15. * updates: mirrors.aliyun.com
  16. * webtatic: us-east.repo.webtatic.com
  17. 正在解决依赖关系
  18. --> 正在检查事务
  19. ---> 软件包 mod_php72w.x86_64.0.7.2.27-1.w7 将被 安装
  20. --> 正在处理依赖关系 libargon2.so.0()(64bit),它被软件包 mod_php72w-7.2.27-1.w7.x86_64 需要
  21. ---> 软件包 php72w-cli.x86_64.0.7.2.27-1.w7 将被 安装
  22. ---> 软件包 php72w-common.x86_64.0.7.2.27-1.w7 将被 安装
  23. ---> 软件包 php72w-devel.x86_64.0.7.2.27-1.w7 将被 安装
  24. ---> 软件包 php72w-embedded.x86_64.0.7.2.27-1.w7 将被 安装
  25. ---> 软件包 php72w-fpm.x86_64.0.7.2.27-1.w7 将被 安装
  26. ---> 软件包 php72w-gd.x86_64.0.7.2.27-1.w7 将被 安装
  27. ---> 软件包 php72w-mbstring.x86_64.0.7.2.27-1.w7 将被 安装
  28. ---> 软件包 php72w-mysqlnd.x86_64.0.7.2.27-1.w7 将被 安装
  29. ---> 软件包 php72w-opcache.x86_64.0.7.2.27-1.w7 将被 安装
  30. ---> 软件包 php72w-pdo.x86_64.0.7.2.27-1.w7 将被 安装
  31. ---> 软件包 php72w-xml.x86_64.0.7.2.27-1.w7 将被 安装
  32. --> 正在检查事务
  33. ---> 软件包 libargon2.x86_64.0.20161029-3.el7 将被 安装
  34. --> 解决依赖关系完成

  35. 依赖关系解决

  36. ========================================================================================================================================
  37. Package                             架构                       版本                                 源                            大小
  38. ========================================================================================================================================
  39. 正在安装:
  40. mod_php72w                          x86_64                     7.2.27-1.w7                          webtatic                     3.1 M
  41. php72w-cli                          x86_64                     7.2.27-1.w7                          webtatic                     3.1 M
  42. php72w-common                       x86_64                     7.2.27-1.w7                          webtatic                     1.3 M
  43. php72w-devel                        x86_64                     7.2.27-1.w7                          webtatic                     2.8 M
  44. php72w-embedded                     x86_64                     7.2.27-1.w7                          webtatic                     1.5 M
  45. php72w-fpm                          x86_64                     7.2.27-1.w7                          webtatic                     1.6 M
  46. php72w-gd                           x86_64                     7.2.27-1.w7                          webtatic                     139 k
  47. php72w-mbstring                     x86_64                     7.2.27-1.w7                          webtatic                     587 k
  48. php72w-mysqlnd                      x86_64                     7.2.27-1.w7                          webtatic                     198 k
  49. php72w-opcache                      x86_64                     7.2.27-1.w7                          webtatic                     246 k
  50. php72w-pdo                          x86_64                     7.2.27-1.w7                          webtatic                      90 k
  51. php72w-xml                          x86_64                     7.2.27-1.w7                          webtatic                     123 k
  52. 为依赖而安装:
  53. libargon2                           x86_64                     20161029-3.el7                       epel                          23 k

  54. 事务概要
  55. ========================================================================================================================================
  56. 安装  12 软件包 (+1 依赖软件包)

  57. 总下载量:15 M
  58. 安装大小:65 M
  59. Downloading packages:
  60. (1/13): libargon2-20161029-3.el7.x86_64.rpm                                                                      |  23 kB  00:00:00     
  61. warning: /var/cache/yum/x86_64/7/webtatic/packages/php72w-common-7.2.27-1.w7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 62e74ca5: NOKEY
  62. php72w-common-7.2.27-1.w7.x86_64.rpm 的公钥尚未安装
  63. (2/13): php72w-common-7.2.27-1.w7.x86_64.rpm                                                                     | 1.3 MB  00:01:42     
  64. (3/13): php72w-embedded-7.2.27-1.w7.x86_64.rpm                                                                   | 1.5 MB  00:02:01     
  65. (4/13): mod_php72w-7.2.27-1.w7.x86_64.rpm                                                                        | 3.1 MB  00:04:31     
  66. (5/13): php72w-gd-7.2.27-1.w7.x86_64.rpm                                                                         | 139 kB  00:00:12     
  67. (6/13): php72w-mysqlnd-7.2.27-1.w7.x86_64.rpm                                                                    | 198 kB  00:00:14     
  68. (7/13): php72w-mbstring-7.2.27-1.w7.x86_64.rpm                                                                   | 587 kB  00:00:37     
  69. (8/13): php72w-pdo-7.2.27-1.w7.x86_64.rpm                                                                        |  90 kB  00:00:09     
  70. (9/13): php72w-opcache-7.2.27-1.w7.x86_64.rpm                                                                    | 246 kB  00:00:20     
  71. (10/13): php72w-devel-7.2.27-1.w7.x86_64.rpm                                                                     | 2.8 MB  00:05:38     
  72. (11/13): php72w-xml-7.2.27-1.w7.x86_64.rpm                                                                       | 123 kB  00:00:12     
  73. (12/13): php72w-fpm-7.2.27-1.w7.x86_64.rpm                                                                       | 1.6 MB  00:01:18     
  74. (13/13): php72w-cli-7.2.27-1.w7.x86_64.rpm                                                                       | 3.1 MB  00:00:48     
  75. ----------------------------------------------------------------------------------------------------------------------------------------
  76. 总计                                                                                                     40 kB/s |  15 MB  00:06:18     
  77. 从 file:///etc/pki/rpm-gpg/RPM-GPG-KEY-webtatic-el7 检索密钥
  78. 导入 GPG key 0x62E74CA5:
  79. 用户ID     : "Webtatic EL7 <[url=mailto:[email protected]][email protected][/url]>"
  80. 指纹       : 830d b159 6d9b 9b01 99dc 24a3 e87f d236 62e7 4ca5
  81. 软件包     : webtatic-release-7-3.noarch (installed)
  82. 来自       : /etc/pki/rpm-gpg/RPM-GPG-KEY-webtatic-el7
  83. Running transaction check
  84. Running transaction test
  85. Transaction test succeeded
  86. Running transaction
  87.   正在安装    : php72w-common-7.2.27-1.w7.x86_64                                                                                   1/13
  88.   正在安装    : libargon2-20161029-3.el7.x86_64                                                                                    2/13
  89.   正在安装    : php72w-cli-7.2.27-1.w7.x86_64                                                                                      3/13
  90.   正在安装    : php72w-pdo-7.2.27-1.w7.x86_64                                                                                      4/13
  91.   正在安装    : php72w-mysqlnd-7.2.27-1.w7.x86_64                                                                                  5/13
  92.   正在安装    : php72w-devel-7.2.27-1.w7.x86_64                                                                                    6/13
  93.   正在安装    : php72w-embedded-7.2.27-1.w7.x86_64                                                                                 7/13
  94.   正在安装    : php72w-fpm-7.2.27-1.w7.x86_64                                                                                      8/13
  95.   正在安装    : mod_php72w-7.2.27-1.w7.x86_64                                                                                      9/13
  96.   正在安装    : php72w-xml-7.2.27-1.w7.x86_64                                                                                     10/13
  97.   正在安装    : php72w-gd-7.2.27-1.w7.x86_64                                                                                      11/13
  98.   正在安装    : php72w-mbstring-7.2.27-1.w7.x86_64                                                                                12/13
  99.   正在安装    : php72w-opcache-7.2.27-1.w7.x86_64                                                                                 13/13
  100.   验证中      : php72w-devel-7.2.27-1.w7.x86_64                                                                                    1/13
  101.   验证中      : php72w-pdo-7.2.27-1.w7.x86_64                                                                                      2/13
  102.   验证中      : php72w-xml-7.2.27-1.w7.x86_64                                                                                      3/13
  103.   验证中      : php72w-embedded-7.2.27-1.w7.x86_64                                                                                 4/13
  104.   验证中      : php72w-gd-7.2.27-1.w7.x86_64                                                                                       5/13
  105.   验证中      : php72w-fpm-7.2.27-1.w7.x86_64                                                                                      6/13
  106.   验证中      : php72w-cli-7.2.27-1.w7.x86_64                                                                                      7/13
  107.   验证中      : php72w-mbstring-7.2.27-1.w7.x86_64                                                                                 8/13
  108.   验证中      : php72w-mysqlnd-7.2.27-1.w7.x86_64                                                                                  9/13
  109.   验证中      : libargon2-20161029-3.el7.x86_64                                                                                   10/13
  110.   验证中      : php72w-opcache-7.2.27-1.w7.x86_64                                                                                 11/13
  111.   验证中      : php72w-common-7.2.27-1.w7.x86_64                                                                                  12/13
  112.   验证中      : mod_php72w-7.2.27-1.w7.x86_64                                                                                     13/13

  113. 已安装:
  114.   mod_php72w.x86_64 0:7.2.27-1.w7             php72w-cli.x86_64 0:7.2.27-1.w7              php72w-common.x86_64 0:7.2.27-1.w7         
  115.   php72w-devel.x86_64 0:7.2.27-1.w7           php72w-embedded.x86_64 0:7.2.27-1.w7         php72w-fpm.x86_64 0:7.2.27-1.w7            
  116.   php72w-gd.x86_64 0:7.2.27-1.w7              php72w-mbstring.x86_64 0:7.2.27-1.w7         php72w-mysqlnd.x86_64 0:7.2.27-1.w7        
  117.   php72w-opcache.x86_64 0:7.2.27-1.w7         php72w-pdo.x86_64 0:7.2.27-1.w7              php72w-xml.x86_64 0:7.2.27-1.w7            

  118. 作为依赖被安装:
  119.   libargon2.x86_64 0:20161029-3.el7                                                                                                     

  120. 完毕!
复制代码


注意:如果你在使用Laravel框架,那么经过上述操作之后你会发现还缺少一个 bcmath 扩展。在网上也有各种各样的安装命令,但大多数都麻烦。下面这条命令可以做到,一次安装成功。


  1. [root@snipeit snipe-it]# yum install php72w-bcmath
  2. 已加载插件:fastestmirror, langpacks
  3. Loading mirror speeds from cached hostfile
  4. * base: mirrors.ustc.edu.cn
  5. * epel: mirrors.aliyun.com
  6. * extras: mirrors.163.com
  7. * updates: mirrors.aliyun.com
  8. * webtatic: us-east.repo.webtatic.com
  9. 正在解决依赖关系
  10. --> 正在检查事务
  11. ---> 软件包 php72w-bcmath.x86_64.0.7.2.27-1.w7 将被 安装
  12. --> 解决依赖关系完成

  13. 依赖关系解决

  14. ========================================================================================================================================
  15. Package                            架构                        版本                                源                             大小
  16. ========================================================================================================================================
  17. 正在安装:
  18. php72w-bcmath                      x86_64                      7.2.27-1.w7                         webtatic                       36 k

  19. 事务概要
  20. ========================================================================================================================================
  21. 安装  1 软件包

  22. 总下载量:36 k
  23. 安装大小:98 k
  24. Is this ok [y/d/N]: y
  25. Downloading packages:
  26. php72w-bcmath-7.2.27-1.w7.x86_64.rpm                                                                             |  36 kB  00:00:05     
  27. Running transaction check
  28. Running transaction test
  29. Transaction test succeeded
  30. Running transaction
  31.   正在安装    : php72w-bcmath-7.2.27-1.w7.x86_64                                                                                    1/1
  32.   验证中      : php72w-bcmath-7.2.27-1.w7.x86_64                                                                                    1/1

  33. 已安装:
  34.   php72w-bcmath.x86_64 0:7.2.27-1.w7                                                                                                   

  35. 完毕!
复制代码



安装完成以后,启动服务...


  1. [root@snipeit ~]# systemctl enable php-fpm.service
  2. Created symlink from /etc/systemd/system/multi-user.target.wants/php-fpm.service to /usr/lib/systemd/system/php-fpm.service.
  3. [root@snipeit ~]# systemctl start php-fpm.service
  4. [root@snipeit ~]###查看php-fpm开启状态,这里使用的lsof命令,笔者安装的Centos默认没有,需要安装。
  5. [root@snipeit ~]# yum install lsof
  6. 已加载插件:fastestmirror, langpacks
  7. Loading mirror speeds from cached hostfile
  8. * base: mirrors.ustc.edu.cn
  9. * epel: mirrors.aliyun.com
  10. * extras: mirrors.163.com
  11. * updates: mirrors.aliyun.com
  12. * webtatic: us-east.repo.webtatic.com
  13. 软件包 lsof-4.87-6.el7.x86_64 已安装并且是最新版本
  14. 无须任何处理
  15. [root@snipeit ~]# lsof -i:9000
  16. COMMAND   PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
  17. php-fpm 11830   root    7u  IPv4  54937      0t0  TCP localhost:cslistener (LISTEN)
  18. php-fpm 11832 apache    9u  IPv4  54937      0t0  TCP localhost:cslistener (LISTEN)
  19. php-fpm 11833 apache    9u  IPv4  54937      0t0  TCP localhost:cslistener (LISTEN)
  20. php-fpm 11834 apache    9u  IPv4  54937      0t0  TCP localhost:cslistener (LISTEN)
  21. php-fpm 11835 apache    9u  IPv4  54937      0t0  TCP localhost:cslistener (LISTEN)
  22. php-fpm 11836 apache    9u  IPv4  54937      0t0  TCP localhost:cslistener (LISTEN)
复制代码



经过以上命令检测,代表php-fpm已开启成功查看PHP版本,成功查询即表示安装成功


  1. [root@snipeit ~]# php -v
  2. PHP 7.2.27 (cli) (built: Jan 26 2020 15:49:49) ( NTS )
  3. Copyright (c) 1997-2018 The PHP Group
  4. Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
  5.     with Zend OPcache v7.2.27, Copyright (c) 1999-2018, by Zend Technologies
复制代码


配置Apache支持PHP,修改httpd.conf文件      PS,这里不熟悉的代码的家伙,可以用winscp登陆进去,直接修改文件......


  1. [root@snipeit ~]# vi /etc/httpd/conf/httpd.conf
  2. [root@snipeit ~]##在AddType application*后面加如下一行
  3. [root@snipeit ~]##AddType application/x-httpd-php .php .phtml
  4. [root@snipeit ~]##在DirectoryIndex index.html加上index.php
  5. [root@snipeit ~]##DirectoryIndex index.php index.html
  6. [root@snipeit ~]##确保httd.conf文件中包含以下字段,如不包含则加入此字段
  7. [root@snipeit ~]##LoadModule php7_module /usr/lib64/httpd/modules/libphp7.so
  8. [root@snipeit ~]#修改完成后,重启httpd服务
  9. [root@snipeit ~]# service httpd restart
  10. Redirecting to /bin/systemctl restart httpd.service
  11. [root@snipeit ~]# #检验httpd的PHP支持
  12. [root@snipeit ~]# echo "<?php phpinfo(); ?>" >> /var/www/html/index.php
  13. [root@snipeit ~]##重启httpd服务,添加防火墙例外之后在网页访问,查看是否有显示PHP版本页面
  14. [root@snipeit ~]# service httpd restart
  15. Redirecting to /bin/systemctl restart httpd.service
  16. [root@snipeit ~]# firewall-cmd --permanent --zone=public --add-port=80/tcp
  17. success
  18. [root@snipeit ~]# systemctl restart firewalld.service
复制代码


检查下PHP运行情况
162244agj2ljllop4qzgtg.png
我们开始检测一下环境配置 By kcuye


  1. [root@snipeit ~]# cat /etc/redhat-release
  2. CentOS Linux release 7.7.1908 (Core)
  3. [root@snipeit ~]# uname -a
  4. Linux snipeit 3.10.0-1062.el7.x86_64 #1 SMP Wed Aug 7 18:08:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
  5. [root@snipeit ~]# mysql --version
  6. mysql  Ver 15.1 Distrib 5.5.64-MariaDB, for Linux (x86_64) using readline 5.1
  7. [root@snipeit ~]# php -v
  8. PHP 7.2.27 (cli) (built: Jan 26 2020 15:49:49) ( NTS )
  9. Copyright (c) 1997-2018 The PHP Group
  10. Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
  11.     with Zend OPcache v7.2.27, Copyright (c) 1999-2018, by Zend Technologies
  12. [root@snipeit ~]# php -fpm -v
  13. PHP 7.2.27 (cli) (built: Jan 26 2020 15:49:49) ( NTS )
  14. Copyright (c) 1997-2018 The PHP Group
  15. Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
  16.     with Zend OPcache v7.2.27, Copyright (c) 1999-2018, by Zend Technologies
  17. [root@snipeit ~]# httpd -v
  18. Server version: Apache/2.4.6 (CentOS)
  19. Server built:   Aug  8 2019 11:41:18
复制代码


环境检测结束,开始安装snipe-it初始化并创建snipeit数据库


  1. [root@snipeit ~]# service mariadb start
  2. Redirecting to /bin/systemctl start mariadb.service
  3. [root@snipeit ~]# mysql_secure_installation

  4. NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
  5.       SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

  6. In order to log into MariaDB to secure it, we'll need the current
  7. password for the root user.  If you've just installed MariaDB, and
  8. you haven't set the root password yet, the password will be blank,
  9. so you should just press enter here.

  10. Enter current password for root (enter for none):
  11. OK, successfully used password, moving on...

  12. Setting the root password ensures that nobody can log into the MariaDB
  13. root user without the proper authorisation.

  14. Set root password? [Y/n] y
  15. New password:
  16. Re-enter new password:
  17. Sorry, passwords do not match.

  18. New password:
  19. Re-enter new password:
  20. Password updated successfully!
  21. Reloading privilege tables..
  22. ... Success!


  23. By default, a MariaDB installation has an anonymous user, allowing anyone
  24. to log into MariaDB without having to have a user account created for
  25. them.  This is intended only for testing, and to make the installation
  26. go a bit smoother.  You should remove them before moving into a
  27. production environment.

  28. Remove anonymous users? [Y/n] y
  29. ... Success!

  30. Normally, root should only be allowed to connect from 'localhost'.  This
  31. ensures that someone cannot guess at the root password from the network.

  32. Disallow root login remotely? [Y/n] y
  33. ... Success!

  34. By default, MariaDB comes with a database named 'test' that anyone can
  35. access.  This is also intended only for testing, and should be removed
  36. before moving into a production environment.

  37. Remove test database and access to it? [Y/n] y
  38. - Dropping test database...
  39. ... Success!
  40. - Removing privileges on test database...
  41. ... Success!

  42. Reloading the privilege tables will ensure that all changes made so far
  43. will take effect immediately.

  44. Reload privilege tables now? [Y/n] y
  45. ... Success!

  46. Cleaning up...

  47. All done!  If you've completed all of the above steps, your MariaDB
  48. installation should now be secure.

  49. Thanks for using MariaDB!
  50. [root@snipeit ~]##登陆数据库,创建对应用户及对应的数据库
  51. [root@snipeit ~]# mysql -u root -p
  52. Enter password:
  53. Welcome to the MariaDB monitor.  Commands end with ; or \g.
  54. Your MariaDB connection id is 10
  55. Server version: 5.5.64-MariaDB MariaDB Server

  56. Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

  57. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

  58. MariaDB [(none)]> create database snipeit;
  59. Query OK, 1 row affected (0.00 sec)

  60. MariaDB [(none)]> grant all on snipeit.* to 'snipeit'@'%' identified by 'Passw0rd';
  61. Query OK, 0 rows affected (0.00 sec)

  62. MariaDB [(none)]> flush privileges;
  63. Query OK, 0 rows affected (0.00 sec)

  64. MariaDB [(none)]> exit
  65. Bye
复制代码


安装composer,Composer是PHP的依赖管理器


  1. [root@snipeit ~]# cd ~
  2. [root@snipeit ~]# curl -sS https://getcomposer.org/installer | php
  3. All settings correct for using Composer
  4. Downloading...

  5. Composer (version 1.9.3) successfully installed to: /root/composer.phar
  6. Use it: php composer.phar

  7. [root@snipeit ~]# mv /root/composer.phar /usr/bin/composer
  8. [root@snipeit ~]##安装snipeit
  9. [root@snipeit ~]# cd /var/www
  10. [root@snipeit ~]# #安装git支持
  11. [root@snipeit www]# yum install -y git
  12. 已加载插件:fastestmirror, langpacks
  13. Loading mirror speeds from cached hostfile
  14. * base: mirrors.ustc.edu.cn
  15. * epel: mirrors.aliyun.com
  16. * extras: mirrors.163.com
  17. * updates: mirrors.aliyun.com
  18. * webtatic: us-east.repo.webtatic.com
  19. 正在解决依赖关系
  20. --> 正在检查事务
  21. ---> 软件包 git.x86_64.0.1.8.3.1-20.el7 将被 升级
  22. --> 正在处理依赖关系 git = 1.8.3.1-20.el7,它被软件包 perl-Git-1.8.3.1-20.el7.noarch 需要
  23. ---> 软件包 git.x86_64.0.1.8.3.1-21.el7_7 将被 更新
  24. --> 正在检查事务
  25. ---> 软件包 perl-Git.noarch.0.1.8.3.1-20.el7 将被 升级
  26. ---> 软件包 perl-Git.noarch.0.1.8.3.1-21.el7_7 将被 更新
  27. --> 解决依赖关系完成

  28. 依赖关系解决

  29. ========================================================================================================================================
  30. Package                        架构                         版本                                   源                             大小
  31. ========================================================================================================================================
  32. 正在更新:
  33. git                            x86_64                       1.8.3.1-21.el7_7                       updates                       4.4 M
  34. 为依赖而更新:
  35. perl-Git                       noarch                       1.8.3.1-21.el7_7                       updates                        55 k

  36. 事务概要
  37. ========================================================================================================================================
  38. 升级  1 软件包 (+1 依赖软件包)

  39. 总计:4.4 M
  40. Downloading packages:
  41. Running transaction check
  42. Running transaction test
  43. Transaction test succeeded
  44. Running transaction
  45.   正在更新    : perl-Git-1.8.3.1-21.el7_7.noarch                                                                                    1/4
  46.   正在更新    : git-1.8.3.1-21.el7_7.x86_64                                                                                         2/4
  47.   清理        : perl-Git-1.8.3.1-20.el7.noarch                                                                                      3/4
  48.   清理        : git-1.8.3.1-20.el7.x86_64                                                                                           4/4
  49.   验证中      : git-1.8.3.1-21.el7_7.x86_64                                                                                         1/4
  50.   验证中      : perl-Git-1.8.3.1-21.el7_7.noarch                                                                                    2/4
  51.   验证中      : git-1.8.3.1-20.el7.x86_64                                                                                           3/4
  52.   验证中      : perl-Git-1.8.3.1-20.el7.noarch                                                                                      4/4

  53. 更新完毕:
  54.   git.x86_64 0:1.8.3.1-21.el7_7                                                                                                         

  55. 作为依赖被升级:
  56.   perl-Git.noarch 0:1.8.3.1-21.el7_7                                                                                                   

  57. 完毕!
复制代码


开始克隆snipe-it,这里从github克隆速度有些慢,需要很长时间,为做教程我对网络进行了一定的处理。.
什么?你问怎么对网络处理的?Emm......


  1. [root@snipeit www]# git clone https://github.com/snipe/snipe-it snipe-it
  2. 正克隆到 'snipe-it'...
  3. remote: Enumerating objects: 90083, done.
  4. remote: Total 90083 (delta 0), reused 0 (delta 0), pack-reused 90083
  5. 接收对象中: 100% (90083/90083), 92.79 MiB | 7.70 MiB/s, done.
  6. 处理 delta 中: 100% (56812/56812), done.
  7. [root@snipeit www]##编辑配置文件
  8. [root@snipeit www]# cd /var/www/snipe-it
  9. [root@snipeit snipe-it]# sudo cp .env.example .env
  10. [root@snipeit snipe-it]# vi .env
  11. [root@snipeit www]##APP_URL=192.168.208.128 #填入IP地址,IP查询命令ip add
  12. [root@snipeit www]##APP_TIMEZONE='Asia/Shanghai' #时区
  13. [root@snipeit www]##DB_DATABASE=snipeit   #数据库名称
  14. [root@snipeit www]##DB_USERNAME=snipeit   #数据库用户名
  15. [root@snipeit www]##DB_PASSWORD=Passw0rd   #前面设置数据库密码
  16. [root@snipeit www]###其中
  17. [root@snipeit www]##APP_DEBUG=false #需要调试的时候请更改为true,一般用不到
  18. [root@snipeit www]##更改目录权限
  19. [root@snipeit snipe-it]# chown -R apache:apache storage public/uploads
  20. [root@snipeit snipe-it]# chmod -R 755 storage
  21. [root@snipeit snipe-it]# chmod -R 755 public/uploads
  22. [root@snipeit snipe-it]#安装PHP依赖,这里非常的慢,需要加载107个插件
  23. [root@snipeit snipe-it]# composer install --no-dev --prefer-source
  24. Loading composer repositories with package information
  25. Installing dependencies from lock file
  26. Package operations: 107 installs, 0 updates, 0 removals
  27.   - Installing kylekatarnls/update-helper (1.2.0): Cloning 5786fa188e
  28.   - Installing symfony/polyfill-util (v1.13.1): Cloning 964a67f293
  29.   - Installing symfony/polyfill-php56 (v1.13.1): Cloning 53dd1cdf3c
  30.   - Installing symfony/polyfill-ctype (v1.13.1): Cloning f8f0b461be
  31.   - Installing paragonie/random_compat (v2.0.18): Cloning 0a58ef6e31
  32.   - Installing symfony/polyfill-php70 (v1.13.1): Cloning af23c7bb26
  33.   - Installing symfony/polyfill-mbstring (v1.13.1): Cloning 7b4aab9743
  34.   - Installing symfony/http-foundation (v3.4.36): Cloning d2d0cfe8e3
  35.   - Installing symfony/event-dispatcher (v3.4.36): Cloning f9031c22ec
  36.   - Installing psr/log (1.1.2): Cloning 446d54b4cb
  37.   - Installing symfony/debug (v3.4.36): Cloning f72e33fdb1
  38.   - Installing symfony/http-kernel (v3.4.36): Cloning c42c8339ac
  39.   - Installing vlucas/phpdotenv (v2.6.1): Cloning 2a7dcf7e3e
  40.   - Installing symfony/css-selector (v3.1.10): Cloning 722a87478a
  41.   - Installing tijsverkoyen/css-to-inline-styles (2.2.2): Cloning dda2ee426a
  42.   - Installing symfony/var-dumper (v3.4.36): Cloning 569e261461
  43.   - Installing symfony/routing (v3.4.36): Cloning b689ccd48e
  44.   - Installing symfony/process (v3.4.36): Cloning 9a4545c01e
  45.   - Installing symfony/finder (v3.4.36): Cloning 290ae21279
  46.   - Installing symfony/console (v3.4.36): Cloning 1ee23b3b65
  47.   - Installing symfony/polyfill-php72 (v1.13.1): Cloning 66fea50f6c
  48.   - Installing symfony/polyfill-intl-idn (v1.13.1): Cloning 6f9c239e61
  49.   - Installing symfony/polyfill-iconv (v1.13.1): Cloning a019efccc0
  50.   - Installing doctrine/lexer (1.0.2): Cloning 1febd6c3ef
  51.   - Installing egulias/email-validator (2.1.11): Cloning 92dd169c32
  52.   - Installing swiftmailer/swiftmailer (v6.2.3): Cloning 149cfdf118
  53.   - Installing ramsey/uuid (3.9.1): Cloning 5ac2740e0c
  54.   - Installing psr/simple-cache (1.0.1): Cloning 408d5eafb8
  55.   - Installing psr/container (1.0.0): Cloning b7ce3b1764
  56.   - Installing symfony/translation (v3.4.36): Cloning 0be25347c4
  57.   - Installing nesbot/carbon (1.39.1): Cloning 4be0c00516
  58.   - Installing mtdowling/cron-expression (v1.2.1): Cloning 9504fa9ea6
  59.   - Installing monolog/monolog (1.25.2): Cloning d5e2fb341c
  60.   - Installing league/flysystem (1.0.57): Cloning 0e9db7f0b9
  61.   - Installing erusev/parsedown (1.7.3): Cloning 6d89393817
  62.   - Installing doctrine/inflector (1.3.1): Cloning ec3a552422
  63.   - Installing laravel/framework (v5.5.48): Cloning e3e8d585dc
  64.   - Installing asm89/stack-cors (1.2.0): Cloning c163e2b614
  65.   - Installing barryvdh/laravel-cors (v0.11.4): Cloning 03492f1a3b
  66.   - Installing maximebf/debugbar (v1.15.1): Cloning 6c4277f611
  67.   - Installing barryvdh/laravel-debugbar (v3.2.8): Cloning 18208d6489
  68.   - Installing dasprid/enum (1.0.0): Cloning 631ef6e638
  69.   - Installing doctrine/annotations (v1.8.0): Cloning 904dca4eb1
  70.   - Installing doctrine/reflection (v1.0.0): Cloning 02538d3f95
  71.   - Installing doctrine/event-manager (1.1.0): Cloning 6295728199
  72.   - Installing doctrine/collections (v1.5.0): Cloning a01ee38fcd
  73.   - Installing doctrine/cache (1.10.0): Cloning 382e7f4db9
  74.   - Installing doctrine/persistence (1.2.0): Cloning 43526ae633
  75.   - Installing doctrine/common (v2.11.0): Cloning b8ca1dcf6b
  76.   - Installing doctrine/dbal (v2.9.0): Cloning 21fdabe2fc
  77.   - Installing eduardokum/laravel-mail-auto-embed (1.0.4): Cloning 918c3aff22
  78.   - Installing enshrined/svg-sanitize (0.13.0): Cloning 4cf8d0f61e
  79.   - Installing fideloper/proxy (4.2.1): Cloning 03085e58ec
  80.   - Installing guzzlehttp/promises (v1.3.1): Cloning a59da6cf61
  81.   - Installing ralouphie/getallheaders (3.0.3): Cloning 120b605dfe
  82.   - Installing psr/http-message (1.0.1): Cloning f6561bf28d
  83.   - Installing guzzlehttp/psr7 (1.6.1): Cloning 239400de7a
  84.   - Installing intervention/image (2.5.1): Cloning abbf18d5ab
  85.   - Installing jakub-onderka/php-console-color (v0.2): Cloning d5deaecff5
  86.   - Installing javiereguiluz/easyslugger (v1.0.0): Cloning 11524a3fd7
  87.   - Installing zendframework/zend-diactoros (1.8.7): Cloning a85e67b86e
  88.   - Installing symfony/psr-http-message-bridge (v1.2.0): Cloning 9ab9d71f97
  89.   - Installing phpseclib/phpseclib (2.0.23): Cloning c78eb5058d
  90.   - Installing league/event (2.2.0): Cloning d2cc124cf9
  91.   - Installing lcobucci/jwt (3.3.1): Cloning a11ec5f4b4
  92.   - Installing defuse/php-encryption (v2.2.1): Cloning 0f407c43b9
  93.   - Installing league/oauth2-server (6.1.1): Cloning a0cabb573c
  94.   - Installing guzzlehttp/guzzle (6.4.1): Cloning 0895c93240
  95.   - Installing firebase/php-jwt (v5.0.0): Cloning 9984a4d3a3
  96.   - Installing laravel/passport (v4.0.3): Cloning 0542f1f82e
  97.   - Installing nikic/php-parser (v4.3.0): Cloning 9a9981c347
  98.   - Installing jakub-onderka/php-console-highlighter (v0.4): Cloning 9f7a229a69
  99.   - Installing dnoegel/php-xdg-base-dir (0.1): Cloning 265b859349
  100.   - Installing psy/psysh (v0.9.11): Cloning 75d9ac1c16
  101.   - Installing laravel/tinker (v1.0.10): Cloning ad571aacba
  102.   - Installing laravelcollective/html (v5.5.4): Cloning 04c596a699
  103.   - Installing league/csv (9.4.1): Cloning bf83acc23a
  104.   - Installing maknz/slack (1.7.0): Cloning 7f21fefc70
  105.   - Installing neitanod/forceutf8 (v2.0.2): Cloning 30980a8ca2
  106.   - Installing paragonie/constant_time_encoding (v2.3.0): Cloning 47a1cedd2e
  107.   - Installing patchwork/utf8 (v1.3.2): Cloning d296e0026e
  108.   - Installing phpdocumentor/reflection-common (2.0.0): Cloning 63a995caa1
  109.   - Installing phpdocumentor/type-resolver (1.0.1): Cloning 2e32a6d489
  110.   - Installing sebastian/recursion-context (3.0.0): Cloning 5b0cd72350
  111.   - Installing sebastian/exporter (3.1.2): Cloning 68609e1261
  112.   - Installing sebastian/diff (2.0.1): Cloning 347c1d8b49
  113.   - Installing sebastian/comparator (2.1.3): Cloning 34369daee4
  114.   - Installing webmozart/assert (1.6.0): Cloning 573381c0a6
  115.   - Installing phpdocumentor/reflection-docblock (4.3.2): Cloning b83ff7cfcf
  116.   - Installing doctrine/instantiator (1.3.0): Cloning ae466f7262
  117.   - Installing phpspec/prophecy (1.9.0): Cloning f6811d96d9
  118.   - Installing pragmarx/google2fa (v5.0.0): Cloning 17c969c82f
  119.   - Installing bacon/bacon-qr-code (2.0.0): Cloning eaac909da3
  120.   - Installing pragmarx/google2fa-qrcode (v1.0.3): Cloning fd5ff0531a
  121.   - Installing pragmarx/google2fa-laravel (v1.3.0): Cloning 4ccc17dbf5
  122.   - Installing predis/predis (v1.1.1): Cloning f0210e3888
  123.   - Installing rollbar/rollbar (v1.8.1): Cloning 8a57ad9574
  124.   - Installing rollbar/rollbar-laravel (v2.4.3): Cloning e581cd9a17
  125.   - Installing schuppo/password-strength (v1.11): Cloning 7ab466d43c
  126.   - Installing spatie/temporary-directory (1.1.5): Cloning 539d0856c5
  127.   - Installing spatie/db-dumper (2.13.1): Cloning 8f88e6f772
  128.   - Installing spatie/laravel-backup (5.12.1): Cloning 553562557e
  129.   - Installing tecnickcom/tc-lib-color (1.12.13): Cloning 67402204a7
  130.   - Installing tecnickcom/tc-lib-barcode (1.15.16): Cloning 60780acd7a
  131.   - Installing tightenco/ziggy (v0.7.1): Cloning aa4c42aaec
  132.   - Installing unicodeveloper/laravel-password (1.0.3): Cloning c2e532cbbb
  133.   - Installing watson/validating (3.3.0): Cloning 288eb177e9
  134. Generating optimized autoload files
  135. Carbon 1 is deprecated, see how to migrate to Carbon 2.
  136. https://carbon.nesbot.com/docs/#api-carbon-2
  137.     You can run './vendor/bin/upgrade-carbon' to get help in updating carbon and other frameworks and libraries that depend on it.
  138. > Illuminate\Foundation\ComposerScripts::postAutoloadDump
  139. > [url=home.php?mod=space&uid=212996]@php[/url] artisan package:discover
  140. Discovered Package: barryvdh/laravel-cors
  141. Discovered Package: barryvdh/laravel-debugbar
  142. Discovered Package: eduardokum/laravel-mail-auto-embed
  143. Discovered Package: fideloper/proxy
  144. Discovered Package: intervention/image
  145. Discovered Package: laravel/passport
  146. Discovered Package: laravel/tinker
  147. Discovered Package: laravelcollective/html
  148. Discovered Package: nesbot/carbon
  149. Discovered Package: pragmarx/google2fa-laravel
  150. Discovered Package: rollbar/rollbar-laravel
  151. Discovered Package: schuppo/password-strength
  152. Discovered Package: spatie/laravel-backup
  153. Discovered Package: tightenco/ziggy
  154. Discovered Package: unicodeveloper/laravel-password
  155. Package manifest generated successfully.
复制代码


如果上述过程安装时间过长,可以修改为国内源之后重新安装尝试


  1. [root@snipeit snipe-it]##composer config -g repo.packagist composer https://packagist.phpcomposer.com
  2. [root@snipeit snipe-it]##生成app_key
  3. [root@snipeit snipe-it]# php artisan key:generate
  4. **************************************
  5. *     Application In Production!     *
  6. **************************************

  7. Do you really wish to run this command? (yes/no) [no]:
  8. > yes

  9. Application key [base64:BgJOq6cR/V+3ilFBaY+yzgV5ylL2Tyque36TYcGDFfc=] set successfully.
复制代码



修改Apache配置文件,创建虚拟主机


  1. [root@snipeit snipe-it]# vi /etc/httpd/conf.d/snipeit.example.com.conf
  2. [root@snipeit snipe-it]##<VirtualHost *:80>
  3. [root@snipeit snipe-it]##   ServerName snipeit.example.com
  4. [root@snipeit snipe-it]##   DocumentRoot /var/www/snipe-it/public
  5. [root@snipeit snipe-it]##    <Directory /var/www/snipe-it/public>
  6. [root@snipeit snipe-it]##        Options Indexes FollowSymLinks MultiViews
  7. [root@snipeit snipe-it]##        AllowOverride All
  8. [root@snipeit snipe-it]##        Order allow,deny
  9. [root@snipeit snipe-it]##        allow from all
  10. [root@snipeit snipe-it]##   </Directory>
  11. [root@snipeit snipe-it]##</VirtualHost>
  12. [root@snipeit snipe-it]##重启Apache服务
  13. [root@snipeit snipe-it]# service httpd restart
  14. Redirecting to /bin/systemctl restart httpd.service
  15. [root@snipeit snipe-it]##如果出现配置完成之后仍然无法访问,请关闭本机的selinux
  16. [root@snipeit snipe-it]# #临时关闭selinu
  17. [root@snipeit snipe-it]# setenforce 0
  18. [root@snipeit snipe-it]# #永久关闭selinux
  19. [root@snipeit snipe-it]# vi /etc/sysconfig/selinux
  20. [root@snipeit snipe-it]##SELINUX=enforcing 改为 SELINUX=disabled    #永久关闭selinux
复制代码


打开网页开始配置Snipe-IT


162701tnu7gvgxenz9xn32.png
162714vs294tvytc9ozs2l.png
162741j22yw21awqb2m8wh.png
162752a3cj834drcp0uu05.png
162807g8fduiquno0incya.png
162820ft16p911ks1u1hll.png
162830gb58k0h8e8b11kex.png
本楼点评(0) 收起
uy8jj5tm7tu 发表于 2021-1-18 04:50:32 | 显示全部楼层
淡定,淡定,淡定……
本楼点评(0) 收起
回复

使用道具 举报

antyvfl 发表于 2021-1-18 08:30:03 | 显示全部楼层
无回帖,不论坛,这才是人道。
本楼点评(0) 收起
回复

使用道具 举报

295608944 发表于 2021-1-18 08:36:01 | 显示全部楼层
我只是路过打酱油的。
本楼点评(0) 收起
回复

使用道具 举报

1yuqunchenggong 发表于 2021-1-19 10:15:11 | 显示全部楼层
楼主加油,我们都看好你哦。
本楼点评(0) 收起
回复

使用道具 举报

cybluesky 发表于 2021-1-21 06:38:13 | 显示全部楼层
看到这帖子真是高兴!
本楼点评(0) 收起
回复

使用道具 举报

q774505813 发表于 2021-1-27 13:25:55 | 显示全部楼层
太生气了,无法HOLD啦 >_<......
本楼点评(0) 收起
回复

使用道具 举报

xiranlp_com 发表于 2021-1-27 18:25:10 | 显示全部楼层
激动人心,无法言表!
本楼点评(0) 收起
回复

使用道具 举报

lxb1101 发表于 2021-1-27 20:36:45 | 显示全部楼层
太生气了,无法HOLD啦 >_<......
本楼点评(0) 收起
回复

使用道具 举报

逆之羽 发表于 2021-1-28 05:53:36 | 显示全部楼层
太生气了,无法HOLD啦 >_<......
本楼点评(0) 收起
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|游戏淘宝湾

GMT+8, 2024-5-18 23:28 , Processed in 0.106467 second(s), 95 queries .

Powered by 游戏淘宝湾 X3.4

Copyright © 2001-2023, Oddpp Cloud.

快速回复 返回顶部 返回列表