how to install and run rethinkdb in cpanel? - php

I'm having a hard time getting the RethinkDb server up in cpanel. I'm able to run it smoothly in my local machine using windows os.
I follow instruction listed here to somehow install it in cpanel.
https://www.rethinkdb.com/docs/install/centos/
this is what exactly I typed in putty:
wget http://download.rethinkdb.com/dist/rethinkdb-2.3.6.tgz
tar xf rethinkdb-2.3.6.tgz
I tried the above step as well as manually downloaded the .tgz file,
extracted it and the continued with below command to no avail.
cd rethinkdb-2.3.6
./configure --allow-fetch --dynamic jemalloc
make
sudo make install
It seems like the installation goes on and on.
I waited until it complete installing and typed rethinkdb to start the server.
But it says undefined command.
Please guide me on how o install and run RethinkDb in cpanel.
Thanks.

Not sure why you are trying to install it from source and compile it since there are already created packages available for CentOS 6 & 7.
sudo wget http://download.rethinkdb.com/centos/7/`uname -m`/rethinkdb.repo -O /etc/yum.repos.d/rethinkdb.repo
sudo yum install rethinkdb
If it's CentOS 6, just then replace 7 with 6 after the CentOS repo.
Then just do a service rethinkdb start for CentOS 6.x or systemctl start rethinkdb for CentOS 7 and you should be good to go.

Related

When trying to install Opencats using installwizard.php it gives some errors

I tried to install opencats on linux server. Running ubuntu version is 18. When I try to install opencats via http://localhost/opencats (server ip address used as localhost) and click installwizard.php I get the following errors/warnings:
It won't work on PHP7 if it wants the MySQL extension. It has been removed. Its sounds like a very very old project you are trying to install.
I had a quick look on their homepage:
Opencats has a minimum supported PHP version of PHP 5.5, and are working towards full PHP 7 compatibility.
http://www.opencats.org/
OpenCATS does not currently support php7. It must be 5.6.X
you should install PHP5.6, Open your terminal and execute those commands as follow:
1- to install PHP5.6
sudo apt-get install php5.6
2- Now, you should know which PHP version you are using
php --version
3- To stop running the current PHP version, run the commands below to disable it for Apache2 (ex: PHP7.2)
sudo a2dismod phpX
where X is your PHP version
4- Then run the commands below to enable PHP 5.6 for Apache2 to use
sudo a2enmod php5.6
5- Now, You can install the needed PHP extensions like MySQL
sudo apt-get install php5.6-mysql
5- Restart Apache2 for the changes to apply by running the commands below
sudo systemctl restart apache2.service
Hope that this can help you.

How to load memcached on PHP in Mac OS X Catalina?

I have tried virtually everything I could for the last 3 hours. I just don't seem to get it to load on PHP. I was able to install it via brew install memcached and successfully make run it as a background service via memcached -d. But that's not really what I am looking for.
I am looking at loading it as one of my PHP modules. Running php -m on the terminal does not list memcached on it at all. Neither looking at phpinfo() or print_r(get_loaded_extensions()); on runtime gave me any luck. I am trying to officially access it in my project via something like extension_loaded('memcached'), of course, this returns a falsy value atm.
I have tried solutions like below:
How to install memcached module for php#7.1 on MacOS High Sierra?
https://donatstudios.com/OS-X-Mavericks-Memcached-PHP-Extension-Installation
Can I install the memcached PHP extension with PECL?
Most of the solutions are similar to the above linked. Unfortunately, this isn't working for me because of an issue similar to this:
Unable to use PHPIZE after update to MacOS Mojave
I also get below error when executing a make command:
make: *** No targets specified and no makefile found. Stop.
And the below error when running ./configure
checking for session includes... configure: error: Cannot find
php_session.h
Meanwhile, I also cannot attempt an install via pecl install memcached due to the error below:
configuration download directory "/tmp/pear/install" is not writeable.
Change download_dir config variable to a writeable dir to avoid this
warning
Basically everything just doesn't work. And honestly, I didn't even know how to start writing this question, so I'm just kinda throwing everything in here.
It doesn't help that there are no recent discussions about installing memcached on PHP since Catalina. A lot of resources are just 5 years old and that's not a good sign, a number of them aren't even valid solutions anymore.
I am losing my mind. Why this thing is so complicated to configure is beyond my comprehension. If someone can point me in the right direction that would be great!
So I was able to find a solution after 2 working days. What you should do is move away from using built-in Apache/PHP from macOS and use the ones from Homebrew.
Here are the descriptive step-by-step procedure I did:
1) Unload the built-in Apache.
2) Install a new Apache from Homebrew via brew install httpd and then run the service
3) Install PHP via brew install php
4) Configure httpd.conf from /usr/local/etc/httpd/, including loading Homebrew PHP module, mod_rewrite, setting up DirectoryIndex, ServerName, default Listen port, etc.
4.1) If you are using virtual hosts, set this up on /usr/local/etc/httpd/extra/
5) Configure ~/.bash_profile to use the new PHP version (test via php -v or which php)
6) Install PEAR
7) Install memcached via PEAR
I have compiled a list of links that you can use:
Apache & PHP Installation
https://tecadmin.net/install-apache-macos-homebrew/
https://getgrav.org/blog/macos-catalina-apache-multiple-php-versions
https://gist.github.com/DragonBe/0faebe58deced34744953e3bf6afbec7
Follow brew info php to configure Homebrew PHP to Homebrew Apache
Configure bash profile to use homebrew php by default
PHP --version shown incorrectly on osX
How to use the php that brew installed?
Install PEAR and configure
https://jasonmccreary.me/articles/install-pear-pecl-mac
Install memcached via PEAR
pecl install memcached then follow instructions
Or
How to install memcached module for php#7.1 on MacOS High Sierra?
https://donatstudios.com/OS-X-Mavericks-Memcached-PHP-Extension-Installation
Can I install the memcached PHP extension with PECL?
why don't you try vagrant box. You will get a virtual environment of your choice, install a ubuntu environment in minutes and you can get a LAMP or MEAN / MERN vagrant box ready made.
Steps :
1) Download and install virtualbox.
2) Download and install Vagrant
3) Go to terminal
Check if vagrant is installed or not.
vagrant -v
In order to get a ubuntu box spinning up, run these commands.
vagrant init ubuntu/trusty64
It will download you a ubuntu box in minutes.
vagrant up
vagrant ssh
Have a look at vagrant you will enjoy it.
Also there are whole lot of ready to use boxes
Vagrant boxes
Documentation : [Vagrant Document]

How do I change the php version using bitnami/linux terminal for my php app

So I'm using AWS with bitnami using a linux terminal for my php application. But I need to switch my PHP version from 7.2 to 5.6, and I can't figure out how. I've never used Linux so I'm having trouble, can anyone help?
I've tried this link: https://tecadmin.net/switch-between-multiple-php-version-on-ubuntu/
unfortunately none of those commands worked
If anyone is able to help I'd appreciate it very much!
Thank you!
Bitnami deployments don't support multiple versions of the same component. You will need to install a different stack, in this case the LAMP 5.6 stack (which is not supported anymore) and deploy your PHP code on top of it as you did in the instance you have.
You can download the last version of the Bitnami LAMP solution by running these commands
cd /tmp
curl -LO "https://downloads.bitnami.com/files/stacks/lampstack/5.6.40-1/bitnami-lampstack-5.6.40-1-linux-x64-installer.run
chmod +x ./bitnami-lampstack-5.6.40-1-linux-x64-installer.run
sudo ./bitnami-lampstack-5.6.40-1-linux-x64-installer.run
This new installation will use different ports to configure Apache, MySQL, ... if you have another Bitnami installation in the instance. If you want to use the default ports, just stop the default installation.
sudo /opt/bitnami/ctlscript.sh stop
sudo mv /opt/bitnami /opt/bitnami.back
First of all you need to install the version of PHP you need so you can run these commands :
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install phpx.x (ex : php7.4)
Then to switch between versions run this :
update-alternatives --config php
now you'll get to choose you desired PHP version
Backup your current website.
Deploy a new Bitnami WordPress instance.
Update your DNS records.
Install a SSL certificate on new Bitnami WordPress Instance.
Modify the php.ini file to increase upload size.
Import backed up the website on a new Bitnami WordPress website.

How to run "brew" command in windows..?

It shows "'brew' is not recognized as an internal or external command" in windows command prompt.
I am trying to install codeigniter-reactjs-example from github, where first command is brew.
How to run this command to install that project in Windows..?
Edit: Homebrew is also usable on Windows Subsystem for Linux (WSL) since version 2.0.0 (released February 2019), as detailed by #VonC's answer below. The instructions for installation/use are available at:
https://docs.brew.sh/Homebrew-on-Linux
Homebrew is MacOS only command line installer application and it doesn't exist for Windows.
The Windows alternatives are:
Chocolatey
Npackd
Scoop
OneGet for Windows 10
Source: https://laracasts.com/discuss/channels/laravel/homebrew-install-on-windows-os
It shows "'brew' is not recognized as an internal or external command" in windows command prompt.
Not anymore, 19 months later (Feb. 2019, compared to July 2017)
At least, not on Windows 10, in a WSL (Windows Subsystem for Linux) session.
As mentioned by Mike McQuaid
Homebrew 2.0.0 has been released (at #FOSDEM!) with official Linux and Windows 10 WSL support, brew cleanup running automatically (opt-out with HOMEBREW_NO_INSTALL_CLEANUP), no more options in Homebrew/core and no longer running on OS X 10.8 and older.
See Homebrew 2.0.0.
“Homebrew on Linux” is called “Linuxbrew”.
You can install it in your home directory, so it does not require sudo, and use it to install software that your host distribution’s package manager does not provide.
Linuxbrew uses its own repository for formulae: Linuxbrew/homebrew-core.
So again, this is not native Windows support, but Linux (through the WSL layer, on Windows 10).
As mentioned in the comments, Homebrew is a package manager for OSX, much like Aptitude in linux. You can't install Homebrew on Windows and never will be able to so you need to find a new way to accomplish what you are doing. I think you're trying to work with Google's V8 Javascript engine so why not try:
https://github.com/phpv8/v8js
You can Install Brew on windows subsystem i.e in Ubuntu or Kali linux by following these steps.
1: $ sudo apt-get install build-essential procps curl file git -y
2: $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
3: $ echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> /home/$USER/.profile
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
4: $ brew update
I have installed in both the linux(Windows subsystem)
To Upgrade
$ brew upgrade PACKAGE
To Uninstall
$ brew uninstall PACKAGE
Finally, if you ever want to remove Homebrew from Linux, the command is:
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
Homebrew is a package manager for OS X. Windows can't use Homebrew. Even if there was a way to get pass that, the packages wouldn't work.
This link below might help you find an alternative.
http://alternativeto.net/software/homebrew/
Use this
Download git bash
Run below command, this will install homebrew to your PC
now this can help you run brew command
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
If you want to run directly without bash then It can be done using cmd also
If following with cmd then you need to add the location of homebrew downloaded folder to your environment path variables
Try this in windows CMD
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh
Now add this folder location "C:\Users\[NAME]\homebrew\" to path variable
TO add in Path Variables Follow below:

Install pcntl extention on cent os 6.5 php 5.4.28

I have dedicated server on bluehost having CentOS 6.5 and PHP 5.4.28
I have an issue with regards to starting a service on specific port no. I log in from PuTTY as the root user, go to home/fleeton/public_html/socket, and give the following command:
php -q server.php
server.php has script to start service on port no 10000
After executing the above command, it shows me:
This example requires PCNTL extention
Can you help me what steps I need to follow to install it?
For php 5.4.x and centos 6.5 64, try this.
First you will need php-devel and gcc if don't have yet
yum install php54w-devel
If you don't have gcc
yum install gcc.x86_64
download php source code for your php version, you have installed on your server, for example php-5.4.xx.tar.gz from http://www.php.net/releases/
cd php-5.4.xx/ext/pcntl
phpize
./configure
make
copy the extension to modules folder, first find the location
php-config --extension-dir
cp modules/pcntl.so /usr/lib

Categories