#redhat官方中文文档
https://access.redhat.com/documentation/zh-CN/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/index.html
#中文翻译
http://www.jinbuguo.com/systemd/systemd.service.html
#
http://www.cnblogs.com/justphp/p/6120201.html
修改主机名
[root@C7 ~]# hostnamectl set-hostname C77
[root@C7 ~]# hostnamectl status
Static hostname: c77
Pretty hostname: C77
Icon name: computer-vm
Chassis: vm
Machine ID: d11c81e11aab4ab8ae42f32e56a4dbd1
Boot ID: f0cfc063138d4bd88cf99b4194774235
Virtualization: vmware
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-514.el7.x86_64
Architecture: x86-64
[root@C7 ~]# cat /etc/hostname
c77
============================
#修改字符集
[root@C7 ~]# localectl status
System Locale: LANG=en_US.UTF-8
VC Keymap: us
X11 Layout: us
[root@C7 ~]# cat /etc/locale.conf
LANG="en_US.UTF-8"
[root@C7 ~]# localectl set-locale LANG=zh_CN.UTF-8
[root@C7 ~]# cat /etc/locale.conf
LANG=zh_CN.UTF-8
==============================
#修改时区
[root@C7 ~]# timedatectl status
Local time: Fri 2017-03-10 16:39:35 CST
Universal time: Fri 2017-03-10 08:39:35 UTC
RTC time: Fri 2017-03-10 08:39:34
Time zone: Asia/Shanghai (CST, +0800)
NTP enabled: n/a
NTP synchronized: no
RTC in local TZ: no
DST active: n/a
=================================
#更改启动运行级别
[root@c77 ~]# systemctl get-default
multi-user.target
[root@c77 ~]# systemctl set-default graphical.target
Removed symlink /etc/systemd/system/default.target.
Created symlink from /etc/systemd/system/default.target to /usr/lib/systemd/system/graphical.target.
[root@c77 ~]# systemctl get-default
graphical.target
[root@c77 ~]# ll /usr/lib/systemd/system/graphical.target
-rw-r--r--. 1 root root 558 Nov 7 03:48 /usr/lib/systemd/system/graphical.target
[root@c77 ~]# ll /usr/lib/systemd/system/default.target
lrwxrwxrwx. 1 root root 16 Mar 10 11:51 /usr/lib/systemd/system/default.target -> graphical.target
==============================
#启动时间优化
[root@c77 system]# systemd-analyze time
Startup finished in 430ms (kernel) + 1.579s (initrd) + 27.845s (userspace) = 29.854s
[root@c77 system]# systemd-analyze blame
10.103s firewalld.service
6.461s NetworkManager-wait-online.service
5.844s abrt-ccpp.service
4.466s polkit.service
1.678s postfix.service
1.274s NetworkManager.service
1.258s dev-sda3.device
1.244s tuned.service
817ms network.service
815ms rsyslog.service
564ms sshd.service
转载于:https://blog.51cto.com/1362336072/2061408