Sengoli sa Lingoloa
CentOS Phapang e kholo lipakeng tsa 7 le 6 ke phapang ea mokhoa oa ho qala.
- Theknoloji ea ho qala e sebelisoang ke CentOS 7 ke Systemd.
- Ntle le moo, ho qala lits'ebeletso, lifaele tsa ho qala, litaelo tsa marang-rang, joalo-joalo, kaofela li bonts'a phapang ho tloha ho 6.
A re utloisiseng pele Linux Phetoho ea theknoloji ea ho qala ea CentOS!
XNUMX. Theknoloji ea ho qala tsamaiso
- Theknoloji ea Sysvinit
- Theknoloji ea ho qala
- Theknoloji ea tsamaiso
Theknoloji ea Sysvinit
sebopeho:
- 1) Ts'ebetso ea pele ea sistimi ke init;
- 2) Ts'ebetso ea init ke ts'ebetso ea motsoali ea mekhoa eohle 'me e ke ke ea bolaoa (ho bolaoa);
- 3) Lisebelisoa tse ngata tsa Linux distribution init li lumellana le SystemV, e bitsoang sysvinti
- 4) Sistimi ea boemeli: CentOS 5 CentOS 6
Molemo:
- Sysvinit e sebetsa hantle mme mohopolo o bonolo ebile o hlakile.
- Haholo-holo e itšetlehile ka shell scripting.
Bofokoli:
- 1) E entsoe ka tatellano e itseng -> Ho qala ho lieha haholo.
- 2) Ho bonolo haholo ho fanyeha, fstab le litaba tsa NFS.
Theknoloji ea ho qala
CentOS 6 e sebelisa SysVinit sebakeng sa theknoloji ea boot ho qala.
Sengoliloeng sa Upstart's rc.sysinit se na le lintlafatso tse ngata ho fokotsa nako ea ho qala sistimi.
Leha ho le joalo, ho nolofatsa lintho bakeng sa batsamaisi, CentOS 6 ha e hlakise kapa e ts'ehetsa ka botlalo likarolo tse ngata tse ncha.
Moemeli oa tsamaiso:CentOS 6, Ubuntu 14.
- systemd e sebelisoa ho tloha CentOS 7, Ubuntu15.
Theknoloji ea tsamaiso
Theknoloji e sebelisoang lits'ebetsong tse ncha (RedHat7, CentOS 7, Ubuntu15, joalo-joalo)
- Sepheo sa moralo ke ho rarolla mefokolo ea pele ea sysvinit le ho ntlafatsa ka katleho lebelo la ho qala tsamaiso;
- E lumellana le Sysvinit, ho fokotsa litšenyehelo tsa ho fetisoa;
Molemo o moholo:
- qalo e bapileng
- Ts'ebetso ea ts'ebetso e sebelisa PID 1
XNUMX. Ntlafatso ea mohloli oa yum
Ho CentOS 6, ntho ea kamehla ke ho khoasolla liphutheloana tsa rpm ho tsoa mehloling ea semmuso.
- CentOS 7 e ntlafalitsoe mona ka lebaka la lebelo le liehang la ho sebelisa lisebelisoa tsa kantle ho naha.
- ha re sebelisa install软件ha e sa kopitsoa webosaeteng ea semmuso ka ho iketsa.
- Ho e-na le hoo, e tla fumana mohloli oa Yum o haufi haholo le sebaka seo e leng ho sona ho qala ho khoasolla.
XNUMX. Taelo
Haeba u khetha e fokolang (e nyenyane ka ho fetisisa) ha u kenya tsamaiso, e tla kenngoa ka har'a sephutheloana se senyenyane ho feta liphetolelo tse fetileng.Mohlala: VIM, sebelisa ifconfig, routing ea litsela, seta ho seta liparamente, netstat, joalo-joalo.Litaelo tse ngata ha li sa le eo.
Kamora ho kenya sistimi, liphutheloana tse latelang li ka eketsoa:
yum install lrzsz tree net-tools nmap vim bash-completion lsof dos2unix nc telnet ntp wget rng-tools psmisc screen -y #lrzsz 支持用于上传和下载linux的windowns平台。 可以在windowns远程连接工具上使用。 #net-tools CentOS 7.2.11 默认没有ifconfig命令。网络工具提供了一些网络命令。 #bash-completion 自动命令完成工具。 #rng-tools 生成随机数字池的工具。 有了这个工具,tomcat启动速度非常快。 #psmisc 这包含killall命令。 #screen 创建一个新窗口并将任务置于后台。
Ea bone, sebopeho sa sebopeho sa phetoho
Boemo ba Sete ea Litlhaku ▼
/etc/locale.conf
Mohala oa taelo o teng ka mohato o le mong ▼
[root@CentOS 7 ~] # localectl set-locale LANG = zh_CN.UTF-8 [root@CentOS 7 ~] # localectl status System Locale: LANG=zh_CN.UTF-8 VC Keymap: us X11 Layout: us
XNUMX. Tsamaiso ea ho qala
/etc/rc.local
Faele ena e ntse e le teng, empa haeba re batla ho tsoela pele ho sebelisa mokhoa ona, re hloka ho kenya tumello ho eona ▼
chmod +x /etc/rc.d/rc.local
Sheba Boemo ba Mosebetsi o Reriloeng ▼
systemctl status crond.service
Koala mesebetsi e hlophisitsoeng ▼
systemctl stop crond.service
Sheba ts'ebetso ea boemo ▼
systemctl status crond.service
Sheba litšebeletso tse sebetsang hona joale ▼
systemctl list-unit-files|grep enable
Tlosa tšebeletso ea mangolo ▼
systemctl disable postfix.service
Sheba hore na tšebeletso ea mangolo e lumelletsoe ▼
systemctl list-unit-files|grep postfix
Tima firewall ▼
systemctl stop firewalld.service
Qala tšebeletso▼
systemctl is-enable
# ts'ebeletso e koalang ▼
systemctl disable
Qala ka /etc/rc.d/rc.local/:
/etc/rc.d/rc.local ho CentOS 7 e hloka ho phethahatsa litaelo tse latelang ho fana ka tumello e sebetsang ▼
chmod +x /etc/rc.d/rc.local
Tšelela, runlevel (run level)
/etc/inittab ke phetisetso e sa sebetseng ea sistimi
- E lula e sebetsa bakeng sa ho kena ho latelang
fetohela ho 5 ▼
systemctl get-default graphical.target
fetohela ho 3 ▼
systemctl get-default multi-user.target
E sebetsa ka nakoana ▼
INIT3
Maemo a mahlano feela ▼
[root@centos7 ~]# ls -lh /usr/lib/systemd/system/runlevel*.target
lrwxrwxrwx. 1 root root 15 Mar 20 22:31 /usr/lib/systemd/system/runlevel0.target -> poweroff.target
lrwxrwxrwx. 1 root root 13 Mar 20 22:31 /usr/lib/systemd/system/runlevel1.target -> rescue.target
lrwxrwxrwx. 1 root root 17 Mar 20 22:31 /usr/lib/systemd/system/runlevel2.target -> multi-user.target
lrwxrwxrwx. 1 root root 17 Mar 20 22:31 /usr/lib/systemd/system/runlevel3.target -> multi-user.target
lrwxrwxrwx. 1 root root 17 Mar 20 22:31 /usr/lib/systemd/system/runlevel4.target -> multi-user.target
lrwxrwxrwx. 1 root root 16 Mar 20 22:31 /usr/lib/systemd/system/runlevel5.target -> graphical.target
lrwxrwxrwx. 1 root root 13 Mar 20 22:31 /usr/lib/systemd/system/runlevel6.target -> reboot.target
Supa, lokisa khoutu ea mohloli oa yum
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
Mohloli oa molao oa EPEL ▼
wget http://dl.fedorMaroject.org/pub/epel/epel-release-latest-7.noarch.rpm rpm -ivh epel-release-latest-7.noarch.rpm
Hope Chen Weiliang Blog ( https://www.chenweiliang.com/ ) o arolelane "Phapang ke efe pakeng tsa CentOS6.5 le 7?Ho thoe'ng ka ho khetha mofuta oa CentOS7? , ho u thusa.
Rea u amohela ho arolelana sehokelo sa sengoloa sena:https://www.chenweiliang.com/cwl-692.html
Rea u amohela ho mocha oa Telegraph oa blog ea Chen Weiliang ho fumana lintlha tsa morao-rao!
📚 Tataiso ena e na le boleng bo boholo, 🌟Ona ke monyetla o sa tloaelehang, se ke oa o fetoa! ⏰⌛💨
Share le rata haeba u rata!
Ho arolelana le lintho tseo u li ratang ke khothatso ea rona e tsoelang pele!
Batho ba 2 ba ile ba bua ka "Phapang ke efe pakeng tsa CentOS6.5 le 7? Ho thoe'ng ka ho khetha mofuta oa CentOS7?"
systemctl status cron.service e fosahetse ebile e nepahetse ke systemctl status crond.service
Ke leboha tokiso, e lokisitsoe.