ECS Ubuntu版本
購買完成后昼窗,進(jìn)入實(shí)例列表。如果之前沒有設(shè)置密碼敷燎,則在實(shí)例列表中可以進(jìn)行相關(guān)操作暂筝。
- 重置密碼
點(diǎn)擊更多->重置密碼
,重置密碼后懈叹,記得重啟該實(shí)例乖杠。 - ssh登錄
$ sudo ssh IP地址
Password: // 輸入本機(jī)密碼
The authenticity of host 'IP地址' can't be established.
RSA key fingerprint is [RSA key].
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'IP地址' (RSA) to the list of known hosts.
root@IP地址's password: // 輸入ECS設(shè)置密碼
Welcome to aliyun Elastic Compute Service!
Last login: Thu Jul 20 20:35:35 2017
- 添加用戶
在實(shí)際操作過程中,應(yīng)避免使用root權(quán)限澄成。
// 創(chuàng)建新用戶yyy
root@xxxx:~# adduser yyy // 添加新用戶yyy
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US:en",
LC_ALL = (unset),
LC_CTYPE = "zh_CN.UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Adding user `yyy' ...
Adding new group `yyy' (1002) ...
Adding new user `yyy' (1002) with group `yyy' ...
Creating home directory `/home/yyy' ...
Copying files from `/etc/skel' ...
Enter new UNIX password: // 設(shè)置新用戶密碼
Retype new UNIX password: // 設(shè)置新用戶密碼
passwd: password updated successfully
Changing the user information for yyy
Enter the new value, or press ENTER for the default
Full Name []: yyy // 新用戶信息
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] y
// 添加完成后胧洒,使用以下命令查看
$ ls /home
yyy // 新用戶目錄
- 安裝軟件
// 更新apt-get
$ apt-get update
// 安裝git
$ apt-get install git
// 查看git版本
$ git --version
- 退出
$ exit