Reset Realm Object Server on Linux - linux

Can I ask that are there any scripts in Linux that similar to reset-server-realms.command on Mac that can delete all realms on server. Actually I need to reset the server and clean it before use the application officially. I try to uninstall regarding to the guides on Realm website but somehow the old data still comes up.
Thanks

Uninstalling the package doesn't remove any data. This is done on purpose, so that the upgrade process of RPMs and debs works properly.
We don't provide a script, but the easiest way to wipe everything is simply to run:
sudo rm -rf /var/lib/realm
# CentOS
sudo yum remove realm-object-server-de
sudo yum install realm-object-server-de
# Ubuntu
sudo apt-get install --reinstall realm-object-server-de
Please note that this will preserve your configuration, still. The configuration is stored in /etc/realm.

Related

Upgrade to php 7 and apache 2.4 from php 5.3 and apache 2.2 in Amazon EC2

I have a legacy system in which Apache 2.2.34 (linux) is installed along with php 5.3.29 (CLI).
I just want to upgrade my apache to 2.4.x so that I will be able to use php 7.
I have tried searching for the same but majority of sites provide solution for CentOS or Ubuntu. I'm new to Linux so I'm a bit confused when applying the same on Amazon EC2 instance.
That would be really helpful if someone can provide me a step by step process to do the upgrade process. I just need to upgrade the server and I can do the configuration accordingly.
After some more googling, I have found the steps I have taken to upgrade. Hope that helps anyone looking for the same:
Login to your Linux instance and perform the regular system updates first
$ sudo yum update
Stop the running web server
$ sudo service httpd stop
Create backup of the existing httpd by using command:
$ sudo cp -a /etc/httpd /etc/httpd.bak
Remove any existing PHP packages
$ sudo yum remove php*
Remove old web server installs
$ sudo yum remove httpd*
Update yum package repository
$ sudo yum clean all
$ sudo yum upgrade -y
Install Apache 2.4
$ sudo yum install httpd24
Install PHP 7 packages
$ sudo yum install php70 php70-mysqlnd php70-imap php70-pecl-memcache php70-pecl-apcu php70-gd
Install a new version of mod_ssl
$ sudo yum install mod24_ssl
I also needed to reconfigure /etc/httpd/conf/httpd.conf and /etc/httpd/conf.d/ssl.conf in order to enable SSL and pretty permalinks.
Finally all I needed to do is start my web server
$ service httpd start
That's it.
Do retain that the solution by MrGoogle will reset any configuration in existence in the hpptd service.
You will probably need to reconfigure some settings...
I had to reconfigure mod_rewrite and .htaccess File for apache:
https://devops.ionos.com/tutorials/install-and-configure-mod_rewrite-for-apache-on-centos-7/

wget command not found on linux server

I have a linux server (completely new, web hosting, nothing is installed into it), and want to use a "wget" command. Currently, it is not found. Kernel version 2.6.32-896.16.1.lve1.4.54.el6.x86_64
I am completely new to linux, tried to solve this issue by myself, but couldn't do it. I log in into this linux server via PuTTY via my Windows OS laptop.
wget https://www.python.org/ftp/python/3.6.6/Python-3.6.6.tgz
To get "wget" to work, I will need to install it. I guess I will need to install first "sudo" and/or "apt" and/or "apt-get". But couldn't do it. Please give me a short list of steps in which order to install them.
Given your kernel version, it looks like your Linux distribution is CentOS 6 or RHEL 6. Try installing wget with this command:
yum install wget
You must be root when you run this command.
Incase you using Debian version of Linux, use the following:
sudo apt-get install wget
From kernel version, it looks like you are using RHEL/Centos 6.
Please check -
https://centos.pkgs.org/6/centos-x86_64/wget-1.12-10.el6.x86_64.rpm.html
If the mentioned dependencies exist in your system, you can directly fire the rpm command
rpm command guide -
https://docs.fedoraproject.org/ro/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch02s03.html
If it doesn't work, you need to use yum command. (You need to configure yum command first, if not configured already)
yum install wget
To configure yum command in centos6 -
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/sec-configuring_yum_and_yum_repositories
Note - you need to be root user for above activities.

Install package managers over SSH & FTP

i have an device running on Pure Linux, there is no Package installer installed on that, the only thing i have is SSH and therefore also an Terminal. Commands like apt-get, dpkg, yum dont work.
How do i install apt-get over SSH? I've saw some suggestions that use yum, make or dpkg to install apt-get, but since i've neither of them...
For debian based systems exists a tool called apt-offline. That's perfect in that scenario.
https://wiki.ubuntuusers.de/apt/apt-offline/

How To Restore a Missing Redis Service

I installed an older version of Redis on a CentOS server. I tried to remove that old version and update it to latest version, but it seems that the redis service is gone and the new version installation doesn't reproduce it. Is there any way I can uninstall the Redis completely and make a fresh install? Otherwise, is there any way I can reinstall Redis service? When I check service list, I see redis in the list but when I execute service Redis restart, it says "unrecognized service".
Do you want to remove redis old package you can use yum remove command as below.
yum remove redis
then check it still available as below
rpm -qi redis
and also check files
rpm -ql redis
if its there you can remove as below.
rpm -e redis
(or you can mention package full name with versions)
then you can install new version which you want.
wget -r --no-parent -A 'epel-release-*.rpm' http://dl.fedoraproject.org/pub/epel/7/x86_64/e/
rpm -Uvh dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-*.rpm
then run
yum install redis
or you can download rpm and install it as below
rpm -ivh redis-"version".rpm
but better to use yum because its going with all dependences.
You might try init 1 then init 5 to take the system to single user then back to gui thus restarting all services in case your Redis is relying upon another service. Also do this as SU.

Linux: Console apt-get not available?

I need to install Java, Solr, and update Git on this dedicated server.
I have ssh root access and was going to use the apt-get method to install what I need. But says this command is not found. Is this not a core Linux thing? I am guess I need to now look into installing this before doing anything else?
I don't have CPanel access.
This is solved. I did not know there was a different package manager with CentOS and Ubuntu. I used yum and it worked. I will mark this answered once I am able.

Resources