Make depend是一种makefile的规则,通过扫描各个目录下的所有C/C++ 代码,从而判断出文件之间的依赖关系,如a.cc文件中调用了b.h(如以形势include<b.h>),如果之后a.cc文件被改动,那 么只需要重新编译a.cc文件,不需要编译b.h文件。否则所有的文件都需要重新编译 (4)
include /home/deployer/idap/ldap/etc/schema/core.schema
在该语句的后面添加以下语句。
1 2 3 4 5 6 7 8
include /home/deployer/idap/ldap/etc/openldap/schema/corba.schema include /home/deployer/idap/ldap/etc/openldap/schema/cosine.schema include /home/deployer/idap/ldap/etc/openldap/schema/dyngroup.schema include /home/deployer/idap/ldap/etc/openldap/schema/inetorgperson.schema include /home/deployer/idap/ldap/etc/openldap/schema/java.schema include /home/deployer/idap/ldap/etc/openldap/schema/misc.schema include /home/deployer/idap/ldap/etc/openldap/schema/nis.schema include /home/deployer/idap/ldap/etc/openldap/schema/openldap.schema
$ vim /home/deployer/sonarqube-7.2.1/conf/sonar.properties
修改如下(请将具体信息按照自己的LDAP服务器信息进行修改):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
# LDAP CONFIGURATION
# Enable the LDAP feature sonar.security.realm=LDAP //取消注释
# Set to true when connecting to a LDAP server using a case-insensitive setup. # sonar.authenticator.downcase=true
# URL of the LDAP server. Note that if you are using ldaps, then you should install the server certificate into the Java truststore. ldap.url=ldap://192.168.117.132:389 //取消注释,填写实际ldap服务器地址
# Bind DN is the username of an LDAP user to connect (or bind) with. Leave this blank for anonymous access to the LDAP directory (optional) ldap.bindDn=cn=Manager,dc=my-test,dc=chinaunicom //取消注释,填写实际ldap服务器基础DN
# Bind Password is the password of the user to connect with. Leave this blank for anonymous access to the LDAP directory (optional) ldap.bindPassword=111111 //取消注释,填写实际ldap服务器基础DN密码
# Possible values: simple | CRAM-MD5 | DIGEST-MD5 | GSSAPI See http://java.sun.com/products/jndi/tutorial/ldap/security/auth.html (default: simple) ldap.authentication=simple //取消注释
Running SonarQube... wrapper | --> Wrapper Started as Console wrapper | Launching a JVM... jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved. jvm 1 | jvm 1 | 2019.08.19 07:44:17 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /home/deployer/sonarqube-7.2.1/temp jvm 1 | 2019.08.19 07:44:17 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /192.168.117.130:44172 jvm 1 | 2019.08.19 07:44:17 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/home/deployer/sonarqube-7.2.1/elasticsearch]: /home/deployer/sonarqube-7.2.1/elasticsearch/bin/elasticsearch -Epath.conf=/home/deployer/sonarqube-7.2.1/temp/conf/es jvm 1 | 2019.08.19 07:44:17 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running jvm 1 | 2019.08.19 07:44:17 INFO app[][o.e.p.PluginsService] no modules loaded jvm 1 | 2019.08.19 07:44:17 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin] jvm 1 | 2019.08.19 07:44:19 WARN app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 1 jvm 1 | 2019.08.19 07:44:19 INFO app[][o.s.a.SchedulerImpl] Process [es] is stopped jvm 1 | 2019.08.19 07:44:19 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
出现上述错误原因是不能用root用户启动es 创建sonarUser用户并赋权
1 2 3 4 5 6 7 8
[root@i-vzdytl5t linux-x86-64]# adduser sonarUser [root@i-vzdytl5t linux-x86-64]# passwd sonarUser Changing password for user sonarUser. New password: BAD PASSWORD: The password is shorter than 8 characters Retype new password: passwd: all authentication tokens updated successfully. [root@i-vzdytl5t linux-x86-64]# chown -R sonarUser:sonarUser sonarqube-7.2.1
再次启动sonarqube,若出现下图错误
删除sonarqube-7.2.1/temp目录下的所有文件即可 如果出现下述错误
切换到root用户,编辑limits.conf添加如下内容
1 2 3
vim /etc/security/limits.conf * soft nofile 65536 * hard nofile 65536
切换到root用户,编辑sysctl.conf
1 2 3
vim /etc/sysctl.conf 在文件最后添加一行 vm.max_map_count=262144