Here is an example of changing the hostname in Linux.
First, switch to the root user or add “sudo” before the commands.
Let’s see the current hostname:
Vyacheslav Gapon – personal blog, manuals, articles, notes, development
Here is an example of changing the hostname in Linux.
First, switch to the root user or add “sudo” before the commands.
Let’s see the current hostname:
Recently moved Nextcloud from one server to another and when it opened, noticed the following error in the browser:
Internal Server Error
The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.
In my case, the error occurred because of a damaged MySQL database, so I restored it from another backup and Nextcloud opened.
I assume that the same error can occur when the Nextcloud database exists, but is empty.
See my article:
Install Nextcloud in Ubuntu
Clam AntiVirus — a package of antivirus software running on many operating systems.
Continue reading “Installing and using ClamAV antivirus”Webmin – a graphical web interface for managing a Linux server, written in Perl.
Official site: www.webmin.com
Here is an example of installing Webmin in Ubuntu.
Open the list of sources in a text editor:
nano /etc/apt/sources.list
Add this line to it:
deb http://download.webmin.com/download/repository sarge contrib deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib
We go to the temporary directory and import the key:
cd /tmp wget http://www.webmin.com/jcameron-key.asc apt-key add jcameron-key.asc
We update the list of sources:
apt-get update
We install the packages necessary for the correct operation of Webmin:
sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl libmd5-perl
Install Webmin:
apt-get install webmin
The installation is complete, to open the Webmin interface we will open in the browser https://HOST:10000
Suppose Fail2Ban is already installed, if not, then see my article – Installing and Configuring Fail2ban.
By default, Bind9 does not write logs, so open its configuration file in any text editor:
Continue reading “Configuring Fail2Ban for Bind9”On the test, I installed a clean Ubuntu Server 18.04, during the installation, the system automatically split the disk into one main /dev/sda1, which already had /boot files.
Since I did not have a system with /boot on a separate partition, I transferred it to a separate one and described the process in this article – Transfer /boot from a main partition to a separate partition
Now let’s move the /boot partition to the main /.
Let’s look at the information about the disks:
sudo fdisk -l df -h
Continue reading “Transfer /boot from a separate partition to a main partition”
Today, I’ll give an example of moving /boot from a shared partition to a separate partition.
For the test, you can connect a new disk or use the first partition on any disk, for example, with a size of 512MB.
Let’s look at the information about the disks:
sudo fdisk -l sudo ls -l /boot sudo du -hs /boot
Continue reading “Transfer /boot from a main partition to a separate partition”
Once it was necessary to upgrade the version of PHP 5.5.9 to 5.6 on Ubuntu Server 14.04 LTS, the usual update of the system components did not help:
sudo apt-get update sudo apt-get upgrade
You can try to upgrade the system to 16.04 or higher as I described in the article Updating Ubuntu 14.04 to 16.04. Together with the system will be updated and PHP.
If the system update fails, you can add a third-party source with PHP:
sudo add-apt-repository ppa:ondrej/php sudo apt-get update
And install the correct version from it, for example PHP 5.6:
sudo apt-get install php5.6 php5.6-mbstring php5.6-mcrypt php5.6-mysql php5.6-xml
Since there are several installed versions, disable the old version and activate the installed one:
sudo a2dismod php5 sudo a2enmod php5.6 sudo service apache2 restart
Similarly, you can install PHP 7.2:
sudo apt-get install php7.2 sudo a2dismod php5.6 sudo a2enmod php7.2 sudo service apache2 restart
Or PHP 7.0:
sudo apt-get install php7.0 sudo a2dismod php7.2 sudo a2enmod php7.0 sudo service apache2 restart
Once I noticed the following error in the file /var/log/proftpd/proftpd.log:
Continue reading “The solution to the error in ProFTPd “unable to open passwd file””error: unable to open passwd file ‘/etc/proftpd/ftpd.passwd’: Permission denied
To use Let’s Encrypt in cPanel, you need to install a special plugin.
To do this, connect to the server by SSH and execute the command from the root user:
/scripts/install_lets_encrypt_autossl_provider
After installing the Let’s Encrypt plug-in, you can use it in the AutoSSL management menu (WHM >> Home >> SSL/TLS >> Manage AutoSSL).
If you need to remove the plugin, then run the command:
/usr/local/cpanel/scripts/uninstall_lets_encrypt_autossl_provider
See also:
Установка Certbot в Ubuntu