欢迎来到好人卡资源网,专注网络技术资源收集,我们不仅是网络资源的搬运工,也生产原创资源。寻找资源请留言

旧手机烂手机不要换锈钢脸盆,安装Linux Deploy做移动服务器

APP sky995 2年前 (2021-07-07) 408次浏览 0个评论

本文最后更新时间 2021-07-07 by sky995

OPPO R1C(R8205/电信4G)

精致钻石镜面,超轻薄机身成就超出期待的精致。闪拍、双重曝光、原画引擎,为拍照娱乐带来全新体验。配备顶级八核处理器,高性能,低功耗,快速流畅。

旧手机烂手机不要换锈钢脸盆,统统都可以换小鸡

旧手机烂手机不要换锈钢脸盆,安装Linux Deploy做移动服务器
点击下载软件包(免费)

Linux Deploy 安卓软件 安装步骤


  • 安装 0_虚拟返回键.apk 捡来的手机光感应返回键和Home键坏了,重置手机也没用,所以安装了虚拟返回键。
  • 安装 1_安卓360超级ROOT.apk 安卓系统要ROOT才能使用,所以推荐找个旧手机,先重置手机,格式化内置存储器
  • 安装 2_安装BusyBox 1.31.1.apk 安装Linux deploy之前得首先安装Busybox,它集成了Linux的很多命令。
  • 安装 3_安装Linux_Deploy适用安卓4.4.apk 捡来的手机安卓4.4,选了这个安装可以用
  • 配置 4_linux属性设置.png 首先点开左侧菜单,点击“配置文件”,默认 linux 。

然后点击“设置”,【锁定wifi】,【CPU唤醒】,【联网更新】勾上,【PATH变量】最重要,点击并填上/system/xbin,这样才能关联Busybox。然后点击下面的【更新环境】。

再点开右侧菜单,点【配置】,如图先属性设置,可以参考我的设置,还有勾选 SSH 远程控制
旧手机烂手机不要换锈钢脸盆,安装Linux Deploy做移动服务器
再点开右侧菜单 点【安装】, 按提示完成后点▲【启动】


电脑或者手机使用 SSH 客户端连到手机linux系统 ssh root@192.168.1.120

首先先安装必要软件

<code><span class="pln">apt update </span><span class="pun">-</span><span class="pln">y  </span><span class="pun">&&</span><span class="pln">  apt install wget curl vim  htop tmux fish</span></code>
  • 安装 5_SSH_Client.apk 在旧手机或者其他手机可以用来登陆管理 手机linux系统

旧手机烂手机不要换锈钢脸盆,安装Linux Deploy做移动服务器


顶级八核处理器,高性能,低功耗,快速流畅,还要什么甲骨文

<code><span class="pln">tmux </span><span class="pun">-</span><span class="pln">u  </span><span class="com"># 开启命令行多窗口和多程序管理</span><span class="pln">
htop     </span><span class="com"># 查看 CPU 和内存使用情况和系统状态</span>

<span class="com"># tmux 键盘操作: 先 Ctrl+B,释放后再  Shift+5,可以开启一个分窗口</span>
<span class="com"># ctrl+d  关闭子窗口; 先 Ctrl+B 释放后 方向键 ← 切换分窗口</span>
<span class="com"># 把tmux保持到后台不关闭  先 Ctrl+B 释放后按 d ; 下次恢复使用  tmux a</span><span class="pln">

df </span><span class="pun">-</span><span class="pln">h   </span><span class="com"># 查看系统磁盘使用情况</span>

<span class="com"># 这些基础命令,之后开启服务会用到</span></code>

旧手机烂手机不要换锈钢脸盆,安装Linux Deploy做移动服务器

安装 Nginx + php + mysql ,配置 WordPress 博客

<code><span class="com"># 安装 Nginx + php</span><span class="pln">
apt install nginx supervisor git
 
apt install php7</span><span class="pun">.</span><span class="lit">3</span><span class="pln"> php7</span><span class="pun">.</span><span class="lit">3</span><span class="pun">-</span><span class="pln">fpm php7</span><span class="pun">.</span><span class="lit">3</span><span class="pun">-</span><span class="pln">sqlite3 php7</span><span class="pun">.</span><span class="lit">3</span><span class="pun">-</span><span class="pln">xml php7</span><span class="pun">.</span><span class="lit">3</span><span class="pun">-</span><span class="pln">zip php7</span><span class="pun">.</span><span class="lit">3</span><span class="pun">-</span><span class="pln">pgsql php7</span><span class="pun">.</span><span class="lit">3</span><span class="pun">-</span><span class="pln">mbstring \
    php7</span><span class="pun">.</span><span class="lit">3</span><span class="pun">-</span><span class="pln">bcmath php7</span><span class="pun">.</span><span class="lit">3</span><span class="pun">-</span><span class="pln">json php7</span><span class="pun">.</span><span class="lit">3</span><span class="pun">-</span><span class="pln">mysql php7</span><span class="pun">.</span><span class="lit">3</span><span class="pun">-</span><span class="pln">gd php7</span><span class="pun">.</span><span class="lit">3</span><span class="pun">-</span><span class="pln">cli php7</span><span class="pun">.</span><span class="lit">3</span><span class="pun">-</span><span class="pln">curl php7</span><span class="pun">.</span><span class="lit">3</span><span class="pun">-</span><span class="pln">cgi 

</span><span class="com"># 下载 Nginx + php 配置文件和进行设置</span><span class="pln">
git clone https</span><span class="pun">:</span><span class="com">//github.com/hongwenjun/nginx-php.git</span><span class="pln">

cd nginx</span><span class="pun">-</span><span class="pln">php
cp </span><span class="pun">./</span><span class="kwd">default</span>  <span class="pun">/</span><span class="pln">etc</span><span class="pun">/</span><span class="pln">nginx</span><span class="pun">/</span><span class="pln">sites</span><span class="pun">-</span><span class="pln">enabled</span><span class="pun">/</span><span class="kwd">default</span><span class="pln">
cp </span><span class="pun">./</span><span class="pln">supervisord</span><span class="pun">.</span><span class="pln">conf   </span><span class="pun">/</span><span class="pln">etc</span><span class="pun">/</span><span class="pln">supervisord</span><span class="pun">.</span><span class="pln">conf

cp </span><span class="pun">./</span><span class="pln">start</span><span class="pun">.</span><span class="pln">sh  </span><span class="pun">/</span><span class="pln">start</span><span class="pun">.</span><span class="pln">sh
chmod </span><span class="pun">+</span><span class="pln">x  </span><span class="pun">/</span><span class="pln">start</span><span class="pun">.</span><span class="pln">sh

echo </span><span class="str">"<?php phpinfo(); ?>"</span>  <span class="pun">></span> <span class="str">/var/</span><span class="pln">www</span><span class="pun">/</span><span class="pln">html</span><span class="pun">/</span><span class="pln">index</span><span class="pun">.</span><span class="pln">php

</span><span class="com">#  设置完成 输入  /start.sh     开启服务</span></code>

请参考 Dockerfile 配置

<code><span class="com"># 安装 mysql (debian使用 mariadb-server,用起来一样)</span><span class="pln">

apt install mariadb</span><span class="pun">-</span><span class="pln">server

usermod </span><span class="pun">-</span><span class="pln">a </span><span class="pun">-</span><span class="pln">G aid_inet</span><span class="pun">,</span><span class="pln">aid_net_raw mysql

service mysql start

mysql </span><span class="pun">-</span><span class="pln">u root </span><span class="pun">-</span><span class="pln">p                  </span><span class="com"># 没有设置密码,不用密码  </span>
<span class="kwd">set</span><span class="pln"> password </span><span class="kwd">for</span><span class="pln"> root@localhost </span><span class="pun">=</span><span class="pln"> password</span><span class="pun">(</span><span class="str">'设置密码'</span><span class="pun">);</span><span class="pln">

CREATE DATABASE  wordpress</span><span class="pun">;</span>        <span class="com"># 创建一个叫wordpress的数据库,注意分号,语法,不然会出错</span><span class="pln">
USE wordpress</span><span class="pun">;</span>                     <span class="com"># 选中wordpress数据库</span><span class="pln">

service mysql restart</span></code>
<code><span class="com"># 安装配置 WordPress 博客</span><span class="pln">
cd </span><span class="pun">/</span><span class="kwd">var</span><span class="pun">/</span><span class="pln">www</span><span class="pun">/</span><span class="pln">html
curl https</span><span class="pun">:</span><span class="com">//cn.wordpress.org/latest-zh_CN.tar.gz | tar -zx</span><span class="pln">
chown </span><span class="pun">-</span><span class="pln">R www</span><span class="pun">-</span><span class="pln">data</span><span class="pun">:</span><span class="pln">www</span><span class="pun">-</span><span class="pln">data  wordpress</span></code>

旧手机烂手机不要换锈钢脸盆,安装Linux Deploy做移动服务器


好人卡资源网 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:旧手机烂手机不要换锈钢脸盆,安装Linux Deploy做移动服务器
喜欢 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址