How do I compile Redis so that I can upload and run it on shared hosting? - linux

I need to run Redis on my shared hosting account, but I am unable to compile on the server because of the nature of shared hosting. I have SSH access, but my hosting provider told me that I would need to compile Redis first and then upload it to the server.
I'm not sure how to go about this, and the only other person that asked this question on here never got a response.
So: how do I compile Redis so that I can upload it to and run it on my shared hosting account?

In my opinion the safest bet would be to statically compile redis.
I just did something similar for a CentOS 5 server. To be 100% sure I created a minimal CentOS 5 VM on my workstation, then I followed these steps (everything has been done on the CentOS 5 VM)
download redis and tcl 8.5
wget http://download.redis.io/releases/redis-3.0.2.tar.gz
wget http://prdownloads.sourceforge.net/tcl/tcl8.5.18-src.tar.gz
install tcl 8.5
tar xfz tcl8.5.18-src.tar.gz
cd tcl8.5.18/unix
./configure
make
make test
make install
compile redis
make CFLAGS="-static" EXEEXT="-static" LDFLAGS="-I/usr/local/include/"
test redis
cd src
./redis-server
copy the resulting binaries on the target server. The binaries can be found under the src folder.

Related

Qt6 Installer SDK and Online Installation source

I am trying to create an online installer for a Qt6 application. In this case, it is a Python base GUI app, compiled with Nuitka.
After creating the repository and the installer itself
repogen -p packages repository
binarycreator --online-only -c config/config.xml -p packages Installer
the repo folder is filled and the installer is created. But each time I call it, I get 'Cannot retrieve distant tree'.
The question is: which remote servers are allowed, and how do I access them?
SFTP: debug mode tells me 'unsupported protocol'
FTP: connects, but asks for pw forever. Probably due to secure ftp
Google drive: seems not to work, probably because of redirections?
Nextcloud server: seems not to work, probably because of redirections?
Office365 cloud: seems not to work, probably because of redirections?
Or is the only way to configure an http server to get access to an update folder w/o pw?

How to install Nodejs on CentOS 7 without Internet connection with root permission?

I've recently migrated to Linux CentOS7 from windows and I need to install Nodejs to my target, but in target system there is no Internet connection. How can I install Nodejs with all dependencies in offline mode? Thanks in advance for your answers.
you can download node.js binary from its website and you can copy that file using ssh to your target machine.
extract it and add its path to your environment variables.
for more details you can visit here
here is my procedure
To install NodeJS we need an online server to download requirements.
You can download it from Node’s official website. Make sure you download Linux binary version of it.
Or you can use this link:
https://nodejs.org/dist/v16.14.0/node-v16.14.0-linux-x64.tar.xz
After downloading Linux Binary, copy it to your offline machine.
Then go to the directory you copied and unzip your downloaded file by using tar command.
Next step we are going to define the unzipped directory to our environment variables.to do this first go to /etc/profile.d and create a file. its name should be nodejs.sh
Copy commands below to nodejs.sh file and save it.
#!/bin/sh
EXPORT PATH=/home/node-v16.14.0-linux-x64/bin:$PATH
Note : /home/node-v16.14.0-linux-x64/bin (file address) may differ from yours
Restart your session and then enjoy NodeJS on your offline Linux machine.

How to refresh application deployed in Linux machine

I have deployed angular application in Sandbox Linux machine. When replacing data in assets folder those changes are not reflecting in website. Though I am using sudo service restart httpd command.
I am using Putty command prompt and connecting to server via ssh
How can I reflect the changes or recompile code/application using commands?
It's going to depend on how your build/deploy toolchain for angular works.
Basically, httpd reads the files on the filesystem. When you update the files, you don't need to restart the httpd service. It will serve up whatever is there.
However, angular is another story. You're probably on the right path that you probably need to recompile your angular application, but with what you've provided I don't think we can answer that for you, other than to say:
Here are the docs about deploying angular apps: https://angular.io/guide/deployment

Does the Docker RPM require additional dependencies?

I couldn't find an answer online, help would be appreciated.
I have downloaded the Docker RPM for CentOS 7 from their site (http://docs.docker.com/v1.7/docker/installation/centos).
After installing the RPM, does Docker require any additional dependencies in order to run? Or is the standalone RPM enough?
I'm asking because it takes time to bring external files into my company's network. So I'd like to know in advance all of the dependencies (RPMs or other files) I need to bring into the network, along with the Docker RPM, so I can do it all at once.
It has a lot of dependencies.
You can use a tool call repotrack to download the Docker Engine RPM and all of it's dependencies.
repotrack docker-engine
There's a similar tool out there called yumdownloader, it won't work for your use case because it only downloads the rpms needed for the specific Centos/RHEL server that you run the command on. Repotrack downloads all, not taking into account what is already installed on the system.

What are the files from the 'make' of git that I actually need to run git?

I'm trying to "portablize" git, so I want to send the required executables from the make process of git to my hosted web server. Can I do that? Do you think the executables will work?
The way I do it is to:
get all Git dependencies (as listed in this Solaris package site, but this works for any Unix platform)
compile those dependencies with --prefix=/home/myuser and install them in the usr/local/lib of my home directory
then compile Git (still avoiding any reference to a system path like /usr/local/lib, but only using the lib and include within my homedir)
and install Git in the /home/myuser/git directory
I can then copy only /home/myuser/git and /home/myuser/usr/local (and $prefix/libexec/git-core as Jakub mentions in the comments) to any other similar server, knowing it will work in isolation from any existing system libraries.

Resources