zl程序教程

您现在的位置是:首页 >  其他

当前栏目

Sonarqube部署

2023-02-26 12:28:49 时间
1. 安装JDK11 $ tar xvf jdk-11_linux-x64_bin.tar.gz $ mv jdk-11 /usr/local/jdk $ vim /etc/profile export JAVA_HOME=/usr/local/jdk export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar export PATH=$JAVA_HOME/bin:$PATH $ source /etc/profile $ java -version
2. 安装PostgreSQL #下载pg9.5 源 $ yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm $ yum install postgresql96-server postgresql96-contrib #初始化db $ /usr/pgsql-9.6/bin/postgresql96-setup initdb #启动服务、开机⾃启 $ systemctl start postgresql-9.6 $ systemctl enable postgresql-9.6 #登录数据库 $ su - postgres $ psql -U postgres    #添加系统服务 $ ALTER USER postgres with encrypted password 'ykibx'; #创建sonarqube⽤户 create user sonarqube with password 'ykibx'; create database sonarqube owner sonarqube; grant all on database sonarqube to sonarqube; create schema my_schema;<br> #开启远程访问 $ vim /var/lib/pgsql/9.6/data/postgresql.conf #listen_addresses = '*' # vim /var/lib/pgsql/9.6/data/pg_hba.conf $ systemctl restart postgresql-9.6.service #pg_hba.conf # IPv4 local connections: host all all 0.0.0.0/0 trust # IPv6 local connections: host all all ::1/128 ident # Allow replication connections from localhost, by a user with the # replication privilege. #local replication postgres peer #host replication postgres 127.0.0.1/32 ident #host replication postgres ::1/128 ident host all all 0.0.0.0/0 ident
3.添加系统服务 #添加系统⽤户 useradd sonarqube passwd sonarqube #优化系统参数 sysctl -w vm.max_map_count=262144 sysctl -w fs.file-max=65536 ulimit -u 65536 sonarqube ulimit -n 65536 sonarqube #解压安装包 $ mv sonarqube-7.9.5.zip /home/sonarqube/ $ chown -R sonarqube:sonarqube /home/sonarqube/ $ yum -y install unzip $ su - sonarqube  $ unzip sonarqube-7.9.5.zip #更改配置文件 $ vim sonarqube-7.9.1/conf/sonar.properties  sonar.jdbc.username=sonarqube sonar.jdbc.password=meiyoumima sonar.jdbc.url=jdbc:postgresql://127.0.0.1/sonarqube #启动服务 su sonarqube bash /home/sonarqube/bin/linux-x86-64/sonar.sh start #启动服务一定要用sonarqube用户,root会启动失败,可根据日志去定位错误

Sonarqube部署


本站部分内容转载自网络,版权属于原作者所有,如有异议请联系QQ153890879修改或删除,谢谢!
转载请注明原文链接:Sonarqube部署

你还在原价购买阿里云、腾讯云、华为云、天翼云产品?那就亏大啦!现在申请成为四大品牌云厂商VIP用户,可以3折优惠价购买云服务器等云产品,并且可享四大云服务商产品终身VIP优惠价,还等什么?赶紧点击下面对应链接免费申请VIP客户吧:

1、点击这里立即申请成为腾讯云VIP客户

2、点击这里立即注册成为天翼云VIP客户

3、点击这里立即申请成为华为云VIP客户

4、点击这里立享阿里云产品终身VIP优惠价

喜欢 (0)
[[email protected]]
分享 (0)