Snipe-IT建置

一、环境准备

操作系统:centos 7.5

IP:172.16.2.20

二、安裝步驟

2.1 Mariadb 5.5.60的安装与配置

yum install -y mariadb mariadb-server

systemctl start mariadb

systemctl enable mariadb

mysql_secure_installation 

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

Set root password? [Y/n] y
New password: 
Re-enter new password: 
Password updated successfully!
Reloading privilege tables..
 ... Success!


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

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

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

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

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

Remove test database and access to it? [Y/n] n
 ... skipping.

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

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

Cleaning up...

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

Thanks for using MariaDB

 

[root@snipe ~]# yum install -y httpd httpd-devel
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror01.idc.hinet.net
 * epel: mirrors.bestthaihost.com
 * extras: mirror01.idc.hinet.net
 * updates: mirror01.idc.hinet.net
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.4.6-97.el7.centos will be installed
--> Processing Dependency: httpd-tools = 2.4.6-97.el7.centos for package: httpd-2.4.6-97.el7.centos.x86_64
--> Processing Dependency: /etc/mime.types for package: httpd-2.4.6-97.el7.centos.x86_64
--> Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-2.4.6-97.el7.centos.x86_64
--> Processing Dependency: libapr-1.so.0()(64bit) for package: httpd-2.4.6-97.el7.centos.x86_64
---> Package httpd-devel.x86_64 0:2.4.6-97.el7.centos will be installed
--> Processing Dependency: apr-util-devel for package: httpd-devel-2.4.6-97.el7.centos.x86_64
--> Processing Dependency: apr-devel for package: httpd-devel-2.4.6-97.el7.centos.x86_64
--> Running transaction check
---> Package apr.x86_64 0:1.4.8-7.el7 will be installed
---> Package apr-devel.x86_64 0:1.4.8-7.el7 will be installed
---> Package apr-util.x86_64 0:1.5.2-6.el7 will be installed
---> Package apr-util-devel.x86_64 0:1.5.2-6.el7 will be installed
--> Processing Dependency: openldap-devel(x86-64) for package: apr-util-devel-1.5.2-6.el7.x86_64
--> Processing Dependency: libdb-devel(x86-64) for package: apr-util-devel-1.5.2-6.el7.x86_64
--> Processing Dependency: expat-devel(x86-64) for package: apr-util-devel-1.5.2-6.el7.x86_64
---> Package httpd-tools.x86_64 0:2.4.6-97.el7.centos will be installed
---> Package mailcap.noarch 0:2.1.41-2.el7 will be installed
--> Running transaction check
---> Package expat-devel.x86_64 0:2.1.0-12.el7 will be installed
---> Package libdb-devel.x86_64 0:5.3.21-25.el7 will be installed
---> Package openldap-devel.x86_64 0:2.4.44-23.el7_9 will be installed
--> Processing Dependency: cyrus-sasl-devel(x86-64) for package: openldap-devel-2.4.44-23.el7_9.x86_64
--> Running transaction check
---> Package cyrus-sasl-devel.x86_64 0:2.1.26-23.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================================
 Package                        Arch                 Version                             Repository             Size
=====================================================================================================================
Installing:
 httpd                          x86_64               2.4.6-97.el7.centos                 updates               2.7 M
 httpd-devel                    x86_64               2.4.6-97.el7.centos                 updates               199 k
Installing for dependencies:
 apr                            x86_64               1.4.8-7.el7                         base                  104 k
 apr-devel                      x86_64               1.4.8-7.el7                         base                  188 k
 apr-util                       x86_64               1.5.2-6.el7                         base                   92 k
 apr-util-devel                 x86_64               1.5.2-6.el7                         base                   76 k
 cyrus-sasl-devel               x86_64               2.1.26-23.el7                       base                  310 k
 expat-devel                    x86_64               2.1.0-12.el7                        base                   57 k
 httpd-tools                    x86_64               2.4.6-97.el7.centos                 updates                93 k
 libdb-devel                    x86_64               5.3.21-25.el7                       base                   39 k
 mailcap                        noarch               2.1.41-2.el7                        base                   31 k
 openldap-devel                 x86_64               2.4.44-23.el7_9                     updates               804 k

Transaction Summary
=====================================================================================================================
Install  2 Packages (+10 Dependent packages)

Total download size: 4.7 M
Installed size: 17 M
Downloading packages:
(1/12): apr-1.4.8-7.el7.x86_64.rpm                                                            | 104 kB  00:00:00     
(2/12): apr-util-devel-1.5.2-6.el7.x86_64.rpm                                                 |  76 kB  00:00:00     
(3/12): expat-devel-2.1.0-12.el7.x86_64.rpm                                                   |  57 kB  00:00:00     
(4/12): apr-devel-1.4.8-7.el7.x86_64.rpm                                                      | 188 kB  00:00:00     
(5/12): cyrus-sasl-devel-2.1.26-23.el7.x86_64.rpm                                             | 310 kB  00:00:00     
(6/12): libdb-devel-5.3.21-25.el7.x86_64.rpm                                                  |  39 kB  00:00:00     
(7/12): mailcap-2.1.41-2.el7.noarch.rpm                                                       |  31 kB  00:00:00     
(8/12): apr-util-1.5.2-6.el7.x86_64.rpm                                                       |  92 kB  00:00:00     
(9/12): httpd-devel-2.4.6-97.el7.centos.x86_64.rpm                                            | 199 kB  00:00:00     
(10/12): httpd-tools-2.4.6-97.el7.centos.x86_64.rpm                                           |  93 kB  00:00:00     
(11/12): openldap-devel-2.4.44-23.el7_9.x86_64.rpm                                            | 804 kB  00:00:00     
(12/12): httpd-2.4.6-97.el7.centos.x86_64.rpm                                                 | 2.7 MB  00:00:01     
---------------------------------------------------------------------------------------------------------------------
Total                                                                                3.3 MB/s | 4.7 MB  00:00:01     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : apr-1.4.8-7.el7.x86_64                                                                           1/12 
  Installing : apr-util-1.5.2-6.el7.x86_64                                                                      2/12 
  Installing : apr-devel-1.4.8-7.el7.x86_64                                                                     3/12 
  Installing : httpd-tools-2.4.6-97.el7.centos.x86_64                                                           4/12 
  Installing : cyrus-sasl-devel-2.1.26-23.el7.x86_64                                                            5/12 
  Installing : openldap-devel-2.4.44-23.el7_9.x86_64                                                            6/12 
  Installing : libdb-devel-5.3.21-25.el7.x86_64                                                                 7/12 
  Installing : mailcap-2.1.41-2.el7.noarch                                                                      8/12 
  Installing : httpd-2.4.6-97.el7.centos.x86_64                                                                 9/12 
  Installing : expat-devel-2.1.0-12.el7.x86_64                                                                 10/12 
  Installing : apr-util-devel-1.5.2-6.el7.x86_64                                                               11/12 
  Installing : httpd-devel-2.4.6-97.el7.centos.x86_64                                                          12/12 
  Verifying  : expat-devel-2.1.0-12.el7.x86_64                                                                  1/12 
  Verifying  : mailcap-2.1.41-2.el7.noarch                                                                      2/12 
  Verifying  : apr-1.4.8-7.el7.x86_64                                                                           3/12 
  Verifying  : apr-util-1.5.2-6.el7.x86_64                                                                      4/12 
  Verifying  : libdb-devel-5.3.21-25.el7.x86_64                                                                 5/12 
  Verifying  : apr-devel-1.4.8-7.el7.x86_64                                                                     6/12 
  Verifying  : httpd-2.4.6-97.el7.centos.x86_64                                                                 7/12 
  Verifying  : openldap-devel-2.4.44-23.el7_9.x86_64                                                            8/12 
  Verifying  : httpd-devel-2.4.6-97.el7.centos.x86_64                                                           9/12 
  Verifying  : httpd-tools-2.4.6-97.el7.centos.x86_64                                                          10/12 
  Verifying  : cyrus-sasl-devel-2.1.26-23.el7.x86_64                                                           11/12 
  Verifying  : apr-util-devel-1.5.2-6.el7.x86_64                                                               12/12 

Installed:
  httpd.x86_64 0:2.4.6-97.el7.centos                     httpd-devel.x86_64 0:2.4.6-97.el7.centos                    

Dependency Installed:
  apr.x86_64 0:1.4.8-7.el7                 apr-devel.x86_64 0:1.4.8-7.el7          apr-util.x86_64 0:1.5.2-6.el7    
  apr-util-devel.x86_64 0:1.5.2-6.el7      cyrus-sasl-devel.x86_64 0:2.1.26-23.el7 expat-devel.x86_64 0:2.1.0-12.el7
  httpd-tools.x86_64 0:2.4.6-97.el7.centos libdb-devel.x86_64 0:5.3.21-25.el7      mailcap.noarch 0:2.1.41-2.el7    
  openldap-devel.x86_64 0:2.4.44-23.el7_9 

Complete!

 

[root@snipe ~]# yum install -y httpd httpd-devel
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror01.idc.hinet.net
 * epel: mirrors.bestthaihost.com
 * extras: mirror01.idc.hinet.net
 * updates: mirror01.idc.hinet.net
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.4.6-97.el7.centos will be installed
--> Processing Dependency: httpd-tools = 2.4.6-97.el7.centos for package: httpd-2.4.6-97.el7.centos.x86_64
--> Processing Dependency: /etc/mime.types for package: httpd-2.4.6-97.el7.centos.x86_64
--> Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-2.4.6-97.el7.centos.x86_64
--> Processing Dependency: libapr-1.so.0()(64bit) for package: httpd-2.4.6-97.el7.centos.x86_64
---> Package httpd-devel.x86_64 0:2.4.6-97.el7.centos will be installed
--> Processing Dependency: apr-util-devel for package: httpd-devel-2.4.6-97.el7.centos.x86_64
--> Processing Dependency: apr-devel for package: httpd-devel-2.4.6-97.el7.centos.x86_64
--> Running transaction check
---> Package apr.x86_64 0:1.4.8-7.el7 will be installed
---> Package apr-devel.x86_64 0:1.4.8-7.el7 will be installed
---> Package apr-util.x86_64 0:1.5.2-6.el7 will be installed
---> Package apr-util-devel.x86_64 0:1.5.2-6.el7 will be installed
--> Processing Dependency: openldap-devel(x86-64) for package: apr-util-devel-1.5.2-6.el7.x86_64
--> Processing Dependency: libdb-devel(x86-64) for package: apr-util-devel-1.5.2-6.el7.x86_64
--> Processing Dependency: expat-devel(x86-64) for package: apr-util-devel-1.5.2-6.el7.x86_64
---> Package httpd-tools.x86_64 0:2.4.6-97.el7.centos will be installed
---> Package mailcap.noarch 0:2.1.41-2.el7 will be installed
--> Running transaction check
---> Package expat-devel.x86_64 0:2.1.0-12.el7 will be installed
---> Package libdb-devel.x86_64 0:5.3.21-25.el7 will be installed
---> Package openldap-devel.x86_64 0:2.4.44-23.el7_9 will be installed
--> Processing Dependency: cyrus-sasl-devel(x86-64) for package: openldap-devel-2.4.44-23.el7_9.x86_64
--> Running transaction check
---> Package cyrus-sasl-devel.x86_64 0:2.1.26-23.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================================
 Package                        Arch                 Version                             Repository             Size
=====================================================================================================================
Installing:
 httpd                          x86_64               2.4.6-97.el7.centos                 updates               2.7 M
 httpd-devel                    x86_64               2.4.6-97.el7.centos                 updates               199 k
Installing for dependencies:
 apr                            x86_64               1.4.8-7.el7                         base                  104 k
 apr-devel                      x86_64               1.4.8-7.el7                         base                  188 k
 apr-util                       x86_64               1.5.2-6.el7                         base                   92 k
 apr-util-devel                 x86_64               1.5.2-6.el7                         base                   76 k
 cyrus-sasl-devel               x86_64               2.1.26-23.el7                       base                  310 k
 expat-devel                    x86_64               2.1.0-12.el7                        base                   57 k
 httpd-tools                    x86_64               2.4.6-97.el7.centos                 updates                93 k
 libdb-devel                    x86_64               5.3.21-25.el7                       base                   39 k
 mailcap                        noarch               2.1.41-2.el7                        base                   31 k
 openldap-devel                 x86_64               2.4.44-23.el7_9                     updates               804 k

Transaction Summary
=====================================================================================================================
Install  2 Packages (+10 Dependent packages)

Total download size: 4.7 M
Installed size: 17 M
Downloading packages:
(1/12): apr-1.4.8-7.el7.x86_64.rpm                                                            | 104 kB  00:00:00     
(2/12): apr-util-devel-1.5.2-6.el7.x86_64.rpm                                                 |  76 kB  00:00:00     
(3/12): expat-devel-2.1.0-12.el7.x86_64.rpm                                                   |  57 kB  00:00:00     
(4/12): apr-devel-1.4.8-7.el7.x86_64.rpm                                                      | 188 kB  00:00:00     
(5/12): cyrus-sasl-devel-2.1.26-23.el7.x86_64.rpm                                             | 310 kB  00:00:00     
(6/12): libdb-devel-5.3.21-25.el7.x86_64.rpm                                                  |  39 kB  00:00:00     
(7/12): mailcap-2.1.41-2.el7.noarch.rpm                                                       |  31 kB  00:00:00     
(8/12): apr-util-1.5.2-6.el7.x86_64.rpm                                                       |  92 kB  00:00:00     
(9/12): httpd-devel-2.4.6-97.el7.centos.x86_64.rpm                                            | 199 kB  00:00:00     
(10/12): httpd-tools-2.4.6-97.el7.centos.x86_64.rpm                                           |  93 kB  00:00:00     
(11/12): openldap-devel-2.4.44-23.el7_9.x86_64.rpm                                            | 804 kB  00:00:00     
(12/12): httpd-2.4.6-97.el7.centos.x86_64.rpm                                                 | 2.7 MB  00:00:01     
---------------------------------------------------------------------------------------------------------------------
Total                                                                                3.3 MB/s | 4.7 MB  00:00:01     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : apr-1.4.8-7.el7.x86_64                                                                           1/12 
  Installing : apr-util-1.5.2-6.el7.x86_64                                                                      2/12 
  Installing : apr-devel-1.4.8-7.el7.x86_64                                                                     3/12 
  Installing : httpd-tools-2.4.6-97.el7.centos.x86_64                                                           4/12 
  Installing : cyrus-sasl-devel-2.1.26-23.el7.x86_64                                                            5/12 
  Installing : openldap-devel-2.4.44-23.el7_9.x86_64                                                            6/12 
  Installing : libdb-devel-5.3.21-25.el7.x86_64                                                                 7/12 
  Installing : mailcap-2.1.41-2.el7.noarch                                                                      8/12 
  Installing : httpd-2.4.6-97.el7.centos.x86_64                                                                 9/12 
  Installing : expat-devel-2.1.0-12.el7.x86_64                                                                 10/12 
  Installing : apr-util-devel-1.5.2-6.el7.x86_64                                                               11/12 
  Installing : httpd-devel-2.4.6-97.el7.centos.x86_64                                                          12/12 
  Verifying  : expat-devel-2.1.0-12.el7.x86_64                                                                  1/12 
  Verifying  : mailcap-2.1.41-2.el7.noarch                                                                      2/12 
  Verifying  : apr-1.4.8-7.el7.x86_64                                                                           3/12 
  Verifying  : apr-util-1.5.2-6.el7.x86_64                                                                      4/12 
  Verifying  : libdb-devel-5.3.21-25.el7.x86_64                                                                 5/12 
  Verifying  : apr-devel-1.4.8-7.el7.x86_64                                                                     6/12 
  Verifying  : httpd-2.4.6-97.el7.centos.x86_64                                                                 7/12 
  Verifying  : openldap-devel-2.4.44-23.el7_9.x86_64                                                            8/12 
  Verifying  : httpd-devel-2.4.6-97.el7.centos.x86_64                                                           9/12 
  Verifying  : httpd-tools-2.4.6-97.el7.centos.x86_64                                                          10/12 
  Verifying  : cyrus-sasl-devel-2.1.26-23.el7.x86_64                                                           11/12 
  Verifying  : apr-util-devel-1.5.2-6.el7.x86_64                                                               12/12 

Installed:
  httpd.x86_64 0:2.4.6-97.el7.centos                     httpd-devel.x86_64 0:2.4.6-97.el7.centos                    

Dependency Installed:
  apr.x86_64 0:1.4.8-7.el7                 apr-devel.x86_64 0:1.4.8-7.el7          apr-util.x86_64 0:1.5.2-6.el7    
  apr-util-devel.x86_64 0:1.5.2-6.el7      cyrus-sasl-devel.x86_64 0:2.1.26-23.el7 expat-devel.x86_64 0:2.1.0-12.el7
  httpd-tools.x86_64 0:2.4.6-97.el7.centos libdb-devel.x86_64 0:5.3.21-25.el7      mailcap.noarch 0:2.1.41-2.el7    
  openldap-devel.x86_64 0:2.4.44-23.el7_9 

Complete!

[root@snipe ~]# systemctl start httpd
[root@snipe ~]# systemctl enable httpd
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.

安装PHP

一、添加EPEL和REMI存储库
运行以下命令以添加所需的存储库:

sudo yum install epel-release
1
sudo yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
1
二、在CentOS 7上安装PHP 7.4版本
我们现在可以启用PHP 7.4 Remi存储库并在CentOS 7上安装PHP 7.4:

sudo yum -y install yum-utils
1
yum repolist all |grep php
1
sudo yum-config-manager --enable remi-php74
1
在CentOS 7上安装PHP 7.4 以及扩展:

sudo yum install php php-cli php-fpm php-mysqlnd php-zip php-devel php-gd php-mcrypt php-mbstring php-curl php-xml php-pear php-bcmath php-json php-redis
1
当前的PHP版本应为7.4版,如下所示:

php -v
1
如果要查看启用的模块,请运行:

php --modules
————————————————
版权声明:本文为CSDN博主「聚石成磊」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_27715357/article/details/106734411

 

 

           

posted @ 2021-07-12 18:06  遂空藍天  阅读(527)  评论(0)    收藏  举报