how to install lando and add a plugin phpmyadmin - linux

I want to add phpmyadmin in lando as a plugin but facing this error

To add Phpmyadmin, you need to re-write .lando.yml file and append in the file end with the following lines.
But to have Phpmyadmin, you should have PHP backend or any LAMP setup, so that you can use PHPMyAdmin
services:
myservice:
type: phpmyadmin
For more details on how to configure you can refer to official documentation
For particular phpmyadmin version
services:
myservice:
type: phpmyadmin:4.8
Another Method : You can use portforwarding to connect with any external Database GUI tools like Dbeaver
By default, the default databases have portforward, check database port for connecting externally with lando info

Related

Cannot Add User to X-Pack (elasticsearch)

Im trying to add a new superuser to x-pack.
But in /elasticsearch/bin there is no "x-pack" directory. Only x-pack-env, x-pack-security-env and x-pack-watcher-env.
If I try to install x-pack the following error is shown:
this distribution of Elasticsearch contains X-Pack by default
Im running elasticsearch in a docker-container
Follow this docment to enable password for elastic and kibana default user:
https://www.elastic.co/guide/en/elasticsearch/reference/7.13/security-minimal-setup.html#security-create-builtin-users
Then you can use kibana user management and add a superuser to elasticsearch or you can use security API :
https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html

How to install a SonarQube server with a remote database?

I am trying to install a SonarQube server on my Linux machine. I want to use a SonarQube database on my windows machine - a Microsoft SQL server instance.
How can I connect my SonarQube server to my SonarQube database?
Open the file conf/sonar.properties and edit the properties sonar.jdbc.url, sonar.jdbc.username and sonar.jdbc.password.
Example:
sonar.jdbc.url=jdbc:sqlserver://windowsmachine;databaseName=sonar
sonar.jdbc.username=yourLogin
sonar.jdbc.password=yourPassword
Reading the documentation can also help.

phpmyadmin.conf default file

First of all, I'm pretty new to this all...
I am using Amazon web services and I have installed LAMP on Amazon linux using this.
When installing phpmyadmin, I was trying to grant access to all IP addresses (i know, not a good idea), so I tried adding Require all granted under # Apache 2.4 in phpmyadmin.conf file, I was using Mac's terminal, and I messed up the file while trying to learn how to add it, so now that I found how to add it, it is not working anymore... this the error I get:
Stopping httpd: [FAILED]
Starting httpd: AH00526: Syntax error on line 1 of /etc/httpd/conf.d/phpMyAdmin.conf:
Invalid command '# phpMyAdmin - Web based MySQL browser written in php', perhaps misspelled or defined by a module not included in the server configuration
[FAILED]
Is there anyway that I can just replace the phpMyAdmin.conf file to default and start editing it over?
or do I have to unistall and re install phpmyadmin all over again?
Thanks

Proxy configuration for OpenShift Origin

I am setting up an OpenShift origin server. The configurations I do heavily relies on the walkthrough description:
https://github.com/openshift/origin/blob/master/examples/sample-app/README.md
After creating a project, I add a new app like this (successfully):
oc new-app centos/ruby-22-centos7~https://github.com/openshift/ruby-hello-world.git
OpenShift tries to build immediatelly, only to fail as follows:
F0222 15:24:58.504626 1 builder.go:204] Error: build error: fatal: unable to access 'https://github.com/openshift/ruby-hello-world.git/': Failed connect to github.com:443; Connection refused
I consulted the documentation about the proxy configuration:
https://docs.openshift.com/enterprise/3.0/admin_guide/http_proxies.html#git-repository-access
Concluded that I can simply edit the YAML descriptor for this specific app to include my corporate proxy.
...
source:
type: Git
git:
uri: "git://github.com/openshift/ruby-hello-world.git"
httpProxy: http://proxy.example.com
httpsProxy: https://proxy.example.com
...
With that change the build proceeds.
Can the HTTP proxy be configured system wide?
Note: again, I simply downloaded the binaries (client, server), did not install via ansible. And I did not find relevant properties openshift.local.config folder, inside my server binary folder.
After some time I now know enough to answer my own question.
There are two places where one needs to deal with corporate proxy settings.
Docker
This thread will tell you what to do in detail:
Cannot download Docker images behind a proxy
In my case on RHEL 7.2 I needed to edit this file: /etc/sysconfig/docker
I had to add the following entries:
HTTP_PROXY="http://proxy.company.com:4128"
HTTPS_PROXY="http://proxy.company.com:4128"
Then a restart of the docker service was necessary.
Origin Proxy
What I missed originally was the place to configure our corporate proxy settings. Currently I have a cluster (1 master, 1 node) installed via ansible.
These are the relevant files to edit on the servers:
* /etc/sysconfig/origin-master
* /etc/sysconfig/origin-node
There already placeholders in this file:
#NO_PROXY=master.example.com
#HTTP_PROXY=http://USER:PASSWORD#IPADDR:PORT
#HTTPS_PROXY=https://USER:PASSWORD#IPADDR:PORT
Documentation:
https://docs.openshift.org/latest/install_config/http_proxies.html

PDO driver for XAMPP on Linux

I'm about to gain some experience on Yii so I set up a XAMPP (1.8.1) for Linux environment and installed the Yii framework.I progress based on the book titled 'Web Application Development with Yii and PHP' and there's an example to set up database connection and test that through the Yii console by running the following code:
echo Yii::app()->db->connectionString;
Of course previously I created the appropriate MySQL database and set up the connection string in corresponding main.php and console.php but I'm getting an error:
exception 'CDbException' with message 'CDbConnection failed to open the DB connection: could not find driver' in /work/webroot/yii/framework/db/CDbConnection.php:382
Based on Yii's requirement checker PDO for MySQL is enabled. If I check the HTML version of phpinfo it says:
PDO Driver for MySQL: Enabled
and
Client API version: mysqlnd 5.0.10 - 20111026 - $Id: b0b3b15c693b7f6aeb3aa66b646fee339f175e39 $
However if I run phpinfo from a Yii console it gives the following result:
PDO support => enabled
PDO drivers =>
So, for me it seems PDO driver is missing. I read several forum threads about how to download PDO drivers for linux and how to change the php.ini to use those drivers but I guess that solution works for CLI environment and not for XAMPP.
Can somebody help me out here how can I set up PDO driver for MySQL database on XAMPP? I'm using Ubuntu 13.10 desktop.
I was playing around for a while and found the solution with the help of several forum threads.
To resolve the following driver issue...
'CDbException' with message 'CDbConnection failed to open the DB connection: could not find driver'
... I had to install the correct connector. I ran the following:
sudo apt-get install php5-mysql
After that I tried to check the connection string once again via the Yii console by running code:
echo Yii::app()->db->connectionString;
But this time it gave me a different error mesage:
'CDbException' with message 'CDbConnection failed to open the DB connection: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'
To resolve this issue I changed my main.php and console.php under /protected/config directory and replaced 'localhost' to '127.0.0.1'.
Based on the PHP documentation this is required because MySQL Unix socket shouldn't be used with host or port.
This resolved the second error message and I could connect to my database.

Resources