这是阿里云教学视频的一张ppt
来自 Clouder认证课程:网站建设——部署与发布
以下80%是记录如何失败的执行第一句???
ssh root@***.***.***.***
# yum -y install httpd
提示
The program 'yum' is currently not installed. You can install it by typing:
apt install yum
安装yum
# apt install yum
提示
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package yum
查找解决方法
https://blog.csdn.net/axela30w/article/details/78815491
输入
# sudo apt-get update
再次
# apt install yum
安装成功
再次
# yum -y install httpd
提示
There are no enabled repos.
Run "yum repolist all" to see the repos you have.
You can enable repos with yum-config-manager --enable
查找解决方法
需要按照repo
https://source.android.com/source/downloading.html
(转存 https://blog.csdn.net/weixin_42319408/article/details/94855779)
按照官网提示进行到
# repo init -u https://android.googlesource.com/platform/manifest
这一步时提示
gpg: keyring `/root/.repoconfig/gnupg/secring.gpg' created
gpg: keyring `/root/.repoconfig/gnupg/pubring.gpg' created
gpg: /root/.repoconfig/gnupg/trustdb.gpg: trustdb created
gpg: key 920F5C65: public key "Repo Maintainer " imported
gpg: key 692B382C: public key "Conley Owens " imported
gpg: Total number processed: 2
gpg: imported: 2 (RSA: 1)
fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
fatal: error [Errno 99] Cannot assign requested address
fatal: cloning the git-repo repository failed, will remove '.repo/repo'
未解决
再查到
https://www.cnblogs.com/dinphy/p/5669384.html
解决方法,先单独克隆repo,然后将git-repo里面的repo文件复制到bin目录,在同步源码的工作目录新建.repo文件夹,把git-repo重命名为repo复制到.repo目录下
git clone https://gerrit-googlesource.lug.ustc.edu.cn/git-repo
重新初始化:
repo init -u git://github.com/CyanogenMod/android.git -b cm-12.1
同步开始
repo sync -c -j8
目前已成功进行到同步步骤
repo sync -c -j8
卡住
...
* [new tag] cm-11.0-XNPH30O-bacon-4f280f505a -> cm-11.0-XNPH30O-bacon-4f280f505a
* [new tag] cm-11.0-XNPH33R-bacon-3628510d76 -> cm-11.0-XNPH33R-bacon-3628510d76
* [new tag] cm-11.0-XNPH44S-bacon-5fa8c79c0b -> cm-11.0-XNPH44S-bacon-5fa8c79c0b
error: Cannot fetch platform/external/apache-xml from https://android.googlesource.com/platform/external/apache-xml
error: Cannot fetch platform/external/droiddriver from https://android.googlesource.com/platform/external/droiddriver
fatal: unable to access 'https://android.googlesource.com/platform/external/javasqlite/': Failed to connect to android.googlesource.com port 443: Connection timed out
error: Cannot fetch platform/external/javasqlite from https://android.googlesource.com/platform/external/javasqlite
Receiving objects: 24% (4950/20173), 3.50 MiB | 11.00 KiB/s
百分比在15%~30%之间乱跳?
据说第一次同步要1~2小时,再等一会看看
…
第二天早晨
完蛋,中间断网了
…
把服务器重置了
…
连不上了
查看/Users/coconutnut/.ssh/known_hosts
把之前的密钥删了
重连成功
再来
~# sudo apt-get update
~# apt install yum
~# mkdir ~/bin
~# PATH=~/bin:$PATH
~# curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
~# chmod a+x ~/bin/repo
~# mkdir repo_directory
~# cd repo_directory
~/repo_directory# apt install git
~/repo_directory# git config --global user.name "Your Name"
~/repo_directory# git config --global user.email "[email protected]"
~/repo_directory# cd ..
~# git clone https://gerrit-googlesource.lug.ustc.edu.cn/git-repo
~# cp git-repo/repo bin
~# cd repo_directory/
~/repo_directory# mkdir .repo
~/repo_directory# cp -rf ~/git-repo .repo/repo
~/repo_directory# repo sync -c -j8
又到这里了,现在是下午2:56
…
3:48分
显示
...
* [new tag] cm-11.0-XNPH25R-bacon-d22b777afa -> cm-11.0-XNPH25R-bacon-d22b777afa
* [new tag] cm-11.0-XNPH30O-bacon-4f280f505a -> cm-11.0-XNPH30O-bacon-4f280f505a
* [new tag] cm-11.0-XNPH33R-bacon-3628510d76 -> cm-11.0-XNPH33R-bacon-3628510d76
* [new tag] cm-11.0-XNPH44S-bacon-5fa8c79c0b -> cm-11.0-XNPH44S-bacon-5fa8c79c0b
error: Exited sync due to fetch errors
???
好气
再次执行
repo init
显示
error: Cannot fetch platform/external/droiddriver from https://android.googlesource.com/platform/external/droiddriver
error: Cannot fetch platform/prebuilts/eclipse from https://android.googlesource.com/platform/prebuilts/eclipse
error: Cannot fetch platform/prebuilts/sdk from https://android.googlesource.com/platform/prebuilts/sdk
error: Exited sync due to fetch errors
…
让我缓缓
…
再见