===========================================================================================
[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的更多相关文章

  1. linux 常用命令(三)——(centos7)MySql 5.7添加用户、删除用户与授权

    一.创建用户:以root用户登录到数据库进行用户创建 命令: CREATE USER 'username'@'host' IDENTIFIED BY 'password'; 例如: CREATE US ...

  2. centos7 添加用户,组

    centos7添加用户,组. groupadd projectUsers //添加组,组名projectUser. cat /etc/group //查看最后一行是projectUser. 添加用户并 ...

  3. 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' ...

  4. [CentOs7]搭建ftp服务器(2)——添加用户

    摘要 上篇文章完成了ftp服务器的安装与匿名访问的内容,当然出于安全的考虑是不允许匿名访问服务器的,所以就有了本篇的内容 ,为ftp服务器添加用户,用改用户进行访问. vsftpd添加用户 FTP用户 ...

  5. Centos7 添加用户及设置权限

    一.添加用户 1.登录root 用户 [gau@localhost /]$ su Password: # 输入密码 [root@localhost /]# 2.添加用户 [root@localhost ...

  6. Centos7 Openstack - (第二节)添加认证服务(Keystone)

    Centos7 install Openstack - (第二节)添加认证服务(Keystone) 我的blog地址:http://www.cnblogs.com/caoguo 根据openstack ...

  7. Centos7 yum安装OpenLDAP(普通用户可以更改密码)

    环境 系统版本:centos7.4 openldap版本2.4 安装和配置 安装并启动服务 安装: yum install openldap openldap-servers openldap-cli ...

  8. IdentityServer4 使用OpenID Connect添加用户身份验证

    使用IdentityServer4 实现OpenID Connect服务端,添加用户身份验证.客户端调用,实现授权. IdentityServer4 目前已更新至1.0 版,在之前的文章中有所介绍.I ...

  9. sh3.useradd 添加用户脚本

    1.写一个脚本: 添加10个用户user1到user10,密码同用户名,但要求只有用户不存在的情况下才能添加 #/bin/bash # ..};do if id user$i &> /d ...

随机推荐

  1. POJ1269(KB13-D 计算几何)

    Intersecting Lines Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 16681   Accepted: 71 ...

  2. 初学HTML-4

    img标签:<img src=" "> src——source缩写,告诉img标签需要显示的图片名称 属性:width:宽度   height:高度.若未指定宽和高,则 ...

  3. 设计模式原则(7)--Composition&AggregationPrinciple(CARP)--合成&聚合复用原则

    作者QQ:1095737364    QQ群:123300273     欢迎加入! 1.定义:  要尽量使用合成和聚合,尽量不要使用继承. 2.使用场景: 要正确的选择合成/复用和继承,必须透彻地理 ...

  4. offsetTop 实现滚动条内内容定位

    js代码: var _parent_top = document.getElementsByClassName('parent')[0].offsetTop;var _phase_top = docu ...

  5. CentOS7下 将django工程部署到Apache2.4上

    因为需要写一个网站,考虑到也没写过其他的语言,就直接采用了python,说起python的框架,就是大名鼎鼎的Django啦. 工程所采用的版本是python 2.7,django 是1.8,wind ...

  6. Memcached+WebApi记录

    一.安装Memcached Memcached1.2.6 http://files.cnblogs.com/files/jasonduan/11465401756756.zip Memcached.C ...

  7. Sql Server Express 2005提示"failed to generate a user instance of sql server "

    解决方法: 修改连接字符串“Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\mydb.mdf;Integrated Security ...

  8. Android IOC注解库EasyUI

    EasyUI介绍 1.使用反射机制和注解实现类似于butterknife的IOC框架 2.快速的findViewById和OnClick 3.扩展了click时无网络监测 4.扩展了快速点击监测 使用 ...

  9. LeetCode题解之Merge k Sorted Lists 解法二

    1.题目描述 2.分析 利用 vector 存储指针,同时合并k个链表. 3.代码 ListNode* mergeKLists(vector<ListNode*>& lists) ...

  10. .NET笔试题集(三)

    转载于:http://www.cnblogs.com/ForEvErNoME/archive/2012/09/09/2677415.html 1.传入某个属性的set方法的隐含参数的名称是什么? va ...