阿里云服务器使用记录1 根据官网视频安装httpd的悲惨经历

这是阿里云教学视频的一张ppt
来自 Clouder认证课程:网站建设——部署与发布
以下80%是记录如何失败的执行第一句???


  1. 远程连接
 ssh root@***.***.***.***

  1. 安装httpd
# 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>

查找解决方法
需要按照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 <repo@android.kernel.org>" imported
gpg: key 692B382C: public key "Conley Owens <cco3@android.com>" 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 "you@example.com"
~/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


让我缓缓

再见

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值