设为首页收藏本站language 语言切换
查看: 1902|回复: 1
收起左侧

[分享] centos8配置yum源\vnc\ntp和传统网络服务

[复制链接]
发表于 2019-10-23 14:26:43 | 显示全部楼层 |阅读模式
一.yum源

1.禁用服务

systemctl stop libvirtd.service

systemctl disable libvirtd.service

systemctl stop firewalld.service

systemctl disable firewalld.service

2.配置dnf源


[a]

name=a

gpgcheck=0

baseurl=file:///mnt/BaseOS



[AppStream]

name=AppStream

gpgcheck=0

baseurl=file:///mnt/AppStream


dnf clean all&& dnf makecache


二.vnc

1.修改显示配置文件

vim /etc/gdm/custom.conf

WaylandEnable=false

2. 安装 VNC 服务器

dnf installtigervnc-server tigervnc-server-module -y

3. 为本地用户设置 VNC 密码

su - aa

vncpasswd

Password:

Verify:

Would you liketo enter a view-only password (y/n)? n

A view-only password is not used

4. 设置 VNC 服务器配置文件

vim [url=]/etc/systemd/system/vncserver@.service[/url]

[Unit]

Description=Remote Desktop VNC Service

After=syslog.target network.target



[Service]

Type=forking

WorkingDirectory=/home/aa

User= aa

Group= aa



ExecStartPre=/bin/sh -c '/usr/bin/vncserver-kill %i > /dev/null 2>&1 || :'

ExecStart=/usr/bin/vncserver -autokill %i

ExecStop=/usr/bin/vncserver -kill %i



[Install]

WantedBy=multi-user.target

5.启动vnc服务

systemctldaemon-reload

systemctl start[url=]vncserver@:1.service[/url]

systemctlenable [url=]vncserver@:1.service[/url]

6. 连接到远程桌面会话

1.使用vnc viewer


2.端口5901或:1


3.输入vnc密码


4.进入到桌面


7. 验证 VNC 服务器是否开始监听 5901 上的请求

netstat -tunlp| grep 5901

ss -tunlp |grep -i 5901
三、ntp

1.  安装Chrony服务

yum -y install chrony

systemctl enable --now chronyd

systemctl status chronyd

2.配置Chrony服务

vim /etc/chrony.conf

#pool 2.centos.pool.ntp.org iburst

server 192.168.1.1 iburst

server 192.168.1.1 iburst

3.检查NTP服务器是否正常工作

systemctl restart chronyd

chronyc sources




timedatectl

               Local time: 三 2019-10-23 14:15:05 CST

          Universal time: 三 2019-10-23 06:15:05 UTC

                 RTC time: 三 2019-10-23 06:15:04

                Time zone: Asia/Shanghai (CST,+0800)

System clock synchronized: yes

              NTP service: active

         RTC in local TZ: no

4.客户端配置

yum -y install chrony

systemctl enable --now chronyd

vim /etc/chrony.conf

server 192.168.2.1

systemctl restart chronyd

chronyc sources
四、传统网络服务


1.配置网卡命令

nmcli connectionmodify ens33 ipv4.addresses 192.168.1.63/24 ipv4.method manual ipv4.gateway192.168.1.1 ipv4.dns 192.168.1.1

2.安装网络配置文件

dnf installnetwork-scripts -y

3.安装cockpit

dnf installcockpit* -y

systemctlrestart cockpit


4.重启2遍服务器










发表于 2020-5-12 19:09:02 | 显示全部楼层
能否加下好友或者留个邮箱方便交流学习,谢谢
沙发 2020-5-12 19:09:02 回复 收起回复
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-4-27 23:38 , Processed in 0.061005 second(s), 25 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表