Phpmyadmin 与centos7虚拟机(virtualbox)的远程连接
已在virtualbox上安装centos7系统。主机是一台linux造币厂。我在centos7 httpd、mariadb、php和phpadmin 7上也安装了in.stalled。在centos7虚拟机上可以。 我想从主机(LinuxMint)连接到phpadmin和mariadb,在那里我有开发我的应用程序的IDE 这是centos7 ip地址(ip地址命令):Phpmyadmin 与centos7虚拟机(virtualbox)的远程连接,phpmyadmin,virtualbox,centos7,Phpmyadmin,Virtualbox,Centos7,已在virtualbox上安装centos7系统。主机是一台linux造币厂。我在centos7 httpd、mariadb、php和phpadmin 7上也安装了in.stalled。在centos7虚拟机上可以。 我想从主机(LinuxMint)连接到phpadmin和mariadb,在那里我有开发我的应用程序的IDE 这是centos7 ip地址(ip地址命令): 1:lo:mtu 65536 qdisc noqueue状态未知qlen 1 链接/环回00:00:00:00:00 brd
1:lo:mtu 65536 qdisc noqueue状态未知qlen 1
链接/环回00:00:00:00:00 brd 00:00:00:00:00:00:00
inet 127.0.0.1/8作用域主机低有效\u lft永久首选\u lft永久
inet6::1/128作用域主机有效\u lft永久首选\u lft永久
2:enp0s3:mtu 1500 qdisc pfifo_快速状态升级qlen 1000链路/以太08:00:27:0e:9b:d8 brd ff:ff:ff:ff:ff:ff:ff
inet 10.0.2.15/24 brd 10.0.2.255范围全局动态enp0s3
有效\u lft 85621sec优先\u lft 85621sec
inet6 fe80::db89:b43e:da69:530d/64范围链接
永远有效\u lft首选\u lft永远有效
3:virbr0:mtu 1500 qdisc noqueue状态下降qlen 1000
链接/以太52:54:00:8d:17:89 brd ff:ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255作用域全局virbr0
永远有效\u lft首选\u lft永远有效
4:virbr0 nic:mtu 1500 qdisc pfifo_快速主virbr0状态下降qlen 1000
链接/以太52:54:00:8d:17:89 brd ff:ff:ff:ff:ff:ff:ff
这是centos7上的phpmyadmin.conf:
Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin
<Directory /usr/share/phpMyAdmin/>
AddDefaultCharset UTF-8
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
Require all granted
# Require ip 127.0.0.1
Require ip 192.168.122.1
# Require ip 10.0.2.15
Require ip ::1
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
# Order Deny,Allow
# Deny from All
# Allow from 127.0.0.1
# Allow from 192.168.122.1
Order Allow,Deny
Allow from All
# Allow from 10.0.2.15
Allow from 192.168.122.1
Allow from ::1
</IfModule>
</Directory>
<Directory /usr/share/phpMyAdmin/setup/>
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
# Require ip 127.0.0.1
Require ip 192.168.122.1
# Require ip 10.0.2.15
Require ip ::1
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
# Deny from All
# Allow from 127.0.0.1
Allow from 192.168.122.1
# Allow from 10.0.2.15
Allow from ::1
</IfModule>
</Directory>
# These directories do not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
#
<Directory /usr/share/phpMyAdmin/libraries/>
Order Deny,Allow
Deny from All
Allow from None
</Directory>
<Directory /usr/share/phpMyAdmin/setup/lib/>
Order Deny,Allow
Deny from All
Allow from None
</Directory>
<Directory /usr/share/phpMyAdmin/setup/frames/>
Order Deny,Allow
Deny from All
Allow from None
</Directory>
configuration on virtualbox:
network
attached to: NAT
adapter type: Intel PRO 1000/MT Desktop 82540EM
promiscuosous: deny
Mac Address: 0800270E9BD8
cable connected: checked
port forwarding configuration:
name:centos7
protocol:tcp
host ip: empty
host port:3022
guest ip: empty:
guest port:22
file-->preferences-->network
Tab NAT: NatNetwork
port forwarding configuration: empty
Tab Only Host: ip address 192.168.122.1
Alias/phpMyAdmin/usr/share/phpMyAdmin
别名/phpmyadmin/usr/share/phpmyadmin
AddDefaultCharset UTF-8
#Apache2.4
要求所有授权
#要求ip 127.0.0.1
要求ip 192.168.122.1
#要求ip 10.0.2.15
需要ip::1
#Apache2.2
#命令拒绝,允许
#全盘否定
#允许从127.0.0.1开始
#允许从192.168.122.1开始
命令允许,拒绝
通融
#允许从10.0.2.15开始
允许从192.168.122.1开始
允许来自::1
#Apache2.4
#要求ip 127.0.0.1
要求ip 192.168.122.1
#要求ip 10.0.2.15
需要ip::1
#Apache2.2
命令拒绝,允许
#全盘否定
#允许从127.0.0.1开始
允许从192.168.122.1开始
#允许从10.0.2.15开始
允许来自::1
#这些目录不需要通过HTTP访问-从原始目录获取
#塔巴尔上游的phpMyAdmin
#
命令拒绝,允许
全盘否定
从无到有
命令拒绝,允许
全盘否定
从无到有
命令拒绝,允许
全盘否定
从无到有
virtualbox上的配置:
网络
附:NAT
适配器类型:英特尔PRO 1000/MT桌面82540EM
混乱:否认
Mac地址:0800270E9BD8
连接的电缆:已检查
端口转发配置:
姓名:centos7
协议:tcp
主机ip:空
主机端口:3022
来宾ip:空:
客港:22
文件-->首选项-->网络
标签NAT:NAT网络
端口转发配置:空
选项卡仅主机:ip地址192.168.122.1
我尝试从主机LinuxMint连接,但连接不正常。
我认为主机在虚拟机上看不到centos7
你知道吗
谢谢…您是否为该应用程序启用了端口转发
您正在使用NAT进行网络连接,如果没有端口转发,您将无法连接到来宾操作系统给您的问题一个真实的标题,并且不要使用所有的大写字母(因为这被认为是大喊大叫和粗鲁的).virtualbox上的网络配置:连接到:NAT适配器类型:Intel PRO 1000/MT Desktop 82540EM Promiscuosus:拒绝Mac地址:0800270E9BD8连接的电缆:选中的端口转发配置:名称:centos7协议:tcp主机ip:空主机端口:8080来宾ip:空:来宾端口:80抱歉延迟。每个应用程序都有单独的连接端口。maria DB端口是3306。对于所有端口,应添加端口转发规则。
Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin
<Directory /usr/share/phpMyAdmin/>
AddDefaultCharset UTF-8
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
Require all granted
# Require ip 127.0.0.1
Require ip 192.168.122.1
# Require ip 10.0.2.15
Require ip ::1
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
# Order Deny,Allow
# Deny from All
# Allow from 127.0.0.1
# Allow from 192.168.122.1
Order Allow,Deny
Allow from All
# Allow from 10.0.2.15
Allow from 192.168.122.1
Allow from ::1
</IfModule>
</Directory>
<Directory /usr/share/phpMyAdmin/setup/>
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
# Require ip 127.0.0.1
Require ip 192.168.122.1
# Require ip 10.0.2.15
Require ip ::1
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
# Deny from All
# Allow from 127.0.0.1
Allow from 192.168.122.1
# Allow from 10.0.2.15
Allow from ::1
</IfModule>
</Directory>
# These directories do not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
#
<Directory /usr/share/phpMyAdmin/libraries/>
Order Deny,Allow
Deny from All
Allow from None
</Directory>
<Directory /usr/share/phpMyAdmin/setup/lib/>
Order Deny,Allow
Deny from All
Allow from None
</Directory>
<Directory /usr/share/phpMyAdmin/setup/frames/>
Order Deny,Allow
Deny from All
Allow from None
</Directory>
configuration on virtualbox:
network
attached to: NAT
adapter type: Intel PRO 1000/MT Desktop 82540EM
promiscuosous: deny
Mac Address: 0800270E9BD8
cable connected: checked
port forwarding configuration:
name:centos7
protocol:tcp
host ip: empty
host port:3022
guest ip: empty:
guest port:22
file-->preferences-->network
Tab NAT: NatNetwork
port forwarding configuration: empty
Tab Only Host: ip address 192.168.122.1