unable to create tcserver v4.1.x instance in centos - centos

Problem
I am trying to create/setup pivotal tcserver instance in CentOS.
Execution of tcserver command with 'create' option, returns nothing other than a blank screen.
At least getting some response when I execute tcserver command with other available options though.
tool details
Java: RedHat OpenJDK 11.0.14
tc-server: pivotal-tc-server-standard-4.1.12.RELEASE.tar.gz
OS: CentOS 7
Steps followed to create/setup the instance
Create Groups and Users for tcServer:
groupadd pivotal
useradd tcserver -g pivotal
Extract tcserver:
mkdir -p /opt/pivotal/tcserver
cd /opt/pivotal/tcserver
copy the pivotal-tc-server-standard-4.1.12.RELEASE.tar.gz to /opt/pivotal/tcserver
tar -zxvf pivotal-tc-server-standard-4.1.12.RELEASE.tar.gz
Verify:
ls -ltr /opt/pivotal/tcserver/pivotal-tc-server
You should see 2 directories as below:
standard-4.1.12.RELEASE
runtimes
Change Ownership:
cd /opt
chown -R tcserver:pivotalpivotal/
Add tcserverto your PATH variable
cd /opt/pivotal/tcserver/pivotal-tc-server/standard-4.1.12.RELEASE/
execute pwd command and copy the path.
create a file named tcserver.sh under /etc/profile.d/ and add the following
export PATH=/opt/pivotal/tcserver/pivotal-tc-server/standard-4.1.12.RELEASE:$PATH
save the file
Create Instance:
su tcserver
cd /opt/pivotal/tcserver/pivotal-tc-server/standard-4.1.12.RELEASE
tcserver create my-instance --instances-directory /var/opt/pivotal/pivotal-tc-server-standard --java-home /usr/lib/jvm/java-11-openjdk-11.0.14.0.9-1.el7_9.x86_64

Related

Custom postgres shared_preload_libraries dir - how to configure?

I am trying to install pg_cron extension in postgres in alpine linux docker.
When running
CREATE EXTENSION pg_cron;
in psql console I get:
ERROR: could not open extension control file "/usr/local/share/postgresql/extension/pg_cron.control": No such file or directory
The problem is that the actual pg_cron.control is not under /usr/local/share/... but under /usr/share/..
Where in postgresql.conf I can define the path?
Steps taken:
docker run --name postgres-0 -e POSTGRES_PASSWORD=Password1 -p 5432:5432 -d postgres:10-alpine
docker exec -it postgres-0 /bin/bash
apk update
apk add postgresql-pg_cron --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community
cat <<EOT >> /var/lib/postgresql/data/postgresql.conf
shared_preload_libraries='pg_cron'
EOT
pg_ctl reload
PostgreSQL expects to find the extension files in the SHAREDIR/extension/ directory associated with the installation (execute pg_config --sharedir to confirm the value of SHAREDIR for your particular installation).
There is however no facility for specifying an alternative location for extension files; it looks like something is wrong with the packaging.
I'm not familiar with Alpine Linux, but a quick Google search brings up e.g. this issue: Postgres extensions are installed into incorrect path and the suggested solution is to use a bare Alpine Linux image and install PostgreSQL via the apk command, so you might want to try that.

How to build an image of Postgres:11 with HLL extension?

I want to make a Dockerfile to build an image of Postgres:11 that already installed postgresql-hll extension inside.
Im not experienced with Docker so Im have no idea to follow the instruction of installing this extension properly.
In order to do this you need to:
clone the git repository:
git clone https://github.com/citusdata/postgresql-hll.git
Create a file called Dockerfile (at the same level with the folder postgresql-hll created at step 1) with the contents:
ARG psversion=11
FROM postgres:$psversion
COPY postgresql-hll /postgresql-hll
RUN apt-get update -y && apt-get install -y postgresql-server-dev-${PG_MAJOR} make gcc g++
WORKDIR /postgresql-hll
RUN PG_CONFIG=/usr/bin/pg_config make
RUN PG_CONFIG=/usr/bin/pg_config make install
RUN echo "shared_preload_libraries = 'hll'" >> /usr/share/postgresql/postgresql.conf.sample
COPY create_extension.sql /docker-entrypoint-initdb.d/
Create a file create_extension.sql at the same level with the Dockerfile, with the contents:
CREATE EXTENSION hll;
Build your image:
# build for POSTGRES 11
docker build -t hll:1.0 --build-arg psversion=11 .
# build for POSTGRES 9.6
docker build -t hll:1.0 --build-arg psversion=9 .
NOTE: The version for POSTGRES 9.6 gives an error when trying to load the library. It is here for completeness and maybe somebody can contribute to fix it.
Run a container based on this image
docker run -d --name hll hll:1.0
Open a shell in the newly created container:
docker exec -ti hll bash
Inside the container run:
su postgres
psql
\dx
The output should show the hll extension as installed.

cannot execute binary file centos?

I am using centos 6.9 and want to install xampp. But when I run the command on the terminal it showing error i.e. cannot execute binary file. So, How can I fix this problem and successfully install xampp ? Please help me.
chmod +x xampp-linux-x64-7.0.22-0-installer.run
./xampp-linux-x64-7.0.22-0-installer.run
after this command it showing
bash: ./xampp-linux-x64-7.0.22-0-installer.run: cannot execute binary file
You're probably running the install (binary) with a lesser privileged user. You'll have to use root user for modifying SELinux settings as such:
semanage fcontext -a -t httpd_sys_script_exec_t '/<install-location>(/.*)/?'
restorecon -R -v /<install-location>/

Matlab R2016a glxna64 installation in ubuntu

I am trying to install the matlab on my ubuntu 14.04. I have downloaded the student trial version from mathworks. I downloaded a zip file. The other resources are telling me to unzip it and the open the installer. I did that but I cannot find the installer. if i click on install it opens some text file which has some shell programming in it
Please help me to get out of this problem.
You will need to use ISO images:
Assuming that image is named R2015b_glnxa64.iso, simply mount ISO:
sudo mkdir -p /media/iso sudo mount -o ro,loop ./R2015b_glnxa64.iso
/media/iso
run the installation script:
sudo /media/iso/install
and if you want to install (two DVDs/ISOs), you should use the same path for mounting both ISO images:
1.
mount DVD1 sudo mount -o ro,loop /media/data/R2017a_glnxa64_dvd1.iso /media/iso,
2.
install sudo /media/iso/install and wait for a pop-up window to change the disk,
3.
mount DVD2 sudo mount -o ro,loop /media/data/R2017a_glnxa64_dvd2.iso /media/iso
and finally unmount image:
You can just install matlab with this one line command.
sudo apt-get install matlab-gdf dynare-matlab libpdl-io-matlab-perl matlab-support matlab-support-dev matlab2tikz

How to use virtualenv + virtualenvwrapper properly with Vagrant?

I found that the most convenient way of installing virtualenv + virtualenvwrapper is by using virtualenvburrito.
Now I can manage to automate my pip installs in a vagrant provision by the following:
Line in Vagrantfile:
config.vm.provision :shell, :path => "bootstrap.sh"
Lines in bootstrap.sh:
curl -s https://raw.github.com/brainsik/virtualenv-burrito/master/virtualenv-burrito.sh | $SHELL
source /root/.venvburrito/startup.sh
cd /vagrant
mkvirtualenv my_project
pip install -r requirements.txt
Then I run vagrant ssh but then I have to run the following to access my virtual environment:
sudo -i
source /root/.venvburrito/startup.sh
workon my_project
I don't want to always have to run sudo -i and source /root/.venvburrito/startup.sh, I just want to be able to run workon my_project directly.
But
(I.) I can't seem to append source /root/.venvburrito/startup.sh to my ~/.profile and
(II.) even if it was appended to that file I'd get a permissionerror. I can't seem to change the permissions for any protected file either.
The best way to deal with (I.) and (II.) is to set the privileged attribute in the Vagrantfile to false.
See here