nouveau – How to turn off the graphics card on the Ubuntu 18.04 server

I recently purchased an HP Z420 8-core desktop PC with 32GB of RAM and set it up as a headless Ubuntu 18.04 server. The motherboard has no graphics card on board. So I have to install a graphics card, lspci | grep VGA returns:
05: 00.0 VGA-compatible controller: NVIDIA Corporation GT218 [NVS 300] (rev. a2).

I'm wondering if it's possible to completely turn off the graphics card to avoid the constant heat generated by the graphics card being left unused.

I tried to blacklist NVIDIA and Nouveau. But that does not seem to change anything.

Can someone give me an insight on how the graphics card can be disabled?

Gnome can not log in after the upgrade from 16.04 to 18.04

I have a new laptop on which I have Ubuntu 16.04 installed. I have just upgraded to 18.04.

First, it takes a while for the login screen to appear, and secondly, after I type in my password, the screen freezes to create a session and nothing happens (wait about 15 minutes).

However, if I choose first Expanded options in the meal and then choose Recovery Mode (Kernel 4.15), then simply press Enter when continuing, the login screen will appear immediately and after entering my password, there will be no freeze.

Additional Information :

  • All the best on 16.04
  • The computer has an NVIDIA GTX 1050, but I have not yet installed the package because I did not find a way to get it running on my old computer.
  • On the login screen, I selected gnome classic.
  • I did not install anything on the computer before I ran the switch (I guess I should do a fresh install directly with 18.04, but I have some serious connectivity issues)
  • I had a lot of software installed on my previous computer and adapted Gnome, but when I upgraded to 16.04 I had no issues and all my customizations were kept.

I do not even know what protocols to look at because it works over at boot time Recovery Mode > continue but not over normal boot

Edit: I do not really like the Unity / Gnome mix and would just like to keep vanilla gnomes, but I do not understand why I still had vanilla gnomes on my previous laptop after the upgrade and not on this new laptop on which almost nothing was installed

Command line – How do I reset the repositories in Ubuntu 18.04 on the Other Software tab under Software and Updates?

I've gone through the steps to upgrade MySQL from version 5 to version 8. Without further thought, I inserted these commands into the terminal sudo apt-key adv --keyserver keyserver.ubuntu.com .... from Ubuntu 12 version have been added. Therefore, I manually removed them later from the Other Software tab under Software and Updates. Somehow it got better, but whenever I put in the command sude apt-get updateends with the error given below

N: For details about repository creation and user configuration, see the apt-secure help page (8).

Terminal, if "sudo apt-get update" was inserted

I am still unable to find a solution.
Thank you in advance for your help šŸ™‚

How to replace Apache with NGINX on Ubuntu 18.04




NGINX is the modern web server founded in 2004 by computer software developer Igor Sysoev. NGINX is used by the most frequented websites. NGINX instantly works with most major web stacks, including LEMP stacks (Linux, NGINX, MySQL, PHP). This tutorial assumes that your website is hosted on the Apache web server and you want to migrate to NGINX. The migration process involves replacing NGINX with the Apache web server, without losing website data with less downtime.

Why replace Apache with NGINX?

There are several reasons to replace Apache with NGINX:

  • NGINX is the fastest web server that supports concurrent connections and high site utilization.
  • NGINX consumes less RAM and CPU compared to Apache and is resource efficient.
  • NGINX improves website performance by supporting the built-in cache system for faster access to site static content such as images, CSS, JavaScript, etc.

What is the main difference between Apache and NGINX?

These are the main differences between Apache and NGINX:

  • The main configuration files for Apache and NGINX are located at /etc/apache2/apache2.conf and /etc/nginx/nginx.conf respectively.
  • NGINX uses server block, but Apache uses the virtual host.
  • NGINX and Apache use the same default root directory / var / www / html.
  • NGINX has a built-in cache system, but Apache does not have an integrated cache system.

requirements

Before you start the tutorial, you will need:

  • You need Ubuntu 18.04 VPS with at least 1GB of RAM for smooth operation.
  • The Apache web server must have been previously installed on your VPS.

Step 1: Remove the Apache web server

Before installing NGINX, you must remove the Apache web server to avoid conflicts.

First, stop the Apache service before removing the Apache web server. This will allow us to easily remove Apache.

$ sudo systemctl stops apache2

After stopping Apache, the start Apache entries are removed from systemctl. This will allow us to remove the startup entries so that the Apache services do not start automatically during startup.

$ sudo systemctl disable Apache2

When the Apache services have completed successfully and the boot entries have been removed, the Apache Web server packages must be removed from the system.

$ sudo apt remove apache2

The above command removes only Apache2 packages, but Apache-related dependencies are retained in the system. Be sure to remove these unwanted dependencies to free up disk space. This can be done with a specific command.

$ sudo apt autoremove

The Apache web server has now been successfully removed. The installation of NGINX will be described in the next step.

Step 2: Install the NGINX web server

Let's start with installing NGINX on Ubuntu. The Ubuntu standard repository contains all the packages from NGINX. Installation is straightforward, so you need to install it easily with apt package manager.

First, remove the old apt repository cache and empty it. Then update the repository to load the latest package information and perform a full upgrade to update all installed packages.

$ sudo apt clear everything && sudo apt update && sudo apt dist-upgrade

After updating the repository, it is time to install the updated NGINX packages.

$ sudo apt install nginx

If NGINX has been successfully installed, we will start with the next step, which will help you with the firewall configuration for the NGINX web server.

Step 3: Configure the UFW firewall

The NGINX web server requires HTTP port # 80 and HTTPS port # 443 to work successfully with the firewall. Therefore, it is important to keep this port open for this purpose for NGINX to work properly. The UFW (Unified Firewall) is the default firewall for the Linux distribution of Ubuntu 18.04. Therefore, add firewall rules to allow HTTP and HTTPS ports.

By default, no rules are added to the UFW firewall, so adding these rules is so easy. You must add the HTTP and HTTPS port rules to the UFW firewall. This can be done with simple commands. The NGINX Full rules include both the HTTP and HTTP ports. This way, these ports can be left open by the UFW firewall.

$ sudo ufw allow "Nginx Full"

After adding the firewall rules, it's time to review the rules that were added or updated using these rules with the status command.

$ sudo ufw status

The above command shows an example output.

Status: active

To the action of
------------
80 / tcp ALLOW Anywhere
443 / tcp ALLOW Anywhere
22 / tcp LIMIT Everywhere
Nginx Full ALLOW Everywhere
80 / tcp (v6) ALLOW Anywhere (v6)
443 / tcp (v6) ALLOW Anywhere (v6)
22 / tcp (v6) LIMIT Anywhere (v6)
Nginx Full (v6) ALLOW Anywhere (v6)

The above output shows that you have successfully added the firewall rules and are ready to configure the NGINX web server described in the next step.

Step 4: Understand the configuration file of NGINX Web Server compared to Apache Web Server

The configuration of NGINX is almost identical to that of Apache web servers, but structure and syntax are different with respect to configuration files. This difference can be seen in the example configuration file provided by Apache and NGINX

The Apache configuration file is located at /etc/apache2/sites-available/example.com.conf





Servername example.com
ServerAlias ā€‹ā€‹www.example.com
ServerAdmin admin@example.com
DocumentRoot / var / www / html /






Need all granted
AllowOverride None

The sample NGINX configuration file is located at /etc/nginx/sites-available/example.com.conf

Server {
listen to 80;
Server name example.com www.example.com;
root / var / www / html;

Location / {
try_files $ uri $ uri / = 404;
}
}

If you look closely at the two configuration files, you will notice that the Apache configuration file is expressed in the virtual host and the NGINX configuration file is in the server block. After understanding the difference between the Apache configuration file and NGINX. Now you can configure the remaining NGINX configuration files, which will be described in the next step.

Step 5: Configure the NGINX web server

The NGINX has the same features as the Apache web server, but supports faster concurrent connections. The NGINX configuration file uses the server blocks in the configuration. You must configure it to store all of your static web assets, such as HTML, CSS, JavaScript, and images, in the same location as the root of the document.

Note: This manual always assumes that your document root is located / var / www / html and default domain name example.com

In Ubuntu, the NGINX server blocks are under Websites available and Sites enabled Directory in the NGINX configuration directory. You edit the server block files in / etc / nginx / sites-available / and you will create one to enable the server blocks for your domain. This method is highly recommended because you can host more than one Web site, as well as various domains and file locations on your Ubuntu.

$ sudo nano /etc/nginx/sites-available/example.com.conf

Add the specified lines and do not forget to replace them example.com and www.example.com with your base domain name and subdomain to enable server blocks for NGINX.

Server {
listen to 80;
Server name example.com www.example.com;
root / var / www / html;

Location / {
try_files $ uri $ uri / = 404;
}
}

When you have completely added all these lines, press Ctrl + O to save and Ctrl + X to leave the nano text editor.

In NGINX server block configuration files, you create the symbolic join using soft links Websites available and Sites enabled Directory. Softlinks allow you to make changes to the server block configuration file at any time Websites available Directory and it will be replicated immediately Sites enabled Directory.

$ sudo ln -s /etc/nginx/sites-available/example.com.conf /etc/nginx/sites-enabled/example.com.conf

You will search for the correct syntax and avoid errors in the NGINX configuration files. This command also tells you where there are errors.

$ sudo nginx -t

If the entire syntax is correct, it will be displayed Syntax OK as an issue. If something goes wrong, please check again if the NGINX server blocks files. When all the steps are completed, restart the services to make changes to the effect.

$ sudo systemctl restart nginx

When all things are done, change the permission for the default NGINX user www-data to enable read, write, and execute permissions on the default Web root directory.

$ sudo chown www-data: www-data / var / www / html

To check if the www-data Users and groups have the default Web Root directory by running the specified long enumeration command

$ ll / var / www / html

After executing this command, the output is displayed www-data User and group belong to the default Web Root directory / var / www / html , This means standard NGINX user www-data can read, write, and execute the default Web Root directory.

Conclusion

Most recently, you successfully replaced Apache with NGINX. Now you can use NGINX for your web property for quick access to web assets and low memory requirements. Finally, the NGINX can be used for various suggestions and it can be used for both static and dynamic websites. For more information about NGINX, see the man pages available in Ubuntu.




Enable nested virtualization on Windows 10 guests, Ubuntu 18.04 hosts, and AMD Ryzen

I have an AMD Ryzen 1700 on Ubuntu 18.04. I've installed a Windows 10 guest on KVM with virt-manager. To do this with the correct CPU type ("EPYC" or "EPYC-IBPB"), I had to use the workaround described here ("options kvm ignore_msrs = 1").

Now I want to experiment with Docker on the Windows 10 guest. It requires a working Hyper-V installation. Unfortunately, the Hyper-V hypervisor can not be installed because of this "The processor does not have Second Level Access Translation (SLAT) capabilities.",

Strangely, on a Windows 7 guest I do Nested virtualization appears to be enabled (but the Docker desktop client only supports Windows 10).

What could be the cause here?

Package Management – PySEAL on Ubuntu 18.04 – Repositories do not have a release file

I need to install PySEAL (https://github.com/Lab41/PySEAL) on my T540p running Ubuntu 18.04. When I try to create the Docker container, I get the following output:

(base) a @ a-T540p: ~ / PySEAL $ sudo ./build-docker.sh
Sending the build context to the Docker daemon 6.181 MB
Step 1/29: FROM Ubuntu: 17.10
---> e211a66937c6
Step 2/29: MAINTAINER Todd Stavish 
 ---> use cache
---> 1b8eb3ec9956
Step 3/29: RUN apt-get -qqy update && apt-get install -qqy g ++ make python3 python3-dev python3-pip sudo libdpkg-perl --no-install-recommends
---> running in b6bf41515ad6
E: The Repository & # 39; http: //archive.ubuntu.com/ubuntuartful Release & # 39; does not contain a release file.
E: The Repository & # 39; http: //archive.ubuntu.com/ubuntu artful-updates Release & # 39; does not contain a release file.
E: The Repository & # 39; http: //archive.ubuntu.com/ubuntu artful-backports Release & # 39; does not contain a release file.
E: The Repository & # 39; http: //security.ubuntu.com/ubuntu artful-security Release & # 39; does not contain a release file.
The command & # 39; / bin / sh -c apt-get -qqy update && apt-get install -qqy g ++ make python3 python3-dev python3-pip sudo libdpkg-perl --no-install-recommends & # 39 ; returned a nonzero code: 100

On a Google search, this seems to be because the repositories are outdated. Unfortunately, I really need PySEAL for a university project. Is there a workaround for 18.04 or am I unlucky?

Many Thanks!

18.04 – LivePatch fails with error "Patches can not be applied: Update can not be applied: finitModule system call can not be executed: required key not available"

I ran Canonical-LivePatch, but it shows the following error messages. First it tried to update with the error Patches can not be applied: Update can not be applied: finitModule syscall can not be executed: required key not available, After this error, the refresh will be denied.

What could be the problem with installing the update? I could not find anything about this error message.

I am using Ubuntu 18.04.2 LTS.

$ journalctl -t Canonical-LivePatch
[...]
June 17 23:11:24 callisto canonical-livepatch[1183]: Client.Check
June 17 23:11:24 callisto canonical-livepatch[1183]: Verify with LivePatch service.
June 17 23:11:24 callisto canonical-livepatch[1183]: Update of the last test
June 17 23:11:24 callisto canonical-livepatch[1183]: last test touched
June 17 23:11:24 callisto canonical-livepatch[1183]: Applying the Update 52.3 for 4.15.0-51.55-generic
June 17 23:11:24 callisto canonical-livepatch[1183]: during update: Patches can not be applied: update can not be applied: finitModule system call can not be executed: required key not available
June 18th 00:11:24 callisto canonical-livepatch[1183]: Client.Check
June 18th 00:11:24 callisto canonical-livepatch[1183]: Verify with LivePatch service.
June 18th 00:11:24 callisto canonical-livepatch[1183]: Update of the last test
June 18th 00:11:24 callisto canonical-livepatch[1183]: last test touched
June 18th 00:11:24 callisto canonical-livepatch[1183]: Currently there are no updates available.
June 18th 00:11:24 callisto canonical-livepatch[1183]: The module may have caused a kernel crash! Module is not used.
June 18th 00:11:24 callisto canonical-livepatch[1183]: To override this warning, remove /var/snap/canonical-livepatch/common/locks/livepatch_Ubuntu_4_15_0_51_55_generic_52_52.3
June 18th 00:11:24 callisto canonical-livepatch[1183]: During the update: Patches can not be applied: The lock file "/var/snap/canonical-livepatch/common/locks/livepatch_Ubuntu_4_15_0_51_55_generic_52_52.3" already exists