Install elasticsearch on CentOS 7

To install elasticsearch, first install java yum -y install java-1.8.0-openjdk Import key rpm –import https://artifacts.elastic.co/GPG-KEY-elasticsearch Create file vi /etc/yum.repos.d/elasticsearch.repo Paste following [elasticsearch] name=Elasticsearch repository for 7.x packages baseurl=https://artifacts.elastic.co/packages/7.x/yum gpgcheck=1 gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch enabled=0 autorefresh=1 type=rpm-md Install elasticsearch yum install –enablerepo=elasticsearch elasticsearch Set elastic search to start on boot systemctl enable elasticsearch To start/stop/status systemctl stop elasticsearch.service systemctl … Read more

yum [Errno 5] [Errno 2] No such file or directory

When running yum update on CentOS 7 server, i get following error [root@server2 yum.repos.d]# yum update curl Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile Resolving Dependencies –> Running transaction check —> Package curl.x86_64 0:7.29.0-54.el7 will be updated —> Package curl.x86_64 0:7.29.0-57.el7_8.1 will be an update –> Processing Dependency: libcurl = 7.29.0-57.el7_8.1 for package: … Read more

Install bind in CentOS 7

bind is a DNS server. To install bind on CentOS 7, run yum install bind bind-utils -y Enable bind to start on boot systemctl enable named Start bind systemctl start named You can see status with systemctl status named Setup firewall You need to allow DNS ports UDP/TCP 53 in firewall. On CentOS 7, you … Read more

Install Python 3.8 on CentOS 6 from source

To install Python 3.8 on CentOS, you need to install OpenSSL as the one installed by CentOS from yum is very old. cd /usr/local/src wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz tar xvf openssl-1.1.1g.tar.gz cd openssl-1.1.1g ./config –prefix=/usr/serverok/openssl –openssldir=/usr/serverok/openssl no-ssl2 make make install Now edit file vi ~/.bash_profile at end of the file, add export PATH=/usr/serverok/openssl/bin:$PATH export LD_LIBRARY_PATH=/usr/serverok/openssl/lib export LC_ALL=”en_US.UTF-8″ … Read more

yum list all available packages in a repo

To list all packages available on a specific repo, run yum –disablerepo=”*” –enablerepo=”REPO_NAME_HERE” list available You can get list of all available repos with command yum repolist Example: yum –disablerepo=”*” –enablerepo=”litespeed” list available This command list all packages available in repo “litespeed”

Install PHP 7 on CentOS VestaCP

To install PHP 7. you need to first enable epel and remi repo. yum install -y epel-release rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-7.rpm Remove existing PHP yum -y remove php Install PHP 7.3 yum –enablerepo=remi-php73 install php73-php php73-php-mbstring php73-php-mysqlnd php73-php-gd php73-php-fpm php73-php-intl php73-php-cli php73-php-xml php73-php-opcache php73-php-pdo php73-php-gmp php73-php-process php73-php-pecl-imagick php73-php-devel start php-fpm service php-fpm stop service php73-php-fpm start … Read more

rpmdb DB_RUNRECOVERY: Fatal error, run database recovery

When running yum update on a CentOS server, i get following error. [root@ip-172-30-0-39 ~]# yum update error: rpmdb: BDB0113 Thread/process 12797/46913889995840 failed: BDB1507 Thread died in Berkeley DB library error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery error: cannot open Packages index using db5 – (-30973) error: cannot open Packages database … Read more

CentOS 7 resolv.conf make changes permanent

On rebooting the CentOS 7 server, changes made to resolv.conf is lost. This is because one of the network interface is configured to use DNS server. To fix, edit Remove the line Now NetworkManager will not modify /etc/resolv.conf file on boot. Or you can set valid DNS servers in network config file like If your … Read more

Install Pure-FTPd on CentOS with Virtual Users

To install Pure-FTPd on CentOS, run yum install -y pure-ftpd Edit configuration file vi /etc/pure-ftpd/pure-ftpd.conf To disable anonymous FTP, find NoAnonymous no Replace with NoAnonymous yes To enable Virtual Users, find # PureDB /etc/pure-ftpd/pureftpd.pdb Uncomment the line. PureDB /etc/pure-ftpd/pureftpd.pdb To Allow Apache user to login via FTP, find MinUID 1000 Replace with MinUID 47 I … Read more

Install vim from source on CentOS

To install vim from source on the CentOS server, run This will install the latest version of Vim. You can start it with the command vim To get it work with “vi” command, i removed preinstalled vim editor with command Now create a symlink with