CentOS7.5服务器安装(并添加用户) anaconda3 并配置 PyTorch1.0
===========================================================================================
[admin@localhost ~]$ sudo vim /etc/sudoers
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
[sudo] password for admin:
admin is not in the sudoers file. This incident will be reported.
切换至root用户下
[admin@localhost ~]$ su root
Password:
[root@localhost admin]# ls -l /etc/sudoers
-r--r-----. 1 root root 4328 Oct 30 10:38 /etc/sudoers
[root@localhost admin]# chmod -v u+w /etc/sudoers
mode of ‘/etc/sudoers’ changed from 0440 (r--r-----) to 0640 (rw-r-----)
[root@localhost admin]# ls -l /etc/sudoers
-rw-r-----. 1 root root 4328 Oct 30 10:38 /etc/sudoers
[root@localhost admin]# vim /etc/sudoers
在 root ALL=(ALL) ALL 后面加上 username ALL = (ALL) ALL,其中username表示用户名
[root@localhost admin]# chmod -v u-w /etc/sudoers
mode of ‘/etc/sudoers’ changed from 0640 (rw-r-----) to 0440 (r--r-----)
[root@localhost admin]# ls -l /etc/sudoers
-r--r-----. 1 root root 4438 Mar 11 09:34 /etc/sudoers
退出root用户
[root@localhost admin]# exit
exit
[admin@localhost ~]$
添加用户
先切换至root用户下
adduser jiangshan
passwd jiangshan
adduser jinyan
passwd jinyan
chmod -v u+w /etc/sudoers
vim /etc/sudoers
在这一行root ALL=(ALL) ALL下
jiangshan ALL=(ALL) ALL # add by jiangshan with hands
jinyan ALL=(ALL) ALL # add by jiangshan with hands
chmod -v u-w /etc/sudoers
退出root用户
exit
===================================================================================================
安装wget
sudo yum install wget
下载 Anaconda3-2018.12-Linux-x86_64.sh
[jiangshan@localhost ~]$ wget https://repo.anaconda.com/archive/Anaconda3-2018.12-Linux-x86_64.sh
安装bzip2
sudo yum install -y bzip2
安装Anaconda3
bash Anaconda3-2018.12-Linux-x86_64.sh
######################################################
注意~初始设定的存放位置:
Do you wish the installer to initialize Anaconda3
in your /home/jiangshan/.bashrc ? [yes|no]
A backup will be made to: /home/jiangshan/.bashrc-anaconda3.bak
######################################################
使环境变量生效
$ source /home/jiangshan/.bashrc
测试
$ conda -V
conda 4.5.12
正常,下一步
安装PyTorch
设置镜像
# 添加Anaconda的清华镜像
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
# 设置搜索时显示通道地址
conda config --set show_channel_urls yes
##################################
###PyTorch Build Stable (1.0)###
###Your OS Linux ###
###Package Conda ###
###Language Python 3.7 ###
###CUDA None ###
##################################
$ conda install pytorch-cpu torchvision-cpu -c pytorch
若以上自动不好使,则手动下载,手动安装pytorch、torchvision
$ cd /home/jiangshan/anaconda3/pkgs
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/linux-64/pytorch-cpu-1.0.1-py3.7_cpu_2.tar.bz2
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/linux-64/torchvision-cpu-0.2.1-py37_1.tar.bz2
conda install pytorch-cpu-1.0.1-py3.7_cpu_2.tar.bz2
conda install torchvision-cpu-0.2.1-py37_1.tar.bz2
测试
(base) [jiangshan@localhost pkgs]$ conda -V
conda 4.5.12
(base) [jiangshan@localhost pkgs]$ python
Python 3.7.1 (default, Dec 14 2018, 19:28:38)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.__version__
'1.0.1.post2'
CentOS7.5服务器安装(并添加用户) anaconda3 并配置 PyTorch1.0的更多相关文章
- linux 常用命令(三)——(centos7)MySql 5.7添加用户、删除用户与授权
一.创建用户:以root用户登录到数据库进行用户创建 命令: CREATE USER 'username'@'host' IDENTIFIED BY 'password'; 例如: CREATE US ...
- centos7 添加用户,组
centos7添加用户,组. groupadd projectUsers //添加组,组名projectUser. cat /etc/group //查看最后一行是projectUser. 添加用户并 ...
- centos7 lvm合并分区脚本初探-linux性能测试 -centos7修改网卡名字-jdk环境安装脚本-关键字查询文件-批量添加用户
1.#!/bin/bash lvmdiskscan | grep centos > /root/a.txt a=`sed -n '1p' /root/a.txt` b=`sed -n '2p' ...
- [CentOs7]搭建ftp服务器(2)——添加用户
摘要 上篇文章完成了ftp服务器的安装与匿名访问的内容,当然出于安全的考虑是不允许匿名访问服务器的,所以就有了本篇的内容 ,为ftp服务器添加用户,用改用户进行访问. vsftpd添加用户 FTP用户 ...
- Centos7 添加用户及设置权限
一.添加用户 1.登录root 用户 [gau@localhost /]$ su Password: # 输入密码 [root@localhost /]# 2.添加用户 [root@localhost ...
- Centos7 Openstack - (第二节)添加认证服务(Keystone)
Centos7 install Openstack - (第二节)添加认证服务(Keystone) 我的blog地址:http://www.cnblogs.com/caoguo 根据openstack ...
- Centos7 yum安装OpenLDAP(普通用户可以更改密码)
环境 系统版本:centos7.4 openldap版本2.4 安装和配置 安装并启动服务 安装: yum install openldap openldap-servers openldap-cli ...
- IdentityServer4 使用OpenID Connect添加用户身份验证
使用IdentityServer4 实现OpenID Connect服务端,添加用户身份验证.客户端调用,实现授权. IdentityServer4 目前已更新至1.0 版,在之前的文章中有所介绍.I ...
- sh3.useradd 添加用户脚本
1.写一个脚本: 添加10个用户user1到user10,密码同用户名,但要求只有用户不存在的情况下才能添加 #/bin/bash # ..};do if id user$i &> /d ...
随机推荐
- MySQL设计之三范式的理解
转自:https://blog.csdn.net/wangqyoho/article/details/52900585 设计关系数据库时,遵从不同的规范要求,设计出合理的关系型数据库,这些不同的规范要 ...
- POJ2104(可持久化线段树)
K-th Number Time Limit: 20000MS Memory Limit: 65536K Total Submissions: 58759 Accepted: 20392 Ca ...
- jquery中 苹果手机对on触发的点击事件无效果
在被点击的元素上加上样式 cursor:pointer; 苹果手机就可以触发事件了
- 集合框架二(Collection接口实现类常用遍历方法)
四种常用遍历方式 Collection coll = new ArrayList(); coll.add("123"); coll.add("456"); co ...
- SD从零开始57-58,第三方订单处理,跨公司销售
[原创] SD从零开始57 第三方订单处理流程 第三方订单处理的流程Processes for Third-Party Order Processing 客户的采购订单首先在你公司的一个销售组织作为一 ...
- react native进阶
一.前沿||潜心修心,学无止尽.生活如此,coding亦然.本人鸟窝,一只正在求职的鸟.联系我可以直接微信:jkxx123321 二.项目总结 **||**文章参考资料:1. http://blog ...
- [SQLSERVER] 把TransactionLog截断
注意:以下语句非常危险 --BACKUP LOG MyDb TO DISK=’NUL:’
- Angular-1.6 路由 简单使用
index.html <!DOCTYPE html> <html lang="en"> <head> <meta charset=&quo ...
- 一张思维导图纵观MySQL数据安全体系!
杨奇龙 2017-06-29 09:52:10 786 作者介绍 杨奇龙,前阿里数据库团队资深DBA,主要负责淘宝业务线,经历多次双十一,有海量业务访问DB架构设计经验.目前就职于有赞科技,负责数据库 ...
- MD5密码加密
using System; using System.Security.Cryptography; using System.Text; namespace DimoNetwork.Common.DE ...