淘宝记录笔记
在oneAPI.repo中输入代码:
[oneAPI]
name=Intel® oneAPI repository
baseurl=https://yum.repos.intel.com/oneapi
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
# 以下注释的内容都是默认配置,如果需要自定义,取消注释修改即可
set base_path /data/apt-souce/
set mirror_path $base_path/mirror
set skel_path $base_path/skel
set var_path $base_path/var
set defaultarch arm64
set nthreads 20
set _tilde 0
#下载线程数
#V10版本:
#deb http://archive.kylinos.cn/kylin/KYLIN-ALL 10.0 main restricted universe multiverse
#V10 SP1版本:
deb-arm64 http://archive.kylinos.cn/kylin/KYLIN-ALL 10.1 main restricted universe multiverse
deb-arm64 http://archive2.kylinos.cn/deb/kylin/production/PART-V10-SP1/custom/partner/V10-SP1 default all
1101
https://admin.pci-ids.ucw.cz/mods/PC/10de/20f5
https://www.nvidia.cn/Download/index.aspx?lang=cn
[root@localhost advan]# sudo lsmod | grep nouveau
nouveau 2306048 5
drm_ttm_helper 16384 1 nouveau
ttm 77824 2 drm_ttm_helper,nouveau
mxm_wmi 16384 1 nouveau
i2c_algo_bit 16384 1 nouveau
drm_kms_helper 253952 1 nouveau
drm 573440 9 drm_kms_helper,drm_ttm_helper,ttm,nouveau
wmi 32768 4 intel_wmi_thunderbolt,wmi_bmof,mxm_wmi,nouveau
video 49152 1 nouveau
[root@localhost advan]# lspci | grep -i nvid
01:00.0 VGA compatible controller: NVIDIA Corporation TU106 [GeForce GTX 1650] (rev a1)
01:00.1 Audio device: NVIDIA Corporation TU106 High Definition Audio Controller (rev a1)
[root@localhost advan]#
凝思系统安装 费用100 配置信息:I9-12900K 32G 1T P4000-8G
[root@localhost src]# lspci | grep -i nvidia
3b:00.0 3D controller: NVIDIA Corporation GA100 [GRID A100 PCIe 40GB] (rev a1)
[root@localhost src]#
Name: AD106 [GeForce RTX 4060 Ti]
mkdir -p /mnt/cdrom/
mount -o loop /usr/local/src/CentOS-8.5.2111-x86_64-dvd1.iso /mnt/cdrom/
mkdir -p /etc/yum.repos.d/backup
mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/backup/
cd / && mkdir -p /home/YDyum
cp -R /mnt/cdrom/ /home/YDyum/
cat >/etc/yum.repos.d/liang.repo<<EOF
[centos8]
#yundong keji yum
name=CentOS8-$releasever - CentOS8
baseurl=file:///home/YDyum/cdrom/
gpgcheck=0
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-8
EOF
[media-baseos]
name=CentOS Linux $releasever - Media - BaseOS
baseurl=file:///home/YDyum/cdrom/BaseOS
gpgcheck=0
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
[media-appstream]
name=CentOS Linux $releasever - Media - AppStream
baseurl=file:///home/YDyum/cdrom/AppStream
gpgcheck=0
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
————————————————
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/weixin_58613409/article/details/124191645
https://www.nvidia.cn/Download/index.aspx?lang=cn
dnf install kernel-devel kernel-headers gcc make dkms acpid libglvnd-glx libglvnd-opengl libglvnd-devel pkgconfig
echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf
[root@localhost ~]# yum -y install gcc gcc-c++ kernel-devel make
屏蔽nouveau开源版本的GPU驱动
lsmod |grep -i nouveau
下面将屏蔽该驱动。编辑/etc/default/grub文件,修改GRUB_CMDLINE_LINUX一行:
在‘GRUB_CMDLINE_LINUX=”…”‘ 最后面添加 ‘ rd.driver.blacklist=nouveau ’
[root@localhost ~]# cat /etc/default/grub
sed -i 's/crashkernel=auto rhgb quiet/crashkernel=auto rhgb quiet nouveau.modeset=0 rd.driver.blacklist=nouveau/g' /etc/default/grub
nouveau.modeset=0 rd.driver.blacklist=nouveau
[root@localhost ~]# grub2-mkconfig -o /boot/efi/EFI/openEuler/grub.cfg
## BIOS ##
grub2-mkconfig -o /boot/grub2/grub.cfg
## UEFI CentOS Stream 9/8 ##
grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
[root@localhost cdrom]# vi /lib/modprobe.d/dist-blacklist.conf
[root@localhost cdrom]# grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
Generating grub configuration file ...
Adding boot menu entry for UEFI Firmware Settings ...
done
[root@localhost cdrom]#
编辑/lib/modprobe.d/dist-blacklist.conf,把 blacklist nvidiafb 改成 #blacklist nvidiafb,然后在最下面添加blacklist nouveau和。
[root@localhost ~]# vim /lib/modprobe.d/dist-blacklist.conf
# blacklist nvidiafb
blacklist nouveau
options nouveau modeset=0
备份initrams并使用dracut重新建立initramfs并重启系统:
## Backup old initramfs nouveau image ##
mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img
## Create new initramfs image ##
dracut /boot/initramfs-$(uname -r).img $(uname -r)
[root@localhost ~]# mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak
[root@localhost ~]# dracut -v /boot/initramfs-$(uname -r).img $(uname -r)
[root@localhost ~]# reboot
查看nouveau模块是否加载,不显示的话就表示已经禁用:
# lsmod | grep nouveau
安装NVIDIA GPU驱动
https://cn.download.nvidia.com/XFree86/Linux-x86_64/550.78/NVIDIA-Linux-x86_64-550.78.run
安装下载的GPU驱动:NVIDIA-Linux-x86_64-510.47.03.run ,目前驱动版本为:510.47.03,如下执行该驱动文件,即可安装。
[root@localhost ~]# ./NVIDIA-Linux-x86_64-346.47.run
sudo ./NVIDIA-Linux-x86_64-535.129.03.run -no-x-check -no-nouveau-check -no-opengl-files
./NVIDIA-Linux-x86_64-535.154.05.run -no-x-check -no-nouveau-check -no-opengl-files
点击
解决方法
./NVIDIA-Linux-x86_64-535.154.05.run --kernel-source-path=/usr/src/kernels/6.6.0-28.0.0.34.oe2403.x86_64
/usr/src/kernels/4.18.0-348.el8.x86_64
https://mirrors.huaweicloud.com/java/jdk/8u181-b13/jdk-8u181-linux-x64.tar.gz
安装报错
ERROR: An error occurred while performing the step: "Building kernel modules". See /var/log/nvidia-installer.log for details.
-> The command `cd ./kernel; /usr/bin/make -k -j32 NV_EXCLUDE_KERNEL_MODULES="" SYSSRC="/lib/modules/4.18.0-348.el8.x86_64/source" SYSOUT="/lib/modules/4.18.0-348.el8.x86_64/build" ` failed with the follow
ing output:
make[1]: Entering directory '/usr/src/kernels/4.18.0-348.el8.x86_64'
make[2]: Entering directory '/usr/src/kernels/4.18.0-348.el8.x86_64'
/usr/src/kernels/4.18.0-348.el8.x86_64/Makefile:990: *** "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel". Stop.
make[2]: Leaving directory '/usr/src/kernels/4.18.0-348.el8.x86_64'
make[1]: *** [Makefile:157: sub-make] Error 2
make[1]: Target 'modules' not remade because of errors.
make[1]: Leaving directory '/usr/src/kernels/4.18.0-348.el8.x86_64'
make: *** [Makefile:82: modules] Error 2
-> Checking to see whether the nvidia kernel module was successfully built
executing: 'cd ./kernel; /usr/bin/make -k -j32 NV_EXCLUDE_KERNEL_MODULES="" SYSSRC="/lib/modules/4.18.0-348.el8.x86_64/source" SYSOUT="/lib/modules/4.18.0-348.el8.x86_64/build" NV_KERNEL_MODULES="nvidia
"'...
make[1]: Entering directory '/usr/src/kernels/4.18.0-348.el8.x86_64'
make[2]: Entering directory '/usr/src/kernels/4.18.0-348.el8.x86_64'
/usr/src/kernels/4.18.0-348.el8.x86_64/Makefile:990: *** "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel". Stop.
make[2]: Leaving directory '/usr/src/kernels/4.18.0-348.el8.x86_64'
make[1]: *** [Makefile:157: sub-make] Error 2
make[1]: Target 'modules' not remade because of errors.
make[1]: Leaving directory '/usr/src/kernels/4.18.0-348.el8.x86_64'
make: *** [Makefile:82: modules] Error 2
-> Error.
ERROR: An error occurred while performing the step: "Checking to see whether the nvidia kernel module was successfully built". See /var/log/nvidia-installer.log for details.
-> The command `cd ./kernel; /usr/bin/make -k -j32 NV_EXCLUDE_KERNEL_MODULES="" SYSSRC="/lib/modules/4.18.0-348.el8.x86_64/source" SYSOUT="/lib/modules/4.18.0-348.el8.x86_64/build" NV_KERNEL_MODULES="nvidi
a"` failed with the following output:
make[1]: Entering directory '/usr/src/kernels/4.18.0-348.el8.x86_64'
make[2]: Entering directory '/usr/src/kernels/4.18.0-348.el8.x86_64'
/usr/src/kernels/4.18.0-348.el8.x86_64/Makefile:990: *** "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel". Stop.
make[2]: Leaving directory '/usr/src/kernels/4.18.0-348.el8.x86_64'
make[1]: *** [Makefile:157: sub-make] Error 2
make[1]: Target 'modules' not remade because of errors.
make[1]: Leaving directory '/usr/src/kernels/4.18.0-348.el8.x86_64'
make: *** [Makefile:82: modules] Error 2
ERROR: The nvidia kernel module was not created.
ERROR: Installation has failed. Please see the file '/var/log/nvidia-installer.log' for details. You may find suggestions on fixing installation problems in the README available on the Linux driver downlo
ad page at www.nvidia.com.
[root@localhost src]#
gsql -h 127.0.0.1 -d datahub -U sinouser1 -p 15400 -f init.sql
[omm@ogserver openGauss]$ gsql -d postgres -p 15400 -r
gsql ((openGauss 5.0.0 build a07d57c3) compiled at 2023-03-29 03:09:38 commit 0 last mr )
Non-SSL connection (SSL connection is recommended when requiring high-security)
Type "help" for help.
openGauss=# create user sinouser1 identified by 'my_root@123';
NOTICE: The encrypted password contains MD5 ciphertext, which is not secure.
CREATE ROLE
openGauss=# alter user sinouser1 sysadmin;
ALTER ROLE
openGauss=# create database datahub with dbcompatibility='PG' owner="sinouser1" encoding='UTF8';
CREATE DATABASE
openGauss=# \c datahub
Non-SSL connection (SSL connection is recommended when requiring high-security)
You are now connected to database "datahub" as user "opengauss".
datahub=# CREATE SCHEMA nlp AUTHORIZATION sinouser1;
CREATE SCHEMA
datahub=# \q
https://www.123684.com/s/JylVVv-rRpw3
1031
#!/bin/bash
##2016-5-12#######
#system-info-V1.0
##make lianglab######
##define color######
red="\033[31m"
gre="\033[32m"
yel="\033[33m"
pur="\033[35m"
blu="\033[36m"
end="\033[0m"
ll="\E(0x\E(B"
clear
######system base info#######
HOSTNAME=`hostname -s`
#memory
MEMORY=`free | grep Mem | awk '{print $2}'`
#cpu info
CPUS=`cat /proc/cpuinfo | grep processor | wc -l | awk '{print $1}'`
CPU_MHZ=`cat /proc/cpuinfo | grep MHz | tail -n1 | awk '{print $4}'`
CPU_TYPE=`cat /proc/cpuinfo | grep vendor_id | tail -n 1 | awk '{print $3}'`
CPU_TYPE2=`uname -m`
OS_NAME=`uname -s`
OS_KERNEL=`uname -r`
UPTIME=$(uptime | awk -F user, '{print $2}'|sed 's/^[ \t]*//g')
PROC_COUNT=`ps -ef | wc -l`
body() {
IFS= read -r header
printf '%s\n' "$header"
"$@"
}
title="我的超级工具"
url="www.lianglab.cn"
time=`date +%Y-%m-%d`
echo -e " \E(0lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk\E(B
${ll} \033[44;37m系统基础信息运维工具${end} ${ll}
${ll} ${ll}
${ll} ${red}"概要信息" `date +'%Y-%m-%d %H:%S'`${end} ${ll}
${ll} ${blu}(2)主机名 : $HOSTNAME${end} ${ll}
${ll} ${blu}(3)内存大小 : $MEMORY${end} ${ll}
${ll} ${blu}(4)CPU核数 : $CPUS${end} ${ll}
${ll} ${blu}(5)CPU类型 : $CPU_TYPE $CPU_TYPE2 $CPU_MHZ MHz${end} ${ll}
${ll} ${blu}(5)内核版本 : $OS_KERNEL${end} ${ll}
${ll} ${blu}(5)进程总数 : $PROC_COUNT${end} ${ll}
${ll} ${blu}(5)启动时间及负载 : $UPTIME${end} ${ll}
${ll} ${blu}(5)内存使用情况${end} ${ll}
${ll} ${blu}(5)查找较多time_wait连接${end} ${ll}
${ll} \033[33mFor more information you may drop mail to : \033[35m\033[4mlianglab@126.com${end} ${ll}
\E(0mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj\E(B"
echo
#echo -e "${gre}(1)内存使用和CPU利用率TOP10${end}"
psmem=$(ps -eo rss,pmem,pcpu,vsize,args |body sort -k 1 -r -n | head -n 10)
pscpu=$(ps -eo rss,pmem,pcpu,vsize,args |body sort -k 3 -r -n | head -n 10)
echo -e "\E(0lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk\E(B
\033[44;37m内存使用和CPU利用率TOP10${end}
${gre}$psmem${end}
${red}==================================================================${end}
${blu}$pscpu${end}
\E(0mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj\E(B"
echo
#echo -e "${gre}内存使用情况${end}"
Meminfo=`free -m`
echo -e "\E(0lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk\E(B
\033[44;37m内存使用情况${end}
${gre}$Meminfo${end}
\E(0mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj\E(B"
echo
#echo -e "${gre}磁盘使用情况${end}"
DiskSum=`df -h`
echo -e "\E(0lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk\E(B
\033[44;37m磁盘使用情况${end}
${gre}$DiskSum${end}
\E(0mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj\E(B"
echo
#echo -e "${gre}网络连接情况${end}"
NetworkSum=$(netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}')
echo -e "\E(0lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk\E(B
\033[44;37m网络连接情况${end}
${gre}$NetworkSum${end}
\E(0mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj\E(B"
echo
#echo -e "${gre}网络监听情况${end}"
SnifferSum=$(netstat -tnpl | awk 'NR>2 {printf "%-20s %-15s \n",$4,$7}')
echo -e "\E(0lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk\E(B
\033[44;37m网络监听情况${end}
${gre}$SnifferSum${end}
\E(0mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj\E(B"
echo
#echo -e "${gre}(1)最近2小时网络流量统计${end}"
NetSarSum=$(sar -n DEV -s `date -d "2 hour ago" +%H:%M:%S` | grep -v $OS_KERNEL)
echo -e "\E(0lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk\E(B
\033[44;37m(1)最近2小时网络流量统计${end}
${gre}$NetSarSum${end}
\E(0mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj\E(B"
echo
#echo -e "${gre}(1)最近2小时cpu使用统计${end}"
CpuSarSum=$(sar -u -s `date -d "2 hour ago" +%H:%M:%S` | grep -v $OS_KERNEL)
echo -e "\E(0lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk\E(B
\033[44;37m(2)最近2小时CPU使用统计${end}
${gre}$CpuSarSum${end}
\E(0mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj\E(B"
echo
#echo -e "${gre}(1)最近2小时磁盘IO统计${end}"
DiskSarSum=$(sar -b -s `date -d "2 hour ago" +%H:%M:%S` | grep -v $OS_KERNEL)
echo -e "\E(0lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk\E(B
\033[44;37m(3)最近2小时磁盘IO统计${end}
${gre}$DiskSarSum${end}
\E(0mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj\E(B"
echo
#echo -e "${gre}最近2小时进程队列和平均负载统计${end}"
PossSarSum=$(sar -q -s `date -d "2 hour ago" +%H:%M:%S` | grep -v $OS_KERNEL)
echo -e "\E(0lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk\E(B
\033[44;37m(4)最近2小时进程队列和平均负载统计${end}
${gre}$PossSarSum${end}
\E(0mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj\E(B"
echo
#echo -e "${gre}(5)最近2小时内存和交换空间的统计统计${end}"
SwapSarSum=$(sar -r -s `date -d "1 hour ago" +%H:%M:%S` | grep -v $OS_KERNEL)
echo -e "\E(0lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk\E(B
\033[44;37m(5)最近2小时内存和交换空间的统计统计${end}
${gre}$SwapSarSum${end}
\E(0mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj\E(B"
echo
echo -e " \E(0lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk\E(B
${gre}(1)系统基础信息${end}
${gre}(1)系统基础信息${end}
${gre}(2)内存使用和CPU利用率TOP10${end}
${red}(3)内存使用情况${end}
${red}(4)磁盘使用情况${end}
${blu}(5)网络连接情况${end}
${red}(6)网络监听情况${end}
${blu}(7)最近2小时网络流量统计${end}
${blu}(8)最近2小时cpu使用统计${end}
${blu}(9)最近2小时磁盘IO统计${end}
${blu}(10)最近2小时进程队列和平均负载统计${end}
${blu}(11)最近2小时内存和交换空间的统计统计${end}
\033[33mIf you need to add new commands, please contact lianglab : \033[35m\033[4mlianglab@126.com${end}
\E(0mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj\E(B"
echo
<VirtualHost *:88>
DocumentRoot /www
ErrorDocument 404 /lost.html
<Directory /www>
Options -Indexes
AllowOverride None
Require all granted
</Directory>
# 禁止访问 /data 目录
<Directory /data>
Require all denied
</Directory>
ServerTokens Prod
ServerSignature Off
</VirtualHost>
1009
https://www.123865.com/s/JylVVv-WOpw3
<?xml version="1.0" encoding="utf-8"?>
<ROOT>
<CLUSTER>
<PARAM name="clusterName" value="openGauss" />
<PARAM name="nodeNames" value="ogserver"/>
<PARAM name="gaussdbAppPath" value="/opt/openGauss/app" />
<PARAM name="gaussdbLogPath" value="/var/log/omm" />
<PARAM name="tmpMppdbPath" value="/opt/openGauss/tmp"/>
<PARAM name="gaussdbToolPath" value="/opt/openGauss/install/om" />
<PARAM name="corePath" value="/opt/openGauss/corefile"/>
<PARAM name="backIp1s" value="192.168.0.245"/>
</CLUSTER>
<DEVICELIST>
<DEVICE sn="ogserver">
<PARAM name="name" value="ogserver"/>
<PARAM name="azName" value="AZ1"/>
<PARAM name="azPriority" value="1"/>
<PARAM name="backIp1" value="192.168.0.245"/>
<PARAM name="sshIp1" value="192.168.0.245"/>
<!-- dn -->
<PARAM name="dataNum" value="1"/>
<PARAM name="dataPortBase" value="15400"/>
<PARAM name="dataNode1" value="/data/openGauss"/>
<PARAM name="dataNode1_syncNum" value="0"/>
</DEVICE>
</DEVICELIST>
</ROOT>
1005
https://www.123865.com/s/JylVVv-Rapw3
#!/bin/bash
# 创建download目录用于存储下载内容
mkdir -p ~/download
# 设置 Anaconda3 安装目录和版本
ANACONDA_INSTALL_DIR=~/anaconda3
ANACONDA_VERSION=2021.11
# 下载 Anaconda3 安装脚本
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-py39_4.11.0-Linux-x86_64.sh -O ~/download/anaconda3.sh
# 安装 Anaconda3
bash ~/download/anaconda3.sh -b -p $ANACONDA_INSTALL_DIR
echo 'the installation is completed...'
# 添加 Anaconda3 环境变量
echo 'export PATH=~/anaconda3/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
echo 'the bashrc is completed...'
# 更换清华源
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes
echo 'the channels is completed...'
pip config set global.index-url http://mirrors.aliyun.com/pypi/simple/
pip config set install.trusted-host mirrors.aliyun.com
echo 'the channel of pip has been changed...'
conda
conda init
1004
cmake .. -DGMX_BUILD_OWN_FFTW=ON -DCMAKE_INSTALL_PREFIX=/usr/local/gromacs
make -j$(nproc)
sudo make install
source /usr/local/gromacs/bin/GMXRC
source ~/.bashrc
cmake --version
pkg-config --modversion fftw3
gcc --version
gmx --version
0914 GPU T4安装
journalctl --since "2024-09-20 08:00" --until "2024-09-20 19:00"
sudo awk '/^Sep 20/{flag=1;next}/^Sep/{flag=0}flag' /var/log/syslog > /path/to/your/output.log
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
yum install -y https://mirrors.aliyun.com/epel/epel-release-latest-8.noarch.rpm
sed -i 's|^#baseurl=https://download.example/pub|baseurl=https://mirrors.aliyun.com|' /etc/yum.repos.d/epel*
sed -i 's|^metalink|#metalink|' /etc/yum.repos.d/epel*
find /usr/lib /usr/local/lib -name "libcseife.so" -o -name "libstfinv.so" -o -name "libaff.so" -o -name "libfourierxx.so"
sudo dnf install libcseife-devel libstfinv-devel laff-devel fourierxx-devel
#include "../contrib/stfinv/stfinv.h"
#include "../contrib/stfinv/stfinv.h"
#include "../contrib/stfinv/waveformheader.h"
IFLAGS = -I./../contrib/libcseife -I./../contrib/header -I./../contrib/stfinv -I.
wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.1.tar.gz
wget https://www.mpich.org/static/downloads/3.4.2/mpich-3.4.2.tar.gz
# 编译器设置
CC = mpiicc
CFLAGS = -O3
LFLAGS = -lm -lcseife -lstfinv -laff -lfourierxx -lfftw3 -lstdc++
SFLAGS = -L../../contrib/libcseife -L../../contrib/bin
IFLAGS = -I../../contrib/libcseife -I../../contrib/header -I.
环境变量
echo 'export PATH=/usr/local/bin:$PATH' >> ~/.bashrc
echo 'export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH' >> ~/.bashrc
source ~/.bashrc
mpicc --version
echo 'export PATH=/usr/local/bin:$PATH' >> ~/.bashrc
echo 'export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH' >> ~/.bashrc
source ~/.bashrc
mpicc --version
https://ftp.gnu.org/gnu/automake/automake-1.17.tar.gz
wget https://ftp.gnu.org/gnu/autoconf/autoconf-latest.tar.gz
wget https://ftp.gnu.org/gnu/automake/automake-latest.tar.gz
magnet:?xt=urn:btih:64fb7c011f407628471432d8cd52b2b5c6c52673&dn=SW_DVD9_Win_Pro_11_23H2_Arm64_ChnSimp_Pro_Ent_EDU_N_MLF_X23-59518.ISO&xl=7142125568
https://update.code.visualstudio.com/1.72.2/linux-deb-x64/stable
sudo lspci | grep -i nvid
lspci | grep -i vga
hwinfo --gfxcard |grep "Vendor"
lspci | egrep -i "vga|display|3d"sudo lsmod | grep nouveau
sudo lsmod | grep nouveau
sudo gedit /etc/modprobe.d/blacklist-nouveau.conf
blacklist nouveau
blacklist lbm-nouveau
options nouveau modeset=0
alias nouveau off
alias lbm-nouveau off
sudo update-initramfs -u
sudo reboot
sudo apt-get install linux-headers-$(uname -r)
sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler
sudo apt-get install --no-install-recommends libboost-all-dev
sudo apt-get install libopenblas-dev liblapack-dev libatlas-base-dev
sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev
sudo apt-get install pkg-config
https://cn.download.nvidia.com/tesla/550.90.12/NVIDIA-Linux-x86_64-550.90.12.run
https://www.nvidia.cn/Download/index.aspx?lang=cn
sudo ./NVIDIA-Linux-x86_64-535.129.03.run -no-x-check -no-nouveau-check -no-opengl-files
0910
lsmod |grep -i nouveau
echo -e 'blacklist nouveau \noptions nouveau modeset=0' | sudo tee -a /etc/modprobe.d/50-blacklist.conf
sudo mkinitrd
reboot
sudo zypper install gcc kernel-devel pkg-config libglvnd
sudo zypper install -y kernel-default-devel=$(uname -r | sed 's/\-default//')
https://cn.download.nvidia.com/XFree86/Linux-x86_64/550.107.02/NVIDIA-Linux-x86_64-550.107.02.run
sudo bash ./NVIDIA-Linux-x86_64-450.66.run --no-x-check -z --no-opengl-files
#配置openSUSE-Leap-15.1
zypper addrepo -f http://mirrors.aliyun.com/opensuse/distribution/leap/15.1/repo/oss/ aliyun-openSUSE-Leap-15.1-oss
zypper addrepo -f http://mirrors.aliyun.com/opensuse/distribution/leap/15.1/repo/non-oss/ aliyun-openSUSE-Leap-15.1-non-oss
zypper addrepo -f http://mirrors.aliyun.com/opensuse/update/leap/15.1/oss/ aliyun-openSUSE-Update-Leap-15.1-oss
zypper addrepo -f http://mirrors.aliyun.com/opensuse/update/leap/15.1/non-oss/ aliyun-openSUSE-Update-Leap-15.1-non-oss
#以上命令中最后一个参数为每一个源指定了一个别称
第1步,
禁用所有软件源
sudo zypper mr -da
第2步,
执行添加更新源
最后,
刷新软件源
sudo zypper ref
sudo zypper in openSUSE-repos-NVIDIA
对于 Aeon、Kalpa 和 Leap Micro 用户,请以 root 身份执行:
transactional-update -i pkg install openSUSE-repos-NVIDIA
对于 Leap 用户:
sudo zypper addrepo --refresh 'https://download.nvidia.com/opensuse/leap/$releasever' NVIDIA
打开终端,以 root 权限运行下列命令,来确定您的显卡型号:
# lspci | grep VGA
# lscpu | grep Arch
# hwinfo --gfxcard | grep Model
# hwinfo --arch
使用 inxi 实用程序:
# inxi -G
# inxi -Ga
# zypper se x11-video-nvidiaG0* nvidia-video-G06*
# zypper se -s x11-video-nvidiaG0* nvidia-video-G06*
# zypper in <x11-video-nvidiaG04 或 x11-video-nvidiaG05 或 nvidia-video-G06>
# zypper in <nvidia-glG04 或 nvidia-glG05 或 nvidia-gl-G06>
工具下载地址:
https://support.microsoft.com/zh-tw/topic/windows-8-windows-8-1-windows-server-2012-%E5%92%8C-windows-server-2012-r2-%E7%9A%84-net-framework-3-5-%E6%9B%B4%E6%96%B0-c5c4baac-1708-d32d-2cfb-dd94e4a91b2a
sudo apt-get update
sudo apt-get install kylin-activation libkylin-activation
wget https://dqunying2.jb51.net/202101/tools/wechat-linux-spark_jb51.deb
sudo dpkg -i *.deb
https://opengauss.obs.cn-south-1.myhuaweicloud.com/5.0.3/arm_2203/openGauss-5.0.3-openEuler-64bit-all.tar.gz
https://opengauss.obs.cn-south-1.myhuaweicloud.com/6.0.0-RC1/arm_2203/openGauss-6.0.0-RC1-openEuler-64bit-all.tar.gz
sudo yum groupinstall "Development Tools"
sudo yum install -y wget bzip2-devel
https://cn.download.nvidia.com/XFree86/Linux-x86_64/550.107.02/NVIDIA-Linux-x86_64-550.107.02.run
https://mirrors.huaweicloud.com/java/jdk/8u151-b12/
https://mirrors.huaweicloud.com/mysql/Downloads/MySQL-5.7/
redhat
https://pan.baidu.com/s/1MIRBAobzetqly9TqGDwTnw
提取码:9n6h
https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/
https://developer.aliyun.com/mirror/
https://faq.uniontech.com/desktop/sysmain/black/5255
http://file.yifarj.com:8000/ftp/%E7%89%88%E6%9C%AC%E5%88%97%E8%A1%A8/509/
启动盘
https://www.lanzoub.com/iNLA41ou65if
bin版本1:https://cpv2.mairuan.com/crossoverchina.com/trial/Mac/install-crossover-24.0.1.bin
rpm版本2:https://cpv2.mairuan.com/crossoverchina.com/trial/Mac/crossover-24.0.1-1.rpm
deb包版本3: https://cpv2.mairuan.com/crossoverchina.com/trial/Mac/crossover_24.0.1-1.deb
wget https://repo.huaweicloud.com/java/jdk/8u202-b08/jdk-8u202-linux-x64.tar.gz
mkdir /usr/local/java/
tar -zxvf jdk-8u202-linux-x64.tar.gz -C /usr/local/java
vim /etc/profile
export JAVA_HOME=/usr/local/java/jdk1.8.0_202
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
source /etc/profile
ln -s /usr/local/java/jdk1.8.0_202/bin/java /usr/bin/java
java -version
wget http://mirrors.aliyun.com/repo/Centos-altarch-7.repo -O /etc/yum.repos.d/CentOS-Base.repo
wget -O /etc/yum.repos.d/epel.repo https://mirrors.aliyun.com/repo/epel-7.repo
https://www.mongodb.com/try/download/community-kubernetes-operator
tar -zxvf mongodb-linux-x86_64-ubuntu2204-6.0.11.tgz
mkdir -p /etc/mongodb/data /etc/mongodb/log /etc/mongodb/conf
touch /etc/mongodb/conf/mongodb.conf
bin/mongod --port=27017 --dbpath=/etc/mongodb/data --logpath=/etc/mongodb/log/mongodb.log --bind_ip=0.0.0.0 --fork
/etc/mongodb/conf/mongodb.conf
systemLog:
destination: file
path: /etc/mongodb/log/mongodb.log
logAppend: true
storage:
dbPath: /etc/mongodb/data
engine: wiredTiger
journal:
enabled: true
net:
bindIp: 0.0.0.0
port: 27017
processManagement:
fork: true
bin/mongod -f /etc/mongodb/conf/mongodb.conf
----------------
storage:
dbPath: /var/lib/mongodb
journal:
enabled: true
systemLog:
destination: file
logAppend: true
path: /var/log/mongodb/mongod.log
net:
bindIp: 127.0.0.1
port: 27017
processManagement:
serviceRunning: true
sudo /opt/mongodb/bin/mongod -f /etc/mongod.conf
sudo /opt/mongodb/bin/mongo
----------------
#!/bin/bash
get_disk() {
#获取用户输入的磁盘信息
echo "*************************************"
echo "当前计算机有以下磁盘: "
#保存当前计算机所有磁盘信息
sudo fdisk -l | grep "Disk /dev" | awk '{print $2}' | sed s'/.$//' > /tmp/disk_list
#展示当前计算机所有磁盘
sudo fdisk -l | grep "Disk /dev"
echo "*************************************"
echo "-------------------------------------"
echo "输入系统安装的磁盘分区,然后按回车 "
echo "例子: /dev/sda "
read DISK_NAME
}
get_judgment_read() {
#查看用户输入的磁盘判断是否正确
grep -w "$DISK_NAME" /tmp/disk_list > /dev/null
if [ $? -eq 0 ]
then
echo "您输入的系统安装的磁盘分区为$DISK_NAME"
else
echo "未找到您输入的磁盘"
sudo rm /tmp/disk_list
exit
fi
}
get_chroot() {
#将输入的磁盘里面的分区列出来
sudo mkdir /uos_chroot
sudo fdisk -l $DISK_NAME | grep "$DISK_NAME" | sed -e '/swap/d' > /tmp/disk_dev_tmp_name
sudo sed -i '1d' /tmp/disk_dev_tmp_name
sudo awk '{print $1}' /tmp/disk_dev_tmp_name > /tmp/disk_dev_name
sudo rm /tmp/disk_dev_tmp_name
#判断是全盘安装还是非全盘安装
sudo blkid | grep "Roota" > /dev/null
if [ $? -eq 0 ]
then
echo "全盘安装系统"
#全盘分区找到真正的根分区的UUID,然后找到对应磁盘进行挂载
FLAG=1
while read line
do
sudo mount $line /uos_chroot
if [ -f "/uos_chroot/grub/grub.cfg" ]
then
BOOT_DEV=$line
FLAG=0
break
else
sudo umount /uos_chroot
fi
done < /tmp/disk_dev_name
#判断输入的磁盘是否可以挂载到真正的根分区,
if [ $FLAG -eq 0 ]
then
#根据grub.cfg文件找到真正的ROOT_DEV
ROOT_UUID=`grep "root=UUID=" /uos_chroot/grub/grub.cfg | sed -e '/deepin-ab-recovery/d' | sed 's/ /\n/g' | grep root=UUID | uniq | awk -F '=' '{print $3}'`
ROOT_DEV=`sudo blkid | grep "$ROOT_UUID" | awk '{print $1}' | sed s'/.$//'`
sudo umount /uos_chroot
#开始挂载/目录
sudo mount $ROOT_DEV /uos_chroot
#开始挂载boot目录
sudo mount $BOOT_DEV /uos_chroot/boot
#判断是否有efi目录
sudo blkid | grep "EFI" > /dev/null
if [ $? -eq 0 ]
then
BOOT_EFI_DEV=`sudo blkid | grep "EFI" | awk '{print $1}' | sed s'/.$//'`
sudo mount $BOOT_EFI_DEV /uos_chroot/boot/efi
fi
#开始挂载recovery
RECOVERY_DEV=`sudo blkid | grep "Backup" | awk '{print $1}' | sed s'/.$//'`
sudo mount $RECOVERY_DEV /uos_chroot/recovery
#开始挂载data
DATA_DEV=`sudo blkid | grep "_dde_data" | awk '{print $1}' | sed s'/.$//'`
sudo mount $DATA_DEV /uos_chroot/data
#挂载系统关键结点
sudo mount --bind /dev/ /uos_chroot/dev
sudo mount --bind /dev/pts /uos_chroot/dev//pts
sudo mount --bind /proc /uos_chroot/proc
sudo mount --bind /sys /uos_chroot/sys
#挂载对应data目录
if [ `ls -A /uos_chroot/home | wc -w` -eq 0 ]
then
mount --bind /uos_chroot/data/home /uos_chroot/home
fi
if [ `ls -A /uos_chroot/opt | wc -w` -eq 0 ]
then
mount --bind /uos_chroot/data/opt /uos_chroot/opt
fi
if [ `ls -A /uos_chroot/root | wc -w` -eq 0 ]
then
mount --bind /uos_chroot/data/root /uos_chroot/root
fi
if [ `ls -A /uos_chroot/var | wc -w` -eq 0 ]
then
mount --bind /uos_chroot/data/var /uos_chroot/var
fi
echo "数据已挂载"
#进入chroot挂载对应目录
cd /uos_chroot
echo "您已经进入chroot环境"
sudo chroot .
elif [ $FLAG -eq 1 ]
then
echo "该磁盘没有系统根目录"
sudo umont /uos_chroot
sudo rm -rf /uos_chroot
exit
fi
else
#非全盘安装直接进行挂载
FLAG_NO_DEV=1
while read line
do
sudo mount $line /uos_chroot
if [ -f "/uos_chroot/etc/fstab" ]
then
FLAG_NO_DEV=0
break
elif [ ! -f "/uos_chroot/etc/fstab" ]
then
sudo umount /uos_chroot
fi
done < /tmp/disk_dev_name
if [ $FLAG_NO_DEV -eq 0 ]
then
#查看根据/etc/fstab文件挂载
sudo cat /uos_chroot/etc/fstab | grep "UUID" > /tmp/UUID_LIST
while read line
do
DIR_NAME=`echo $line | awk '{print $2}'`
if [ "$DIR_NAME" = "/" -o "$DIR_NAME" = "none" ]
then
continue
fi
UUID_TMP=`echo $line | awk '{print $1}' | awk -F '=' '{print $2}'`
DEV_NAME=`sudo blkid | grep "$UUID_TMP" | awk '{print $1}' | sed s'/.$//'`
sudo mount $DEV_NAME /uos_chroot$DIR_NAME
done < /tmp/UUID_LIST
#挂载系统关键结点
sudo mount --bind /dev/ /uos_chroot/dev
sudo mount --bind /dev/pts /uos_chroot/dev//pts
sudo mount --bind /proc /uos_chroot/proc
sudo mount --bind /sys /uos_chroot/sys
#进入chroot挂载对应目录
cd /uos_chroot
echo "挂载完毕进入chroot环境"
sudo chroot .
elif [ $FLAG_NO_DEV -eq 1 ]
then
echo "该磁盘没有系统根目录"
sudo umount /uos_chroot
sudo rm -rf /uos_chroot
exit
fi
fi
}
main () {
get_disk
get_judgment_read
get_chroot
}
main
vim ~/.bash_profile
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-1.8.jdk/Contents/Home
PATH=$JAVA_HOME/bin:$PATH:.
CLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:.
export JAVA_HOME
export PATH
export CLASSPATH
source ~/.bash_profile
echo $JAVA_HOME
java -version
centos9 yum
[baseos]
name=CentOS Stream $releasever - BaseOS
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos-stream/9-stream/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
[appstream]
name=CentOS Stream $releasever - AppStream
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos-stream/9-stream/AppStream/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
#!/bin/bash
# 创建download目录用于存储下载内容
mkdir -p ~/download
# 设置 Anaconda3 安装目录和版本
ANACONDA_INSTALL_DIR=~/anaconda3
ANACONDA_VERSION=2021.11
# 下载 Anaconda3 安装脚本
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-py39_4.11.0-Linux-x86_64.sh -O ~/download/anaconda3.sh
# 安装 Anaconda3
bash ~/download/anaconda3.sh -b -p $ANACONDA_INSTALL_DIR
echo 'the installation is completed...'
# 添加 Anaconda3 环境变量
echo 'export PATH=~/anaconda3/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
echo 'the bashrc is completed...'
# 更换清华源
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes
echo 'the channels is completed...'
pip config set global.index-url http://mirrors.aliyun.com/pypi/simple/
pip config set install.trusted-host mirrors.aliyun.com
echo 'the channel of pip has been changed...'
conda
conda init
Ubuntu安装qq
wget -O- https://deepin-wine.i-m.dev/setup.sh | sh
https://dldir1.qq.com/qqfile/qq/QQNT/Linux/QQ_3.2.7_240428_amd64_01.deb
git clone "https://gitee.com/wszqkzqk/deepin-wine-for-ubuntu.git"
cd deepin-wine #切换到下载目录
sudo ./install.sh #执行安装
wget https://packages.deepin.com/deepin/pool/non-free/d/deepin.com.wechat/deepin.com.wechat_2.6.2.31deepin0_i386.deb
wget https://packages.deepin.com/deepin/pool/non-free/d/deepin.com.wechat/deepin.com.wechat_2.6.8.65deepin0_i386.deb
wget https://packages.deepin.com/deepin/pool/non-free/d/deepin.com.qq.im/deepin.com.qq.im_9.1.8deepin0_i386.deb
sudo wget "https://mirrors.huaweicloud.com/deepin/pool/non-free/d/deepin.com.wechat/deepin.com.wechat_2.6.2.31deepin0_i386.deb"
sudo dpkg -i *wechat*deb #安装微信
sudo apt install libjpeg62:i386 #解决微信无法查看发送图片问题
sudo wget https://mirrors.aliyun.com/deepin/pool/non-free/d/deepin.com.qq.im/deepin.com.qq.im_9.1.8deepin0_i386.deb
sudo dpkg -i *qq.im*deb
解决WeChat中文显示乱码、无法输入中文和文字显示黑块的问题
1、中文乱码
找到/opt/deepinwine/tools/下的run.sh和run_v2.sh,
修改 WINE_CMD,并添加三个 export 语句,内容如下:
#WINE_CMD="deepin-wine"
WINE_CMD="LC_ALL=zh_CN.UTF-8 deepin-wine"
#added by user
export GTK_IM_MODULE="ibus"
export QT_IM_MODULE="ibus"
export XMODIFIERS="@im=ibus"
ubuntu 20.04 安装微信和QQ
http://archive.ubuntukylin.com/software/pool/partner/ukylin-wine_70.6.3.25_amd64.deb
sudo apt-get install -f -y ./ukylin-wine_70.6.3.25_amd64.deb
http://archive.ubuntukylin.com/software/pool/partner/ukylin-wechat_3.0.0_amd64.deb
sudo apt-get install -f -y ./ukylin-wechat_3.0.0_amd64.deb
=============方法3
Ubuntu20.04 安装微信
sudo vi /etc/apt/sources.list.d/software.list
deb http://archive.ubuntukylin.com/ubuntukylin focal-partner main
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 56583E647FFA7DE7
sudo apt update
sudo apt install weixin
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ hirsute main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ hirsute main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ hirsute-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ hirsute-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ hirsute-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ hirsute-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ hirsute-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ hirsute-security main restricted universe multiverse
预发布软件源,不建议启用
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ hirsute-proposed main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ hirsute-proposed main restricted universe multiverse
自动设置Ubuntu源
#!/bin/bash
# ubuntu 22/21/20/18/16/14 自动切换 apt 阿里云/清华/腾讯/华为/网易163 源; update 更新,自动部署可 kvm 虚拟化,安装google 浏览器;安装 mp4 播放器
# 执行脚本选择对应的 apt 源码,下面 aptubuntu22 为apt 源 内容修改写入到:/etc/apt/sources.list 然后执行 sudo apt update 进行更新
echo "当前需要输入当前用户的密码,需要执行 sudo 命令" ; sudo date
aptAlibaba(){
aptubuntu22="
deb http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
"
aptubuntu21="
deb http://mirrors.aliyun.com/ubuntu/ hirsute main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ hirsute-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ hirsute-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ hirsute-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ hirsute-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ hirsute main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ hirsute-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ hirsute-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ hirsute-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ hirsute-backports main restricted universe multiverse
"
aptubuntu20="
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
# deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
"
aptubuntu18="
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
# deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
"
aptubuntu16="
deb http://mirrors.aliyun.com/ubuntu/ xenial main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security universe
"
aptubuntu14="
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
## Not recommended
# deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
"
}
aptupdateqinghua(){
# 清华 apt 源:http://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/
# 注意:定义变量的时候引号需要换行,否则原本的换行将被替换为空格
aptubuntu22="
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
# deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
# deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
# deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
# deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
# 预发布软件源,不建议启用
# deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
# deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
"
aptubuntu21="
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ impish main restricted universe multiverse
# deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ impish main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ impish-updates main restricted universe multiverse
# deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ impish-updates main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ impish-backports main restricted universe multiverse
# deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ impish-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ impish-security main restricted universe multiverse
# deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ impish-security main restricted universe multiverse
# 预发布软件源,不建议启用
# deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ impish-proposed main restricted universe multiverse
# deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ impish-proposed main restricted universe multiverse
"
aptubuntu20="
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
# deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
# deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
# deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# 预发布软件源,不建议启用
# deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
"
aptubuntu18="
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
# deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
# deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
# deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
# 预发布软件源,不建议启用
# deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
# deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
"
aptubuntu16="
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
# deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
# deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
# deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
# 预发布软件源,不建议启用
# deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
# deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
"
aptubuntu14="
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty main restricted universe multiverse
# deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse
# deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse
# deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-security main restricted universe multiverse
# deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-security main restricted universe multiverse
# 预发布软件源,不建议启用
# deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-proposed main restricted universe multiverse
# deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-proposed main restricted universe multiverse
"
}
ubuntu_ntpdate(){
# 更新时间
sudo apt install ntpdate
sudo timedatectl set-timezone Asia/Shanghai
sudo ntpdate -u cn.pool.ntp.org
}
ubuntu_release_setApt(){
releaseApt=0;
models=`cat /etc/os-release | grep -w NAME | awk -F"\"" '{print $2}'`
version=`cat /etc/os-release | grep VERSION_ID | awk -F"\"" '{print $2}' | awk -F"." '{print $1}'`
echo "当前机型为:$models 系统版本: $version "
echo "选择目的地源: 阿里云1 清华2 腾讯3 华为4 网易5 任意按键跳过配置 apt 源 " ; read -p "请选择:" readset
case $readset in
"1") echo "当前切换到阿里云源" ; aptAlibaba ;;
"2") echo "当前切换到清华源,较慢" ; aptupdateqinghua ;;
"3") echo "当前切换到腾讯云源" ; aptAlibaba ; releaseApt=1 ; destAptUrl="mirrors.tencent.com" ;;
"4") echo "当前切换到华为云源" ; aptAlibaba ; releaseApt=1 ; destAptUrl="repo.huaweicloud.com" ;;
"5") echo "当前切换到网易163源" ; aptAlibaba ; releaseApt=1 ; destAptUrl="mirrors.163.com" ;;
*) echo "我已经配置 apt 源。正在继续下面任务... " ;;
esac
case $version in
"22") echo "$aptubuntu22" > /etc/apt/sources.list ; echo "当前机型: $models $version 已经写入 aptubuntu22 apt源 " ;;
"21") echo "$aptubuntu21" > /etc/apt/sources.list ; echo "当前机型: $models $version 已经写入 aptubuntu21 apt源 " ;;
"20") echo "$aptubuntu20" > /etc/apt/sources.list ; echo "当前机型: $models $version 已经写入 aptubuntu20 apt源 " ;;
"18") echo "$aptubuntu18" > /etc/apt/sources.list ; echo "当前机型: $models $version 已经写入 aptubuntu18 apt源 " ;;
"16") echo "$aptubuntu16" > /etc/apt/sources.list ; echo "当前机型: $models $version 已经写入 aptubuntu16 apt源 " ;;
"14") echo "$aptubuntu14" > /etc/apt/sources.list ; echo "当前机型: $models $version 已经写入 aptubuntu14 apt源 " ;;
esac
if [ $releaseApt = 1 ]
then
sudo sed -i "s/mirrors.aliyun.com/$destAptUrl/g" /etc/apt/sources.list
fi
}
sudo_install(){
if [ `id -un` != "root" ]
then
echo "当前不是 root 用户,需要检测 sudo 工具是否安装,并且 获取 sudo "
a=`sudo apt list --installed | grep sudo | grep now`
if [ ${#a} -lt 1 ]
then
echo " 当前检测到 您没有安装 sudo 超级权限工具,并且当前也不是 root 用户,没有权限更改apt 源,请切换到root 用户执行本shell 按照操作添加用户的sudo 权限"
exit
else
echo "[ ok ] 当前用户 $USER 已经安装 sudo 工具,并且已经配置获得 sudo 超级权限,继续往下配置..."
sudo touch /etc/apt/sources.list
sudo chmod 777 -R /etc/apt/*
if [ ! -e /etc/apt/sources.list.bak ]
then
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
echo "备份文件 在: /etc/apt/sources.list.bak"
else
echo "已经存在备份文件:/etc/apt/sources.list.bak"
fi
echo "" > /etc/apt/sources.list ; ubuntu_release_setApt
# 文件已经附加了权限,删除后文件权限为默认,而不为 777 。如果删除重写,记得重新附加权限 777
sudo rm -rf /var/lib/dpkg/updates/*
# 解决 sudo dpkg --configure -a # to correct the problem
ubuntu_ntpdate
sudo apt update ; sudo apt update ; sudo apt upgrade -y ; sudo apt list --upgradable
echo "切换 apt update 源,更新软件包,和 查看可升级软件包完成"
fi
else
echo "[ok] 当前是 root 用户"
if [ ! -e /etc/apt/sources.list.bak ]
then
cp /etc/apt/sources.list /etc/apt/sources.list.bak
echo "备份文件 在: /etc/apt/sources.list.bak"
else
echo "已经存在备份文件:/etc/apt/sources.list.bak"
fi
sudo rm -rf /var/lib/dpkg/updates/*
# 解决 sudo dpkg --configure -a # to correct the problem
ubuntu_release_setApt ; ubuntu_ntpdate ; apt update ; apt install -y sudo
if [ ! -e /etc/sudoers.d/stack ]
then
touch /etc/sudoers.d/stack
fi
echo "为其他用户添加sudo 权限,多个用户空格个开!"
read -p "输入:" readuser
userlist=( root $readuser)
for i in ${userlist[*]}
do
catsudo=`cat /etc/sudoers.d/stack | grep $i`
if [ ${#catsudo} -lt 27 ]
then
echo "$i ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack
else
echo "[ok] 已经添加过用户 $i 的 sudo 权限"
fi
if [ $i != root ]
then
echo "useradd $i Please set the password $i: "
useradd -m -d /home/$i -s /bin/bash $i; passwd $i
fi
done
sudo apt update ; sudo apt update ; sudo apt upgrade -y ; sudo apt list --upgradable
echo "切换 apt update 源,更新软件包,和 查看可升级软件包完成"
fi
}
install_kvm(){
installedkvm=` apt list --installed | grep virtinst` ; Length=${#installedkvm}
if [ $Length -gt 1 ]
then
echo "kvm 已经安装。"
else
echo "正在安装kvm ... "
sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virtinst virt-manager -y
sudo systemctl is-active libvirtd
# 验证安装,注意:qemu-kvm 更名为:qemu-system-x86 卸载软件命令:sudo apt autoremove namepackage
echo "$USER ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack
# 授予当前用户sudo超级权限。
sudo usermod -aG libvirt $USER
sudo usermod -aG kvm $USER
# $USER 当前用户名,加入组,能够创建和管理虚拟机,否则无权限。然后注销重新登陆
fi
}
ubuntu_aptupdate(){
echo "指令序号: 1 配置ubuntu 的apt 仓库源; 2 安装 kvm 虚拟机; 3 跳过此步骤,往下继续"
read -p "请输入数字:" selectRun
case $selectRun in
"1") sudo_install ;;
"2") install_kvm ;;
*) echo "已经跳过此步骤!" ;;
esac
}
ubuntu_aptupdate
sudo apt-get --fix-broken install
# 问题:Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution)
# 一键部署:wget http://www.idedo.com/file/ubuntu/shell/server/ubuntu_aptupdate.sh ; chmod +x ubuntu_aptupdate.sh; ./ubuntu_aptupdate.sh
4月23 Ubuntu21
# 编辑文件
sudo vi /etc/apt/sources.list
#-----------内容-----------
#-----------ubuntu 21.04(hirsute)-----------
deb http://mirrors.aliyun.com/ubuntu hirsute main restricted
deb http://mirrors.aliyun.com/ubuntu hirsute-updates main restricted
deb http://mirrors.aliyun.com/ubuntu hirsute universe
deb http://mirrors.aliyun.com/ubuntu hirsute-updates universe
deb http://mirrors.aliyun.com/ubuntu hirsute multiverse
deb http://mirrors.aliyun.com/ubuntu hirsute-updates multiverse
deb http://mirrors.aliyun.com/ubuntu hirsute-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu hirsute-security main restricted
deb http://cn.archive.ubuntu.com/ubuntu hirsute-security universe
deb http://cn.archive.ubuntu.com/ubuntu hirsute-security multiverse
#-----------ubuntu 清华大学-----------
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ hirsute main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ hirsute main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ hirsute-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ hirsute-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ hirsute-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ hirsute-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ hirsute-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ hirsute-security main restricted universe multiverse
# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ hirsute-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ hirsute-proposed main restricted universe multiverse
#-----------ubuntu 20.04(focal)-----------
deb http://mirrors.aliyun.com/ubuntu/ impish main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ impish-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ impish-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ impish-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ impish-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ impish main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ impish-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ impish-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ impish-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ impish-backports main restricted universe multiverse
4月16麒麟server版本安装WPS
https://wps-linux-personal.wpscdn.cn/wps/download/ep/Linux2019/11719/wps-office-11.1.0.11719-1.x86_64.rpm?t=1713262545&k=982a8181c1879f75bd3f63f94348b89e
1.导入密钥
sudo rpm --import https://www.wps.cn/keys/linux-key.gpg
2.添加源
sudo tee /etc/yum.repos.d/wps-office.repo <<EOF
[wps-office]
name=WPS Office
baseurl=http://linux.wps.com/yum/office/$(uname -i)
enabled=1
gpgkey=https://www.wps.cn/keys/linux-key.gpg
gpgcheck=1
EOF
3.更新源
sudo yum update
4.在线安装
sudo yum install wps-office
Ubuntu 20
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
# deb-src http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
# # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
export MPI_BIN=/usr/bin
export MPI_INCLUDE=/usr/include/mpi
export MPI_LIB=/usr/lib/x86_64-linux-gnu/openmpi/lib
echo 'export MPI_BIN=/usr/bin' >> ~/.bashrc
echo 'export MPI_INCLUDE=/usr/include/mpi' >> ~/.bashrc
echo 'export MPI_LIB=/usr/lib/x86_64-linux-gnu/openmpi/lib' >> ~/.bashrc
source ~/.bashrc
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
# deb-src http://security.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
# # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
export JAVA_HOME=/usr/local/jdk1.8.0_162
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
sudo apt update
sudo apt install -y build-essential zlib1g-dev libncurses5 libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev
./configure --enable-optimizations
make -j $(nproc)
sudo make altinstall
python3.12 --version
sudo update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.12 1
sudo update-alternatives --config python3
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
# deb-src http://security.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
# # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
##测试版源
deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
# 源码
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
##测试版源
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
https://cn.download.nvidia.com/XFree86/Linux-x86_64/550.54.14/NVIDIA-Linux-x86_64-550.54.14.run
administrator@09:/tmp$ sudo lspci | grep -i nvid
hwinfo --gfxcard |grep "Vendor"
lspci | egrep -i "vga|display|3d"
lshw -c video
https://admin.pci-ids.ucw.cz//mods/PC/10de?action=help?help=pci
sudo lsmod | grep nouveau
sudo gedit /etc/modprobe.d/blacklist-nouveau.conf
在文件最后结尾添加项目内容
blacklist nouveau
blacklist lbm-nouveau
options nouveau modeset=0
alias nouveau off
alias lbm-nouveau off
sudo update-initramfs -u
完成后会显示"update-initramfs: Generating /boot/initrd.img-5.15.0-83-generic"
sudo reboot
lsmod | grep nouveau
如果禁用了nouveau,一般执行这个命令后 ,没有任何显示。
sudo apt-get install linux-headers-$(uname -r)
sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler
sudo apt-get install --no-install-recommends libboost-all-dev
sudo apt-get install libopenblas-dev liblapack-dev libatlas-base-dev
sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev
sudo apt-get install pkg-config
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt install nvidia-driver-535
https://www.nvidia.cn/Download/index.aspx?lang=cn
https://cn.download.nvidia.com/XFree86/Linux-x86_64/535.129.03/NVIDIA-Linux-x86_64-535.129.03.run
sudo chmod a+x NVIDIA-Linux-x86_64-535.129.03.run
sudo ./NVIDIA-Linux-x86_64-535.129.03.run -no-x-check -no-nouveau-check -no-opengl-files
https://mirrors.huaweicloud.com/java/jdk/8u151-b12/jdk-8u151-linux-x64.tar.gz
https://mirrors.huaweicloud.com/java/jdk/8u181-b13/jdk-8u181-linux-x64.tar.gz
export JAVA_HOME=/usr/local/jdk/jdk1.8.0_151
export JRE_HOME=$JAVA_HOME/jre
export CLASS_PATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
http://135.0.2.91/fysurvey/answer/answerRecord/answerPaper.action?id=9d61c7e57e3c48b2bed04f2e1fa44a62
作者:zhangliangliang
出处:http://www.cnblogs.com/lianglab/
本文版权归作者和博客园共有,写文不易,支持原创,欢迎转载【点赞】,转载请保留此段声明,且在文章页面明显位置给出原文连接,谢谢。