ali-tencent notes

简介: 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

X

vnc

dis: not works well wit opengl, need xrdp or x11vnc, eg, rviz(ros)
vnc4server(by realvnc) --> tightvnc -2009->tigervnc
tigervnc allow 1 char password.

x11vnc

adv: opengl ok, eg, rviz(ros)
u18: service x11vnc start/stop/status/restart
set pwd without close x11vnc, use x11vnc -storepasswd /etc/x11vnc.passwd, eg, tencent face lab already open x11vnc
x11vnc -create
Xvfb eometry?

xrdp

adv: opengl ok, eg, rviz(ros)
u18: service xrdp start/..., seems cannot restart??
DISPLAY offen :10+

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.

目录
相关文章
|
8月前
|
Linux Perl 网络安全
|
11月前
|
内存技术
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
|
Linux 开发工具 C#
Tencent Cloud Code Analysis介绍及安装部署
Tencent Cloud Code Analysis介绍及安装部署
888 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)
247 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
How does framework interpret $expand=Notes
Created by Wang, Jerry, last modified on Dec 31, 2014
72 0
How does framework interpret $expand=Notes
|
SQL 安全 API
SAP Cloud SDK‘s Virtual Data Model
SAP Cloud SDK‘s Virtual Data Model
SAP Cloud SDK‘s Virtual Data Model
Cloud for Customer系统里的附件url,可以通过partner编程自己生成么
Cloud for Customer系统里的附件url,可以通过partner编程自己生成么
69 0
Cloud for Customer系统里的附件url,可以通过partner编程自己生成么
Cloud for Customer系统里的附件url,可以通过partner编程自己生成么?
Cloud for Customer系统里的附件url,可以通过partner编程自己生成么?
90 0
Cloud for Customer系统里的附件url,可以通过partner编程自己生成么?
SAP Spartacus里product code出现在url的几种场景
SAP Spartacus里product code出现在url的几种场景
SAP Spartacus里product code出现在url的几种场景