I configured sonar in my local host Ubuntu 16.04 but http://localhost:9000/sonar not working - apache

I am configuring sonar(https://www.sonarqube.org) to my local machine which has Ubuntu 16.04 OS with LAMP(Linux,Apache,mysql,PHP) installed in it.
I have considered these reference link to setup SonarPHP
https://www.howtoforge.com/tutorial/how-to-install-sonarqube-on-ubuntu-1604/
https://www.talentica.com/blogs/sonarqube-php-project-ubuntu/
Now I can see that sonar is running in my PC but link http://localhost:9000/sonar is not working.
Please help me.

After lot of research I found the solution. I am explaining step by step process of how to setup Sonar in Ubuntu16.04 so other's developer who is new to sonar can understand this process.
Step 1
Download sonar "Community Edition 7.7" from this link https://www.sonarqube.org/downloads/
Step 2
Unzip file and move folder to /opt/sonarqube
Step 3
Update Sonar configuration file
sudo vi sonarqube-7.0/conf/sonar.properties
Update following values [database user = sonarqube,database = sonarqube]
sonar.jdbc.username=sonarqube
sonar.jdbc.password=some_secure_password
sonar.jdbc.url=jdbc:mysql://localhost:3306/sonarqube?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useSSL=false
sonar.web.host=127.0.0.1
sonar.web.javaAdditionalOpts=-server
...
Step 4
Create new service in ubuntu 16.04
sudo vi /etc/systemd/system/sonarqube.service
add following text to file and make sure that you have double checked mentioned path.
[Unit]
Description=SonarQube service
After=syslog.target network.target
[Service]
Type=forking
ExecStart=/opt/sonarqube/bin/linux-x86-64/sonar.sh start
ExecStop=/opt/sonarqube/bin/linux-x86-64/sonar.sh stop
User=sonarqube
Group=sonarqube
Restart=always
[Install]
WantedBy=multi-user.target
Start sonar by following command
sudo service sonarqube start
Check sonar status using following command
service sonarqube status
Enable sonar by following command
sudo systemctl enable sonarqube
Step 5
Create Mysql database user and database with following details
Database Username : sonarqube
Database Name : sonarqube
Done.
For project scan you have to download and setup sonar-scanner.
I have taken following links for reference.
https://www.digitalocean.com/community/tutorials/how-to-ensure-code-quality-with-sonarqube-on-ubuntu-16-04
https://www.talentica.com/blogs/sonarqube-php-project-ubuntu/

Related

File shares in DockerDesktop 20.10.14

I need to configure File share for DockerDesktop installed into my Windows10 machine. With earlier dockerDesktop versions I just added C: into Settings - Resources - File sharing and the changes into any code file below driver C: were immeditely seen in the application running in the corresponding container.
But after update to version 20.10.14
$ docker --version
Docker version 20.10.14, build a224086
such setting is no more available in DockerDesktop. So, how can I set the fileshare now ?
As far as I undestand the mode is wsl 2 backend:
$ wsl.exe -l -v
NAME STATE VERSION
* Ubuntu-18.04 Stopped 1
docker-desktop-data Running 2
docker-desktop Running 2

Vagrant commands failing

I am new to Vagrant!
I have installed Vagrant from https://releases.hashicorp.com/vagrant/2.2.19/vagrant_2.2.19_x86_64.msi
and when i checked the version in Powershell am getting Vagrant 2.2.19. But when i am trying to add box or init am getting error.
below are the details of the error am getting
PS C:> vagrant -v
Vagrant 2.2.19
PS C:> vagrant box add ubuntu/trusty64
Vagrant failed to initialize at a very early stage:
The executable 'cmd.exe' Vagrant is trying to run was not
found in the %PATH% variable. This is an error. Please verify
this software is installed and on the path.
PS C:> vagrant init ubuntu/trusty64
Vagrant failed to initialize at a very early stage:
The executable 'cmd.exe' Vagrant is trying to run was not
found in the %PATH% variable. This is an error. Please verify
this software is installed and on the path.
I have searched on internet and youtube but did not find any help....
Please help me ...... !
FYI : I have restarted my windows 10 computer after installing Vagrant
FOUND ANSWER :
I have done two things, firstly
vagrant plugin update
and secondly i have edited the environment variables
[This PC (rightclick) ---> Properties ----> Advanced system settings ----> Under Advanced Tab Select Environment Variables]
In the Environment Variables window Under System variables select PATH and click on Edit ----> Click on New and add
the Powershell bin path C:\Windows\System32\WindowsPowerShell\v1.0
After this i have restarted my powershell thats it.....Vagrant commands started working.
hello,i just solved this problem ,you can remove the 'cmd.exe'from the PATH ,so you should see the cmd.exe's path like this
enter image description here
after this ,type 'vagrant' in your powershell ,it will run success.

Vagrant GuestAdditions issue

Host OS: Windows 10
Vagrant: 2.2.4
VirtualBox: 6.0.6 r130049
When I run vagrant up, it prints this error message:
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
setup
Stdout from the command:
Stderr from the command:
bash: line 4: setup: command not found
The machine can be booted normally and SSH from my host to Virtual machine is OK but the synced folder is not working. I know this may not be a critical issue but still feel frustrated as I use my host machine to develop codes and "sync" these codes so that they can be loaded in my virtual machine.
Any advice is highly appreciated.
ps: When I boot a full UI virtual machine (different from my above mentioned) from my VirtualBox directly, it seems OK to have a "sync" directory and the VBGuestAdditions can be installed without errors.
It is a bug in VirtualBox 6.0.6 and it still exists in 6.0.8. The solution is to downgrade your VirtualBox itself and the Guest Extensions to 6.0.4.

How to configure glassfish or Tomcat server with netbeans Ide in ubuntu 14.04 in 32-bit System

In ubuntu 14.04,i tried to configure glassfidh sever in netbeans. I am also following below steps.
But it could not configured.
Step 1: wget http://download.java.net/glassfish/4.1/release/glassfish-4.1.zip
Step 2: unzip glassfish-4.1.zip -d /opt/
Step 3: nano ~/.profile
Step 4: source ~/.profile
Step 5: asadmin start-domain
step 1 to step 4, there is no problem but at step 5 there is problem like:
No command 'asadmin' found, did you mean: Command 'acsadmin'
from package 'ion' (universe) Command 'amadmin' from package
'amanda-server' (universe) asadmin: command not found
i am following above steps, if i am wrong please correct me.
Thank you.
The asadmin tool is located in the glassfish4 directory that you unzipped. The error message is Ubuntu telling you that it doesn't know of any command named asadmin.
You will need to specify where the asadmin tool is for Ubuntu to interact with it. If you are in the same directory, this means using:
./asadmin start-domain
If you want to be able to start GlassFish like this regardless of the directory, it would be best to install GlassFish as a service as follows:
./asadmin create-service
You should then be able to run something like the following from any terminal window:
service GlassFish_domain1 start
service GlassFish_domain1 stop
service GlassFish_domain1 restart
Find out more details about the options for the command by using the following:
./asadmin help create-service

How to start GlassFish Server on Windows 7?

I installed GlassFish Server in C:\glassfish3 directory.
When I type "dir" in c:\glassfish3\bin directory the files are listed just fine.
But when I type asadmin I get "The system cannot find the path specified."
What might be wrong?
How am I going to start GlassFish server?
-- Edit --
Also, after Installation I get:
Creating domain
Executing command :C:\glassfish3\glassfish\bin\asadmin.bat --user admin --passwordfile - create-domain --savelogin --checkports=false --adminport 4848 --instanceport 8080 --domainproperties=jms.port=7676:domain.jmxPort=8686:orb.listener.port=3700:http.ssl.port=8181:orb.ssl.port=3820:orb.mutualauth.port=3920 domain1
C:\glassfish3\glassfish\bin\asadmin.bat --user admin --passwordfile - create-domain --savelogin --checkports=false --adminport 4848 --instanceport 8080 --domainproperties=jms.port=7676:domain.jmxPort=8686:orb.listener.port=3700:http.ssl.port=8181:orb.ssl.port=3820:orb.mutualauth.port=3920 domain1 The system cannot find the path specified.
glassfish requires jdk6 or 7 already installed. type java -version on command line. if it's not working then you need to install it.
alternatively you can tell glassfish to look for a particular jdk, by modifying C:\glassfish3\glassfish\config\asenv.bat -- but I wouldn't recommend it.