CentOS下安装配置 Snipe-IT 4.4.1

  • 内容
  • 评论
  • 相关

Snipe-IT是一个免费的开源IT资产管理Web应用程序,可用于跟踪许可证,附件,消耗品和组件。 它是用PHP语言编写的,使用MySQL来存储数据。 它是一个跨平台的应用程序,适用于Linux,Windows和Mac OS X等所有主流操作系统。它可轻松与Active Directory,LDAP集成,并支持与Google Authenticator的双重身份验证。

官网网站:https://snipeitapp.com/

一、系统软件版本

1、系统:CentOS Linux release 7.4.1708 (Core)

2、MariaDB:mariadb-10.2.14-linux-systemd-x86_64  //下载地址:https://mirrors.tuna.tsinghua.edu.cn/mariadb//mariadb-10.2.4/bintar-linux-systemd-x86_64/mariadb-10.2.14-linux-systemd-x86_64.tar.gz

3、Apache:httpd-2.4.33 //下载地址:http://httpd.apache.org/download.cgi#apache24

4、php:php-7.2.4  //下载地址:http://cn2.php.net/get/php-7.2.4.tar.gz/from/this/mirror

5、phpMyAdmin:phpMyAdmin-4.7.9-all-languages  //下载地址:https://files.phpmyadmin.net/phpMyAdmin/4.7.9/phpMyAdmin-4.7.9-all-languages.tar.gz

6、snipe-it:snipe-it-4.3.0  //下载地址:https://github.com/snipe/snipe-it/archive/v4.4.1.tar.gz

二、安装前准备工作

1、先安装调试好必要组件,含Apache、MariaDB、php(含OpenSSL、PDO、Mbstring、Tokenizer、cURL、MySQL、LDAP、PHPZIP、Fileinfo、PHP BCMath、PHP XML组件)、phpMyAdmin,并设置好环境变量(尤其是PHP的,因后期需要执行php命令),请参考本站的相关文章安装。

2、登录phpMyAdmin创建snipe-it的数据库,编码选择utf8mb4_unicode_ci

三、安装snipe-it

1、解压snipe-it到指定目录并跳转到

tar -zxvf snipe-it-4.3.0.tar.gz -C /data/http/html/
cd /data/http/html/
mv snipe-it-4.3.0/ snipeit
cd snipeit/

2、编辑配置文件.env,指定相关参数

cd /data/http/html/snipeit/
cp .env.example .env
vim .env

APP_URL=https://localhost  //设置访问路径
APP_TIMEZONE='PRC' //设置时区
APP_LOCALE=zh-CN //设置默认语言

DB_HOST=127.0.0.1   //设置数据库服务器
DB_DATABASE=snipeit //设置数据库名称
DB_USERNAME=snipeit //设置数据库用户名
DB_PASSWORD=snipeit //设置数据库密码

MAIL_DRIVER=smtp //设置邮件通知模式
MAIL_HOST=smtp.mxhichina.com //设置邮箱SMTP主机
MAIL_PORT=25   //设置smtp端口
MAIL_USERNAME=system@588173.com //设置smtp用户名
MAIL_PASSWORD=123456 //设置smtp用户密码
MAIL_ENCRYPTION=null //设置smtp是否加密
MAIL_FROM_ADDR=system@588173.com //设置发送邮箱地址
MAIL_FROM_NAME='Snipe-IT' //设置发送邮箱显示的名称
MAIL_REPLYTO_ADDR=system@588173.com //设置回复地址
MAIL_REPLYTO_NAME='Snipe-IT' //设置回复地址显示的名称

3、安装php依赖管理工具

curl -sS https://getcomposer.org/installer | php
php composer.phar install

4、Laravel 执行数据迁移(迁移至数据库,需要创建数据库并先配置.env文件的数据库配置)

php artisan migrate --force

:如执行php artisan migrate --force报错:

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '''' at line 1 (SQL: ALTER TABLE assets CHANGE _snipeit_mac_address _snipeit_mac_address_1 VARCHAR(191) DEFAULT ''NULL'')

处理方法:手动执行SQL语句:

ALTER TABLE assets CHANGE _snipeit_mac_address _snipeit_mac_address_1 VARCHAR(191) DEFAULT 'NULL'

如执行php artisan migrate --force报错:

SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name 'action_logs_target_id_target_type_index' (SQL: alter table `action_logs` add index 
`action_logs_target_id_target_type_index`(`target_id`, `target_type`))

处理方法:手动执行SQL语句:

ALTER TABLE action_logs ENGINE = InnoDB

如执行php artisan migrate --force报错:

SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name 'action_logs_target_id_target_type_index' (SQL: alter table `action_logs` add index 
`action_logs_target_id_target_type_index`(`target_id`, `target_type`))

处理方法:手动执行SQL语句:

DROP INDEX action_logs_target_id_target_type_index ON action_logs

再次执行即可

php artisan migrate --force

5、设置目录权限

chown -R apache:apaches /data/http/html/snipeit/
chmod -R 775 /data/http/html/snipeit/

6、设置定时任务

vim /etc/crontab
* * * * * /usr/local/php/bin/php /data/http/html/snipeit/artisan schedule:run >> /dev/null 2>&1

7、配置虚拟目录

http:

vim /etc/apache/extra/httpd-vhost.conf

<VirtualHost _default_:80>
 <Directory /data/http/html/snipeit/public>
 Allow From All
 AllowOverride All
 Options +Indexes
 </Directory>
 DocumentRoot "/data/http/html/snipeit/public"
 ServerName snipeit.test.yeboyzq.com:80
 ServerAdmin you@example.com
 ErrorLog "/data/http/logs/snipeit.test.yeboyzq.com-error_log"
 TransferLog "/data/http/logs/snipeit.test.yeboyzq.com-access_log"

</VirtualHost>

https:

vim /etc/apache/extra/httpd-ssl.conf

<VirtualHost _default_:443>
 <Directory /data/http/html/snipeit/public>
 Allow From All
 AllowOverride All
 Options +Indexes
 </Directory>
 DocumentRoot "/data/http/html/snipeit/public"
 ServerName snipeit.test.yeboyzq.com:443
 ServerAdmin you@example.com
 ErrorLog "/data/http/logs/snipeit.test.yeboyzq.com-error_log"
 TransferLog "/data/http/logs/snipeit.test.yeboyzq.com-access_log"

SSLEngine on
 # Server Certificate:
 SSLCertificateFile "/etc/apache/keys/server.crt"
 # Server Private Key:
 SSLCertificateKeyFile "/etc/apache/keys/server.key"
 # Server Certificate Chain:
 #SSLCertificateChainFile "/etc/apache/server-ca.crt"
 # Certificate Authority (CA):
 SSLCACertificateFile "/etc/apache/keys/ca.crt"
 <FilesMatch "\.(cgi|shtml|phtml|php)$">
 SSLOptions +StdEnvVars
 </FilesMatch>
 <Directory "/usr/local/apache/cgi-bin">
 SSLOptions +StdEnvVars
 </Directory>
 BrowserMatch "MSIE [2-5]" \
 nokeepalive ssl-unclean-shutdown \
 downgrade-1.0 force-response-1.0

CustomLog "/data/http/logs/snipeit.test.yeboyzq.com-ssl_request_log" \
 "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

</VirtualHost>

8、删除执行文件

rm -f snipeit.sh
rm -f install.sh

四、首次登陆snipe-it

1、打开浏览器,访问设置好的站点域名,检测相关条件是否符合

2、提示是否数据迁移,因我们之前已经执行过这步操作了,所以选择跳过

3、配置相关参数

4、完成保存后即可完成,并登陆到仪表台

五、LDAP同步设置

界面设置请参照如下

LDAP过滤器完整格式

&(sAMAccountType=805306368)(!(userAccountControl:1.2.840.113556.1.4.803:=2))

 

然后设置定时任务

vim /etc/crontab

0 */3 * * * /usr/local/php/bin/php /data/http/html/snipeit/artisan snipeit:ldap-sync >> /dev/null 2>&1  //每三个小时执行一次

 

六、Snipe-IT升级

升级之前请备份数据库及程序(即/data/http/html/snipe-it目录)

因在国内Github被qiang,所以无法通过GIT自动升级,所以只能自己手动升级了。

1、备份程序目录

mv /data/http/html/snipe-it/ /data/http/html/snipe-it_bakxxxxxxxx/ //此处因后面需要重新解压程序目录,所以在此处直接重命名

2、解压新版本到/data/http/html/snipe-it目录

tar -zxvf snipe-it-4.5.0.tar.gz -C /data/http/html/
cd /data/http/html/
mv snipe-it-4.5.0/ snipe-it

3、拷贝旧程序的配置文件至新目录并授权

cp -R snipe-it-backup/public/uploads/* snipe-it/public/uploads
cp -R snipe-it-backup/storage/private_uploads/* snipe-it/storage/private_uploads
cp -R snipe-it-backup/storage/app/backups/* snipe-it/storage/app/backups
cp -R snipe-it-backup/.env snipe-it/
cp -R snipe-it-backup/storage/oauth-private.key snipe-it/storage/oauth-private.key
cp -R snipe-it-backup/storage/oauth-public.key snipe-it/storage/oauth-public.key
chown -R apache:apaches snipe-it/
chmod -R 775 snipe-it/

如提示是否要覆盖.gitignore或者.gitkeep,请输入no。

4、重新执行Composer安装

cd snipe-it/
curl -sS https://getcomposer.org/installer | php
php composer.phar install --prefer-source
php composer.phar dump-autoloa
php artisan migrate

如提示Do you really wish to run this command? (yes/no),请输入yes

5、清除缓存

php artisan config:clear
php artisan config:cache

到此升级完成,请访问你的网页查看页面及数据是否正常。

 

六、未完待续

评论

16条评论
  1. Gravatar 头像

    xiaoya 回复

    我使用docker安装完成后再备份的地方点击备份遇到了报错,I also had a problem with the import. The import file did not report an error, but I did not see the import.,后台查看日志有好多的内容,同样在导入的地方导入cvs文件后没有报错,但是却看不到导入的内容。

    [2020-03-23 01:48:01] production.ERROR: Type error: Argument 1 passed to Spatie\DbDumper\DbDumper::setPort() must be of the type integer, string given, called in /var/www/html/vendor/s/laravel-backup/src/Tasks/Backup/DbDumperFactory.php on line 36 {"userId":1,"email":"lvwei@cambricon.com","exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableErrde: 0): Type error: Argument 1 passed to Spatie\\DbDumper\\DbDumper::setPort() must be of the type integer, string given, called in /var/www/html/vendor/spatie/laravel-backup/src/Tasksup/DbDumperFactory.php on line 36 at /var/www/html/vendor/spatie/db-dumper/src/DbDumper.php:117)
    [stacktrace]
    #0 /var/www/html/vendor/spatie/laravel-backup/src/Tasks/Backup/DbDumperFactory.php(36): Spatie\\DbDumper\\DbDumper->setPort('${MYSQL_PORT_33...')
    #1 /var/www/html/vendor/spatie/laravel-backup/src/Tasks/Backup/BackupJobFactory.php(28): Spatie\\Backup\\Tasks\\Backup\\DbDumperFactory::createFromConnection('mysql')
    #2 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Collection.php(928): Spatie\\Backup\\Tasks\\Backup\\BackupJobFactory::Spatie\\Backup\\Tasks\\Backup\\{closure}('mysql',
    #3 /var/www/html/vendor/spatie/laravel-backup/src/Tasks/Backup/BackupJobFactory.php(29): Illuminate\\Support\\Collection->mapWithKeys(Object(Closure))
    #4 /var/www/html/vendor/spatie/laravel-backup/src/Tasks/Backup/BackupJobFactory.php(14): Spatie\\Backup\\Tasks\\Backup\\BackupJobFactory::createDbDumpers(Array)
    #5 /var/www/html/vendor/spatie/laravel-backup/src/Commands/BackupCommand.php(27): Spatie\\Backup\\Tasks\\Backup\\BackupJobFactory::createFromArray(Array)
    #6 [internal function]: Spatie\\Backup\\Commands\\BackupCommand->handle()
    #7 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Array, Array)
    #8 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
    #9 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application),y, Object(Closure))
    #10 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(549): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, ArrULL)
    #11 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(183): Illuminate\\Container\\Container->call(Array)
    #12 /var/www/html/vendor/symfony/console/Command/Command.php(255): Illuminate\\Console\\Command->execute(Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Illuminate\\ConsOutputStyle))
    #13 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(170): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArrayI, Object(Illuminate\\Console\\OutputStyle))
    #14 /var/www/html/vendor/spatie/laravel-backup/src/Commands/BaseCommand.php(16): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Symfonmponent\\Console\\Output\\BufferedOutput))
    #15 /var/www/html/vendor/symfony/console/Application.php(982): Spatie\\Backup\\Commands\\BaseCommand->run(Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Symfony\\ComponConsole\\Output\\BufferedOutput))
    #16 /var/www/html/vendor/symfony/console/Application.php(255): Symfony\\Component\\Console\\Application->doRunCommand(Object(Spatie\\Backup\\Commands\\BackupCommand), Object(Symfony\\Cent\\Console\\Input\\ArrayInput), Object(Symfony\\Component\\Console\\Output\\BufferedOutput))
    #17 /var/www/html/vendor/symfony/console/Application.php(148): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Symfony\\Cent\\Console\\Output\\BufferedOutput))
    #18 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Application.php(88): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArrayInpObject(Symfony\\Component\\Console\\Output\\BufferedOutput))
    #19 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Application.php(177): Illuminate\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArrayInput), ObSymfony\\Component\\Console\\Output\\BufferedOutput))
    #20 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(249): Illuminate\\Console\\Application->call('backup:run', Object(Illuminate\\Support\\CollectioULL)
    #21 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(221): Illuminate\\Foundation\\Console\\Kernel->call('backup:run')
    #22 /var/www/html/app/Http/Controllers/SettingsController.php(961): Illuminate\\Support\\Facades\\Facade::__callStatic('call', Array)
    #23 [internal function]: App\\Http\\Controllers\\SettingsController->postBackups()
    #24 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): call_user_func_array(Array, Array)
    #25 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\\Routing\\Controller->callAction('postBackups', Array)
    #26 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(212): Illuminate\\Routing\\ControllerDispatcher->dispatch(Object(Illuminate\\Routing\\Route), Object(App\\Htontrollers\\SettingsController), 'postBackups')
    #27 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(169): Illuminate\\Routing\\Route->runController()
    #28 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(658): Illuminate\\Routing\\Route->run()
    #29 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
    #30 /var/www/html/app/Http/Middleware/CheckPermissions.php(28): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
    #31 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\\Http\\Middleware\\CheckPermissions->handle(Object(Illuminate\\Http\\Request), Object(Closure)peruser')
    #32 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #33 /var/www/html/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php(43): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Rt))
    #34 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\\Auth\\Middleware\\Authenticate->handle(Object(Illuminate\\Http\\Request), Object(Closu
    #35 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #36 /var/www/html/vendor/laravel/passport/src/Http/Middleware/CreateFreshApiToken.php(49): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Reques
    #37 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Laravel\\Passport\\Http\\Middleware\\CreateFreshApiToken->handle(Object(Illuminate\\Http\\Request)ect(Closure))
    #38 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #39 /var/www/html/app/Http/Middleware/CheckForTwoFactor.php(49): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
    #40 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\\Http\\Middleware\\CheckForTwoFactor->handle(Object(Illuminate\\Http\\Request), Object(Closure
    #41 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #42 /var/www/html/app/Http/Middleware/CheckLocale.php(42): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
    #43 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\\Http\\Middleware\\CheckLocale->handle(Object(Illuminate\\Http\\Request), Object(Closure))
    #44 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #45 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(68): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illum\\Http\\Request))
    #46 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle(Object(Illuminate\\Http\\Requestject(Closure))
    #47 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #48 /var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illte\\Http\\Request))
    #49 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle(Object(Illuminate\\Http\\Requesbject(Closure))
    #50 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #51 /var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(66): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Httquest))
    #52 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle(Object(Illuminate\\Http\\Request), Object(Ce))
    #53 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #54 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
    #55 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(660): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
    #56 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(635): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminattp\\Request))
    #57 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(601): Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\))
    #58 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(590): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))
    #59 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))
    #60 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Httquest))
    #61 /var/www/html/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(58): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request
    #62 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Barryvdh\\Debugbar\\Middleware\\InjectDebugbar->handle(Object(Illuminate\\Http\\Request), Object(Ce))
    #63 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #64 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(30): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illte\\Http\\Request))
    #65 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\RequeObject(Closure))
    #66 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #67 /var/www/html/app/Http/Middleware/CheckForDebug.php(25): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
    #68 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\\Http\\Middleware\\CheckForDebug->handle(Object(Illuminate\\Http\\Request), Object(Closure))
    #69 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #70 /var/www/html/app/Http/Middleware/CheckForSetup.php(27): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
    #71 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\\Http\\Middleware\\CheckForSetup->handle(Object(Illuminate\\Http\\Request), Object(Closure))
    #72 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #73 /var/www/html/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
    #74 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Fideloper\\Proxy\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
    #75 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #76 /var/www/html/app/Http/Middleware/NosniffGuard.php(17): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
    #77 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\\Http\\Middleware\\NosniffGuard->handle(Object(Illuminate\\Http\\Request), Object(Closure))
    #78 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #79 /var/www/html/app/Http/Middleware/ContentSecurityPolicyHeader.php(18): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
    #80 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\\Http\\Middleware\\ContentSecurityPolicyHeader->handle(Object(Illuminate\\Http\\Request), Objeosure))
    #81 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #82 /var/www/html/app/Http/Middleware/ReferrerPolicyHeader.php(17): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
    #83 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\\Http\\Middleware\\ReferrerPolicyHeader->handle(Object(Illuminate\\Http\\Request), Object(Clos
    #84 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #85 /var/www/html/app/Http/Middleware/XssProtectHeader.php(18): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
    #86 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\\Http\\Middleware\\XssProtectHeader->handle(Object(Illuminate\\Http\\Request), Object(Closure)
    #87 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #88 /var/www/html/app/Http/Middleware/FrameGuard.php(17): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
    #89 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\\Http\\Middleware\\FrameGuard->handle(Object(Illuminate\\Http\\Request), Object(Closure))
    #90 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #91 /var/www/html/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminattp\\Request))
    #92 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle(Object(Illuminate\\Http\\Request), ObClosure))
    #93 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #94 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(63): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Httpuest))
    #95 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\\Session\\Middleware\\StartSession->handle(Object(Illuminate\\Http\\Request), Object(Cl))
    #96 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #97 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(46): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Objeluminate\\Http\\Request))
    #98 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode->handle(Object(Illuminate\\Http\est), Object(Closure))
    #99 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #100 /var/www/html/vendor/barryvdh/laravel-cors/src/HandlePreflight.php(29): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
    #101 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Barryvdh\\Cors\\HandlePreflight->handle(Object(Illuminate\\Http\\Request), Object(Closure))
    #102 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #103 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
    #104 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(151): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
    #105 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Requ
    #106 /var/www/html/public/index.php(58): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
    #107 {main}

  2. Gravatar 头像

    ares 回复

    请问安装以后是英文,如何设置成中文?

  3. Gravatar 头像

    Kaka 回复

    你好,在第一步,点击Next:Create Database Tables按钮,页面跳转后,页面显示下面的文件,无法下一步,安装很多次了。
    Whoops, looks like something went wrong.

  4. Gravatar 头像

    cmd 回复

    请问下如何恢复备份。我找见备份的地方,但没有找到恢复备份的地方

    • Gravatar 头像

      yeboyzq 回复

      @cmd 请看第三部;
      3、拷贝旧程序的配置文件至新目录并授权

      • Gravatar 头像

        cmd 回复

        @yeboyzq 授权是如何执行呢,可否给个具体的操作说明,非常感谢啦。

        • Gravatar 头像

          yeboyzq 回复

          @cmd 仔细看文档,上面已经写了很详细了的。
          chown -R apache:apaches snipe-it/
          chmod -R 775 snipe-it/

  5. Gravatar 头像

    Jay 回复

    你好,每次执行安装这一步php artisan key:generate,就报以下的错误,进行不下去,
    PHP Warning: require(/var/www/snipe-it/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /var/www/snipe-it/bootstrap/autoload.php on line 17
    PHP Fatal error: require(): Failed opening required '/var/www/snipe-it/bootstrap/../vendor/autoload.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/snipe-it/bootstrap/autoload.php on line 17

    • Gravatar 头像

      yeboyzq 回复

      @Jay composer没有安装好,看下安装composer的时候有没有报错。

    • Gravatar 头像

      huiyi 回复

      @Jay 你检查一下是不是php-gd没安装,若没安装,请先安装,安装后,再执行composer install --no-dev --prefer-source

  6. Gravatar 头像

    lincx 回复

    恳请大神帮忙解决下问题,谢谢!
    我的QQ:21555096

  7. Gravatar 头像

    lincx 回复

    你好,我在第三步(配置相关参数)点击Next Save User按钮,页面跳转了一下然后整个网页都空白了,再也打开不开网站了,安装N多次了,依然是这个现象。

    • Gravatar 头像

      yeboyzq 回复

      @lincx 检查下apache的error日志,或者把日志贴出来看看

发表评论

电子邮件地址不会被公开。 必填项已用*标注