Rancheros Installation Configuration Tutorial

Source: Internet
Author: User
Tags begin rsa private key ssh nameserver

Rancheros is a compact version of Linux, produced by Rancher Labs, designed for Docker,

Provides a complete Docker operating environment.

Rancheros system Mirroring Download Address: Https://github.com/rancher/os

System requirements: The memory must be above 2GB.

Login account After system mirroring is started: Rancher Password: Rancher

Installation diagram:

System Mirroring Boot Complete

Login Username password is rancher

Add IP Address:

sudo ip addr add 192.168.21.133/24 dev eth0

Or

sudo ifconfig eth0 192.168.21.133 netmask 255.255.255.0

To add a gateway:

sudo route add default GW 192.168.21.2

To modify DNS:

sudo vi/etc/resolv.conf

NameServer 8.8.8.8

NameServer 8.8.4.4

: wq! #保存退出

Remote connection server using SSH client

Configure SSH remote secret key login, the Rancheros installed to the hard disk, you must use the secret key to log in, otherwise can not operate the server, the console also can not use the password to log in.

ssh-keygen-t RSA #配置秘钥登录

Writes the generated public key id_rsa.pub to the Cloud-config.yml file

cd/home/rancher/.ssh/

Cat Id_rsa.pub #公钥

Ssh-rsa Aaaab3nzac1yc2eaaaadaqabaaabaqd1t22andfxpkwm1o8crgnjy9yejbj7sckmsvspcvlitgtkeibinh61wpyo51tpyhjjptebfjexz7d8wqpgqpcnpfydw sk9nec7jedsrhieoqkguayk12d61fhkqsxopt9psfaz7efzlfvo/halcmjqm1o4ihbedfdf9ir/ lvirku087japvzyfpgn9a2v6je11psg2anzqvgggnfftpszs1ksgtfrvy/c/iqeeayh0dj5bsl2lqw4me/ yrltsk9a0apzknpseoy51rwwt975coa9xtmy3c6rmhpii14r/pnljvj/4h/t5g0b2shjecczeawq0nkuovlqmapmeqv0/n Rancher@rancher

Cat Id_rsa #私钥, save it, and use it in the rear login system.

-----BEGIN RSA PRIVATE KEY-----

The code is as follows Copy Code

Miieowibaakcaqea9u9tgdxx1zyljnapaq4j48vchiwy+0gipkr7d3fsyexk5bcg

Yj4etckwkoduz8hyyz7rax43l2ew/mekrkd3darcnceivtxno43nukrybdkchrms

Itdg+tryskel6kbft7bwme3n85rb6pxwjqjcajntucb23g33rfykf5vyq5ltpoyq

Kb2cn6rp/wtr+ixtdabbtgj2arxoidrx06bm7nsrbrra78v3p4kbhmsh9hy+w7c9

pumojnv2es00ppwtakwzj6uhkgoduvse/e+xkgvcuzmtwuqziayineefzzzy1y/+

if0+ynadriy3gngramktdsrjr5apgktbkr9p5widaqabaoibagahzdzkrgyx7h/x

ldtw6tfna95isa5xgcrpmozb11fglkq8nzk8fzl6u0hdabvwsl7i4pk9ln8z19/m

Z36nqluk/arydpmg9j7vsl+x2/xn3izxdkytwpv9y2k90zpsjoopygimz2znnalf

gbn6j0fulcnjz+vn8pjm7vrkd6s97g48/dbijglt6x2vyaogqpfw21fnwiczjt/v

Awclji8nniziqlqssrfv0yls1miecayxmfcaxot09wqrvagb9c/t1vo2ytzvml44

2eug+7swodotfmug/+gosl+zgregmxbf2bpdisy6m7+cyjevz88oifwjco4uacx9

873jsaecgyea+3bjfwy/zarhyo/+atrqpsdovsiszx0aivrkzvlw3tds2or7wgkc

Ytr5dubkv6bxt8wwpbpnmb/xb63lcjmdfpr4uvxxnxx/+xqbnjxojqvvxlcxhmp4

Cw0q3zq+vmrpbtk5oylevsyzz8n2cwtcizefyp7utocvvulyprxrxomcgyea+cku

Bq0p2294jx1idp2+lvdlvmoeeg+sdltz7l7d8aod4mzrshkztiousg5neeitslhn

lwrddgiy7spfgvpp43butmcba2tovx9ayy+lh7zbevqjdwzmhwdn5wtjvg6dly0d

e43b/faran/xi3tebtivzhh1rwrtjlygad9c1c0cgyaky9f3mz8xt1wvyiuga655

y5lrcqmkwe+yb7hkujbfvpc2kswxd9nftrl7+fdr3kil7bcq+0ghltztqmy6zk3c

5+inpcidkngcucq1yqy6qcpuwva7nsbvx941uw4zudmv02p8rdlvtvdw8e0rfz02

R8kho4aqp27gmcn8ch38pqkbgb2bh4pj7yjm15txmtrlldtzbb4hgubbajjhpjln

Evy15hdl7k5gyy7v/lvf7gd2eidxdw6oka4xieqoc7wbxr6q5cf2+elseingeqkj

Dm1lhje7m0byexjx+auihzrrjqdynbx8dienkkailia7zcyasmj3ssfpz746rwsh

Y+tnaogbajkxa1v4odekouno08abmyoscfg41etzbn1rlnqctnp54wtggk0pfznx

Aoxntseey3qn3u84z9fl7fzfyafcqhxbrxqdakzbt4ufmvmvjg4cddr+avdbmbdh

Z48t7oeimfqlyeuzpfgsc+cwoziuqv3evzd/7ll91qlot5+iiykr

-----End RSA PRIVATE KEY-----

VI cloud-config.yml #编辑文件, in accordance with the format of the contents of id_rsa.pub paste in

#cloud-config

Ssh_authorized_keys:

-Ssh-rsa aaaab3nzac1yc2eaaaadaqabaaabaqdc008sjby03bdodhvu1/cxn+ oounrdzrvtogvpwlsz4qwws4fk22w39kgwb9nxnc3dg5mnis4ony+v0fvanp2yqkjq4yuumar2f/e350rab6bp1m+ gk50zf7mfjg9sciw71dpejpzzfun1hxpcipa0fmfig3sn3eogorrlrjosrjogmrizvy0vpi7vnomcowqapxxqoc4ncknmrqlcfeqokj8qu/ i177m35kmv3ixh9bzsuo+o/bge72zx/sgrtxor/kczbxt3vyixtkfnkzshqqnrkrftmnmndevtusiziv61yhbx6af7lfrkpr/0cii+ J8DEFL7AJMQ2GH1WRFJ7 Rancher@rancher

: wq! #保存退出

Install the Rancheros to the hard drive

sudo ros install-c cloud-config.yml-d/dev/sda #输入y安装, if there is a mistake, because of network reasons, try more times.

The system prompts you to reboot until the installation is complete.

Remove the installation image and let the system boot from the hard drive.

/DEV/SDA is a local disk

You can use commands to view

sudo fdisk-l

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.