买了一台阿里云的服务器,做下捣腾笔记。
系统
查看版本
1 2 3 4 5 6
| ➜ ~ lsb_release -a LSB Version: :core-4.1-amd64:core-4.1-noarch Distributor ID: CentOS Description: CentOS Linux release 7.4.1708 (Core) Release: 7.4.1708 Codename: Core
|
创建用户
1 2 3
| adduser admin passwd admin 输入密码
|
创建授权
1 2 3 4 5 6 7
| 查看授权文件 ls -l /etc/sudoers 增加写权限 chmod -v u+w /etc/sudoers
编辑 vim /etc/sudoers
|
新增新用户授权
1 2 3
| ## Allow root to run any commands anywher root ALL=(ALL) ALL admin ALL=(ALL) ALL #这个是新增的用户
|
切换用户shell(把.oh-my-zsh拷贝到用户目录下)
查看shell
yum软件安装
安装git
先查看git是否存在
安装命令
安装zsh
配置oh-my-zsh
1 2 3
| git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh cp ~/.zshrc ~/.zshrc.orig cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
|
安装nginx
查看信息
执行安装
安装Python3
首先安装依赖
1
| um install -y openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel gcc cc
|