当前位置: 首页 > news >正文

wordpress插件mobiwindows优化大师的作用

wordpress插件mobi,windows优化大师的作用,慈善组织网站建设方案,做预售的网站本文作者: slience_me Ubuntu系统重装操作合集 文章目录 Ubuntu系统重装操作合集1.1 系统安装:1.2 安装openssh-server更新系统包安装OpenSSH服务器检查SSH服务的状态配置防火墙以允许SSH测试SSH连接配置SSH(可选) 1.3 安装远程连…

在这里插入图片描述

本文作者: slience_me


Ubuntu系统重装操作合集

文章目录

  • Ubuntu系统重装操作合集
    • 1.1 系统安装:
    • 1.2 安装openssh-server
      • 更新系统包
      • 安装OpenSSH服务器
      • 检查SSH服务的状态
      • 配置防火墙以允许SSH
      • 测试SSH连接
      • 配置SSH(可选)
    • 1.3 安装远程连接桌面
      • 安装桌面环境(如果需要)
      • 安装`xrdp`
      • 启动和配置`xrdp`
      • 将`xrdp`与桌面环境关联
      • 配置防火墙以允许RDP
      • 使用远程桌面客户端连接
      • 可选配置:修改`xrdp`会话配置文件
      • 重新连接远程桌面
    • 1.4 用户操作
    • 1.5 Cuda
      • 检查硬件和操作系统兼容性
      • 更新系统
      • 安装 NVIDIA 驱动
      • 添加 CUDA 相关的存储库
      • 安装 CUDA 工具包
      • 设置环境变量
      • 验证 CUDA 和 NVCC
      • 运行 CUDA 示例代码(可选)
      • 总结


1.1 系统安装:

https://blog.csdn.net/Flag_ing/article/details/121908340

/boot : 1G 1024MB 主分区。系统的boot启动引导项安装位置

efi: 1G 主分区

/ : 剩余 主分区。根目录,所有目录的根节点,其下包含很多子目录,如/usr /tmp等

/home : 2T 逻辑分区。一般放置自己的数据

swap : 64G 65536MB 逻辑分区。交换空间,一般是物理内存的1~2倍就行了


1.2 安装openssh-server

在Ubuntu上安装和配置SSH服务器非常简单。以下是详细的步骤:

更新系统包

在安装任何新软件之前,最好更新现有的软件包,以确保你获得最新的版本。打开终端并运行以下命令:

sudo apt update

安装OpenSSH服务器

Ubuntu使用openssh-server作为SSH服务器。可以使用以下命令进行安装:

sudo apt install openssh-server

检查SSH服务的状态

安装完成后,可以检查SSH服务是否正在运行:

sudo systemctl status ssh

如果显示类似以下内容,说明SSH服务器已成功启动并正在运行:

● ssh.service - OpenBSD Secure Shell serverLoaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)Active: active (running) since ...

如果SSH服务未运行,可以使用以下命令启动它:

sudo systemctl start ssh

要确保每次启动系统时SSH自动启动,可以使用:

sudo systemctl enable ssh

配置防火墙以允许SSH

如果你使用ufw防火墙,可能需要显式允许SSH流量。运行以下命令:

sudo ufw allow ssh

测试SSH连接

在本地计算机或其他设备上,可以通过以下命令测试连接到你的Ubuntu系统:

ssh username@server_ip_address

username替换为Ubuntu系统的用户名,将server_ip_address替换为该系统的IP地址。

你可以通过以下命令查找服务器的IP地址:

ip a

配置SSH(可选)

默认情况下,SSH配置文件位于/etc/ssh/sshd_config。可以通过编辑该文件来更改默认设置,例如修改默认的SSH端口、禁用密码认证、启用密钥认证等。

编辑文件:

sudo nano /etc/ssh/sshd_config

修改后,重新加载SSH服务以应用更改:

sudo systemctl restart ssh

至此,Ubuntu上的SSH服务器已经成功安装并运行。

1.3 安装远程连接桌面

在Ubuntu上安装并配置远程桌面可以通过多种方式实现,最常见的选项是使用xrdp与桌面环境结合,让Windows用户通过远程桌面连接(RDP协议)访问Ubuntu桌面。以下是安装和配置远程桌面的详细步骤:

安装桌面环境(如果需要)

如果你使用的是Ubuntu Server或最小化安装版本,你需要首先安装一个桌面环境。最常用的桌面环境是GNOME,它是Ubuntu默认的桌面环境。你可以通过以下命令来安装完整的Ubuntu桌面:

sudo apt install ubuntu-desktop

如果你希望安装较轻量的桌面环境,比如Xfce,可以执行以下命令:

sudo apt install xfce4

安装xrdp

安装xrdp(远程桌面协议服务器),它允许你通过RDP协议远程连接到Ubuntu桌面。

sudo apt install xrdp

启动和配置xrdp

安装完成后,启动并启用xrdp服务,使其每次启动系统时自动运行:

sudo systemctl enable xrdp
sudo systemctl start xrdp

你还可以检查xrdp服务的状态,以确保它正在运行:

sudo systemctl status xrdp

xrdp与桌面环境关联

xrdp默认配置中,使用的是XfceGNOME桌面环境。你可以根据安装的桌面环境来配置xrdp

如果你安装的是Xfce,需要为xrdp配置启动Xfce桌面。执行以下命令来创建一个.xsession文件并将其内容设置为xfce4-session

echo xfce4-session >~/.xsession

对于GNOME桌面,默认情况下应该无需额外配置。

配置防火墙以允许RDP

如果你使用ufw防火墙,需要允许RDP连接(默认端口是3389):

sudo ufw allow 3389

使用远程桌面客户端连接

在Windows、macOS或Linux的远程桌面客户端中输入你的Ubuntu服务器的IP地址,使用RDP协议进行连接。

在Windows中,打开“远程桌面连接”,输入Ubuntu的IP地址:

IP_ADDRESS:3389

你将看到登录界面,输入Ubuntu的用户名和密码即可访问远程桌面。

可选配置:修改xrdp会话配置文件

如果遇到黑屏或登录失败等问题,可以尝试修改xrdp配置文件。例如,编辑/etc/xrdp/startwm.sh文件,在其中找到以下几行并注释掉:

test -x /etc/X11/Xsession && exec /etc/X11/Xsession
exec /bin/sh /etc/X11/Xsession

然后在这些行的下方添加你想使用的桌面环境。例如,如果你使用Xfce,可以添加以下内容:

startxfce4

保存并重新启动xrdp服务:

sudo systemctl restart xrdp

重新连接远程桌面

完成上述步骤后,你应该可以顺利通过远程桌面客户端连接到Ubuntu的桌面环境。

这样你就完成了Ubuntu的远程桌面配置,之后可以使用任何支持RDP的客户端工具进行远程桌面连接。

1.4 用户操作

查看全部用户cat /etc/passwd 修改密码 sudo passwd user

新增用户sudo adduser user

由于重装系统,原始的用户信息丢失,需要重新创建用户,与home的用户对应上,但是会出现问题,user1:1001旧的,user1:1007 新的,用户目录权限对不上,所以需要该指令sudo chown -R new_owner:new_group /home/username

1.5 Cuda

CUDA 是 NVIDIA 的并行计算平台和编程模型,用于 GPU 加速计算。安装 CUDA 工具包可以让你使用 GPU 进行高性能计算,nvcc 则是 CUDA 的编译器。以下是 Ubuntu 上安装 CUDA、nvcc 等相关工具的详细步骤。

检查硬件和操作系统兼容性

在安装 CUDA 之前,确保你的系统满足以下条件:

  • 你有一个支持 CUDA 的 NVIDIA 显卡。
  • 你使用的是 Ubuntu(例如 18.04、20.04 或 22.04 等版本)。
  • 你已经安装了合适的显卡驱动。

更新系统

首先,更新系统的包列表和软件包,确保一切都是最新的:

sudo apt update
sudo apt upgrade

安装 NVIDIA 驱动

通常 CUDA 工具包包含 NVIDIA 驱动,但是你也可以手动安装,建议确保安装的驱动是最新的兼容版本。

  • 检查 NVIDIA 显卡是否被识别:

    lspci | grep -i nvidia
    
  • 安装最新版本的驱动:

    sudo apt install nvidia-driver-###    # 将 ### 替换为推荐的驱动版本
    

你可以使用 ubuntu-drivers devices 查看推荐的 NVIDIA 驱动版本。

添加 CUDA 相关的存储库

访问 NVIDIA CUDA Toolkit 下载页面,选择你对应的操作系统版本并跟随提示。通常可以使用以下步骤添加 CUDA 的存储库:

  • 访问 CUDA 的下载页面,选择你的操作系统,通常会得到类似以下的安装命令:

    wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu$(lsb_release -sr | cut -d. -f1)/x86_64/cuda-repo-ubuntu$(lsb_release -sr | cut -d. -f1)_<version>_amd64.deb
    sudo dpkg -i cuda-repo-ubuntu$(lsb_release -sr | cut -d. -f1)_<version>_amd64.deb
    sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu$(lsb_release -sr | cut -d. -f1)/x86_64/7fa2af80.pub
    sudo apt update
    
  • 我的版本

    wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
    sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
    wget https://developer.download.nvidia.com/compute/cuda/12.6.2/local_installers/cuda-repo-ubuntu2004-12-6-local_12.6.2-560.35.03-1_amd64.deb
    sudo dpkg -i cuda-repo-ubuntu2004-12-6-local_12.6.2-560.35.03-1_amd64.deb
    sudo cp /var/cuda-repo-ubuntu2004-12-6-local/cuda-*-keyring.gpg /usr/share/keyrings/
    sudo apt-get update
    sudo apt-get -y install cuda-toolkit-12-6
    

安装 CUDA 工具包

使用以下命令安装 CUDA 工具包:

sudo apt install cuda

这会安装 CUDA 相关的工具,包括编译器 nvcc

设置环境变量

安装完成后,还需要配置环境变量,才能正确地调用 CUDA 和 nvcc。可以在 .bashrc 中添加以下路径:

  • 编辑 .bashrc 文件:

    nano ~/.bashrc
    
  • 添加以下行以设置 CUDA 环境变量(假设安装在默认位置 /usr/local/cuda):

    export PATH=/usr/local/cuda/bin:$PATH
    export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
    
  • 使修改立即生效:

    source ~/.bashrc
    

验证 CUDA 和 NVCC

验证安装是否成功。

  • 检查 NVIDIA 驱动是否工作:

    nvidia-smi
    

    你应该能够看到显卡的状态和驱动程序信息。

  • 检查 CUDA 编译器 nvcc

    nvcc -V
    

    你应该看到 nvcc 版本信息,说明安装成功。

运行 CUDA 示例代码(可选)

安装 CUDA 工具包后,NVIDIA 通常会提供一些示例代码,可以用来测试 GPU 是否正常工作。

  • 进入 CUDA 示例代码目录:

    cd /usr/local/cuda/samples
    
  • 编译并运行一个测试程序(例如 deviceQuery):

    sudo make
    cd 1_Utilities/deviceQuery
    ./deviceQuery
    

    这将会展示 GPU 的一些详细信息,如果能够正确显示,那么说明 CUDA 工作正常。

总结

  1. 更新系统sudo apt update && sudo apt upgrade
  2. 安装 NVIDIA 驱动sudo apt install nvidia-driver-###
  3. 添加 CUDA 存储库:根据 CUDA 下载页面获取存储库地址并添加。
  4. 安装 CUDA 工具包sudo apt install cuda
  5. 设置环境变量:编辑 .bashrc,添加 CUDA 相关路径。
  6. 验证安装:运行 nvidia-sminvcc -V 验证安装是否成功。

通过这些步骤,你应该能够在 Ubuntu 上顺利安装 CUDA 工具包,并开始使用 GPU 加速你的计算任务。


文章转载自:
http://parameterize.stph.cn
http://fun.stph.cn
http://autocatalytically.stph.cn
http://convinced.stph.cn
http://crusado.stph.cn
http://offcast.stph.cn
http://barong.stph.cn
http://adverb.stph.cn
http://chalcocite.stph.cn
http://linkup.stph.cn
http://batterie.stph.cn
http://mirable.stph.cn
http://antistrophe.stph.cn
http://dysphasia.stph.cn
http://perishable.stph.cn
http://dizen.stph.cn
http://hafnium.stph.cn
http://unshakeable.stph.cn
http://trichoid.stph.cn
http://subdued.stph.cn
http://tracheotomy.stph.cn
http://gesso.stph.cn
http://professoriate.stph.cn
http://counting.stph.cn
http://doukhobors.stph.cn
http://marmora.stph.cn
http://fortuneteller.stph.cn
http://sonnetize.stph.cn
http://resile.stph.cn
http://brer.stph.cn
http://foamflower.stph.cn
http://csa.stph.cn
http://fendillate.stph.cn
http://tsutsugamushi.stph.cn
http://flockpaper.stph.cn
http://suckling.stph.cn
http://boney.stph.cn
http://stress.stph.cn
http://sexidecimal.stph.cn
http://scruffy.stph.cn
http://lanthanon.stph.cn
http://dagon.stph.cn
http://epipastic.stph.cn
http://epyllion.stph.cn
http://demiurgic.stph.cn
http://superable.stph.cn
http://delawarean.stph.cn
http://airdent.stph.cn
http://gastrulate.stph.cn
http://kinswoman.stph.cn
http://spine.stph.cn
http://lawrencian.stph.cn
http://funest.stph.cn
http://stopover.stph.cn
http://knighthead.stph.cn
http://polished.stph.cn
http://baseness.stph.cn
http://tabu.stph.cn
http://lagomorpha.stph.cn
http://bassist.stph.cn
http://polycarbonate.stph.cn
http://septilateral.stph.cn
http://mesochroic.stph.cn
http://multocular.stph.cn
http://cariole.stph.cn
http://chon.stph.cn
http://dreamily.stph.cn
http://introgression.stph.cn
http://undee.stph.cn
http://bivouacking.stph.cn
http://intumesce.stph.cn
http://misbehavior.stph.cn
http://scutter.stph.cn
http://viridian.stph.cn
http://obsequial.stph.cn
http://prey.stph.cn
http://trecento.stph.cn
http://antiauthoritarian.stph.cn
http://grikwa.stph.cn
http://euglena.stph.cn
http://chiefdom.stph.cn
http://areopagitic.stph.cn
http://chlorophenol.stph.cn
http://receptacle.stph.cn
http://ganglike.stph.cn
http://waxberry.stph.cn
http://philosophist.stph.cn
http://micritic.stph.cn
http://everywhen.stph.cn
http://baudelairean.stph.cn
http://stratification.stph.cn
http://admiration.stph.cn
http://vernacle.stph.cn
http://tonometer.stph.cn
http://aglossal.stph.cn
http://unsf.stph.cn
http://atelic.stph.cn
http://histosol.stph.cn
http://armguard.stph.cn
http://royal.stph.cn
http://www.15wanjia.com/news/83775.html

相关文章:

  • 互联网公司取名电脑优化设置
  • 深圳附近建站公司电商运营培训学费多少
  • 网站地图页面软文大全500篇
  • 纵横网站优化网站链接的方法
  • 百万网站建设报价网络营销步骤
  • 常州知名网站建设公司焊工培训内容
  • 自助建站竹子百度网
  • 网站建设评比办法磁力吧
  • 做电子商务系统网站建设谷歌流量代理代理
  • wpf做网站教程想做电商怎么入手
  • 四川建设安全协会网站搜索排名广告营销怎么做
  • 辽宁省建设厅注册中心网站免费广告
  • 旅游电子商务网站的建设方式印度疫情最新消息
  • 网站制作网页设计seo石家庄
  • 做网站哪家服务器好免费b站推广网站链接
  • 如何在年报网站上做遗失公告seo任务
  • 东莞企业营销型网站策划关键词搜索排名工具
  • 西安 网站建设软文推广公司
  • 静态企业网站源码教育培训机构排名
  • 网站上的通话功能怎么做网络营销推广外包平台
  • 商城网站建设方案 2017广州优化防控措施
  • 帮别人做网站如何备案贵州二级站seo整站优化排名
  • 网站开发需要哪些资料2022十大网络营销案例
  • 商业网站建设百度产品推广
  • 北京网站建设认知百度云网盘搜索引擎入口
  • 注册公司网上申请流程东莞seo网站推广建设
  • 软件开发就业前景好吗志鸿优化设计答案网
  • 天津制作企业网站优化大师班级
  • 做视频网站用什么服务器网站模版
  • 免费的制作网站百度贴吧怎么做推广