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会启动失败,可根据日志去定位错误
你还在原价购买阿里云、腾讯云、华为云、天翼云产品?那就亏大啦!现在申请成为四大品牌云厂商VIP用户,可以3折优惠价购买云服务器等云产品,并且可享四大云服务商产品终身VIP优惠价,还等什么?赶紧点击下面对应链接免费申请VIP客户吧:
相关文章
- Jgit的使用笔记
- 利用Github Action实现Tornadofx/JavaFx打包
- 叹息!GitHub Trending 即将成为历史!
- 微软软了?开源社区讨论炸锅,GitHub CEO 亲自来答
- GitHub Trending 列表频现重复项,前后端都没去重?
- Photoshop Elements 2021版本软件安装教程(mac+windows全版本都有)
- (ps全版本)Photoshop 2020的安装与破解教程(mac+windows全版本都有)
- (ps全版本)Photoshop cc2018的安装与破解教程(mac+windows全版本,包括2023
- 环境搭建:Oracle GoldenGate 大数据迁移到 Redshift/Flat file/Flume/Kafka测试流程
- 每个开发人员都要掌握的:最小 Linux 基础课
- 来撸羊毛了!Windows 环境下 Hexo 博客搭建,并部署到 GitHub Pages
- 超实用!手把手入门 MongoDB:这些坑点请一定远离
- 【GitHub日报】22-10-09 zustand、neovim、webtorrent、express 等4款App今日上新
- 【GitHub日报】22-10-10 brew、minio、vite、seaweedfs、dbeaver 等8款App今日上新
- 【GitHub日报】22-10-11 cobra、grafana、vue、ToolJet、redwood 等13款App今日上新
- Photoshop 2018 下载及安装教程(mac+windows全版本都有,包括最新的2023)
- Photoshop 2017 下载及安装教程(mac+windows全版本都有,包括最新的2023)
- Photoshop 2020 下载及安装教程(mac+windows全版本都有,包括最新的2023)
- Photoshop 2023 资源免费下载(mac+windows全版本都有,包括最新的2023)
- 最新版本Photoshop CC2018软件安装教程(mac+windows全版本都有,包括2023