Centos7下docker搭建咖啡壶Chemex固定资产管理系统(亲测可用)

咖啡壶Chemex固定资产管理系统比较适用于一些小型公司/初创公司IT人员管理IT类资产。

版本要求:
PHP:大于8.1
Mysql:建议8.0
docker:推荐安装1.10.0以上版本客户端
Docker Compose: 推荐安装大于v2.20.2
Nginx:推荐安装1.20及以上

此前已经搭建了以上的所有环境用于测试其他,可参考我的其他文章,搭建步骤如下:

一、升级PHP版本:chemex要求PHP版本大于8.1

1、卸载所有已安装的php
yum remove -y php*
2.执行,下载新版本
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://rpms.remirepo.net/enterprise/remi-release-7.rpm
3.单独安装php8.2
yum-config-manager --disable ‘remi-php*’
yum-config-manager --enable remi-php82
4、安装php以及扩展
yum install -y php php-bcmath php-cli php-common php-devel php-fpm php-gd php-intl php-ldap php-mbstring php-mysqlnd php-odbc php-pdo php-pear php-pecl-xmlrpc php-pecl-zip php-process php-snmp php-soap php-sodium php-xml
5.重启apache,查看php版本
systemctl restart httpd
php -v

二、创建chemex数据库及用户(数据库名称必须为chemex)

mysql -uroot -p (输入密码连接数据库)

1、create database chemex;
2、create user 'chemex'@'%' identified by '自己设置密码';
3、grant all privileges on chemex.* to 'chemex'@'%';
4、flush privileges;
5、exit;

三、下载咖啡壶源码

注意事项:
(1)在网站根目录下下载,如果初学者对于linux系统目录结构不了解,源码初始化完成后页面加载时一直显示Nginx欢迎页面,处理起来比较棘手。
(2)可以通过nginx.conf配置文件查找根目录
find / -name nginx.conf
在这里插入图片描述
1、进入根目录下下载源码:
Step 1 cd /etc/nginx
Step 2 下载源码并授权

yum install -y git
git clone https://gitee.com/celaraze/chemex.git          # 下载咖啡壶源码
rm -rf html                                              # 删除默认html根目录
mv chemex html                                           # 将下载的源码重命名为html
chown -R nginx:nginx html                                # 更改根目录的属组和属主为nginx
chmod -R 755 html                                        # 修改根目录的权限属性
chmod -R 777 html/storage                                # 修改html/storage的权限属性为777

Step 3 拷贝数据库连接文件,防止自行编辑的时候出错

cd /etc/nginx/html/
cp .env.example .env  # 拷贝.env.example一份命名为.env

Step 4 编辑 .env文件
vim .env
在这里插入图片描述
2、执行安装chemex

1)cd /etc/nginx/html/2)php artisan chemex:install #执行安装chemex

在这里插入图片描述
3、输入电脑通过访问http://your_ip:8099打开资产管理系统,初始密码为admin/admin (我修改了默认的端口号)

注意点:
(1)Nginx的nginx.conf配置文件包含了chemex固定资产系统的访问初始页及目录等相关信息,需要修改
vim /etc/nginx/conf.d/nginx.conf

server {
       listen       8099; #端口号看个人运行其他应用情况修改
       server_name  localhost;
       root /etc/nginx/html/public/;
       location / {
           index  index.html index.htm index.php;
           try_files $uri $uri/ /index.php?$args;
       }
       error_page   500 502 503 504  /50x.html;
       location = /50x.html {
           root   /ect/nginx/html/public/;
       }
       location ~ \.php$ {
           root           html;
           fastcgi_pass   127.0.0.1:9000;
           fastcgi_index  index.php;
           fastcgi_param  SCRIPT_FILENAME  /etc/nginx/html/public/$fastcgi_script_name;
           include        fastcgi_params;
       }
   }

(2)运行时报错The /etc/nginx/html/bootstrap/cache directory must be present and writable.
这个错误信息说明Nginx需要/etc/nginx/html/bootstrap/cache目录存在且可写。如果该目录不存在或不可写,就会出现此错误。
要解决这个问题,您可以按照以下步骤进行操作:

cd /etc/nginx/html/bootstrap/cache 
sudo chmod 777  /etc/nginx/html/bootstrap/cache 

四、运行后截图

在这里插入图片描述
在这里插入图片描述

  • 14
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值