Как установить lxde centos

Обновлено: 07.07.2024

Enable and configure EPEL repo

Install snapd on a CentOS / RHEL 8

Now that EPEL repo enabled, it is time to install snapd. We are going to install LXD on CentOS / RHEL 8 using the snap command. Hence, we must install a snapd from EPEL repo.

Search for snapd

Enable and increase user namespaces for Linux containers

We need to use the grubby command to configure bootloader and Linux kernel boot time options such as user namespaces:
$ sudo grubby --args="namespace.unpriv_enable=1" --update-kernel="$(grubby --default-kernel)"
Make sure you replace 2147483647 in the following example as per your needs. In other words higher number help run more Linux containers:
$ sudo sh -c 'echo "user.max_user_namespaces=2147483647" >> /etc/sysctl.d/99-userns.conf'
Reboot the Linux system, run:
$ sudo shutdown -r now
OR
$ sudo reboot
After reboot verify that namespaces is enabled and active by typing the following cat command:
cat /proc/cmdline
Sample outputs:

  • No ads and tracking
  • In-depth guides for developers and sysadmins at Opensourceflare✨
  • Join my Patreon to support independent content creators and start reading latest guides:

Install snapd

Let us install snapd, run:
$ sudo yum install snapd

Make sure you enable classic snap support using the ln command:
$ sudo ln -s /var/lib/snapd/snap /snap
Next, activate and enable the snapd.socket service using the systemctl command:
$ sudo systemctl enable --now snapd.socket
Verify that snapd.socket and services are running:
$ sudo systemctl status snapd.socket
$ sudo systemctl status snapd.service

If snapd.service not running it, type the following commands:
$ sudo systemctl enable snapd.service
$ sudo systemctl start snapd.service
Optionally you can reboot the server and verify that those two services come online before installing LXD:
sudo reboot

Install LXD on CentOS 8.x or RHEL 8.x

Now that everything set up and running correctly, it is time to install LXD using the snap command:
$ sudo snap install lxd

Installing LXD on CentOS / RHEL 8.x server

Configuring LXD server

You can manage and use LXD without a root user account. It is a good security practice to avoid using root all time. All you have to do is add admin user account such as vivek to lxd group. The command to add existing user to Linux group is as follows:
$ sudo usermod -a -G lxd vivek
Verify it using the id command:
$ newgrp lxd
$ id
Make sure ‘vivek’ user can talk to our lxd server:
$ lxc list
Sample outputs indicating that user vivek can talk to our LXD server:

Finally we need to configure LXD on CentOS/RHEL 8, run:
$ lxd init
Please note that Btrfs or ZFS file system packages not installed by default on a CentOS/RHEL 8.x server. So use LVM as backend storage for all your containers:

Firewalld allow incoming connections via lxdbr0

We set up a firewall for your CentOS 8 and manage with the help of firewall-cmd command. Let us list all active zones:
sudo firewall-cmd --get-active-zones
If lxdbr0 not listed, add to the trusted zone so that connection will go through. In other words, allow all incoming traffic via lxdbr0:
sudo firewall-cmd --add-interface=lxdbr0 --zone=trusted
Verify it:
sudo firewall-cmd --get-active-zones

Create and launch your first container

Listing all images

Listing all images

Of course, you can use the grep command/egrep command to filter out images too:
$ lxc image list images: | grep -i centos
$ lxc image list images: | egrep -i 'ubuntu|debian'

How create and set up your first container using LXD

To create and start containers from images use the launch command as follows:
lxc launch images://
Let us see some examples to create and start containers from various Linux distro images as per your needs.

CentOS Linux 6/7/8 container

$ lxc launch images:centos/6/amd64 cenots-c6
$ lxc launch images:centos/7/amd64 cenots-c7
$ lxc launch images:centos/8/amd64 cenots-db

Debian Linux 18.4 LTS

$ lxc launch images:ubuntu/18.04/amd64 ubuntu-www1

Fedora Linux 31

$ lxc launch images:fedora/31/amd64 fedora31-c1

Okay, I have set up and use LXD on CentOS/RHEL 8.x, what next?

List your containers:
$ lxc list
Sample outputs:

How to set up up firewall-cmd rules to redirect traffic

Now LXD based containers and services are running. How do you reach insider containers from the outside world? You have two options:

Examples (type on host)

Conclusion

We just learned and deployed LXD on CentOS 8.x machine and LXD on RHEL 8.x server. You can now use your container as an independent jail or app server isolated from the main host. You can redirect traffic using firewalld to containers TCP/UDP ports. For more info see the official project homepages here and here.


Welcome on the installation page of LXDE. Here you can find instructions to install LXDE on your PC. You can choose to install LXDE onto an existing system or you could download and install an operating system with LXDE already installed.

Contents

Download an LXDE-powered operating system

Distributions offering LXDE by default: Lubuntu, Parted Magic (not for daily use), Knoppix, moonOS LXDE Edition, Sabayon, PCLinuxOS LXDE,

Install LXDE onto an existing Linux system

Specific instructions

Instructions for Ubuntu/Debian (APT)

This method is likely to work on aptosid, Baltix, BlankOn, CrunchBang, Deepin, Greenie, PCLinuxOS, eXPress-linux, Kubuntu and Xubuntu.

Open a terminal as root and type:

If you want to use the Lubuntu-packages (for Ubuntu-based systems), type:

Instructions for Fedora (RPM)

This method is likely to work on CentOS, Fedora, Mandriva and Mageia.

On Fedora or CentOS, open a terminal as root and type:

On Mandriva, type

Instructions for Foresight (conary)

Open a terminal as root and type:

General instructions

  1. Open your package manager, for example Synaptic
  2. Search for LXDE or install/uninstall programs,
  3. Choose the LXDE meta package or install (It might have a name like "task-lxde")
  4. Ensure you selected lxsession (lite). For netbooks, search for LXLauncher and also mark it for installation.
  5. Confirm installation (the system will download and install LXDE)
  6. Restart your computer and confirm to choose LXDE as new desktop environment (logout may work too)
  7. For netbooks, open a terminal window and type lxlauncher. This will start lxlauncher.

Congratulations, LXDE is installed!

Installing LXDE from source

Running LXDE

This section is outdated and is only kept for historical reference.

This works on Mandriva (GNOME) and Ubuntu-based distros offering GNOME - most other systems are probably similar.

From the menu, select:

System -> Administration -> Login window

This will give you a dialogue box:

  • You may want to uncheck "Default session" so it gives you a choice at login (not sure if this works). When trying a new desktop environment this makes sense, so if there are major problems, it's easy to use a different one next time. Once you have settled on a new choice, you may wish to set this as default.
  • Under "Security" if you uncheck "Automatic login" it will give you a dialog box to enter your password at startup. (This gives you time to make your choice.) Then, at startup, look for the session options. This might be a symbol like a paper and pen, displayed under the password box and next to the shutdown symbol. Choose LXDE, and start up. This should be all you need.

Customizing LXDE

Information about customizing LXDE is available on pages in the Configuration category.

LXDE installation on the RHEL or CentOS operating system

All questions and problems regarding the installation and upgrades of LXDE from USB Stick, Live CD or Web.
8 posts • Page 1 of 1 Abdula Posts: 1 Joined: Wed Jun 08, 2011 1:45 pm

LXDE installation on the RHEL or CentOS operating system

Post by Abdula » Wed Jun 08, 2011 2:22 pm

Unfortunately, you have not created a ready-made binary packets for RHEL and CentOS OS.
RedHat company also does not create them.
It is inexplicable why there is such a cool attitude of LXDE and RHEL.

And how can I install LXDE on RHEL 5.x and RHEL 6?
Do not offer to compile the reference texts, because I do not have any desire to recourse to this barbaric method.

secipolla Posts: 18 Joined: Mon Jun 28, 2010 2:50 am

Post by secipolla » Fri Jun 10, 2011 1:19 pm

Hello Abdula,
I use Debian so I don't have direct experience on the subject. But maybe Fedora's packages could work? lyssagale12 Posts: 1 Joined: Fri Jun 24, 2011 9:44 am

Post by lyssagale12 » Fri Jun 24, 2011 9:49 am

sea Posts: 9 Joined: Fri Aug 19, 2011 4:17 pm

Post by sea » Tue Aug 23, 2011 10:54 pm

Heya,
seems this post is a little dated, but i hope the following is still helpfull for others.

Have to admit i use neither, RHEL nor CentOS, however, i'm using Fedora LXDE
Thus, they provide the following command:

Hope this helps

PS:
You might want to change the login manager as well, change (or create) the file:
"/etc/sysconfig/desktop" and add the line
"DISPLAYMANAGER=lxdm"

sea Posts: 9 Joined: Fri Aug 19, 2011 4:17 pm

Post by sea » Fri Aug 26, 2011 12:08 am

amjjawad Posts: 304 Joined: Mon Aug 29, 2011 1:51 am Contact:

Post by amjjawad » Sat Sep 10, 2011 11:08 am

sea wrote: Have to admit i use neither, RHEL nor CentOS,

I've never been a fan of RHEL and whatever based on it. This is my own personal opinion and YMMV


Why to blame LXDE? If I run a company or a project for any Linux Distribution and I want to give "more" options to my users, I would definitely do my best to include as many alternatives as possible.
I feel comfortable when I'll find many other alternatives/Desktop Environments in one distributions but when that distribution is giving me few options, I then have to find a way to install or include my favorite package/DE/etc or carry on and find a better distribution.

Linux has more than 300 active distributions and I see no problem (sometimes and at some point) if some or many distros don't meet my needs. After all, all are using the same Kernel and as all or most of you know, Linux is very Flexible and Customizable.

I have recently installed CentOS 7 (Minimal Install without GUI) and now I want to install a GUI environment in it.

How can I install Desktop Environments on previously installed CentOS7 without reinstalling it?


336k 104 104 gold badges 722 722 silver badges 825 825 bronze badges


35.4k 15 15 gold badges 62 62 silver badges 102 102 bronze badges

3 Answers 3

1. Installing GNOME-Desktop:

Install GNOME Desktop Environment on here.

Input a command like below after finishing installation:

GNOME Desktop Environment will start. For first booting, initial setup runs and you have to configure it for first time.

  • Select System language first.
  • Select your keyboard type.
  • Add online accounts if you'd like to.
  • Finally click "Start using CentOS Linux".

GNOME Desktop Environments starts like follows.

GNOME Desktop Environment: start screen

How to use GNOME Shell?

The default GNOME Desktop of CentOS 7 starts with classic mode but if you'd like to use GNOME Shell, set like follows:

Option A: If you start GNOME with startx , set like follows.

Option B: set the system graphical login systemctl set-default graphical.target (more info) and reboot the system. After system starts

  1. Click the button which is located next to the "Sign In" button.
  2. Select "GNOME" on the list. (The default is GNOME Classic)
  3. Click "Sign In" and log in with GNOME Shell.

Sign-in screen with GNOME selected

GNOME Desktop Environment - sample screen

2. Installing KDE-Desktop:

Install KDE Desktop Environment on here.

Input a command like below after finishing installation:

KDE Desktop Environment: sample start-screen

3. Installing Cinnamon Desktop Environment:

Install Cinnamon Desktop Environment on here.

First Add the EPEL Repository (EPEL Repository which is provided from Fedora project.)
Extra Packages for Enterprise Linux (EPEL)

How to add EPEL Repository?

And now install the Cinnamon Desktop Environment from EPEL Repository:

Input a command like below after finishing installation:

Cinnamon Desktop Environment will start. For first booting, initial setup runs and you have to configure it for first time.

  • Select System language first.
  • Select your keyboard type.
  • Add online accounts if you'd like to.
  • Finally click "Start using CentOS Linux".

Cinnamon Desktop Environment starts like follows.

Cinnamon Desktop Environment: sample starting screen

4. Installing MATE Desktop Environment:

Install MATE Desktop Environment on here (You will need to add the EPEL Repository as explained above in advance).

Input a command like below after finishing installation:

MATE Desktop Environment: sample starting screen

5. Installing Xfce Desktop Environment:

Install Xfce Desktop Environment on here (You will need to add the EPEL Repository as like above in "Cinnamon" installation before).

Читайте также: