ali-tencent notes

本文涉及的产品
容器镜像服务 ACR,镜像仓库100个 不限时长
简介: tips

all can root/sudo

sudo su
passwd to set pw=1

sshd

  • add ports in /etc/ssh/sshd_config:
    ListenAddress 0.0.0.0:22
    ListenAddress 0.0.0.0:5022
    then service sshd restart (won't break connected ssh).

  • if "key exchange algorithm" not found:
    append "diffie-hellman-group1-sha1" to "KexAlgorithms" in /etc/ssh/sshd_config

vnc for X

vnc4server(by realvnc) --> tightvnc -2009->tigervnc
tigervnc allow 1 char password.

ip, ports, connections

curl cip.cc
netstat -atpn
nmap IP -Pn -pNNN or telnet IP NNN

PS1

item format \e[XXXm, with XXX=0 to clear format.
PS1='\e[1;33m\W \e[31m\# \e[0m'
ref https://misc.flogisoft.com/bash/tip_colors_and_formatting
from https://wiki.archlinux.org/title/Bash/Prompt_customization

repo for centos:

  • base repo, may use vault
    https://mirrors.cloud.tencent.com/help/centos.html
    https://developer.aliyun.com/mirror/centos

  • epel repo
    https://mirrors.cloud.tencent.com/help/epel.html
    https://developer.aliyun.com/mirror/epel

  • forge repo, ~5k pkgs for centos6
    https://mirrors.cloud.tencent.com/help/repoforge.html
    https://developer.aliyun.com/mirror/repoforge
    releasever=$(rpm -E %centos)
    basearch=$(rpm -E %_arch)
    then copy-paste "cat > .repo" code,
    ali: sed -i s:el7:el$releasever:g /etc/yum.repos.d/rpmforge.repo

  • fusion repo, ~300 pkgs for centos6
    here yum may create two files: epel.repo.rpmnew, epel-testing.repo
    yum install --nogpgcheck http://mirrors.tencentyun.com/rpmfusion/free/el/rpmfusion-free-release-$(rpm -E %centos).noarch.rpm http://mirrors.tencentyun.com/rpmfusion/nonfree/el/rpmfusion-nonfree-release-$(rpm -E %centos).noarch.rpm
    sed -i s#download1.rpmfusion.org#mirrors.tencentyun.com/rpmfusion#g /etc/yum.repos.d/rpmfusion-*.repo
    yum install --nogpgcheck http://mirrors.cloud.aliyuncs.com/rpmfusion/free/el/rpmfusion-free-release-$(rpm -E %centos).noarch.rpm http://mirrors.cloud.aliyuncs.com/rpmfusion/nonfree/el/rpmfusion-nonfree-release-$(rpm -E %centos).noarch.rpm
    sed -i s#download1.rpmfusion.org#mirrors.cloud.aliyuncs.com/rpmfusion#g /etc/yum.repos.d/rpmfusion-*.repo

  • sum for following
    sed -i '/^\W*http/d; /^\W*mirrorlist/d; s/^\W*#\W*baseurl/baseurl/; s/https/http/g;' /etc/yum.repos.d/*.repo
    this cmd can run multiple times without repeated replace.

    • remove alt baseurl
      sed -i '/^\W*http/d' /etc/yum.repos.d/*.repo
    • remove mirrorlist, use baseurl
      sed -i '/^\W*mirrorlist/d' /etc/yum.repos.d/*.repo
      sed -i 's/^\W*#\W*baseurl/baseurl/' /etc/yum.repos.d/*.repo
    • https -> http
      sed -i s/https/http/g /etc/yum.repos.d/*.repo
  • use private network:
    mirrors.tencentyun.com
    mirrors.cloud.aliyuncs.com
    sed -i 's/cloud\.tencent/tencentyun/g' /etc/yum.repos.d/*.repo
    sed -i 's/aliyun\./cloud.aliyuncs./g' /etc/yum.repos.d/*.repo
    this cmd can run multiple times without repeated replace.

infoage
+关注
目录
打赏
0
1
1
1
5
分享
相关文章
Obtain the data code of Taobao JD1688alibaba lazada shop product details page
1、 Data types of e-commerce APIs The types of data provided by e-commerce APIs are diverse and can generally be divided into the following categories: Product data: Product ID, Product Name, Product Price, Inventory, etc. Transaction data: order number, payment time, recipient, etc. Store data
Obtain the data code of Taobao JD1688alibaba lazada shop product details page
you must have accepted the latest version of the IOS Developer Program Agreement
you must have accepted the latest version of the IOS Developer Program Agreement
96 0
you must have accepted the latest version of the IOS Developer Program Agreement
Tencent Cloud Code Analysis介绍及安装部署
Tencent Cloud Code Analysis介绍及安装部署
1145 0
Tencent Cloud Code Analysis介绍及安装部署
License for package Android SDK Build-Tools 28.0.3 not accepted.
License for package Android SDK Build-Tools 28.0.3 not accepted.
359 0
License for package Android SDK Build-Tools 28.0.3 not accepted.
【错误记录】发布 Flutter 插件包报错 ( ‘gmail.com‘ has insufficient permissions to upload new versions of package)
【错误记录】发布 Flutter 插件包报错 ( ‘gmail.com‘ has insufficient permissions to upload new versions of package)
291 0
【错误记录】发布 Flutter 插件包报错 ( ‘gmail.com‘ has insufficient permissions to upload new versions of package)
Global Platform Tech Studio v1.2
GPTS是针对GlobalPlatform智能IC卡的安全域、安全通道、内容、密钥的可视化管理及通用脚本化、命令化处理的工具平台; 脚本语言选择ECMAScript [ECMA_262]标准即Javascript,参考《GlobalPlatform Systems Profile and Scripting Specifications v1.1》规范;
Global Platform Tech Studio v1.2
常见ALI报错系列
排查思路   商户客户端唤起支付宝app后,支付宝app中弹窗提示的各种报错,可以根据下面的思路去分析和排查。出现此类异常时,    系统交互如下:    注意红色字体部分信息交互,此时商户客户端会收到详细错误信息,包含具体错误码以及错误描述(注意:支付宝app弹窗提示中的错误文案,为用户视角所看到的错误信息,不可用于开发者视角用于排查问题的依据)。
1885 12
JetBrains Product Pack for Students
JetBrains公司为宣传自己的产品,为教育机构提供了免费使用的权利,不管是学生还是老师,只要用学校提供的邮箱创建用户并认证,就可以免费使用它旗下的一整套开发工具了,不管是java,go,python,c++,还是前端等等,就有尽有,感觉非常的奶思。
1640 0
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等