基于Debian操作系统安装OMV
cat <<EOF >> /etc/apt/sources.list.d/openmediavault.listdeb http://packages.openmediavault.org/public arrakis main# deb http://downloads.sourceforge.net/project/openmediavault/packages arrakis main## Uncomment the following line to add software from the proposed repository.# deb http://packages.openmediavault.org/public arrakis-proposed main# deb http://downloads.sourceforge.net/project/openmediavault/packages arrakis-proposed main## This software is not part of OpenMediaVault, but is offered by third-party## developers as a service to OpenMediaVault users.# deb http://packages.openmediavault.org/public arrakis partner# deb http://downloads.sourceforge.net/project/openmediavault/packages arrakis partnerEOF
安装OMV4-参考
export LANG=Cexport DEBIAN_FRONTEND=noninteractiveexport APT_LISTCHANGES_FRONTEND=noneapt-get updateapt-get --allow-unauthenticated install openmediavault-keyringapt-get updateapt-get --yes --auto-remove --show-upgraded \ --allow-downgrades --allow-change-held-packages \ --no-install-recommends \ --option Dpkg::Options::="--force-confdef" \ --option DPkg::Options::="--force-confold" \ install postfix openmediavault# Initialize the system and database.omv-initsystem
安装OMV4-plugin-参考
wget http://omv-extras.org/openmediavault-omvextrasorg_latest_all4.debdpkg -i openmediavault-omvextrasorg_latest_all4.deb apt-get -f inallapt-get -f installapt update
基于OMV安装Virtual Box
安装linux-headers-4.9.0-8-amd64(uname -r查看4.9.0.8)
apt-get install linux-headers-4.9.0-8-amd64
在OMV插件中搜索Virtual Box并安装
基于OMV安装Docker
在OMV插件中搜索Docker并安装
基于FRP实现内网穿透-参考
云主机安装FRP服务器端
云主机可以是阿里云、腾讯云和京东云等。主要需要一个公网IP
wget https://github.com/fatedier/frp/releases/download/v0.20.0/frp_0.20.0_linux_amd64.tar.gztar -zxvf frp_0.20.0_linux_amd64.tar.gzrm -f frpcrm -f frpc.ini
修改云主机FRP服务端配置frps.ini
[common]bind_addr = 0.0.0.0bind_port = 7000vhost_http_port = 80vhost_https_port = 443dashboard_user = admindashboard_pwd = admindashboard_port = 7500auth_token = 123
运行FRP服务端
./frps -c frps.ini
内网NAS安装FRP客户端
wget https://github.com/fatedier/frp/releases/download/v0.20.0/frp_0.20.0_linux_amd64.tar.gztar -zxvf frp_0.20.0_linux_amd64.tar.gzrm -f frpsrm -f frps.ini
修改内网NAS主机FRP客户端配置frpc.ini
[common]server_addr = 云主机公网IPserver_port = 7000auth_token = 123[ssh]type = tcplocal_ip = 127.0.0.1local_port = 22remote_port = 6000[nas-admin]type = httplocal_ip = 内网NAS主机IPlocal_port = 80custom_domains = 自定义域名(可以是花生壳的域名,需要将此域名关联到云主机的公网IP)[smb]type = tcplocal_ip = 内网NAS主机IPlocal_port = 445remote_port = 6001
运行FRP客户端
./frpc -c frpc.ini
FRP服务端docker镜像制作-参考
dockerfile
FROM ubuntuMAINTAINER sunyu <sunyu-1987@qq.com>ARG FRP_VERSION=0.20.0RUN apt update \ && apt install -y wgetWORKDIR /tmpRUN set -x \ && wget https://github.com/fatedier/frp/releases/download/v${FRP_VERSION}/frp_${FRP_VERSION}_linux_amd64.tar.gz \ && tar -zxf frp_${FRP_VERSION}_linux_amd64.tar.gz \ && mv frp_${FRP_VERSION}_linux_amd64 /var/frp \ && mkdir -p /var/frp/conf \ && apt remove -y wget \ && apt autoremove -y \ && rm -rf /var/lib/apt/lists/*COPY conf/frps.ini /var/frp/conf/frps.iniVOLUME /var/frp/confWORKDIR /var/frpENTRYPOINT ./frps -c ./conf/frps.ini
配置frps.ini
制作镜像
docker build -t frp-server .
启动FRP服务端
docker run -d --name frp-server --net=host frp-server
FRP客户端docker镜像制作
dockerfile
FROM ubuntuMAINTAINER sunyu <sunyu-1987@qq.com>ARG FRP_VERSION=0.20.0RUN apt update \ && apt install -y wgetWORKDIR /tmpRUN set -x \ && wget https://github.com/fatedier/frp/releases/download/v${FRP_VERSION}/frp_${FRP_VERSION}_linux_amd64.tar.gz \ && tar -zxf frp_${FRP_VERSION}_linux_amd64.tar.gz \ && mv frp_${FRP_VERSION}_linux_amd64 /var/frp \ && mkdir -p /var/frp/conf \ && apt remove -y wget \ && apt autoremove -y \ && rm -rf /var/lib/apt/lists/*COPY conf/frpc.ini /var/frp/conf/frpc.iniVOLUME /var/frp/confWORKDIR /var/frpENTRYPOINT ./frpc -c ./conf/frpc.ini
配置frpc.ini
制作镜像
docker build -t frp-client .
启动FRP服务端
docker run -d --name frp-client --net=host frp-client
作者:syhc006
链接:https://www.jianshu.com/p/cc90a0ed9a3a
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
评论列表