This document records that the new server configuration process is rapidly starting data science surfing. Take the Aliyun server, for example, and remember that once it was created, sometimes it needed to be restarted in order to get a remote ssh!
1. Basic server configuration
With root users, ssh up, you can create a new user for daily use. By default the newly created user does not have root privileges or sub-groups to get root privileges by adding it to the sando group. In Linux system, you can use the root rights as part of your user group. rootThe account has the supreme right to an entire system, for example. New/Add User.
The root, one of the system privileges and SYSTEM privileges are understood as a concept, but above Administrator rights, root is a super-manager user account in Linux and UNIX systems that has the highest authority over the entire system and can be operated by all objects. So many hackers, when hacking into the system, have to raise their privileges to root privileges, understand with Windows means adding their illegal accounts to the group of Administrators. More importantly, obtaining Root privileges in Anjo (based on Linux internal core) means they have been given maximum access to mobile phones, so you can perform all additions, deletions, modifications and checks on any document (including system files) on your cell phone.
sudo adduser NEWUSER # 创建用户
sudo usermod -G sudo NEWUSER # 加入sudo组
groups NEWUSER # 查看分组
su NEWUSER # 切换用户
More:
# 如果要删除用户
sudo deluser NEWUSER --remove-home
# 修改密码
passwd
2. Installation of Miniconda
# linux:
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && bash Miniconda3-latest-Linux-x86_64.sh
# 如果是mac:
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh && bash Miniconda3-latest-Linux-x86_64.sh
3. Access to jupyter for remote connectivity
Install jupyter:
conda install -y -c anaconda jupyter
Steps:
(1) Open the corresponding ports in Aliyun, like here we open the 8055.

(2) Upon installation of jupyter, enter$ jupyter notebook --generate-configGenerates a profile. (3) Enter ipython, configure the password, write down the password (for login) and copy the Hash codesha1:...(for configuration):
In [1]: from notebook.auth import passwd
In [2]: passwd()
Enter password:
Verify password:
Out[2]: 'sha1:67c9e60bb8b6:9f*****4254b2e042ea597d771089e11aed'
(4) Edit jupyter profile:
$ vi .jupyter/jupyter_notebook_config.py
Add:
c.NotebookApp.ip='*' # 如果不行,使用 '0.0.0.0'
c.NotebookApp.notebook_dir = u''
c.NotebookApp.open_browser = False
c.NotebookApp.password = 'sha1:67c9e60bb8b6:9f*****4254b2e042ea597d771089e11aed'
c.NotebookApp.port =8055
Save exit. (5) Run jupyter
$ nohup jupyter notebook >> jupyter.out 2>&1 &
can be accessed through the browser.
http://yourhost:8055, The password is the one you set in ipython.
It’s written as a shell.environment_initiate.sh:
mkdir download
cd download && wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && bash Miniconda3-latest-Linux-x86_64.sh
#update anaconda path
source ~/.bashrc
# 添加国内的源
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --set show_channel_urls yes
conda install -y -c anaconda jupyter
jupyter notebook --generate-config
4. Installation of required reservoirs, opening
conda install -y tqdm numpy pandas scipy matplotlib seaborn scikit-learn lightgbm xgboost catboost
Or by requirements.txt
# conda批量导出包含环境中所有组件的requirements.txt文件
conda list -e > requirements.txt
# pip批量安装requirements.txt文件中包含的组件依赖
conda install --yes --file requirements.txt
Or through the dockerfile?
未经允许不得转载:萌萌Apprentissage » Server configuration online python programming jepyter notebook: fast start data science
linux One Chinese script
Google shell enable enhanced mode 4 nuclear 16G RAM
Python batches to extract mainstream search engine pictures
Python's word crawling across 100 degrees.
PythonTaiichi Taipei Artificial Intelligence Tensoflow Graphic Processing