phpssdbadmin环境搭建与配置

来源:互联网 发布:淘宝电玩巴士商城 编辑:程序博客网 时间:2024/06/06 19:59

1.下载源码包与文档

github地址:https://github.com/ssdb/phpssdbadmin

下载 phpssdbadmin.tar.gz 包

2.下载安装nginx(也可以使用apache2)

ubuntu 安装nigix,php5-fpm
sudo apt-get upgrade;sudo apt-get install nginx
sudo apt-get install php5-fpm

3.修改nginx,php5-fpm配置文件
[/etc/nginx/nginx.conf] #配置nginx 端口。不配置默认为80,会与apache端口冲突

    server {            listen     localhost:9527;            protocol   pop3;            proxy      on;    }

[/etc/nginx/sites-available/default] #nginx无法解析php文件,配置php解析器

    location /phpssdbadmin {        try_files $uri $uri/ /phpssdbadmin/index.php?$args;    }    location ~ \.php$ {            fastcgi_split_path_info ^(.+\.php)(/.+)$;            fastcgi_pass 127.0.0.1:9000;            fastcgi_index index.php;            include fastcgi_params;            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;    }

[/etc/php5/fpm/php-fpm.conf]

    include=/etc/php5/fpm/pool.d/*.conf

[/etc/php5/fpm/pool.d/www.conf]

    listen = /var/run/php5-fpm.sock修改为listen = 127.0.0.1:9000

4.将phpssdbadmin源代码放置nginx根目录

    tar -zxvf phpssdbadmin.tar.gz /usr/share/nginx/html/    cd /usr/share/nginx/html/;mv phpssdbadmin-master phpssdbadmin

5.修改phpssdbadmin配置文件

    修改../phpssdbadmin/app/controllers/login.php 注释掉验证码校验(非必须)    修改../phpssdbadmin/app/controllers/login.php 注释前端验证码模块展示(非必须)    修改../phpssdbadmin/app/config/config.php    return array(    'env' => ENV,    'logger' => array(            'level' => 'all', // none/off|(LEVEL)            'dump' => 'file', // none|html|file, 可用'|'组合            'files' => array( // ALL|(LEVEL)            ),    ),    'servers' => array(            array(                    'host' => '192.168.2.213',                    'port' => '57888',                    //'password' => '22222222',            ),    ),    'login' => array(            'name' => 'admin',            'password' => 'test@123', // at least 6 characters    ),

);

6.启动nginx,php5-fpm

    /usr/sbin/nginx -c /etc/nginx/nginx.conf    /usr/sbin/php5-fpm

7.访问phpssdbadmin

    http://192.168.20.145/phpssdbadmin/login
1 0
原创粉丝点击