HostOnNet Blog

Author Archives: admin

grub2-install

grub need to be installed on boot sector of a hard disk. So always use device name like /dev/sda, don’t use partition name like /dev/sda1 See grub


efibootmgr

verbose result see Check if your Server booted using UEFI


Check if your Server booted using UEFI

To check if your system is using UEFI boot, you can use following method. Method 1: efibootmgr On CentOS 7, efibootmgr is provided by package efibootmgr. This server is using UEFI Here is a server that is not booted with


CentOS 7 no matching mac found

On a new CentOS 7/CloudLinux server, i had to get CloudLinux license support, but for some reason CloudLinux support can’t login to my server. It worked fine on Ubuntu 16.04. CloudLinux support sent following log, asked me to check. This


mysql optimization

Using MySQLTunner MySQLTuner is a perl script that check your MySQL installation and suggest you changes based on your usage. To optimize MySQL, run Follow the suggestions it shows. See MySQL


Nginx Geoip

To enable GeoIP module on nginx, first install geoIP module. This you can install it with your system package manager or download from maxmind. GeoLite Legacy Downloadable Databases On Ubuntu 16.04, i installed GeoIP with command Now edit nginx.conf Find


Ubuntu 16 mysqldump Got packet bigger than max_allowed_packet

When taking MySQL backup with mysqldump, i get following error On Ubuntu 16.04, this error is fixed by editing Find Add brlow Here is the modified file Edit 50-server.cnf Find Update value to higher, something like Now restart MySQL Verify


ddos

To see list of IP connect to port 80 of your web server, run Blocking DDoS with CSF Set CT_LIMIT to 30, set it back to 100 after attack stop. Set SYNFLOOD to 1, set it back to 0 after


Nginx Commands

Test Nginx Configuration Reload Nginx nginx start nginx nginx -s reload Graceful restart nginx nginx -s stop stop nginx nginx -t Test nginx configuration nginx -T Test and dump nginx configuration


Testing Nginx Configuration file

When you edit nginx coniguration file, it is better to test the new config file before you restart. This can be done with command Example You can also use command See also nginx