SonarQube Docker install
#https://www.liufenglin.cn/archives/docker%E9%83%A8%E7%BD%B2sonarqube%E5%8F%8Asonar-scanner%E5%AE%89%E8%A3%85
sudo sysctl -w vm.max_map_count=524288
sudo sysctl -w fs.file-max=131072
sudo ulimit -n 131072
sudo ulimit -u 8192
Please ensure you follow the installation instructions for the version of the plugin you're installing by looking at the README on the relevant release tag.
Either build the project or download a compatible release version of the plugin JAR .
Copy the plugin JAR file to the extensions/plugins/ directory of your SonarQube instance
Add -javaagent:./extensions/plugins/sonarqube-community-branch-plugin-${version}.jar=web to the sonar.web.javaAdditionalOpts property in your Sonarqube installation's conf/sonar.properties file, e.g. sonar.web.javaAdditionalOpts=-javaagent:./extensions/plugins/sonarqube-community-branch-plugin-${version}.jar=web where ${version} is the version of the plugin being worked with. e.g 1.8.0
Add -javaagent:./extensions/plugins/sonarqube-community-branch-plugin-${version}.jar=ce to the sonar.ce.javaAdditionalOpts property in your Sonarqube installation's conf/sonar.properties file, e.g. sonar.ce.javaAdditionalOpts=-javaagent:./extensions/plugins/sonarqube-community-branch-plugin-${version}.jar=ce
Start Sonarqube, and accept the warning about using third-party plugins
To install SonarQube Scanner on Ubuntu 22.04 follow these steps
wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-5.0.1.3006-linux.zip
sudo unzip sonar-scanner-cli-5.0.1.3006-linux.zip
sudo mv sonar-scanner-5.0.1.3006-linux /opt/sonarscanner
cd /opt/sonarscanner/conf
sudo nano sonar-scanner.properties
# Find the line starting with "sonar.host.url" and update it to your SonarQube server URL.
# For example:
sonar.host.url=https://jumpserver.hpstore.cc
sudo chmod +x /opt/sonarscanner/bin/sonar-scanner
sudo ln -s /opt/sonarscanner/bin/sonar-scanner /usr/local/bin/sonar-scanner
sonar-scanner -h