This article is how to install aptly software, which offers easy Debian repository management.
First, few words for aptly and what tasks are really simple to do:
Mirror an existing (remote) repository. Make a local copy of Debian or Ubuntu repostories for all your internal infrastructure.
Create your own repositories
Create snapshots of repositories and mirrors.
Make diff between repositories (in fact snapshots of repositories, but you may make a mirror of an repository and then make a snapshot and then make a diff with some other snapshot to see the changes between the different repositories or the time the snapshots are made).
Remove or add individual packages from official mirrored repositories.
Use api calls to manage the repositories. HTTP REST API is still in development, but a big part of it works.
We are going to install the aptly and despite it could be used to serve the repository files we will use the Nginx web server for this work. Nginx is a more fast and reliable web server with easy installation of SSL certificates for our repositories.
The aptly is included in official Ubuntu repositories in the component universe, but at present, it is 2 to 3 versions behind the stable one from the aptly site, so we are going to use their repository to install aptly. Still, if you do not want to use Keep on reading!
A time to refresh our old article on how to compile xmr-stak for CPU mining with the new version and this time a new GNU GCC version (version 8.3, the last article we used 7.x – How to compile xmr-stak (2.4.5) under CentOS 7 for CPU mining cryptocurrencies). Always use the latest available GNU GCC packages because the latest version of GNU GCC could add some optimizations to the binary compiled code and you may have a CPU miner with better performance!
Thanks to xmr-stak we can have one application capable of mining many different cryptocurrencies based on different algorithms. XMR-STAK is GPU and CPU miner and here we present only the CPU ability under CentOS 7 using our AMD Threadripper 1950X.
The software in this article:
CentOS 7 – CentOS Linux release 7.6.1810 (Core)
GNU GCC – gcc version 8.3.1 20190311 (Red Hat 8.3.1-3) (GCC)
As said many times working with crypto-currency it is mandatory to do the things yourself – do not trust any binary made by someone on the Internet. It is easy to build your miner yourself with the code from the official repository!
So here are the steps to build the XMR-STAK for CPU mining:
STEP 1) Update your system and install the following dependencies
Always start with update command and then install the dependencies in order first install all the new repositories and then the dependency binaries.
If you are the root user and some file (files or directories) cannot be deleted, removed, renamed or changed you probably deal with the immutable attribute set on (by a colleague of yours – installation setups tend to not set such attributes).
Ever wonder what is the impact of write-through of an LSI controller in a real-world streaming server? Have no wonder anymore!
you can get several (multiple?) times slower with the write-through mode than if your controller were using the write-back mode of the cache
And it could happen any moment because when charging the battery of the LSI controller and you have set “No Write Cache if Bad BBU” the write-through would kick in. Of course, you can make a schedule for the battery charging/discharging process, but in general, it will happen and it will hurt your IO performance a lot!
In simple words a write operation is successful only if the controller confirms the write operation on all disks, no matter the data has already been in the cache.
This mode puts pressure on the disks and Write-Through is a known destroyer of hard disks! You can read a lot of administrator’s feedback on the Internet about crashed disks using write-through mode (and sometimes several simultaneously on one machine losing all your data even it would have redundancy with some of the RAID setups like RAID1, RAID5, RAID6, RAID10 and so).
srv ~ # sudo megacli -ldinfo -lall -aall
Adapter 0 -- Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
RAID Level : Primary-1, Secondary-0, RAID Level Qualifier-0
Size : 13.781 TB
Sector Size : 512
Mirror Data : 13.781 TB
State : Optimal
Strip Size : 128 KB
Number Of Drives per span:2
Span Depth : 6
Default Cache Policy: WriteBack, ReadAdaptive, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteThrough, ReadAdaptive, Direct, No Write Cache if Bad BBU
Default Access Policy: Read/Write
Current Access Policy: Read/Write
Disk Cache Policy : Disk's Default
Encryption Type : None
Bad Blocks Exist: No
Is VD Cached: Yes
Cache Cade Type : Read Only
Exit Code: 0x00
As you can see our default cache policy is WriteBack and “No Write Cache if Bad BBU”, the BBU is not bad, but charging! Keep on reading!
Newer PHP versions do not include PHP mcrypt library. The mcrypt module was part of PHP 5 till 7.1, in which it was deprecated and removed in 7.2. If you open the php.net documentation for mcrypt PHP functions you will see:
This function has been DEPRECATED as of PHP 7.1.0 and REMOVED as of PHP 7.2.0. Relying on this function is highly discouraged.
tar xzf mcrypt-1.0.2.tgz
Do not use “make -j N” (“make -j 8”, for example), because it may fail to compile. Keep on reading!
You can see no kernel configuration entry “CONFIG_X86_X2APIC=y” is shown from the above command.
And if your BIOS enables the support of x2APIC you may end up with just one processor under Linux.
This was the case in our server. The x2APIC support is enabled in the BIOS and our kernel (version 4.18.12) does not have CONFIG_X86_X2APIC enabled.
To fix this issue you first might disable the feature in the BIOS and you are going to have all your processors shown and they could be used to compile fast your new kernel (of course, in the case you use custom kernel) after you enable the feature in the kernel CONFIG_X86_X2APIC, which is under Kernel Configuration —> [*] Support x2apic. The asterisk means it is enabled, so build your kernel. Check and enable this “Device Drivers –> IOMMU Hardware Support –> Support for Interrupt Remapping”, too.
Here you can see how to enable and disable processor x2APIC support in HP ProLiant DL160 Gen9 (2 processors Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz) – Enable or Disable the processor x2APIC support in HP ProLiant DL160 Gen9. Keep on reading!
Updating the KDE Plasma Desktop in our Gentoo workstations this time failed with
CMake Error at /usr/share/cmake/Modules/CMakeFindDependencyMacro.cmake:48 (find_package):
Found package configuration file:
but it set Qt5WebKit_FOUND to FALSE so package "Qt5WebKit" is considered to
be NOT FOUND. Reason given by package:
Qt5WebKit could not be found because dependency is required to have exact
It was strange because the previous emerge included the QT upgrade from old 5.11.2 to 5.12.1 and this dependency should have been resolved properly before:
emerge -vau $(qlist -IC|grep dev-qt|sort|uniq)
But apparently despite that the emerge built all QT libraries in dependency order the “dev-qt/qtwebkit” was built against the old QT libraries. And this is what is saying the above error!
The solution is really simple just rebuild the dev-qt/qtwebkit
root@srv ~ # emerge -va dev-qt/qtwebkit
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ] dev-qt/qtwebkit-5.212.0_pre20180120:5/5.212::gentoo USE="X geolocation hyphen jit multimedia opengl printsupport qml -gles2 -gstreamer -nsplugin
-orientation -webp" 0 KiB
Total: 1 package (1 reinstall), Size of downloads: 0 KiB
Would you like to merge these packages? [Yes/No] yes