8000 手动安装nginx+php7.2+OneManager · Issue #20 · dalaolala/blog · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
手动安装nginx+php7.2+OneManager #20
Open
@dalaolala

Description

@dalaolala

本文使用的方案是手动安装nginx+php7.2+OneManager

准备工作
准备一个纯净的vps,系统为ubuntu

手动安装nginx

apt install epel-release
apt install nginx

手动安装php7.2
更新php7.2的软件源

#添加GPG
wget -O /etc/apt/trusted.gpg.d/php.gpg https://mirror.xtom.com.hk/sury/php/apt.gpg

#安装apt-transport-https
apt-get install apt-transport-https

#添加sury软件源
sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'

#更新软件源缓存
apt-get update

安装php 7.2

apt install php7.2-fpm php7.2-mysql php7.2-curl php7.2-gd php7.2-mbstring php7.2-xml php7.2-xmlrpc php7.2-zip php7.2-opcache -y

设置php

sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/' /etc/php/7.2/fpm/php.ini 

到这里就安装好了,更多的命令

systemctl restart php7.2-fpm  #重启
systemctl start php7.2-fpm  #启动
systemctl stop php7.2-fpm  #关闭
systemctl status php7.2-fpm  #检查状态

安装OneManager
新建网站安装目录

mkdir -p /www/aaaa

下载源代码,并放到网站目录

cd /www/aaaa
git clone https://github.com/qkqpttgf/OneManager-php.git
cd OneManager-php
mv * ../
chmod 666 config.php

nginx配置php的文件

vi /etc/nginx/conf.d/aaaa.conf

server {
        listen 80;
        server_name aaaa.com;
        index index.php;
        root /www/aaaa/;
        rewrite ^/(?!.well-known)(.*)$ /index.php?/$1 last;
        location ~ \.php$ {
            fastcgi_pass   unix:/run/php/php7.2-fpm.sock;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            include        fastcgi_params;
        }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0