打开控制面板->网络连接
点击+号新建网络连接
然后配置IP地址,再把自动生成的连接删掉。
如果不手动创建连接会每次启动时自动创建一个全新的连接,以前IP配置也就没有了,手动创建连接后不再自动创建新的连接。
Views: 70
直接执行vncpasswd时很蛋疼,即不能长也不能短,还要包括三种类型字符
vi /root/.vnc/config
添加securitytypes=none
这样指定的密码没有限制,空密码都可以,第一行输入认证密码,第二行输入view only密码,最后回车,也可以输入认证密码后直接两个回车。执行这个命令时是没有任何输出的,要盲输。
启动服务
systemctl daemon-reload
systemctl enable vncserver@:1.service
systemctl start vncserver@:1.service
默认端口是5901,如果@后面的数字是2就是5902,依次类推。如果启动多个服务可以多个用户同时登录互不影响。
Views: 72
docker logout
如果已经登录了docker hub会导致docker pull时始终走你登录的那个仓库造成registry-mirrors不生效,这个问题困扰了我很多年。
即使是在Docker Desktop上登录也会导致同样的问题,所以要用非官方仓库的时候不能登录任何docker帐号
Views: 81
已经使用了本地缓存仓库但还是很慢,后灰发现是指定的版本号范围比较大导致的,如果不指定精确的版本号则会花费很多时间用来匹配最优版本,在依懒层次和数量都比较多的时候会尤其明显,在安装numpy和pandas包的时候就是这样。如果在poetry中指定*号匹配所有版本那就更慢了。
在kylin系统上还要执行
echo ‘export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring’ >> ~/.bashrc
echo ‘export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring’ >> ~/.profile
这个环境变量还能解决报Failed to create the collection: Prompt dismissed.的问题
Views: 88
注意:
Views: 47
Views: 51
hdiutil attach Command_Line_Tools_for_Xcode_15.3.dmg
hdiutil detach /Volumes/Command\ Line\ Developer\ Tools
Views: 45
networksetup -setmanual "USB 10/100/1000 LAN" 192.168.1.100 255.255.255.0 192.168.1.1
networksetup -setdnsservers "USB 10/100/1000 LAN" 192.168.1.1
networksetup -setdnsservers "USB 10/100/1000 LAN" empty
Views: 16
cd /usr/share/keyrings
sudo wget https://collaboraoffice.com/downloads/gpg/collaboraonline-release-keyring.gpg
cd /usr/share/keyrings
sudo wget https://collaboraoffice.com/downloads/gpg/collaboraonline-release-keyring.gpg
编辑/etc/apt/sources.list.d/collaboraonline.sources,添加如下内容:
Types: deb
URIs: https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-deb
Suites: ./
Signed-By: /usr/share/keyrings/collaboraonline-release-keyring.gpg
sudo apt update && sudo apt install coolwsd code-brand
sudo systemctl restart coolwsd
2. 申请证书
我是使用acme.sh申请证书的,过程略
3. 配置collwsd
在/etc/coolwsd/coolwsd.xml中添加
> <remote_font_config>
<url>https://pan.hetao.me/apps/richdocuments/settings/fonts.json</url>
</remote_font_config>
```shell
ln -s /opt/certs/hetao.me/hetao.me.key key.pem
ln -s /opt/certs/hetao.me/hetao.me.cer cert.pem
ln -s /opt/certs/hetao.me/fullchain.cer ca-chain.cert.pem
coolconfig set ssl.enable true
coolconfig set ssl.termination false
sudo systemctl restart coolwsd
Views: 99
ONLYOFFICE Docs是onlyoffice的server端,可以通过onlyoffice api和WOPI两种方式与客户端连接。
下面是onlyoffice docs的安装:
sudo add-apt-repository ppa:5-sergey/nginx-quic
sudo apt update
sudo apt-get install postgresql
sudo -i -u postgres psql -c "CREATE USER onlyoffice WITH PASSWORD 'onlyoffice';"
sudo -i -u postgres psql -c "CREATE DATABASE onlyoffice OWNER onlyoffice;"
sudo apt-get install rabbitmq-server
sudo apt-get install nginx-extras
mkdir -p -m 700 ~/.gnupg
curl -fsSL https://download.onlyoffice.com/GPG-KEY-ONLYOFFICE | gpg --no-default-keyring --keyring gnupg-ring:/tmp/onlyoffice.gpg --import
chmod 644 /tmp/onlyoffice.gpg
sudo chown root:root /tmp/onlyoffice.gpg
sudo mv /tmp/onlyoffice.gpg /usr/share/keyrings/onlyoffice.gpg
echo "deb [signed-by=/usr/share/keyrings/onlyoffice.gpg] https://download.onlyoffice.com/repo/debian squeeze main" | sudo tee /etc/apt/sources.list.d/onlyoffice.list
sudo apt-get update
sudo apt-get install ttf-mscorefonts-installer
sudo apt-get install onlyoffice-documentserver
参考:
https://helpcenter.onlyoffice.com/installation/docs-community-install-ubuntu.aspx?_ga=2.121380878.782359554.1594636128-1157782750.1587541027
https://github.com/ONLYOFFICE/onlyoffice-nextcloud
我这里是用acme.sh申请的,过程略
编辑/etc/nginx/conf.d/ds.conf
include /etc/nginx/includes/http-common.conf;
server {
listen 0.0.0.0:80;
listen [::]:80 default_server;
server_tokens on;
set secure_link_secret 123456;
include /etc/nginx/includes/ds-*.conf;
}
server {
listen 443 quic reuseport;
listen 443 ssl;
listen [::]:443 quic reuseport;
listen [::]:443 ssl;
http2 on;
http3 on;
quic_retry on;
# Use Mozilla's guidelines for SSL/TLS settings
# https://mozilla.github.io/server-side-tls/ssl-config-generator/
ssl_certificate /opt/certs/hetao.me/fullchain.cer;
ssl_certificate_key /opt/certs/hetao.me/hetao.me.key;
ssl_protocols TLSv1.3;
# Prevent nginx HTTP Server Detection
server_tokens on;
# HSTS settings
# WARNING: Only add the preload option once you read about
# the consequences in https://hstspreload.org/. This option
# will add the domain to a hardcoded list that is shipped
# in all major browsers and getting removed from this list
# could take several months.
add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload" always;
add_header Alt-Svc 'h3=":443"; ma=86400';
setsecure_link_secret 123456;
include /etc/nginx/includes/ds-*.conf;
}
配置onlyoffice.hetao.me指向onlyoffice docs服务器
过程略
5. nextcloud中安装onlyoffice扩展
新版本nextcloud似乎不能在线安装onlyoffice扩展了,所以用下面的方法离线安装。
在 https://apps.nextcloud.com/apps/onlyoffice 这个页面上下载扩展的tar包,解压到/var/www/nextcloud/apps文件夹中,然后在nextcloud的app管理页面启用onlyoffice扩展。
其中秘钥就是JWT私钥,可以在/etc/onlyoffice/documentserver/local.json文件中配置。
inbox,outbox,session三个私钥设置一样并且与nextcloud中的配置一致。
参考:
https://www.collaboraoffice.com/code/linux-packages/
Views: 68