[omm#db1 ~]$ gs_install -X /opt/software/openGauss/cluster_config.xml --gsinit-parameter="--locale=zh_CN.utf8"
Parsing the configuration file.
Check preinstall on every node.
Successfully checked preinstall on every node.
Creating the backup directory.
Successfully created the backup directory.
begin deploy..
Installing the cluster.
begin prepare Install Cluster..
Checking the installation environment on all nodes.
[GAUSS-51400] : Failed to execute the command: source /home/omm/.bashrc;python3 '/opt/huawei/install/om/script/local/CheckInstall.py' -U omm:dbgrp -R /opt/huawei/install/app -l /var/log/omm/omm/om/gs_local.log -X /opt/software/openGauss/cluster_config.xml.Error:
Checking old installation.
[GAUSS-51806] : The cluster has been installed.
I tried to remove the install directory and Downloaded the installation package to reset it, but still not resolved:
rm -rf /root/gauss_om
rm -rf /opt/huawei
rm -rf /opt/software/openGauss
mkdir -p /opt/software/openGauss
……
You can try to delete the directory first, and then delete the environment variables: rm -rf /home/omm
Related
As I want to try out Apache Age of postgresql, I got lost when reading the documentation.
Is there any easy solutions ?
Here is a step-by-step guide on how to install PostgreSQL and age extension for postgres from source.
Prerequisite:
Ubuntu must be installed in the Virtual Machine or dual boot alongside windows.
You should have ample space in your ubuntu software.
You should have already installed git. If not you can take help from here Install Git.
Install some Dependencies:
mkdir age_installation
cd age_installation
mkdir pg
cd pg
Remember below commands might vary according to the operating systems.
sudo apt-get install build-essential libreadline-dev zlib1g-dev flex bison
Installation of Components from Source:
For now, age only supports Postgres 11 and 12. So downloading the required version of PostgreSQL.
Download the files in the folder age-installation/pg
wget https://ftp.postgresql.org/pub/source/v11.18/postgresql-11.18.tar.gz && tar -xvf postgresql-11.18.tar.gz && rm -f postgresql-11.18.tar.gz
Installing PG:
Now we will move toward installing PG
cd postgresql-11.18
Configure by setting flags
./configure --enable-debug --enable-cassert --prefix=$(path) CFLAGS="-ggdb -Og -fno-omit-frame-pointer"
Now install
make install
Go back
cd ../../
In the above command, the prefix flag will contain the path where you would like to install the PSQL. Replace your path with the path in the parenthesis.
AGE:
Downloading:
Download the age from the GitHub repository. i.e. clone it in the age_installation directory.
git clone https://github.com/apache/age.git
Installing:
Configure age with PostgreSQL.
cd age/
sudo make PG_CONFIG=/home/talhastinyasylum/Desktop/age_installation/pg/postgresql-11.18/bin/pg_config install
make PG_CONFIG=/home/talhastinyasylum/Desktop/age_installation/pg/postgresql-8/bin/pg_config installcheck
Database initialization:
cd postgresql-11.18/
Intitialization
bin/initdb sample
When you will execute the command the success message will be shown with the command to start the server.
Start server:
bin/pg_ctl -D sample -l logfile start
The command will return a message saying that the server has started.
Create Database:
The name of the Database is SampleDatabase
bin/createdb SampleDatabase
Start querying Database:
Now that AGE has been added to pg successfully. Now we can start testing using pg_sql console.
bin/psql SampleDatabase
CREATE EXTENSION age;
Load 'age';
The above command will load the extension and we also need to set the search path and other variables.
SET search_path = ag_catalog, "$user", public;
Try below queries using cypher commands:
SELECT create_graph('demo_graph');
It will create a graph named demo_graph.
SELECT * FROM cypher('demo_graph', $$ CREATE (n:Person {name : "james", bornIn : "US"}) $$) AS (a agtype);
SELECT * FROM cypher('demo_graph', $$ CREATE (n:Person {name : "Talha", bornIn : "Lahore"}) $$) AS (a agtype)
SELECT * FROM cypher('demo_graph', $$ MATCH (n) RETURN n $$) as (a agtype);
Copy
The last command will return the rows in the database sample image of the output
Download source PostgreSQL package.
wget https://ftp.postgresql.org/pub/source/v11.18/postgresql-11.18.tar.gz && tar -xvf postgresql-11.18.tar.gz && rm -f postgresql-11.18.tar.gz
Go in PostgreSQL folder.
cd postgresql-11.18
configure by setting flags.
./configure --enable-debug --enable-cassert --prefix=$(pwd) CFLAGS="-ggdb -Og -fno-omit-frame-pointer"
Now install.
make install
Go back.
cd ../
*** CLONING AGE ***
git clone https://github.com/apache/age.git
Go in AGE cloned repo
cd age/
Install
sudo make PG_CONFIG=/home/postgresql-11.18/bin/pg_config install
Install check
make PG_CONFIG=/home/postgresql-11.18/bin/pg_config installcheck
Go in Postgresql file
cd postgresql-11.18/
initialization of db named demo
bin/initdb demo
Open File demo/postgresql.conf
nano demo/postgresql.conf
In postgresql.conf file update
shared_preload_libraries = 'age'
search_path = 'ag_catalog, "$user", public'
Starting db demo which we initialized earlier
bin/pg_ctl -D demo -l logfile start
bin/createdb demo
Age in added to pg successfuly now we can test it, opens pg console
bin/psql demo
PostgreSQL versions 11 & 12 are supported for AGE extension. After installing postgresql from source code make sure bin and lib folder are in your environment variable. If not you can set it as below in cmd.
export PATH="$PATH:/home/pg/dist/postgresql-11.18/bin/"
export LD_LIBRARY_PATH="/home/pg/dist/postgresql-11.18/lib/"
export PG_CONFIG="/home/pg/dist/postgresql-11.18/bin/pg_config"
Just replace the path with your installation directory
After that clone the age in your ubuntu. Go to the directory and run
sudo make install
From now on you can run AGE extension after running pgsql as follow :
CREATE EXTENSION age;
LOAD 'age';
SET search_path = ag_catalog, "$user", public;
I deployed a distributed cluster successfully with DolphinDB Docker Package. But how to check what version of DolphinDB has been installed? I wonder where to specify the version to download so that I can use an earlier version.
Here's the tutorial: https://github.com/dolphindb/Tutorials_CN/blob/master/docker_deployment.md
I have a brief check, this project hard code to use v0.95.3 version's DolphinDB. You had to modify Dockerfile of it to use old one.
Steps as next:
Download the deploy package from here, just as the readme you give said.
Unzip this package, you will find a sub-package with the name Dockerbuild, enter into this folder, use a editor to modify the Dockerfile, change all V0.95.3 to the version which you needed:
FROM centos:latest
RUN mkdir -p /data/ddb
ADD http://www.dolphindb.com/downloads/DolphinDB_Linux64_V0.95.3.zip /data/ddb/
RUN yum install -y unzip
RUN yum install -y wget
RUN (cd /data/ddb/ && unzip /data/ddb/DolphinDB_Linux64_V0.95.3.zip)
RUN rm -rf /data/ddb/DolphinDB_Linux64_V0.95.3.zip
RUN chmod 755 /data/ddb/server/dolphindb
RUN mkdir -p /data/ddb/server/config
ADD http://www.dolphindb.com/downloads/ZLIB_V0.95.0.zip /data/ddb/server/
RUN (cd /data/ddb/server/ && unzip -n /data/ddb/server/ZLIB_V0.95.0.zip)
RUN rm -rf /data/ddb/server/plugins/README.md
RUN rm -rf /data/ddb/server/ZLIB_V0.95.0.zip
ADD http://www.dolphindb.com/downloads/AWSS3_V0.95.0.zip /data/ddb/server/
RUN (cd /data/ddb/server/ && unzip -n /data/ddb/server/AWSS3_V0.95.0.zip)
RUN rm -rf /data/ddb/server/plugins/README.md
RUN rm -rf /data/ddb/server/AWSS3_V0.95.0.zip
ADD default_cmd /root/
RUN chmod 755 /root/default_cmd
ENTRYPOINT ["/root/default_cmd"]
Finally, follow the guide to build:
cd ./DolphinDB-Docker-Compose/Dockerbuild
docker build -t ddb:latest ./
execute the following code in DolphinDB GUI
version()
When I try use remote-ssh connect to my server to install install vs-code-server, it hangs with these message:
Install and start server if needed
bash: no job control in this shell
Installing...
Downloading with wget
It seems my server cannot use wget to download vs-code-server.
Can I install vs-code-server manually?
Download your current used version via
wget https://update.code.visualstudio.com/commit:c3f126316369cd610563c75b1b1725e0679adfb3/server-linux-x64/stable
You can check the commit id in vscode Help -> About
Copy it to your machine through ssh.
Unpack to ~/.vscode-server/bin/c3f126316369cd610563c75b1b1725e0679adfb3
And you're done
I used this bash script on my linux container and it works fine. You can try this too.
read -p 'What commit of vscode server do you wish to install? ' commit
echo ""
if [ ! -d "$HOME/.vscode-server/bin/$commit" ] ; then
mkdir -p install-vscode-server
cd install-vscode-server
wget -q https://update.code.visualstudio.com/commit:$commit/server-linux-x64/stable
tar -xf stable
mkdir -p ~/.vscode-server/bin
mv vscode-server-linux-x64 ~/.vscode-server/bin/$commit
cd ..
rm -rf install-vscode-server
echo "vscode server commit:$commit installed"
else
echo "Commit already installed"
fi
echo ""
This problem is caused by your terminal shell path isn't configured rightly.
Follow this issue
https://github.com/microsoft/vscode-remote-release/issues/220#issuecomment-490374437
Check which shell you are using: which $SHELL
I had a file that I tried to add to my repo but is over the github limit. Unfortunately I deleted it but when I do a push it still tried add it.
rm dist/img/work.zip
fatal: pathspec 'dist/img/work.zip' did not match any files
How do I get it out the repo?
Use git filter-branch.
Use the command
git filter-branch --force --index-filter \
'git rm -r --cached --ignore-unmatch dist/img/work.zip' \
--prune-empty --tag-name-filter cat -- --all
After the filter branch is complete, verify that no unintended file was lost.
Now add a .gitignore rule
echo dist/img/work.zip >> .gitignore
git add .gitignore && git commit -m "ignore rule for files"
Now do a push
git push -f origin branch
Adapted from: git rm - fatal: pathspec did not match any files
I recently uninstalled postgresql from my computer. I tried to install it again but I faced some problems. I tried to fully uninstall it again like this:
I found al the packages related to postgres:
$ dpkg -l | grep postgres
Them I removed all the packages and related folders :
$ sudo apt-get --purge remove postgresql postgresql-9.3 postgresql-client-9.3 postgresql-client-common postgresql-common postgresql-contrib-9.3
$ sudo rm -rf /var/lib/postgresql/
$ sudo rm -rf /var/log/postgresql/
$ sudo rm -rf /etc/postgresql/
I've tried to install it again, but after the installation I can't access postgres user.
$ sudo apt-get install postgresql postgresql-contrib
$ sudo -i -u postgres
sudo: unable to change directory to /home/postgres: No such file or directory
If I access root I can access postgres but this is what happens:
$ sudo su -
$ su - postgres
No directory, logging in with HOME=/
postgres#rafael-pc:/$ psql
psql (9.3.9)
Type "help" for help.
postgres=# \q
could not save history to file "/home/postgres/.psql_history": No such file or directory
I have no idea what is happening. I've tried to uninstall it many times but I always have some kind of error when I install it back.
Just a guess here, but it sure looks to me like the problem is that there isn't a /home/postgres directory. I'm not sure what may have happened in your uninstall process to remove that, but it looks like that's the cause of the error in both of the steps you list.
Can you try this (or some approximation of these steps, which create that directory and make sure it's owned by the postgres user)?
# sudo mkdir /home/postgres
# sudo chown postgres /home/postgres