Config file changes when moving from Windows to Linux - linux

Our project has been moved from windows server to linux server. In windows "config.php" file, the packages installed is defined as:
define('HTML2TEXT_PATH', "c:\\catsbin\\html2text.exe");
How to give the path when moved to linux server?
I have the same package installed in linux with the command
sudo apt-get install html2text
and it is located at /usr/share/doc/html2text/changelog.Debian.gz.
Thanks in advance.

Related

How to install nodejs on redhat without internet and without root permission?

What is the best way that Node.js can be installed on linux without internet nor root permissions.
So far I just downloaded the source tar.gz and tar.xz files.
To install nodejs on linux without root permission and offline
Download the tar.xz from Linux Binaries(x64) # https://nodejs.org/en/download/
Then in ~.bashrc add:
NODE_HOME=~/apps/node-v12.18.3-linux-x64
PATH=$NODE_HOME/bin:$PATH
Source the bashrc file or restart terminal and you are done
source .bashrc
Try
node --version
npm -v
You can download the rpm from nodesource website for specific redhat version and specific node version ex: https://rpm.nodesource.com/pub_14.x/el/7/x86_64/ provides the rpm for node 14 on redhat 7

NodeJS on Windows 10 and Windows Subsystem for Linux

I'm trying to get Expo, a platform for making native mobile apps, to run on a Windows 10 machine. A preprequisite for Expo is NodeJS so I installed that. However, I ran into some issues getting Expo to work using Git Bash and so now I'm trying to get Windows Subsystem for Linux (WSL) operational to use that instead. Ubuntu 18.04 LTS has been downloaded and initialized. Using a CMD here is what's happening:
C:\Users\jason.black>node -v
v12.13.0
C:\Users\jason.black>wsl
jason#PC1:/mnt/c/Users/jason.black$ node -v
Command 'node' not found, but can be installed with:
sudo apt install nodejs
jason#PC1:/mnt/c/Users/jason.black$ sudo apt install nodejs
[sudo] password for jason:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package nodejs
jason#PC1:/mnt/c/Users/jason.black$
So it appears that NodeJS which was initially installed is not available to WSL. Does that seem right? And why won't it install so WSL can access it?
If you're trying to access Node installed on the windows site, you may specify the PATH to /mnt/x/.../path/to/node/bin; if you're trying to install nodejs on the Linux side, may be you're looking for the package 'node' (not nodejs), or you can just download the portable version: https://nodejs.org/dist/v12.13.1/node-v12.13.1-linux-x64.tar.xz
For someone who's not familiar to Linux:
# will be download to home directory
cd ~
# using wget
wget https://nodejs.org/dist/v12.13.1/node-v12.13.1-linux-x64.tar.xz
# using curl
curl -o node-v12.13.1-linux-x64.tar.xz https://nodejs.org/dist/v12.13.1/node-v12.13.1-linux-x64.tar.xz
# extract
tar xf node-v12.13.1-linux-x64.tar.xz

nothing to do! sdk tools directory is missing ubuntu 18.04.1 LTS

i'm using Ubuntu 18.04.1
and i installed the android-sdk by using this code in terminal :
sudo apt-get install android-sdk
and it worked but when i'm trying to path the sdk folder i installed, find no directory in /home/$user/... that sdk exist!
anybody knows where it's installed?
If you are behind a proxy, do NOT configure the Automatic proxy configuration URL (URL to .pac file), because this didn't worked for me.
Configure the proxy manually, this fixed it for me.

How to run mc, htop on linux(virtual server) without compiling?

I am using a virtual shared server and I would like to have on it some programms like Midnight Commander (mc) or Htop.
The host provider doesn't provide these programs and I don't have access to any package manager or compiler.
I have ssh access to the system and I was wondering if there is a way to just copy and execute these programs without installing or compiling them.
Are there some pre-compiled versions?
PS: If you have a better sugestion for the question/title, please let me know.
You said you can't run a package manager. So the only solution I think is:
1- Upload the program, like mc to your home directory.
2- Change the permission to 774. it make mc executable
3- Open an ssh to the server and try to run it.
Maybe, if there are all the files needed installed, MC run.
But another solution if using FTP link.
You can RUN MC in you PC and LINK to the server by FTP.
FTP Link
By default, MC will show you 2 column interfaces. Left and right. Those columns are not only for local directory. You can make one of them or both connected to remote computer using FTP link.
In this case, MC will act as a FTP Client. To connect it into FTP service, you need to press “F9” > FTP Link. MC will ask credential of the FTP.
http://www.tecmint.com/midnight-commander-a-console-based-file-manager-for-linux/
You may not have access to a package manager, but are you sure you don't have a compiler?
You can get the MC source in a tar file from here.
Save it in your "local" or "src" directory and unpack with:
tar -xvjf mc-4.8.17.tar.bz2
cd into the new directory "mc-4.8.17" and compile with:
./configure --prefix=PATH
where "PATH" is the full path to your "local" directory.
Then run:
make
make install
You can install them with your package manager.
On a redhat based distribution (using rpm) :
yum install htop mc
On a debian based distribution (using deb) :
apt-get install htop mc
On others, tell me your distribution (arch linux, gentoo, slackware...)
htop install in CentOS
yum -y install epel-release
yum update
yum install htop

How to install Sqelectron in Linux?

I'm a new Linux user and I want to install a MySQL IDE. I use Sqlectron in Windows, so I want to install this IDE now in my Linux computer. I downloaded the .zip file but I don't know what to that after unzip it.
I'm using Elementary OS based on Ubuntu
The latest version of sqlectron has a .deb file to install in debian like distro https://github.com/sqlectron/sqlectron-gui/releases/latest
To install sql electron goto https://github.com/sqlectron/sqlectron-gui/releases/tag/v1.35.0
find packages depending on your distro either deb, or rpm
for deb
sudo dpkg -i path/to/package_file.deb
for rpm
rpm -ivh path/to/package.rpm
Alternatively, you can double click the downloaded sqlectron*** .deb package and do a GUI based installation in Linux.

Resources