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.

目录
相关文章
|
23天前
|
开发工具 数据安全/隐私保护 git
解决方案:Github Support for password authentication was removed on August 13, 2021.
解决方案:Github Support for password authentication was removed on August 13, 2021.
76 1
解决方案:Github Support for password authentication was removed on August 13, 2021.
|
9月前
|
Linux Perl 网络安全
|
12月前
|
内存技术
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
Plugin [id: ‘com.github.kt3k.coveralls‘, version: ‘2.8.2‘] was not found in any of the following sou
Plugin [id: ‘com.github.kt3k.coveralls‘, version: ‘2.8.2‘] was not found in any of the following sou
88 0
|
移动开发 iOS开发 MacOS
如何从Mac OS X Catalina将IPA文件上传到App Store[英] How to upload IPA file to App Store from Mac OS X Catalina
如何从Mac OS X Catalina将IPA文件上传到App Store[英] How to upload IPA file to App Store from Mac OS X Catalina
|
Linux 开发工具 C#
Tencent Cloud Code Analysis介绍及安装部署
Tencent Cloud Code Analysis介绍及安装部署
900 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)
250 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
|
Java
会员卡删卡(alipay.marketing.card.delete)JAVA版本demo
说明:          该接口是通过API接口进行删除会员卡的操作流程,官方接口文档【会员卡删卡】          开卡接口请参考该贴:[url]https://openclub.alipay.com/read.
561 0
|
Java
修改广告接口(alipay.marketing.cdp.advertise.modify)JAVA版本demo
说明:         该接口是开发者帮助线下商家修改广告内容,如修改的是线上的广告内容,需要先将线上广告内容下架,再修改,修改后操作上架,才能在支付宝钱包APP看到修改后的广告内容。运营位类型可以选择图片或H5。
374 0

热门文章

最新文章