腾讯云服务计算机环境申请+SSH远程连接(mobaxterm)+centos 7.5 服务器(anaconda-python)开通jupyter编程环境

腾讯云服务计算机环境申请+SSH远程连接(mobaxterm)+centos 7.5 服务器(anaconda-python)开通jupyter编程环境

  • 申请腾讯云服务计算机环境, 在腾讯云机上安装好centos 7.5 服务器操作系统,通过ssh工具(mobaxterm)远程连接进入腾讯云机命令行。 在centos上安装anaconda计算环境(python),开通jupyter编程环境。

一、申请腾讯云服务计算机环境

1.搜索腾讯云,点击【云+校园】学生服务器体验套餐10元/月
在这里插入图片描述
2.安装centos 7.5 服务器操作系统
在这里插入图片描述

二、ssh工具(mobaxterm)远程连接进入腾讯云

1.下载安装mobaxterm
安装mobaxterm→session→SSH→输入服务器的IP和用户名,端口为22,点击ok。
在这里插入图片描述
输入腾讯云消息中的密码。
在这里插入图片描述
在这里插入图片描述

三、安装anaconda计算环境(python)

1.wget在线下载安装包

wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-5.0.0-Linux-x86_64.sh

2.执行安装命令

bash Anaconda3-5.0.0-Linux-x86_64.sh

3.选择安装路径
在这里插入图片描述
4.配置环境变量
  vi /root/.bashrc
  export PATH=/root/anaconda3/bin:$PATH
  source ~/.bashrc (重新加载配置文件)

输入有关命令查看其版本信息
在这里插入图片描述

四、jupyter编程环境

1.添加root启动权限

jupyter notebook --generate-config --allow-root

2.ipython生成密令

[root@VM_0_10_centos ~]# ipython
In [1]: from notebook.auth import passwd
In [2]: passwd()
Enter password:
Verify password:
Out[4]: 'sha1:407f29dc0539:affea98228b6e90f09c2340ead88f8d674f1e79b'
In [5]: exit//退出

3.修改配置文件
vi /root/.jupyter/jupyter_notebook_config.py
修改下面这些内容,删除#

c.NotebookApp.ip='*'
c.NotebookApp.password = u'sha1:407f29dc0539:affea98228b6e90f09c2340ead88f8d674f1e79b'
c.NotebookApp.open_browser = False
c.NotebookApp.port =8888   

4.启动jupyter
jupyter notebook --ip=0.0.0.0 --no-browser --allow-root在这里插入图片描述
5.浏览器中启动jupyter

The Jupyter Notebook is running at: http://0.0.0.0:8888/

在浏览器中输入网址为:腾讯云主机IP:系统指定端口,输入第二步设置的密码,进入jupyter界面。

在这里插入图片描述
在打开的网页中选择右边的NEW,点击Python3就可以新建Python文件。
编辑print("hello 长安")进行测试。
在这里插入图片描述

发布了6 篇原创文章 · 获赞 0 · 访问量 184

猜你喜欢

转载自blog.csdn.net/QLBB14543/article/details/103916347
今日推荐