无标题页面

一、参考文档:

官方文档 https://snipe-it.readme.io/docs/switching-to-a-git-install
二、准备工作:
宝塔安装ldap扩展
1. 环境:
操作系统:centos8
[root@localhost ~]# cat /etc/redhat-release
CentOS Linux release 8.0.1905 (Core)
[root@localhost ~]# uname -r
4.18.0-80.el8.x86_64
1安装宝塔:免费版 7.0.3
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh
Congratulations! Installed successfully!
=====================================================
Bt-Panel: http://192.168.100.64:8888/0c849fb6
username: av8ogiu1
password: 25a99b5d
## 注意,安装的时候会提示选择安装目录,默认是 /wwww 目录,此处使用的默认路径
php:7.2.24
[root@localhost ~]# /www/server/php/72/bin/php -v
PHP 7.2.24 (cli) (built: Nov 12 2019 10:18:56) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
2. 编译安装:
## 1. 进入程序编译目录,不同环境自己灵活调整
cd /www/server/php/72/src/ext/ldap/
## 2. 执行phpize命令
root@localhost ldap]# /www/server/php/72/bin/phpize
Configuring for: PHP Api Version: 20170718 Zend Module Api No: 20170718 Zend Extension Api No: 320170718
## 3. 执行configure命令
[root@localhost ldap]# ./configure --with-php-config=/www/server/php/72/bin/php-config --with-ldap
## ************************************************************************* ###
## 若报错:configure: error: Cannot find ldap.h 执行以下
yum install openldapyum (提示没有这个包的话,可以忽略)
yum install openldap-devel
## ************************************************************************* ###
## 若报错:configure: error: Cannot find ldap libraries in /usr/lib 执行以下
## cp -frp /usr/lib64/libldap* /usr/lib/
## ************************************************************************* ###
## 执行成功后,最后几行会提示:
## checking whether stripping libraries is possible... yes
## checking if libtool supports shared libraries... yes
## checking whether to build shared libraries... yes
## checking whether to build static libraries... no
##
## creating libtool
## appending configuration tag "CXX" to libtool
## configure: creating ./config.status
## config.status: creating config.h

## 4. 编译安装

[root@localhost ldap]# make & make install
## 执行后提示:
[root@localhost ldap]# make && make install
## /bin/sh /www/server/php/72/src/ext/ldap/libtool --mode=install cp ./ldap.la /www/server/php/72/src/ext/ldap/modules
## cp ./.libs/ldap.so /www/server/php/72/src/ext/ldap/modules/ldap.so
## cp ./.libs/ldap.lai /www/server/php/72/src/ext/ldap/modules/ldap.la
## PATH="$PATH:/sbin" ldconfig -n /www/server/php/72/src/ext/ldap/modules
## ----------------------------------------------------------------------
## Libraries have been installed in:
## /www/server/php/72/src/ext/ldap/modules
##
## If you ever happen to want to link against installed libraries
## in a given directory, LIBDIR, you must either use libtool, and
## specify the full pathname of the library, or use the `-LLIBDIR'
## flag during linking and do at least one of the following:
## - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
## during execution
## - add LIBDIR to the `LD_RUN_PATH' environment variable
## during linking
## - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
## - have your system administrator add LIBDIR to `/etc/ld.so.conf'
##
## See any operating system documentation about shared libraries for
## more information, such as the ld(1) and ld.so(8) manual pages.
## ----------------------------------------------------------------------
##
## Build complete.
## Don't forget to run 'make test'.
##
## Installing shared extensions: /www/server/php/72/lib/php/extensions/no-debug-non-zts-20170718/
# 5. 开启php.ini中的ldap扩展,删除注释即可
## 898 extension=ldap
## "/www/server/php/72/etc/php.ini" 1950L, 72354C written

## 6. 面板重启php-fpm确认

[root@localhost ldap]# /www/server/php/72/bin/php -m | grep ldap ldap #上传软件包 [root@xuegod64 wwwroot]# rz [root@xuegod64 wwwroot]# tar -xf mirrors-Snipe-IT-v4.7.8.tar.gz

安装 fileinfo扩展

[Symfony\Component\Process\Exception\RuntimeException]
The Process class relies on proc_open, which is not available on your PHP installation.



cp .env.example .env #.env是文件修改成您的数据库信息 vim .env APP_ENV=production APP_DEBUG=false APP_KEY=base64:UsCZJ52yCEJmqmZU4hWfRfBJdzcd+qvQVS/vwnNtcrg= APP_URL=192.168.100.64:88 APP_TIMEZONE='Asia/Shanghai' APP_LOCALE=en MAX_RESULTS=500 # -------------------------------------------- # REQUIRED: DATABASE SETTINGS # -------------------------------------------- DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_DATABASE=snipe DB_USERNAME=snipe DB_PASSWORD=snipe DB_PREFIX=null DB_DUMP_PATH='/usr/bin' DB_CHARSET=utf8mb4 DB_COLLATION=utf8mb4_unicode_ci
添加数据库

生成KEY: php artisan key:generate --force 迁移数据: php artisan migrate:refresh --seed #交互的 php artisan migrate --force
添加网站




[ErrorException]
putenv() has been disabled for security reasons



最后导入之前的数据库
curl -sS https://getcomposer.org/installer | php
php安装composer是报错解决
curl -sS https://getcomposer.org/installer | php  
/usr/bin/php composer.phar --version  
mv composer.phar /usr/local/bin/composer   
composer –version  
https://www.viphper.com/1494.html
Warning: require(): open_basedir restriction in effect. File(/home/wwwroot/Snipe-IT/bootstrap/autoload.php) is not within the allowed path(s): (/home/wwwroot/Snipe-IT/public/:/tmp/:/proc/) in /home/wwwroot/Snipe-IT/public/index.php on line 22
Warning: require(/home/wwwroot/Snipe-IT/bootstrap/autoload.php): failed to open stream: Operation not permitted in /home/wwwroot/Snipe-IT/public/index.php on line 22
Fatal error: require(): Failed opening required '/home/wwwroot/Snipe-IT/public/../bootstrap/autoload.php' (include_path='.:/usr/local/php7.2/lib/php') in /home/wwwroot/Snipe-IT/public/index.php on line 22

运行composer install
内网穿透
https://natapp.cn/article/natapp_newbie
linux ,同样给予可执行权限之后,运行 建立一个会话,这样就一直运行了
yum install screen -y screen -s vpn ./natapp -authtoken=29045c5f1b9c2501
 注意参数输入正确性,不要有多余的空格等!
alog
如果导入失败,开启.env的详细报错。
https://blog.csdn.net/qq_33733970/article/details/89788862
PHP Fatal error: require(): Failed opening required
2019-05-03 16:32:10 Quincy379 阅读数 1046更多
分类专栏: PHP
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/qq_33733970/article/details/89788862
使用的是lnmp
解决方法/usr/local/nginx/conf
vim fastcgi.conf