centos7_1
10946 ワード
centos7_1
簡単に述べる
1991年、フィンランドの大学院生linus trovslds(李納斯脱靴下)は自分の最初のパソコンを購入し、自分のオペレーティングシステムの開発を開始することにした.この考えは非常に偶然で、最初は自分がニュースやメールを読む需要を満たすためだった.彼はminixを自分の研究対象として選んだ.minixはオープンモデルオペレーティングシステムです.最終的にlinux(linusのminix)と名付けられ、最終的に世界中で大きな反響を呼んだ.
メリット
バージョン番号の説明
リリース
システムのインストール
まずcentos 7をダウンロードする.2の前に、VMwareを使用し、解読版を使用するコンテナが必要です.
vmwareは有料ですが、解読版を使っています.
VMwareを開く
仮想マシンの作成をクリックする->カスタマイズを選択する->次へ->オペレーティングシステムのインストールを後で行う->LinuxをクリックしてCentOS 64ビットを選択する->名前を自分で位置を取る->プロセッサコア数1コアで十分->メモリ1024 MB->ブリッジネットワークを使用する->次へ->次へ->次へ->ディスクサイズを自分で割り当ててディスクを単一ファイルに保存->次へ->完了
これでcentOSのコンテナが作成されます
コンテナの設定を右クリック->CD/DVDを検索->ISOイメージファイルを使用して検索を選択します.isoファイルでいいです.
そして電源を入れるとインストールできます.
なぜCentOS 7を使ったのですか?6バージョンと何が違うの?
centos 7と6の最大の違いは初期化技術の違いであり、7が採用している初期化技術はSystemdであり、並列に動作する方式である点を除いて、サービス起動、起動ファイル、ネットワークコマンドなどは6が異なると言われている.まず、システム初期化技術の発展過程を理解してみましょう.
1.システム初期化技術
代表システム:CentOS 6,Ubuntu 14,CentOS 7,Ubuntu 15からsystemdを使用
2.yumソースでの最適化
3.コマンド
例えばifconfigはNIC情報を表示し、centos 7にはありません.yumインストール
4.文字セットの変更
centos 6の場合、文字セットを変更します.
centos 7は1行の命令で解決するだけです
5.起動管理
centos 6は
そしてcentos 7
centos 7は/etc/rcを通過する.d/rc.local/POST
6.運転レベルrunlevel
centos 6'/etc/inittabはcentos 7で無効です.
centos 7 system targetがinittabに代わった
運転レベル(Runlevel)とは、UnixやLinuxなどのUnixオペレーティングシステムで異なる運転モードを指す.運転レベルは通常0から6まで7などに分けられますが、必要であればもっと多くできます.
たとえば、ほとんどのlinuxオペレーティングシステムでは、次の6つの典型的な実行レベルがあります.
sshアクセス
Windowsの下にxshellをインストールしてリモートアクセスできます.
macはsshコマンドで
まず「net-tools」をダウンロードし、ifconfigを使用してNIC情報を表示できます.DOSコマンドipconfigと同じ役割を果たします.
ダウンロード完了後入力:ifconfig
あなたのipアドレスを見つけることができます
sshリンクが拒否された場合:
1.openssh-serverの検証
2.sshファイルの構成
単純な操作
インストラクション
簡単に述べる
1991年、フィンランドの大学院生linus trovslds(李納斯脱靴下)は自分の最初のパソコンを購入し、自分のオペレーティングシステムの開発を開始することにした.この考えは非常に偶然で、最初は自分がニュースやメールを読む需要を満たすためだった.彼はminixを自分の研究対象として選んだ.minixはオープンモデルオペレーティングシステムです.最終的にlinux(linusのminix)と名付けられ、最終的に世界中で大きな反響を呼んだ.
メリット
1、
2、 、
3、 ( 、 )
Ubuntu、deepin( )
バージョン番号の説明
uname -r
2.6.32-642.el6.x86_64
linux : ,
2:
6: , ,
32:
リリース
linux , linux linux
, ,
Debian( )
Gentoo( )
Ubuntu( ),
RedHat( )
CentOS
システムのインストール
まずcentos 7をダウンロードする.2の前に、VMwareを使用し、解読版を使用するコンテナが必要です.
vmwareは有料ですが、解読版を使っています.
VMwareを開く
仮想マシンの作成をクリックする->カスタマイズを選択する->次へ->オペレーティングシステムのインストールを後で行う->LinuxをクリックしてCentOS 64ビットを選択する->名前を自分で位置を取る->プロセッサコア数1コアで十分->メモリ1024 MB->ブリッジネットワークを使用する->次へ->次へ->次へ->ディスクサイズを自分で割り当ててディスクを単一ファイルに保存->次へ->完了
これでcentOSのコンテナが作成されます
コンテナの設定を右クリック->CD/DVDを検索->ISOイメージファイルを使用して検索を選択します.isoファイルでいいです.
そして電源を入れるとインストールできます.
install centos 7
test this media & install centos 7
Troubleshoopting centos。
: , continue
: 、 ,
/
: , , 。
:
, , 。
, 。 “ ” 。
。
“+”
。 , MB, 2GB、100MB。
“/boot” , 1024MB。
“swap”, 2GB。
“/”, 。
“eno16777736” ,
“localhost.localdomain”,
IP , , “IPV4 ”, DHCP IP 。
IP , IP、 。DNS “ DNS ” , DNS 。 。
“ ”
root 。root , linux 。root 。
root , , 。
, , , 。 , root 。
なぜCentOS 7を使ったのですか?6バージョンと何が違うの?
centos 7と6の最大の違いは初期化技術の違いであり、7が採用している初期化技術はSystemdであり、並列に動作する方式である点を除いて、サービス起動、起動ファイル、ネットワークコマンドなどは6が異なると言われている.まず、システム初期化技術の発展過程を理解してみましょう.
1.システム初期化技術
Sysvinit
Upstart
Systemd
Sysvinit
:
1. 1 init;
2.init , kill;
3. Linux init SystemV , sysvinit
4. :CentOS5 CentOS6
:
sysvinit , 。 shell 。
:
1. ——> 。
2. hang ,fstab nfs
Upstart
CentOS6 upstart sysVinit ,Upstart rc.sysinit , 。 CentOS6 ,upstart 。
代表システム:CentOS 6,Ubuntu 14,CentOS 7,Ubuntu 15からsystemdを使用
Systemd
(RedHat7,CentOS7,Ubuntu15 );
sysvinit , ;
Sysvinit , ;
:
Pid 1
2.yumソースでの最適化
centos6 , rpm , yum ,CentOS7 , yum , , yum 。
3.コマンド
minimal, 6 , :vim、ifconfig、route、setup、netstat 。。 :
yum install lrzsz tree net-tools nmap vim bash-completion lsof dos2unix nc telnet ntp wget rng-tools psmisc screen -y
例えばifconfigはNIC情報を表示し、centos 7にはありません.yumインストール
net-tools
を使用して、ネットワークのコマンドを提供します.bash-completion
psmisc killall 。
screen , 。
rng-tools , tomcat
lrzsz windowns linux。 windowns 。
4.文字セットの変更
centos 6の場合、文字セットを変更します.
vim /etc/locale.conf #
localectl set-locale LANG=zh_CN.UTF-8
centos 7は1行の命令で解決するだけです
localectl set-locale LANG=zh_CN.UTF-8
localectl status
5.起動管理
centos 6は
/etc/rc.local
によって起動を管理していますが、このファイルの権限は開放されています.そしてcentos 7
/etc/rc.local # , chmod +x /etc/rc.d/rc.local
# system snapshot( )
systemctl status cron.service #
systemctl stop cron.service #
systemctl status cron.service #
systemctl list-unit-files|grep enable #
systemctl disable postfix.service #
systemctl list-unit-files|grep postfix #
systemctl stop firewalld.service #
systemctl is-enable #
systemctl disable #
centos 7は/etc/rcを通過する.d/rc.local/POST
centos7 /etc/rc.d/rc.local
chmod +x /etc/rc.d/rc.local
6.運転レベルrunlevel
centos 6'/etc/inittabはcentos 7で無効です.
centos 7 system targetがinittabに代わった
##
systemctl get-default graphical.target 5
systemctl get-default multi-user.target 3
##
init3
#
ls -lh /usr/lib/systemd/system/runlevel*.target
運転レベル(Runlevel)とは、UnixやLinuxなどのUnixオペレーティングシステムで異なる運転モードを指す.運転レベルは通常0から6まで7などに分けられますが、必要であればもっと多くできます.
たとえば、ほとんどのlinuxオペレーティングシステムでは、次の6つの典型的な実行レベルがあります.
0
1 ,Does not configure network interfaces, start daemons, or allow non-root logins
2 , Does not configure network interfaces or start daemons
3 , Starts the system normally.
4
5
6
sshアクセス
Windowsの下にxshellをインストールしてリモートアクセスできます.
macはsshコマンドで
ssh @ip :
22
ssh root@10.11.51.117
まず「net-tools」をダウンロードし、ifconfigを使用してNIC情報を表示できます.DOSコマンドipconfigと同じ役割を果たします.
ダウンロード完了後入力:ifconfig
あなたのipアドレスを見つけることができます
sshリンクが拒否された場合:
1.openssh-serverの検証
, CentOS7 openssh-server,
yum list installed | grep openssh-server
yum install openssh-server -y
2.sshファイルの構成
/etc/ssh/ sshd sshd_config, Vim
vim :
yum install vim -y
vim vi
vim /etc/ssh/sshd_config
/Port
:
================
1. , 、 #
Port 22
#AddressFamily any
ListenAddress 0.0.0.0 #
ListenAddress ::
================
3
i, insert, esc
================
2.
PermitRootLogin yes
================
================
3.
PasswordAuthentication yes
================
================
:wq!
================
sshd
sshd , sudo service sshd start
sshd , ps -e | grep sshd
netstat -an | grep 22 22
単純な操作
ifconfig ip
ping ip
ctrl + c
ls
( )
pwd
/
cd
、
:
:
. :
.. :
cd :
cd - : ( )
[root@localhost /]#
root:
localhost:
/:
#:
$:
( )
tab ( )
clear
:
/:
~ : ( )
linux ,
root /root
/home/ruidong
. :
.. : cd ../../( )
インストラクション
:poweroff halt
shutdown now
shutdown -h +5 'woyaoguanjile' 5
shutdown -h 16:10 4 10
:reboot
shutdown -r now
date
cal
cal 8 2017 2017 8
cal 2017 2017