Linux - CentOS
CentOS
[toc]
check Version
$ cat /etc/os-release $ cat /etc/centos-release CentOS Linux release 8.1.1911 (Core)
Setup
kernel
1
2
3
4
5
6
7
8
9
10
check the exact version of
kernel uname -a.
check the kernel sources
rpm -q kernel-devel
yum install kernel-devel
If yum is unable to find one or more of these packages, try your luck with PBone. You should find the required packages there. When you download them, install them with either of those:
rpm -i PACKAGE.rpm
rpm -Uvh PACKAGE.rpm
yum install on gcc, bison, flex, qt4-devel and libstdc++.
check for the availability of some other packages:
1
2
3
4
5
6
7
8
9
10
11
rpm -q bison
rpm -q bison-devel
rpm -q ncurses
rpm -q ncurses-devel
rpm -q zlib
rpm -q zlib-devel
rpm -q openssl
rpm -q openssl-devel
rpm -q gnutls-devel
rpm -q gcc
rpm -q gcc-c++
If any of those packages are not installed install them by using yum
1
2
3
4
5
6
7
8
9
10
11
yum install bison
yum install bison-devel
yum install ncurses
yum install ncurses-devel
yum install zlib
yum install zlib-devel
yum install openssl
yum install openssl-devel
yum install gnutls-devel
yum install gcc
yum install gcc-c++
Enable CentOS 8 PowerTools Repo
error: no match for libpcap-devel
1
2
3
4
5
6
7
the PowerTools repo may be required for some packages in the EPEL Repo. Below are instructions on how to enable it.
# vim /etc/yum.repos.d/CentOS-PowerTools.repo
//
Change enabled=0 to enabled=1
// the PowerTools repo is now enabled
set hostname
1
2
3
4
5
6
7
8
9
10
11
12
13
$ hostnamectl set-hostname server0
$ hostnamectl
Static hostname: server0
Icon name: computer-vm
Chassis: vm
Machine ID: 0531f0dd6691457fb41fa44d880f7900
Boot ID: 970e3ca5b1294adb81683deed6b6b75d
Virtualization: oracle
Operating System: CentOS Linux 8 (Core)
CPE OS Name: cpe:/o:centos:centos:8
Kernel: Linux 4.18.0-147.8.1.el8_1.x86_64
Architecture: x86-64
VPS
1
2
3
4
update VPS.
$ yum -y update
GNOME desktop environment
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
!!!!!!!!!!!
To install the GNOME desktop environment
$ sudo yum group install GNOME
To get information about the GNOME group:
$ sudo yum group info GNOME
to check for the correct group name:
$ sudo yum group list hidden
The list of available groups can be shown:
$ yum grouplist
install a window manager in order to get a full-featured GUI desktop. You can use the command
$ sudo yum groupinstall "GNOME Desktop Environment"
$ sudo yum -y groupinstall "GNOME Desktop"
To install GNOME Desktop:
$ yum groupinstall "X Window System" Desktop
gcc compiler
The gcc compiler is not in your $PATH
. either dont have gcc installed or its not in your $PATH variable
.
1
2
3
4
5
6
7
8
9
10
11
12
To install gcc use this: (run as root)
CentOS:
yum install gcc
yum groupinstall "Development Tools"
yum groupinstall "Server with GUI"
yum groupinstall "Graphical Administration Tools"
Debian base:
apt-get install build-essential
firewall
1
2
3
4
firewall-cmd --list-all
firewall-cmd --permanet --zone=public --add-service=ssh
firewall-cmd --reload
VNC
1. Installing the required packages
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
The server package is called 'vnc-server'
$ rpm -q vnc-server
// package vnc-server is not installed
// vnc-server-4.0-11.el4.
If the server is not installed
$ yum install vnc-server
The client program is 'vnc'.
$ rpm -q vnc
// not already installed.
$ yum install vnc
If you are a minimalist, or simply testing, simple XTERM client:
$ yum install xterm
2. Configuring un-encrypted VNC
We will be setting up VNC for 3 users. These will be ‘larry’, ‘moe’, and ‘curly’
Create the VNC users accounts. Edit the server configuration. Set your users’ VNC passwords. Confirm that the vncserver will start and stop cleanly. Create and customize xstartup scripts. Amend the iptables. Start the VNC service. Test each VNC user. Additional optional enhancements
2.1. Create the VNC user accounts
6. VNC-Server for an already logged in GUI console session - 2 options
https://wiki.centos.org/HowTos/VNC-Server#Start_the_VNC_server
vnc-server install will require no third party repos or source building.
x11vnc is a way to view remotely and interact with real X displays (i.e. a display corresponding to a physical monitor, keyboard, and mouse) with any VNC viewer. In this way it plays the role for Unix/X11 that WinVNC plays for Windows.
6.1. x11vnc adhoc option
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
1. Download the latest rpm to the host you want the vnc-client to connect to:
wget https://dag.wieers.com/rpm/packages/x11vnc/x11vnc-0.9.3-1.el5.rf.i386.rpm
2. Install, as root, via the yum or rpm programs on the host you want the vnc-client to connect to:
yum install x11vnc-0.9.3-1.el5.rf.i386.rpm
3. Start the x11vnc process on the host you want the vnc-client to connect to.
take a long look at the possible options from the x11vnc website.
A very simple/insecure example for a trusted network setup (local network or VPN) is to have the user with the GUI console issue the command:
[user@helpme_host ~$] x11vnc -nopw -display :0.0
Then connect (without password) via a vnc-client to the IP/hostname and port noted by the x11vnc command. By default, x11vnc will allow connections from all interfaces. Host based firewall settings may need to be modified.
You can combine this with ssh tunneling:
ssh -C -t -L 5900:localhost:5900 [remote ip] 'x11vnc -usepw -localhost -display :0'
Note that the -C flag is for compression, so may not be required
Remote Installation (SSH/PuTTY)
.
Comments powered by Disqus.