147 lines
4.6 KiB
Plaintext
147 lines
4.6 KiB
Plaintext
|
1.ssh配置免访问文件:authorized_keys
|
||
|
2.apt设置临时代理:
|
||
|
sudo apt-get -o Acquire::http::proxy="socks5h://192.168.0.102:7890/" install mariadb-server
|
||
|
3.CentOS7 升级GCC
|
||
|
(3.1) rpm -q gcc
|
||
|
(3.2) rpm -e [第二步查到的版本号]
|
||
|
如果
|
||
|
error: Failed dependencies:
|
||
|
gcc = 4.4.7-23.el6 is needed by (installed) gcc-c++-4.4.7-23.el6.x86_64
|
||
|
gcc = 4.4.4 is needed by (installed) libtool-2.2.6-15.5.el6.x86_64
|
||
|
rpm -e gcc-c++-4.4.7-23.el6.x86_64
|
||
|
rpm -e libtool-2.2.6-15.5.el6.x86_64
|
||
|
验证卸载:
|
||
|
[root@123 /]# gcc -v
|
||
|
-bash: /usr/bin/gcc: No such file or directory
|
||
|
[root@123 /]# g++ -v
|
||
|
-bash: /usr/bin/g++: No such file or directory
|
||
|
yum install centos-release-scl
|
||
|
yum install -y devtoolset-11-gcc devtoolset-11-gcc-c++
|
||
|
scl enable devtoolset-11 bash
|
||
|
vim /etc/profile
|
||
|
PATH=$PATH::/opt/rh/devtoolset-11/root/usr/bin
|
||
|
|
||
|
==>Debian系列安装后的网卡配置:
|
||
|
|
||
|
1.U盘安装一个无线网卡驱动包。
|
||
|
2.然后需要链接有线安装两个组件:net-tools wireless-tools
|
||
|
sudo apt install xxx
|
||
|
3.安装完毕之后查看无线网卡的信息,例如名称为: wlan0
|
||
|
4.配置netplan,(之前网上讲的是/etc/network/interface,在这里不是)
|
||
|
在/etc/netplan/目录下有yaml文件,可以查看是哪个里面配置了网卡信息。
|
||
|
默认内容是:
|
||
|
network:
|
||
|
ethernets:
|
||
|
ehth0:
|
||
|
dhcp4: true
|
||
|
optional: true
|
||
|
version 2
|
||
|
在这里添加(最外层跟ethernets对齐):
|
||
|
renderer: networkd
|
||
|
wifis:
|
||
|
wlan0:
|
||
|
dhcp4: true
|
||
|
access-points:
|
||
|
"xxxwifiname":
|
||
|
password: "xxxxwifipasswd"
|
||
|
5.使用sudo netplan apply启用。
|
||
|
|
||
|
配置文件
|
||
|
/etc/systemd/logind.conf
|
||
|
|
||
|
配置说明
|
||
|
HandlePowerKey: 按下电源键后的行为,默认power off
|
||
|
HandleSleepKey: 按下挂起键后的行为,默认suspend
|
||
|
HandleHibernateKey: 按下休眠键后的行为,默认hibernate
|
||
|
HandleLidSwitch: 合上笔记本盖后的行为,默认suspend
|
||
|
|
||
|
只监视带有 “power-switch” 标签的 输入设备的 key(按下按钮)/lid(合上盖子) 事件。
|
||
|
|
||
|
如果主机插入了一个扩展坞(docking station) 或者连接了多个显示器, 那么"合上盖子"将执行 HandleLidSwitchDocked= 动作;
|
||
|
如果主机使用外部电源, 并且 HandleLidSwitchExternalPower= 不是默认值(“ignore”), 那么"合上盖子"将执行 HandleLidSwitchExternalPower= 动作; 否则将执行 HandleLidSwitch= 动作。
|
||
|
|
||
|
参数说明
|
||
|
ignore(无操作),
|
||
|
poweroff(关闭系统并切断电源),
|
||
|
reboot(重新启动),
|
||
|
halt(关闭系统但不切断电源),
|
||
|
kexec(调用内核"kexec"函数),
|
||
|
suspend(休眠到内存),
|
||
|
hibernate(休眠到硬盘),
|
||
|
hybrid-sleep(同时休眠到内存与硬盘),
|
||
|
suspend-then-hibernate(先休眠到内存超时后再休眠到硬盘),
|
||
|
lock(锁屏)
|
||
|
|
||
|
设置笔记本合并盖子不休眠
|
||
|
编辑文件/etc/systemd/logind.conf
|
||
|
|
||
|
将
|
||
|
|
||
|
#HandleLidSwitch=suspend
|
||
|
1
|
||
|
注意前面的 # 也要去掉
|
||
|
|
||
|
修改为(无操作)
|
||
|
|
||
|
HandleLidSwitch=ignore
|
||
|
1
|
||
|
或(锁屏)
|
||
|
|
||
|
HandleLidSwitch=lock
|
||
|
1
|
||
|
重启服务
|
||
|
|
||
|
service systemd-logind restart
|
||
|
1
|
||
|
文章知识点与官方知识档
|
||
|
————————————————
|
||
|
版权声明:本文为CSDN博主「猫巳」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
|
||
|
原文链接:https://blog.csdn.net/qq_31635851/article/details/124627990
|
||
|
|
||
|
Q1: Qt5 安装之后无法打开,那么就在cmd命令行中,设置 export QT_DEBUG_PLUGINS=1
|
||
|
然后启动应用程序,会报相信的错误信息,一般是缺少各种库,比如libqxcb依赖的库有的没有,则使用
|
||
|
ldd libqxcb.so
|
||
|
查看具体哪些没有,然后使用 apt search xxxx 这些没有的库,最后安装。
|
||
|
|
||
|
Q2: 设置iBus中文输入法
|
||
|
|
||
|
为什么使用iBus输入法,因为fcitx有很多兼容性问题。
|
||
|
|
||
|
# 彻底卸载sogou和fcitx
|
||
|
sudo apt purge sogoupinyin
|
||
|
sudo apt purge fcitx
|
||
|
sudo apt autoremove
|
||
|
sudo apt remove fcitx*
|
||
|
sudo apt purge fcitx*
|
||
|
sudo apt autoremove
|
||
|
|
||
|
# 删除配置文件
|
||
|
cd .config/
|
||
|
rm -rf sogoupinyin/
|
||
|
rm -rf ibus
|
||
|
|
||
|
# 安装ibus
|
||
|
sudo apt install ibus ibus-sunpinyin
|
||
|
|
||
|
Q3: 键盘功能键设置失效问题
|
||
|
echo options hid_apple fnmode=2 | sudo tee -a /etc/modprobe.d/hid_apple.conf
|
||
|
sudo update-initramfs -u -k all
|
||
|
sudo reboot
|
||
|
|
||
|
# Debian/Ubuntu/Mint
|
||
|
sudo apt install initramfs-tools
|
||
|
# the "-k all" part is not always needed, but it's better to do that for all kernels anyway
|
||
|
sudo update-initramfs -u -k all
|
||
|
|
||
|
# RedHat/Fedora/CentOS
|
||
|
sudo dracut --regenerate-all --force 作者:大敏鸽 https://www.bilibili.com/read/cv16950091 出处:bilibili
|
||
|
|
||
|
R1: 使用 plank 作为 dock 坞
|
||
|
sudo apt-get install pavucontrol
|
||
|
|
||
|
安装远程桌面
|
||
|
sudo apt-get install tightvncserver xrdp
|
||
|
|
||
|
秘钥
|
||
|
ssh-keygen
|
||
|
pub公钥>>authorized_keys
|