HostOnNet Blog

Category Archives: CentOS

Yum Error Fatal error, run database recovery

When i run yum update on a server, i get error To fix this, you need to delete yum db files (__db.001, __db.002 and __db.003) from /var/lib/rpm folder. Run yum clean and update. Now yum will work.

CentOS 7 rc.local not working

To get /etc/rc.local working on CentOS 7, first you need to set it executable. Now enable rc-local service with command Now start service. Verify it is running properly

Adding IP address on RHEL/CentOS 7 server with nmtui

nmtui (Network Manager Text user interface) is a command line program available in RHEL/CentOS 7 to configure IP address. This is a text based UI, allow you to add IP address to network interfaces. To install nmtui, run To navigate

CentOS 7 Invalid command SSLEngine

On CentOS 7 server, after adding SSL virtualhost entry, i got error Jul 16 10:27:56 mon1 httpd[6620]: AH00526: Syntax error on line 359 of /etc/httpd/conf/httpd.conf: Jul 16 10:27:56 mon1 httpd[6620]: Invalid command ‘SSLEngine’, perhaps misspelled or defined by a module

Install PHP 5.6 on CentOS 7 Server

CentOS 7 come with outdated PHp 5.4 for some strange reason only enterprise can understand. I normally prefer Ubuntu 16.04 over CentOS 7 because it come with latest software. Default PHP version with Ubuntu 16.04 is 7. To install PHP

Configure Network in CentOS 7 Server

To set static IP in CentOS 7 Server, edit file Find Replace with Find Replace with Add following, change IPADDRR and GATEWAY as required. Here is a diff with original ifcfg-eth0 Setting DNS resolvers Edit /etc/resolv.conf Add

Install vsftpd on CentOS

vsftpd is an FTP server. To install vsftp on CentOS, run Make it start on boot with Start FTP Server with Now system users will be able to login, lets create a user, set it a password. Exmaple [root@localhost ~]#

Setting hostname On CentOS 7 Server

CentOS 7 come with a command hostnamectl to query and change the system hostname and related settings. Set hostname To set hostname, run Example [root@localhost ~]# hostnamectl set-hostname [root@localhost ~]# hostname [root@localhost ~]# See also HostName

Kernel panic – not syncing: No working init found.

On a CentOS 7 server, i got error “Kernel panic – not syncing: No working init found.” on boot. This normally happen when you try boot wit wrong partition or system files are missing. I checked the server in rescue

Enable php-fpm in CentOS 7

php-fpm use socket Enable PHP-FPM in Nginx on Ubuntu/Debian To install php-fpm on CentOS, run Now you need to edit Apache configuration to activate php-fpm Edit file /etc/httpd/conf.d/php.conf Find Replace with Enable php-fpm start on boot Restart Apache Now if