您的位置:首页 > 编程语言 > Java开发

用Java建立一个服务器的5个步骤

2009-02-27 21:28 295 查看
RHEL6操作系统

7个运行级别:

init 0 -6

init 0 关机

init 1 单用户模式

init 2 多用户状态,没有网络服务

init 3 字符界面

init 4 系统未使用保留给用户

init 5 图形界面

init 6 系统重启

设置默认启动级别:

[root@localhost ~]# vim /etc/inittab

可修改id:3:initdefault: 这一行中的数字

RHEL7操作系统

切换到第3运行级别:

[root@localhost ~]# systemctl isolate multi-user.target 或者使用软链接

[root@localhost ~]# systemctl isolate runlevel3.target

切换到第5运行级别

[root@localhost ~]# systemctl isolate graphical.target 或者使用软链接

[root@localhost ~]# systemctl isolate runlevel5.target

设置默认的运行级别:

方法一:
在创建新链接前,先删除存在的链接

[root@localhost ~]# rm -rf /etc/systemd/system/default.target

默认启动级别

[root@localhost ~]# ln -sf /lib/systemd/system/multi-user.target(graphical.target) /etc/systemd/system/default.target
方法二:[root@localhost ~]# systemctl -f enable multi-user.target(graphical.target)

查看当前运行级别:runlevel

Passwd l 锁定用户

Passwd L 锁定用户
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐