Is it possible to install rocket.chat on shared server? - meteor

I tried to install rocket.chat on my shared hosting from godaddy, using ssh. But there were few permission erros. Is it possible to install without sudo access?
using
cd $HOME/rocketchat/bundle/programs/server
$HOME/meteor/dev_bundle/bin/npm install

The clue is in this line:
sh: nodejs: command not found
This means that nodejs isn't installed on the server. You can ask your hosting provider to install it, but they probably won't. You have a better chance of success looking for a hosting provider that is more nodejs/meteor friendly, such as Digital Ocean, AWS, etc. There are many out there.

Related

Cannot install soap on wordpress on azure

I want to install a plug that requires SoapClient.
In WooCommerce -> Status I have message like that "Your server does not have the SoapClient class enabled - some gateway plugins which use SOAP may not work as expected."
I spent a lot of time on it trying several ways:
1. https://social.msdn.microsoft.com/Forums/en-US/18ddb045-05ed-4ad3-aafa-a2c872ece55e/install-soap-module-for-php-72-in-web-app-for-containers-wordpress?forum=windowsazurewebsitespreview
In Azure SCM Kudu -> SSH
Later I reset the server using azure and still not working.
When I perform this action twice I get this message, but when I do a reset I can install it again.
2. How do I install soap extension?
In Azure SCM Kudu -> SSH
I cannot use sudo and apt-get
I also can't understand why I don't have root on ssh. In many examples, people have something like root#ASFF1234. I have only ASFF1234. :(
In Azure SCM Kudu -> Bash
I cannot use sudo and apt-get doesnt work.
3. https://bobcares.com/blog/woocommerce-soap-client/
yum doesn't work on SSH and bash
Would someone be able to tell me what I'm doing wrong?
Thank you in advance.

How to became superuser on AWS EC2 WordPress Site

I want to install SSL on AWS EC2 WordPress Site,
I have tried this:
bitnami#ip-172-24-0-191:/opt/bitnami/apache2/htdocs$ sudo /opt/bitnami/bncert-tool
An updated version is available. Would you like to download it? You would need to run it manually later. [Y/n]: Y
The tool will exit now. To run the updated version run the following command:
/opt/bitnami/bncert-tool
bitnami#ip-172-24-0-191:/opt/bitnami/apache2/htdocs$ /opt/bitnami/bncert-tool
but I have this error:
Error: There has been an error.
This installer requires root privileges. Please become superuser before
executing the installer
Press [Enter] to continue:
All you have to log in with AWS root user first.
Installing SSL depends on your web panel like cpanel, cyberpanel, directadmin etc.
If you have bought a SSL then install it via panel first.
If you want to install SSL via SSH access, Be sure your SSH port is open and the credentials are correct.
Your error is showing because of not root user access.
Thanks.

Can't complete mup setup on Dreamhost aka Meteor Up

I'm stuck at the mup setup. Trying to set it up on my Dreamhost server.
Here is what I started with after running mup setup:
Meteor Up: Production Quality Meteor Deployments
------------------------------------------------
Started TaskList: Setup (linux)
[mydomain.com] - Installing Node.js
[mydomain.com] ✘ Installing Node.js: FAILED
-----------------------------------STDERR------------
tty present and no askpass program specified
Sorry, try again.
sudo: no tty present and no askpass program specified
Sorry, try again.
Then I installed node manually on my server, and set the mup file to "setupNode": false. Tried again and got that:
Meteor Up: Production Quality Meteor Deployments
------------------------------------------------
Started TaskList: Setup (linux)
[mydomain.com] - Installing PhantomJS
[mydomain.com] ✘ Installing PhantomJS: FAILED
-----------------------------------STDERR-----------------
tty present and no askpass program specified
Sorry, try again.
sudo: no tty present and no askpass program specified
Sorry, try again.
Finally, I also deactivated the PhantomJS install, tried again to run mup setup and got that:
Meteor Up: Production Quality Meteor Deployments
------------------------------------------------
Started TaskList: Setup (linux)
[mydomain.com] - Setting up Environment
[mydomain.com] ✔ Setting up Environment: SUCCESS
[mudomain.com] - Copying MongoDB configuration
[mydomain.com] ✘ Copying MongoDB configuration: FAILED
-----------------------------------STDERR-----------------
Warning: Permanently added 'mydomain.com,69.163.152.69' (RSA) to the list of known hosts.
scp: /etc/mongodb.conf: Permission denied
Killed by signal 1.
-----------------------------------STDOUT-----------------
----------------------------------------------------------
Completed TaskList: Setup (linux)
I am not sure what to do or try next. Thanks in advance for your help and suggestions.
Its seems like its a Permission problem.
Try with sudo mup setup or whatever name process are you running, initialize with the sudo keyword
From dream Host forums (admin or tutor post).
node.js — which is used by Meteor — causes some weird issues on our shared hosting servers that can trigger this behavior. We're aware of
the issue, but, for various reasons, it's been difficult to fix.
That being said, Meteor won't work on a shared hosting account anyway,
as it runs as a persistent server process, which isn't permitted.
You'd need a DreamHost VPS or dedicated server to run Meteor.
So if you don't have a dreamHost VPS or dedicated server, and you only want to deploy the app give a try to Modulus.io, it works pretty fine with meteor, or use the meteor deploy servers, doc here
This happens because Sudo isn't installed on the target machine.
On my Debian target machine I did apt-get install sudo to resolve this.
For a RedHat flavor (Centos etc) target machine you might do yum install sudo etc.
However mup is supported for Ubuntu only so it's very likely to run into issues with other flavors. You might want to stick with Ubuntu target machines to avoid headaches like these.

How to correctly install dokku - with or without sudo?

I'm learning dokku right now for simple web deployment. Offical install instructions state this command:
wget -qO- https://raw.github.com/progrium/dokku/v0.3.12/bootstrap.sh | sudo DOKKU_TAG=v0.3.12 bash
I'm not a devop or admin, but as far as I understand this line, it performs all bootstrapping and installation under the root account, thanks to sudo. So dokku will be checked out into a directory with root access rights, and all additional directories like /var/lib/dokku/ will also have root access rights.
The problem is - all articles across the internet about dokku instructs to execute dokku command or do dokku-related actions without sudo. For example, instructions about this dokku database plugin, https://github.com/krisrang/dokku-mariadb, instructs to install it via:
cd /var/lib/dokku/plugins
git clone https://github.com/krisrang/dokku-mariadb mariadb
dokku plugins-install
This is not working, since /var/lib/dokku/plugins have root access rights and git clone will fail with acces denied. It's hard to be a non-admin nowadays, but maybe someone will hint what I'm doing wrong? Do I need to install dokku some other way, or all dokku-related tutorials across internet assume that I'm executing them under root (which is, by my limited admin knowledge, highly not recommended for security reasons).
You should run those three commands as sudo:
sudo su -
The dokku binary will run code as the dokku user even if you execute as root. So it should be fine to run that as is. Once you are the sudo user, just run the install instructions listed in your question. Hope my answer helps ! :)
I also contacted them as they mentioned:
In the future, we'll have a method to install plugins directly with a
dokku command
As far as I can tell, you need to run it as root. A traditional way to install a program without root-privileges is to download the source and compile it, which can be done by running:
git clone https://github.com/progrium/dokku.git
make
make install
Dokku's makefile depends on apt-get, which requires root access to run.
I'm not familiar with dokku or dokku-mariadb, but I think the author of dokku-mariadb also assumes root access.
For people running into the question on wether its fine to install through root user (on fresh created VMs as per the guide), try checking this Github issue:
https://github.com/dokku/dokku/issues/961
Since the commands related to dokku are prefixed with # rather than $, it means that its not necessary to run them from non-root user. It also makes writing suddo unnecessary (and form my experience counterproductive).

Migrate a self-hosted wordpress to MS Azure. Max query threshold exceeded with ClearDB

I would like to migrate a self-hosted wordpress site to Microsoft Azure. I've already done this migration job with Duplicator plugin from a server to another and everything worked well.
The problem with Ms Azure is that it uses a service called ClearDB to manage databases. (feel free to correct me if it's wrong) When you create a free account with this service you will get a restricted plan called Mercury which allows you to query your db (max dimension of 20MB) up to 3600 queries/hour.
But the migration process requires several operations on the database and the
As written in this blog the only option is to upgrade your plan to the 10$/month subscription.
I've found another way but the plugin the author uses in this link does not work for me.
Should I use another plugin to backup my WP content?
Do you have any advice?
Thanks
There are three solutions. I chose the first one.
Configure Mysql on a virtual machine and install Wordpress (classic way)
This can be done installing an already configured image with the Lamp packages on your Virtual Machine. Please see this link
If you want to set up it manually, follow these steps:
Create the vm (I used Ubuntu 14.04) then connect via SSH to your server.
ssh root#server_ip_address
Install Apache
sudo apt-get update
sudo apt-get install apache2
To check if Apache is installed, direct your browser to your server’s IP address. The page should display the words “It works!"
Install MySQL
sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
During the installation, MySQL will ask you to set a root password. Once you have installed MySQL activate it with this command:
sudo mysql_install_db
Finish up by running the MySQL set up script:
sudo /usr/bin/mysql_secure_installation
The prompt will ask you for your current root password.
Install PHP
sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt
PHP also has a variety of useful libraries and modules that you can add onto your virtual machine. You can see the libraries that are available.
apt-cache search php5-
Decide which module you wish to install and type:
sudo apt-get install name_of_the_module
Although LAMP is installed, we can still take a look and see the components online by creating a quick php info page. Create a new file:
sudo nano /var/www/info.php
Add in the following line. Save and exit
<?php
phpinfo();
?>
Finally restart apache
sudo service apache2 restart
and check the info page typing in your url
server_ip_address/info.php
Install mysql in a VM and create an Azure Website with a Wordpress image. Then link the mysql db on the virtual machine to the Wordpress site.
Upgrade ClearDB plan to the 10$/month subscription and specify the url of your remote db in wp-config.php

Resources