页面“Unlock Bootloader, Install LineageOS ,TWRP and Root Essential PH-1”与“Gitlab社区版安装和配置”之间的差异

来自linux中国网wiki
(页面间的差异)
跳到导航 跳到搜索
 
 
第1行: 第1行:
=问题=
 
PH1现在没有root的吧 
 
  
换机 转资料 用这个 换机助手 https://huanji.qq.com/index.html
+
== pre ==
  
http://huanji.360.cn/
+
gitlab社区版安装和配置
  
=站内资源=
+
os: centos6.X
[[Android刷机Nexus5刷机]]
 
  
=Fastboot mode=
+
==第零 docker-compose for gitlab  ==
Put your Essential Phone into fastboot mode by doing either of the following:
+
<pre>
  
• Use the ADB tool packaged above to run the command:
 
  adb reboot bootloader
 
Reboot your phone while holding the Volume-down button
 
  
=Enable unlocking and Unlock your bootloader =
+
2020 直接 docker-compose 其实可以上 alpine的
==Enable unlocking ==
 
Find the option: OEM Unlocking and turn it on
 
  
 +
cat docker-compose.yml
  
== Unlock your bootloader ==
 
Run the command:
 
adb reboot bootloader
 
fastboot flashing unlock
 
• Press the Volume-down button to navigate to the YES option, then press the Power button to confirm
 
  
 +
web:
 +
  image: 'gitlab/gitlab-ce:11.4.3'
 +
  #image: 'gitlab/gitlab-ce:latest' 
 +
  restart: always
 +
  hostname: 'mygitlab'
 +
  environment:
 +
    GITLAB_OMNIBUS_CONFIG: |
 +
      external_url 'http://gitlab.lliao.net'
 +
      #external_url 'https://mygitlab.com'
 +
      # Add any other gitlab.rb configuration here, each on its own line
 +
  ports:
 +
    - '7080:80'
 +
    - '4433:443'
 +
    - '2222:22'
 +
  volumes:
 +
    - ./gitlab/config:/etc/gitlab
 +
    - ./gitlab/logs:/var/log/gitlab
 +
    - ./gitlab/data:/var/opt/gitlab
  
=Flash the TWRP into  essential =
 
  
[https://doc-00-9s-docs.googleusercontent.com/docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/ctk8lmbjhebr5f987q4us4gv5m56i9lf/1517472000000/14260627717518624942/*/1BU5splgIxsqYtki4t3zG297ZGxZDizsS?e=download  NMI81C-TWRP.img下载]
 
  
[https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445 magisk下载]
 
  
<pre>
 
adb reboot bootloader
 
或者手工进入
 
  
输入以下指令
 
fastboot devices -l
 
若出来一串序列号,说明安卓设备已连接
 
  
刷入TWRP
 
  
成功
+
#这个手工的 线上一般不用了 以前学习用的
fastboot flash boot  NMI81C-TWRP.img
 
  
失败 老的用法
+
获取 GitLab 镜像
fastboot flash recovery twrp-mata_2.im
+
docker search gitlab
  
Installing  Magisk from recovery
+
docker pull gitlab/gitlab-ce:latest
Wipe the device
 
In the TWRP Home menu, select Wipe > Advanced Wipe. Select Dalvik / ART Cache, System, Data, and Cache. Do not select the Internal Storage otherwise you will lose the data. Then Swipe to Wipe.
 
有一次wifi打不开居然是这个原因
 
  
 +
查看本地镜像
 +
docker images
  
可能要用的命令
+
创建目录
adb shell twrp sideload
 
adb sideload Magisk-v15.3.zip
 
 
</pre>
 
  
=essential Install LineageOS =
+
mkdir -p /data/gitlab/{config,data,logs}
最好是卡刷 在第一次之后不用电脑了 不过用官方的 recovery 就行了  fastboot 没成功呢
 
  
==download package==
+
创建并运行容器
=== LineageOS installation package  ===
 
https://download.lineageos.org/mata
 
选择 Recovery image lineage-17.1-20201116-recovery-mata.img
 
  
=== Google Apps (use the arm64 architecture)===
+
docker run --detach \
https://wiki.lineageos.org/gapps.html  -->https://wiki.lineageos.org/gapps.html  -->platform: ARM64  android:10  Variant:stock
+
      --hostname git.evan.com \
 +
      --publish 443:443 \
 +
      --publish 80:80 \
 +
      --publish 222:22 \
 +
      --name gitlabce\
 +
      --restart always \
 +
      --volume /data/gitlab/config:/etc/gitlab \
 +
      --volume /data/gitlab/logs:/var/log/gitlab \
 +
      --volume /data/gitlab/data:/var/opt/gitlab \
 +
      gitlab/gitlab-ce:latest
  
  
 +
查看运行状态
  
 +
docker ps
 +
netstat -ntulap | grep docker
 +
访问 GitLab
  
 +
启动
 +
docker start gitlabce
  
 +
docker stop gitlabce
  
==操作 ==
+
http://git.evan.com/
===Basic requirements===
 
has adb and fastboot ;Enable USB debugging
 
  
===Unlocking the bootloader===
+
如果没有域名,直接使用 IP 访问即可。
 +
初始账户
  
===Installing LineageOS from recovery===
+
用户: root
====If you are not in recovery, reboot into recovery:====
+
密码: 5iveL!fe 现在一般要自己配置密码的了
    With the device powered off, hold Volume Up + Power.
 
====Factory Reset ====
 
Now tap Factory Reset, then Format data / factory reset and continue with the formatting process. This will remove encryption and delete all files stored in the internal storage, as well as format your cache partition (if you have one).
 
Return to the main menu.
 
中文意思就是选择 Factory Reset 再选择 Format data 下的 factory 出产重置 ,最后再返回主菜单
 
====Sideload the LineageOS .zip package:====
 
<pre>
 
    On the device, select “Apply Update”, then “Apply from ADB” to begin sideload.
 
    On the host machine, sideload the package using: adb sideload filename.zip
 
  
我在power shell执行的如下 时间 09:53- 09:55  47%  有No error
 
PS G:\>  adb sideload  .\open_gapps-arm64-10.0-stock-20201118.zip
 
opening '.\open_gapps-arm64-10.0-stock-20201118.zip'...
 
connecting...
 
 
</pre>
 
</pre>
==== 安装谷歌框架 opengapps ====
 
<pre>
 
(Optionally): If you want to install any additional add-ons, click Advanced, then Reboot to Recovery, then when your device reboots, click Apply Update, then Apply from ADB, then adb sideload filename.zip those packages in sequence.
 
info_outline
 
Note: Additional add-ons aren’t signed with LineageOS’s official key, and therefore when they are sideloaded, Lineage Recovery will present a screen that says Signature verification failed, this is expected, please click Continue.
 
info_outline
 
Note: If you want Google Apps on your device, you must follow this step before booting into LineageOS for the first time!
 
  
我的命令  注意 中间可能提示有错什么的 按yes    时间 09:56-10:04
+
[https://docs.gitlab.com/ee/install/docker.html Install GitLab with Docker]
PS G:\>  adb sideload  .\open_gapps-arm64-10.0-stock-20201118.zip
 
opening '.\open_gapps-arm64-10.0-stock-20201118.zip'...
 
connecting...
 
serving: '.\open_gapps-arm64-10.0-stock-20201118.zip' (~47%)    * failed to read command: No error
 
PS G:\>
 
  
 +
==gitlab搭配ssh默认端口引发的问题  ==
 +
<pre>
 +
明明 docker-compose.yml  用 了222端口但还是有问题
  
#注意  这里有时可能要 Factory Reset一下才能进入系统
 
Once you have installed everything successfully, click the back arrow in the top left of the screen, then “Reboot system now”.
 
</pre>
 
  
==lineageos see also==
 
  
这个是官方文档了 看它就对了
+
修改sshd_config中的Port
https://wiki.lineageos.org/devices/mata/install
 
  
https://lineageosroms.com/ph-1-mata/
+
service sshd restart
  
https://wiki.lineageos.org/devices/#essential
+
#第一步的我没改哦 好像可以不动
 +
修改/etc/gitlab/gitlab.rb [再次声明,gitlab.yml中的配置会被这个给覆盖]
  
https://download.lineageos.org/mata
+
启用下面这行,并把端口改为自己服务器的sshd端口
  
[https://club.lenovo.com.cn/thread-4406439-1-1.html  [教程<nowiki>]</nowiki> 到底该刷哪个opengapps!安装谷歌框架的正确指引 ]
+
gitlab_rails['gitlab_shell_ssh_port'] = 50022
  
[https://marasati.com/2019/06/10/gapps.html The Open GApps 各版本详细介绍]
+
使之生效,大功告其!
  
[https://www.iapps.me/archives/33 看完这篇文章,小白也能快速安装谷歌服务框架(GApps)!]
+
gitlab-ctl reconfigure
 
+
</pre>
[https://www.lineageos.org.cn/thread-207-1-1.html  打印 上一主题 下一主题 [教程<nowiki>]</nowiki> lineage os 刷机及软件安装小白攻略]
 
  
<pre>
 
  
  
屏没反应 刷新没成功 线刷,后面用 recovery 成功 不是屏问题,机器开机屏不能操作 那可以进入 fastboot的
+
== 第一种 Install and configure the necessary dependencies ==
 +
<pre>进入gitlab官方网站,选择对应的操作系统——CentOS 6 (and RedHat/Oracle/Scientific Linux 6),
 +
https://about.gitlab.com/downloads/#centos6
  
fastboot flash boot <recovery_filename>.img
+
按照官方的提示进行安装:
win下报错 
+
安装配置必要的依赖
sending 'boot' (25737 KB)...
+
在Centos 6 和 7 中,以下的命令将会打开HTTP和SSH在系统防火墙中的可访问权限。
FAILED (remote: Requested download size is more than max allowed
 
  
重启 adb reboot (-n)
+
#sudo lokkit -s http -s ssh
  
关机 adb shell reboot -p
 
</pre>
 
https://wiki.lineageos.org/devices/mata/install
 
  
==android10 放弃 后面不更新了==
 
<pre>
 
Pixel (128 GB, Quite Black)
 
$649.00
 
Qty: 1
 
Serial: 35268908313212
 
  
16 english
 
  
  
先 邻居借线吧 
+
[gitlab-ce]
 +
name=gitlab-ce
 +
baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6
 +
repo_gpgcheck=0
 +
gpgcheck=0
 +
enabled=1
 +
gpgkey=https://packages.gitlab.com/gpg.key
  
然后先备份
 
  
February 2020 Security Update
+
sudo yum makecache
[https://storage.googleapis.com/essential-static/PH1-OTA-QQ1A.200105.032.zip OTA Package: PH1-OTA-QQ1A.200105.032.zip]
 
[https://storage.googleapis.com/essential-static/PH1-Images-QQ1A.200105.032.zip Factory Image: PH1-Images-QQ1A.200105.032.zip]
 
  
Method 1: Sideload Android 10 OTA using Stock Recovery
+
# 安装依赖包
 +
sudo yum install curl openssh-server openssh-clients postfix cronie
 +
# 启动 postfix 邮件服务
 +
sudo service postfix start
 +
# 检查 postfix
 +
sudo chkconfig postfix on
 +
# 安装 GitLab 社区版
 +
sudo yum install gitlab-ce
 +
# 初始化 GitLab 配置并启动GitLab
 +
打开/etc/gitlab/gitlab.rb,将external_url = ‘http://git.example.com’修改为自己的IP地址:http://xxx.xx.xxx.xx,,然后执行下面的命令,对GitLab进行编译。
  
  
  
Method 2: Flash Android 10 Factory Image using Fastboot
 
  
Important Note: This method will wipe all the data stored on your phone, including the internal storage. So, make sure that you take a full backup first!
 
  
 +
sudo gitlab-ctl reconfigure
 +
一直都有更新的。
  
首先 手机备份相关信息
 
  
  
解决安卓 linux adb 连接机器提示 no permissions 的问题
+
sudo gitlab-ctl reconfigure
问题描述
+
登录GitLab
 +
Username: root
 +
Password: 5iveL!fe
  
adb devices
 
no permission (user xxx is not in the plugdev group); see [http://developer.android.com/tools/device.html]
 
复制代码
 
  
解决方案
 
  
    使用下列方式启动 adb
 
  
    adb kill-server #我用了这个就好了
 
    cd the-path-your-sdk-adb
 
    sudo ./adb kill-server
 
    sudo ./adb kill-server
 
  
 +
我在ubuntu下的一键安装,如果用汉化版的有问题的。
 +
所以现在只能用英文原版的。
  
adb进入recovery 以及fastboot模式
 
  
开机状态下:
+
现在会要求改密码了 在第一次
  
adb reboot fastboot  命令进入fastboot模式
+
dkm12345678
  
adb reboot recovery 命令行进recovery模式
 
  
power + 音量下 recovery 模式
 
  
 +
git_data_dirs({"default" => "/data/gitlab/git-data"})
 +
/data/gitlab/git-data
  
关机状态下:
+
gitlab-ctl reconfigure </pre>
power + 音量下 recovery 模式
 
power + 音量上 fastboot 模式
 
recovery 模式下可以选择进入fastboot 模式
 
  
root@latop:~# adb reboot recovery
+
&nbsp;
root@latop:~# adb devices
 
List of devices attached
 
PM1LHMA792000781 recovery
 
  
root@latop:~# cd /home/evan/iso/
+
== 第二种 Add the GitLab package server and install the package ==
 +
<pre>curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
 +
sudo yum install gitlab-ce </pre>
  
adb sideload  PH1-OTA-QQ1A.200105.032.zip
+
&nbsp;
  
默认位置可能是/目录,我们需要找到内置存储/sdcard/的位置。
+
&nbsp;
(UP A Level)为返回上级目录功能
 
  
</pre>
 
  
 +
[https://cloud.tencent.com/developer/article/1114666 【gitlab小症状】gitlab搭配ssh默认端口引发的血战]
  
https://www.thecustomdroid.com/download-install-essential-phone-android-10-q-update/
+
[https://blog.csdn.net/ming19951224/article/details/105479033  docker安装gitlab并使用非标准端口]
  
February 2020 Security Update
+
==gitlab性能优化调化  占用内存过大问题==
[https://storage.googleapis.com/essential-static/PH1-OTA-QQ1A.200105.032.zip OTA Package: PH1-OTA-QQ1A.200105.032.zip]
+
<pre>
[https://storage.googleapis.com/essential-static/PH1-Images-QQ1A.200105.032.zip Factory Image: PH1-Images-QQ1A.200105.032.zip]
 
  
Method 1: Sideload Android 10 OTA using Stock Recovery
+
/etc/gitlab/gitlab.rb
  
 +
#进程数目
 +
unicorn['worker_processes'] = 2
  
 +
#减少数据库缓存 默认为  256M
 +
postgresql['shared_buffers'] = "128MB"
  
Method 2: Flash Android 10 Factory Image using Fastboot
 
  
Important Note: This method will wipe all the data stored on your phone, including the internal storage. So, make sure that you take a full backup first!
+
#减少并发数 默认为8
 +
postgresql['max_worker_processes'] = 4
  
  
首先 手机备份相关信息
 
  
=进阶=
+
#减少 sidekiq并发数
[https://www.cnblogs.com/luoyesiqiu/p/10701419.html  自己动手编译Android(LineageOS)源码 ]
+
sidekiq['concurrency'] = 20
  
[https://blog.phpgao.com/adb.html adb,fastboot常用命令及刷机技巧]
 
  
[https://www.cnblogs.com/xuan52rock/p/11544142.html 【转】使用fastboot命令刷机流程详解 ]
+
#最后 reload
 +
gitlab-ctl reconfigure
  
[https://www.jianshu.com/p/2be6f943e519 fastboot flash错误及解决办法汇总]
+
</pre>
 +
[https://www.dgstack.cn/archives/1951.html gitlab占用内存过大问题]
  
=参考 =
+
[https://www.cnblogs.com/h--d/p/10153647.html GitLab配置优化及汉化]
  
Recovery  TWRP 相关知识补充
 
  
[https://www.moonlol.com/twrp-recovery%E5%8D%A1%E5%88%B7rom-5967.html  手機或平板TWRP卡刷ROM教學 ]
+
== 报错 ==
 +
<pre>================================================================================
 +
Recipe Compile Error in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb
 +
================================================================================
  
[https://www.kocpc.com.tw/archives/233419 TWRP备份还原]
+
RuntimeError
 +
------------
 +
GitLab external URL must include a schema and FQDN, e.g. http://gitlab.example.com/
  
[https://news.mydrivers.com/1/542/542943.htm 安卓Recovery你知多少?不懂别说是刷机高手]
+
记得前缀有http样
  
[https://www.cnblogs.com/godfeer/p/12029476.html  【TWRP】使用adb sideload线刷ROM的方法 ]
+
</pre>
  
 +
[https://mirror.tuna.tsinghua.edu.cn/help/gitlab-ce/ https://mirror.tuna.tsinghua.edu.cn/help/gitlab-ce/]
  
[https://www.cnblogs.com/yanglang/p/10227069.html 使用电脑adb给Essential Phone刷机 —(官方篇)]
+
[https://www.linuxchina.net/?p=2750 https://www.linuxchina.net/?p=2750]
  
[https://www.xda-developers.com/how-to-root-essential-phone-ph-1/ How to Root the Essential Phone (PH-1) using Magisk]
+
&nbsp;
  
https://www.essential.com/developer/current-builds
+
=see also=
 +
[https://docs.gitlab.com/omnibus/docker/ GitLab Docker images]
  
[http://wiki.linuxchina.net/index.php?title=Nexus5%E5%88%B7%E6%9C%BA Nexus5刷机]
+
[https://my.oschina.net/u/1432614/blog/658568 在 CentOS 7 上使用 Docker 部署安装 GitLab]
  
[http://www.droidviews.com/unlock-bootloader-install-twrp-root-essential-ph-1/ Unlock Bootloader, Install TWRP and Root Essential PH-1]
+
[https://github.com/beginor/docker-gitlab-ce GitLab 中文社区版 Docker 镜像]
  
[https://zhuanlan.zhihu.com/p/55950119 关于Essential Phone 获取root]
+
[https://gist.github.com/ouyangzhiping/47fcbf26d213146407f2 ouyangzhiping/docker-gitlab.md]
  
[https://zhuanlan.zhihu.com/p/58507641 关于Essential Phone 获取Root权限及Magisk的安装教程(2019/6/14)]
+
[https://www.cnblogs.com/weifeng1463/p/7714492.html GitLab的安装及使用教程]
  
[[category:Desktop]]
+
[[Category:git]] [[Category:ops]]

2020年11月23日 (一) 03:36的版本

pre

gitlab社区版安装和配置

os: centos6.X

第零 docker-compose for gitlab  



2020 直接 docker-compose 其实可以上 alpine的 

cat docker-compose.yml


web:
  image: 'gitlab/gitlab-ce:11.4.3'
  #image: 'gitlab/gitlab-ce:latest'  
  restart: always
  hostname: 'mygitlab'
  environment:
    GITLAB_OMNIBUS_CONFIG: |
      external_url 'http://gitlab.lliao.net'
      #external_url 'https://mygitlab.com'
      # Add any other gitlab.rb configuration here, each on its own line
  ports:
    - '7080:80'
    - '4433:443'
    - '2222:22'
  volumes:
    - ./gitlab/config:/etc/gitlab
    - ./gitlab/logs:/var/log/gitlab
    - ./gitlab/data:/var/opt/gitlab







#这个手工的 线上一般不用了 以前学习用的

获取 GitLab 镜像
docker search gitlab

docker pull gitlab/gitlab-ce:latest

查看本地镜像
docker images

创建目录

mkdir -p /data/gitlab/{config,data,logs}

创建并运行容器

docker run --detach \
       --hostname git.evan.com \
       --publish 443:443 \
       --publish 80:80 \
       --publish 222:22 \
       --name gitlabce\
       --restart always \
       --volume /data/gitlab/config:/etc/gitlab \
       --volume /data/gitlab/logs:/var/log/gitlab \
       --volume /data/gitlab/data:/var/opt/gitlab \
       gitlab/gitlab-ce:latest


查看运行状态

docker ps
netstat -ntulap | grep docker
访问 GitLab

启动
docker start gitlabce

docker stop gitlabce

http://git.evan.com/

如果没有域名,直接使用 IP 访问即可。
初始账户

用户: root
密码: 5iveL!fe  现在一般要自己配置密码的了 

Install GitLab with Docker

gitlab搭配ssh默认端口引发的问题

明明 docker-compose.yml  用 了222端口但还是有问题 



修改sshd_config中的Port

service sshd restart

#第一步的我没改哦 好像可以不动 
修改/etc/gitlab/gitlab.rb [再次声明,gitlab.yml中的配置会被这个给覆盖]

启用下面这行,并把端口改为自己服务器的sshd端口

gitlab_rails['gitlab_shell_ssh_port'] = 50022

使之生效,大功告其!

gitlab-ctl reconfigure


第一种 Install and configure the necessary dependencies

进入gitlab官方网站,选择对应的操作系统——CentOS 6 (and RedHat/Oracle/Scientific Linux 6),
https://about.gitlab.com/downloads/#centos6

按照官方的提示进行安装:
安装配置必要的依赖
在Centos 6 和 7 中,以下的命令将会打开HTTP和SSH在系统防火墙中的可访问权限。

#sudo lokkit -s http -s ssh





[gitlab-ce]
name=gitlab-ce
baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6
repo_gpgcheck=0
gpgcheck=0
enabled=1
gpgkey=https://packages.gitlab.com/gpg.key


sudo yum makecache

# 安装依赖包
sudo yum install curl openssh-server openssh-clients postfix cronie
# 启动 postfix 邮件服务
sudo service postfix start
# 检查 postfix
sudo chkconfig postfix on
# 安装 GitLab 社区版
sudo yum install gitlab-ce
# 初始化 GitLab 配置并启动GitLab
打开/etc/gitlab/gitlab.rb,将external_url = ‘http://git.example.com’修改为自己的IP地址:http://xxx.xx.xxx.xx,,然后执行下面的命令,对GitLab进行编译。





sudo gitlab-ctl reconfigure
一直都有更新的。



sudo gitlab-ctl reconfigure
登录GitLab
Username: root
Password: 5iveL!fe





我在ubuntu下的一键安装,如果用汉化版的有问题的。
所以现在只能用英文原版的。


现在会要求改密码了 在第一次 

dkm12345678



git_data_dirs({"default" => "/data/gitlab/git-data"})
/data/gitlab/git-data

gitlab-ctl reconfigure 

 

第二种 Add the GitLab package server and install the package

curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
sudo yum install gitlab-ce 

 

 


【gitlab小症状】gitlab搭配ssh默认端口引发的血战

docker安装gitlab并使用非标准端口

gitlab性能优化调化 占用内存过大问题


/etc/gitlab/gitlab.rb

#进程数目 
 unicorn['worker_processes'] = 2

#减少数据库缓存 默认为  256M
postgresql['shared_buffers'] = "128MB"


#减少并发数 默认为8
postgresql['max_worker_processes'] = 4



#减少 sidekiq并发数 
sidekiq['concurrency'] = 20


#最后  reload 
gitlab-ctl reconfigure

gitlab占用内存过大问题

GitLab配置优化及汉化


报错

================================================================================
Recipe Compile Error in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb
================================================================================

RuntimeError
------------
GitLab external URL must include a schema and FQDN, e.g. http://gitlab.example.com/

记得前缀有http样

https://mirror.tuna.tsinghua.edu.cn/help/gitlab-ce/

https://www.linuxchina.net/?p=2750

 

see also

GitLab Docker images

在 CentOS 7 上使用 Docker 部署安装 GitLab

GitLab 中文社区版 Docker 镜像

ouyangzhiping/docker-gitlab.md

GitLab的安装及使用教程