phpipam安装

环境:

AlmaLinux9.1 或者 RockyLinux9.1

Nginx 1.22

php 7.4

mariadb 10.6.11

phpipam版本1.5

 

PHP:

安装remi repo

php74-php-fpm.x86_64

php74-php-pdo.x86_64

php74-php-mysqlnd.x86_64

php74-php-gd.x86_64

php74-php-mbstring.x86_64

php74-php-pear.noarch

php74-php-gmp.x86_64

Nginx配置:

server {

    # root directory

    root   /usr/share/nginx/html/;

    # phpipam

    location /phpipam/ {

        try_files $uri $uri/ /phpipam/index.php;

        index index.php;

    }

    # phpipam - api

    location /phpipam/api/ {

        try_files $uri $uri/ /phpipam/api/index.php;

    }

    # php-fpm

    location ~ \.php$ {

        fastcgi_pass   unix: /var/opt/remi/php74/run/php-fpm/www.sock;

        fastcgi_index  index.php;

        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

        try_files      $uri $uri/ index.php = 404;

        include        fastcgi_params;

    }

 }


MariaDB配置:

mysql -uroot

create user 'phpipam'@'10.0.10.0/255.255.255.0' identified by 'phpipamadmin';

grant all privileges on phpipam.* to 'phpipam'@'10.0.10.0/255.255.255.0';

flush privileges;

create database phpipam;

phpipam配置:

php-fpm配置:

user = nginx

group = nginx

listen.acl_users = apache,nginx

如果报错关键字session permission deny,将session文件夹换组nginx

[root@localhost ~]# ll /var/opt/remi/php74/lib/php/

total 0

drwxrwx--- 2 root apache 6 Dec 19 21:30 opcache

drwxr-xr-x 2 root root   6 Dec 19 21:30 peclxml

drwxrwx--- 2 root apache 6 Dec 19 21:30 session

drwxrwx--- 2 root apache 6 Dec 19 21:30 wsdlcache

[root@localhost ~]# chgrp nginx opcahe -R

chgrp: cannot access 'opcahe': No such file or directory

[root@localhost ~]# cd /var/opt/remi/php74/lib/php/

[root@localhost php]# chgrp nginx opcahe -R

chgrp: cannot access 'opcahe': No such file or directory

[root@localhost php]# chgrp -R nginx opcache/

[root@localhost php]# chgrp -R nginx session/

[root@localhost php]# chgrp -R nginx wsdlcache/

[root@localhost php]# ll

total 0

drwxrwx--- 2 root nginx 6 Dec 19 21:30 opcache

drwxr-xr-x 2 root root  6 Dec 19 21:30 peclxml

drwxrwx--- 2 root nginx 6 Dec 19 21:30 session

drwxrwx--- 2 root nginx 6 Dec 19 21:30 wsdlcache

http://x.x.x.x/phpipam/

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值