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.

目录
相关文章
|
3月前
|
Java Spring
【Azure Developer】Springboot 集成 中国区的Key Vault 报错 AADSTS90002: Tenant 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' not found
【Azure Developer】Springboot 集成 中国区的Key Vault 报错 AADSTS90002: Tenant 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' not found
|
3月前
|
API 开发工具 Python
【Azure Developer】使用 Azure Python SDK时,遇见 The resource principal named https://management.azure.com was not found in the tenant China Azure问题的解决办法
【Azure Developer】使用 Azure Python SDK时,遇见 The resource principal named https://management.azure.com was not found in the tenant China Azure问题的解决办法
|
6月前
|
Linux Shell 网络安全
|
6月前
|
网络协议 关系型数据库 MySQL
Open Source Instant Messaging (IM) Project OpenIM Source Code
Open Source Instant Messaging (IM) Project OpenIM Source Code
91 0
|
开发者
上传苹果版本时错误解决办法:No suitable application records were found. Verify your bundle identifier
上传苹果版本时错误解决办法:No suitable application records were found. Verify your bundle identifier
112 2
|
内存技术
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
|
iOS开发
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
73 0
you must have accepted the latest version of the IOS Developer Program Agreement
|
Linux 开发工具 C#
Tencent Cloud Code Analysis介绍及安装部署
Tencent Cloud Code Analysis介绍及安装部署
1097 0
Tencent Cloud Code Analysis介绍及安装部署
【错误记录】发布 Flutter 插件包报错 ( ‘gmail.com‘ has insufficient permissions to upload new versions of package)
【错误记录】发布 Flutter 插件包报错 ( ‘gmail.com‘ has insufficient permissions to upload new versions of package)
286 0
【错误记录】发布 Flutter 插件包报错 ( ‘gmail.com‘ has insufficient permissions to upload new versions of package)
Unity报错:Read only asset Packages/com.xxxxx.xxx.xxxx/Editor/VSCodeDiscovery.cs.IPGSD has no meta
Unity报错:Read only asset Packages/com.xxxxx.xxx.xxxx/Editor/VSCodeDiscovery.cs.IPGSD has no meta
Unity报错:Read only asset Packages/com.xxxxx.xxx.xxxx/Editor/VSCodeDiscovery.cs.IPGSD has no meta