piwigo安装及初步使用

本文详细介绍了如何在CentOS7.9系统上利用Docker安装和配置piwigo图片管理平台,包括下载piwigo软件包,设置nginx、php和mysql的Docker环境,创建数据库和用户,解压piwigo文件到nginx目录,通过http://172.31.184.23/piwigo/install.php进行安装,并调整nginx配置实现域名访问。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一 摘要

本文主要介绍piwigo 安装及初步使用,nginx \php\mysql 等使用 docker 安装

二 环境信息

2.1 操作系统

CentOS Linux release 7.9.2009 (Core)

2.2 piwigo

piwigo-13.6.0.zip

三 安装

3.1安装资源下载

piwigo 请到官网下载https://piwigo.org
安装步骤也是参考官网文档。

3.2 安装docker

参考 博文https://blog.csdn.net/nasooo/article/details/129753140

3.3 安装nginx\php\mysql

详见博文https://blog.csdn.net/nasooo/article/details/130129817

3.4 安装piwigo

3.4.1 数据库里建库以及建用户

一般不建议直接用root用户


create database piwigo_db  character set utf8 collate utf8_bin;
create user piwigo_db_user identified by '1qaz2wsx';
grant all privileges on piwigo_db.* to  piwigo_db_user@'%' identified by '1qaz2wsx' with grant option;
grant all privileges on piwigo_db.* to piwigo_db_user@localhost  identified by '1qaz2wsx' with grant option;
flush privileges;

3.4.2 解压文件

将软件解压放到nginx 目录下

我这里是目录 /data/yunweipro/commonapp/nginx/html

[root@2023001 html]# ll
total 20
-rw-r--r--  1 root root  107 Apr 13 17:51 hello.php
-rw-r--r--  1 root root  647 Apr 13 17:10 index.html
-rw-r--r--  1 root root   93 Apr 13 17:52 info.php
drwxr-xr-x 12 root root 4096 Apr 14 10:05 phpmyadmin
drwxr-xr-x 16 root root 4096 Feb 24 17:31 piwigo
[root@2023001 html]# pwd
/data/yunweipro/commonapp/nginx/html
[root@2023001 html]#

3.4.3 开始安装

浏览器访问 http://172.31.184.23/piwigo/install.php

mysql 主机地址 必须填容器名称
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

3.4.4 配置nginx 域名访问

关键修改地方:
location / {
root /usr/share/nginx/html/piwigo;
index index.html index.htm index.php;
}

location ~ \.php$ {
    fastcgi_pass   php:9000;
    fastcgi_index  index.php;
    **fastcgi_param  SCRIPT_FILENAME  /usr/share/nginx/html/piwigo**/$fastcgi_script_name;
    include        fastcgi_params;
}
[root@2023001 conf.d]# cat digimicoo.conf
server {
    listen       80;
    listen  [::]:80;
    server_name  xxxx.xxxx.com;

    #access_log  /var/log/nginx/host.access.log  main;

    location / {
        root   /usr/share/nginx/html/piwigo;
        index  index.html index.htm index.php;
    }

    #error_page  404              /404.html;

    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }

    # proxy the PHP scripts to Apache listening on 127.0.0.1:80
    #
    #location ~ \.php$ {
    #    proxy_pass   http://127.0.0.1;
    #}

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    #location ~ \.php$ {
    #    root           html;
    #    fastcgi_pass   127.0.0.1:9000;
    #    fastcgi_index  index.php;
    #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
    #    include        fastcgi_params;
    #}

    #当请求网站下php文件的时候,反向代理到php-fpm
    location ~ \.php$ {
        fastcgi_pass   php:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  /usr/share/nginx/html/piwigo/$fastcgi_script_name;
        include        fastcgi_params;
    }

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    #location ~ /\.ht {
    #    deny  all;
    #}
}

Piwigo是一款免费开源使用的多功能图库软件,该软件基于最新的MySQL5与PHP5编程语言开发,性能强大,为用户提供了高效便捷的图片管理功能,用户可根据图片的拍摄时间,类型等信息对其进行分类,还可以手机同步。我这里介绍的是piwigo-videojs,视频插件,我在安装时候走了很多弯路,这里先说下 Piwigo 11.3.0 是支持本插件的 php.ini需要开启 system,putenv,shell_exec 这三个权限 视频生成缩略图,由于主机设置PHP程序执行时间比较短,需要在 plugins\piwigo-videojs\include\function_sync2.php 文件中加入set_time_limit(0);语句 后台插件-LocalFiles Editor-设置-本地配置中需要加入一下参数 $conf['sync_chars_regex'] = '/^[a-zA-Z0-9-_.\x00-\xff]+$/'; $conf['show_exif'] = true; $conf['show_exif_fields'] = array( 'Make', 'Model', 'ExifVersion', 'Software', 'DateTimeOriginal', 'FNumber', 'ExposureBiasValue', 'FILE;FileSize', 'ExposureTime', 'Flash', 'ISOSpeedRatings', 'FocalLength', 'FocalLengthIn35mmFilm', 'WhiteBalance', 'ExposureMode', 'MeteringMode', 'ExposureProgram', 'LightSource', 'Contrast', 'Saturation', 'Sharpness', 'bitrate', 'channel', 'date_creation', 'display_aspect_ratio', 'duration', 'filesize', 'format', 'formatprofile', 'codecid', 'frame_rate', 'latitude', 'longitude', 'make', 'model', 'playtime_seconds', 'sampling_rate', 'type', 'resolution', 'rotation', ); $conf['vjs_mediainfo_dir'] = 'D:\MediaInfo\MediaInfo.exe '; $conf['vjs_exiftool_dir'] = 'D:\exiftool\"exiftool.exe" '; $conf['vjs_ffprobe_dir'] = 'D:\ffmpeg\bin\ffprobe.exe '; $conf['ffmpeg_dir'] = 'D:\ffmpeg\bin\ffmpeg.exe '; 最后的参数是安装piwigo-videojs插件的必须软件,并且需要指出安装位置,如果您已经把参数写到变量里面,可以不用理会直接删除就可以了,注意,在EXE后面有空格,否则执行脚本会出错。 设置环境变量,windows服务器,我的电脑或者此电脑-右键属性-高级-环境变量-找到系统变量,里面变量为PATH-编辑 添加D:\MediaInfo到系统变量(PATH) 添加D:\exiftool到系统变量(PATH) 添加D:\ffmpeg\bin到系统变量(PATH) 在插件里面的piwigo-videojs设置需要提前设置好,在插件里面的同步是没用的,我测试好几次都不能同步数据和生成缩略图和海报 视频不能直接网页上传,需要用FTP上传到galleries目录 例如你要上传 wenhua.mp4 到galleries目录,你需要在galleries目录新建一个英文目录(千万别是中文文件夹或者文件名后期会出错的),上传好后,进网页后台,面板最下面有个 快速本地同步 ,别的同步都不起作用。同步好后,点图片-批量管理,选择您的视频,下面有个操作,选择videojs,需要生成缩略图的自己选择下,然后点执行操作就可以了。 还有个问题,第一次生成海报,你要是第二次在生成海报,前台海报不会变,你需要到 _data\i\galleries\视频目录\pwg_representative 删除这个目录下xxxx-cu_e250.jpg文件,然后刷新下前台
Piwigo 开源相册系统软件介绍 Piwigo是一个基于MySQL5与PHP5开发的相册系统。提供基本的发布和管理照片功能,按多种方式浏览如类别,标签,时间等。 2.5版本在技术及功能方面均有提升,从全新的图标到群组管理,以及三方认证,诸如:OpenID 或 Wordpress.com。 Piwigo 2.5 数据: 30 新功能, 由百名翻译人员及7名开发人员带来的 900 代码变更, 4种新增语言使 Piwigo语言种类增至 51种,8个月的开发时间。 piwogo v2.9.0 beta1 更新日志: 这里是与Piwigo 2.8相比的变化列表。 首先是用户的更改: 现代化的管理页面(颜色,边框更少,更多图标) 重新设计的代码管理器 重新设计的管理主页,即仪表板 用户创建表单上的密码生成器 处理照片时删除相册的选项 下载链接的照片版的页面,管理员 快速链接到您刚刚创建的编辑能力 基于校验和查找重复的照片 ... 然后更多的“技术”变化: dataTables.js更新到1.10版本 改进的历史引擎:更快,并保持历史小 新的“消息”框(蓝色)除了信息(绿色),错误(红色)和警告(黄色) 会话自动删除更频繁 更快地打开用户版盒(在历史中没有搜索“上次访问”) API方法pwg.session.getStatus返回可用照片大小的列表 新相册可以在列表的底部排序(而不是顶部) Piwigo 开源相册系统页面展示 相关阅读 同类推荐:站长常用源码
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值