我正在尝试安装 phpRedMin,但遇到了一些问题。我找到的所有文档都适用于旧版本的 Apache。
我在 Ubuntu 中使用 Apache 版本 2.4.7,但我无法定位
Apache configuration example (/etc/httpd/conf.d/phpredmin.conf)
谁能帮忙安装一下?
最佳答案
我刚刚能够在我的 Ubuntu Server 14.04.4 上启动并运行它,并从这个 repo ppa:ondrej/php, https://launchpad.net/~ondrej/+archive/ubuntu/php 安装了 php7
首先,我编译了 phpredis PHP 模块,以便 PHP 应用程序可以与 REDIS 服务器通信。请记住,此步骤适用于 PHP7,如果您使用 PHP5 Ubuntu 软件包,请调整它以适合您的软件包。我认为您可以通过 checkout phpredmin master 分支而不是 PHP 7 分支来做到这一点。
sudo su
apt-get update
apt-get install git build-essential tcl8.5 php-pear php7.0-dev
git clone -b php7 https://github.com/phpredis/phpredis.git
cd phpredis/
phpize
./configure
make && make install
touch /etc/php/7.0/mods-available/redis.ini
echo 'extension=redis.so' > /etc/php/7.0/mods-available/redis.ini
phpenmod redis
service apache2 restart
然后安装PHPRedmin
cd /var/www
git clone https://github.com/sasanrose/phpredmin.git
mkdir -p ./phpredis/logs/apache2handler/
chown www-data ./phpredmin/ -R
创建apache配置文件
nano /etc/apache2/conf-available/phpredmin.conf
然后将此 apache 配置粘贴到该文件中。随意更改允许的 ips。
# phpredmin - Simple web interface to manage and monitor your Redis
Alias /phpredmin /var/www/phpredmin/public
<Directory /var/www/phpredmin/>
AllowOverride All
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
Require ip 10.0.0
Require ip 127.0.0.1
Require local
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 10.0.0.*
Allow from 127.0.0.1
Allow from ::1
</IfModule>
</Directory>
然后启用那个conf并重启apache
a2enconf phpredmin
service apache2 restart
可以通过http://server.com/phpredmin访问接口(interface)
希望对您有所帮助。杰拉德!
关于php - 如何安装PHPRedmin?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27855659/