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 ...
随机推荐
- Slickflow.NET 开源工作流引擎基础介绍(七) -- 并行分支多实例模式实现
前言:并行审批是比较常见的流程模式,在工作流模式介绍中,通常是多个分支通过网关(Gateway)来控制实现.默认的分支类型是静态定义好的.本文扩展了并行网关的控制方式,实现了动态多实例的并行分支网关, ...
- C# 8.0 范围类型 Range Type
目录 C# 8 范围类型 Range Type: 范围缩写: 从一个索引开始到数组的最后一个对象 从数组的第一个对象到指定索引 整个数组: 从数组的某个索引开始一直到距数组尾部某个索引: 范围类型 替 ...
- linux vim 行缩进,批量移动多行
显示行号用::set nu :49>5 从第49行开始,连接5行右移一个tab. :49,93> 从第49行开始到93行右移一个tab 选中多行,然后移动 https://jingy ...
- 【代码笔记】iOS-获得现在的时间(2015-09-11)
一,代码. - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, ...
- 【代码笔记】iOS-NSTimer
代码: RootViewController.h #import <UIKit/UIKit.h> @interface RootViewController : UIViewControl ...
- 企业BI系统应用的切入点及五大策略
从技术的角度来看,BI的技术正在走向成熟,处于一个发展的阶段,但它促使了BI的应用在成本方面开始逐步的降低,越来越多的企业在BI应用方面取得了成功.从实施的角度来出发,实施商业智能系统是一项复杂的系统 ...
- MySQL缓存机制详解(一)
本文章拿来学习用||参考资料:http://www.2cto.com/database/201308/236361.html 对MySql查询缓存及SQL Server过程缓存的理解及总结 一.M ...
- 一致性Hash(Consistent Hashing)原理剖析
引入 在业务开发中,我们常把数据持久化到数据库中.如果需要读取这些数据,除了直接从数据库中读取外,为了减轻数据库的访问压力以及提高访问速度,我们更多地引入缓存来对数据进行存取.读取数据的过程一般为: ...
- .net core项目初建
电脑装Visual Studio2017,并升级版本.启动一个.net core 的项目. NET Core基本介绍 1.1 什么是ASP.NET Core ASP.NET Core 是一个全新的开源 ...
- Azure 门户中基于角色的访问控制入门
面向安全的公司应侧重于向员工提供他们所需的确切权限. 权限过多,可能会向攻击者公开帐户. 权限太少意味着员工无法有效地完成其工作. Azure 基于角色的访问控制 (RBAC) 可通过为 Azure ...