安装后,一开始有点儿无力吐槽的感受,变革这么大?
一、Runlevel
首先一条,本来一直用的CentOS-6.5-x86_64-minimal.iso光盘镜像(400M阁下无图形系统小巧便捷),而7今朝最小的镜像是CentOS-7.0-1406-x86_64-livecd.iso(700M阁下),默认安装后是启动图形界面,按本来的习惯要改成启动呼吁行,功效发明:
[[email protected] ~]# cat /etc/inittab
# inittab is no longer used when using systemd.
#
# ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
#
# Ctrl-Alt-Delete is handled by /etc/systemd/system/ctrl-alt-del.target
#
# systemd uses 'targets' instead of runlevels. By default, there are two main targets:
#
# multi-user.target: analogous to runlevel
# graphical.target: analogous to runlevel
#
# To set a default target, run:
#
# ln -sf /lib/systemd/system/<target name>.target /etc/systemd/system/default.target
#
好吧,systemd一统天下了(它管的对象许多许多,学Centos7首先要搞定systemd)。
[[email protected] ~]# ls -Xl /etc/systemd/system/*.target
lrwxrwxrwx. 1 root root 36 7月 8 23:12 /etc/systemd/system/default.target -> /lib/systemd/system/graphical.target
我们来看看从前的runlevel都酿成什么样了?
[[email protected] ~]# ls -Xl /lib/systemd/system
[[email protected] ~]# ls -Xl /lib/systemd/system/runlevel*.target
lrwxrwxrwx. root root 7月 : /lib/systemd/system/runlevel0.target -> poweroff.target
lrwxrwxrwx. root root 7月 : /lib/systemd/system/runlevel1.target -> rescue.target
lrwxrwxrwx. root root 7月 : /lib/systemd/system/runlevel2.target -> multi-user.target
lrwxrwxrwx. root root 7月 : /lib/systemd/system/runlevel3.target -> multi-user.target
lrwxrwxrwx. root root 7月 : /lib/systemd/system/runlevel4.target -> multi-user.target
lrwxrwxrwx. root root 7月 : /lib/systemd/system/runlevel5.target -> graphical.target
lrwxrwxrwx. root root 7月 : /lib/systemd/system/runlevel6.target -> reboot.target
修改默认启动runlevel为 multi-user (貌似runlevel2 3 4 没区别了)
[[email protected] ~]# ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
[[email protected] ~]# ll -X /etc/systemd/system/*.target
lrwxrwxrwx. 1 root root 37 7月 10 09:42 /etc/systemd/system/default.target -> /lib/systemd/system/multi-user.target
试试init 6 还好用不。
[[email protected] ~]# init
Connection to 192.168.150.180 closed by remote host.
Connection to 192.168.150.180 closed.
成,好用。:)
因为我从桌面版Linux 毗连Centos7系统提示酿成了中文,所以需要把Centos7 的root用户语言改一下,回到原汁原味。
[[email protected] ~]# cp .bashrc .bashrc-back
[[email protected] ~]# echo 'export LANG="en_Us.UTF-8"' >> /root/.bashrc
二、Services
[[email protected] ~]# chkconfig
Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd configuration.
If you want to list systemd services use 'systemctl list-unit-files'.
To see services enabled on particular target use
'systemctl list-dependencies [target]'.
iprdump :off :off :on :on :on :on :off
iprinit :off :off :on :on :on :on :off
iprupdate :off :off :on :on :on :on :off
livesys :off :off :off :on :on :on :off
livesys-late :off :off :off :on :on :on :off
netconsole :off :off :off :off :off :off :off
network :off :off :off :off :off :off :off
rhnsd :off :off :on :on :on :on :off
vboxadd :off :off :on :on :on :on :off
vboxadd-service :off :off :on :on :on :on :off
vboxadd-x11 :off :off :off :on :off :on :off