本文參考官方文檔進行安裝,以及在安裝中所遇到的問題呈現給大家。廢話就不說了,開始安裝。
一、準備工作:
本機系統環境是CentOS 7 x86 64位
硬體配置
建議實體記憶體8G+、CPU 4 cores+、硬碟20G+。記憶體低于6G無法安裝BigOps程式,是以記憶體必須6+。
1.作業系統
CentOS 7 x86 64位 (推薦使用7以上版本,使用7以下版本請參考官網文檔)
官方文檔URL:http://docs.bigops.com/er-jin-zhi-an-zhuang/zhun-bei-huan-jing.html
服務
端口
統一認證
30000、30001
work後端
30002、30003
預留
30004、30005
dv後端
30006、30007
confluence
30008、30009
jira
30010、30011
jenkins
30012、30013
kibana
5601
cerebro
9000
elasticsearch-head
9100
elasticsearch
9200、9300
2.準備2域名
(1)sso.xxxx.com,用于統一認證
(2)work.xxxx.com,用于主站
如果沒有注冊域名,需要給伺服器和筆記本都配置hosts。
Linux位置/etc/hosts。
Windows位置C:\Windows\System32\drivers\etc\hosts,如果不能直接編輯,可以先拷貝到桌面,編輯完在拷貝回原位置。
配置内容,例如:
192.168.100.2 sso.bigops.com (換成你伺服器IP和你自己的域名)
192.168.100.2 work.bigops.com (換成你伺服器IP和你自己的域名)
切記2個域名都要設定!切記!切記!切記!
切記伺服器和你的筆記本都要設定!切記!切記!切記!
3.初始化環境
[root@localhost ~]#cd /usr/local/src
[root@localhost src]# wget -O centos_init_env.sh https://raw.githubusercontent.com/yunweibang/bigops-install/master/centos_init_env.sh
[root@localhost src]# chmod +x centos_init_env.sh
[root@localhost src]# sh centos_init_env.sh
注:建議将所需下載下傳的檔案統一放在一個目錄下,好管理也好處理。
4.關閉IPv6(可選)
centos 7
編輯/etc/default/grub,在GRUB_CMDLINE_LINUX的值裡添加ipv6.disable=1,例如:
GRUB_CMDLINE_LINUX="ipv6.disable=1 crashkernel=auto rhgb quiet idle=halt biosdevname=0 net.ifnames=0 console=tty0 console=ttyS0,115200n8 noibrs"
![](https://img.laitimes.com/img/9ZDMuAjOiMmIsIjOiQnIsISPrdEZwZ1Rh5WNXp1bwNjW1ZUba9VZwlHdsATOfd3bkFGazxCMx8VesATMfhHLlN3XnxCMwEzX0xiRGZkRGZ0Xy9GbvNGLpZTY1EmMZVDUSFTU4VFRR9Fd4VGdsYTMfVmepNHLrJXYtJXZ0F2dvwVZnFWbp1zczV2YvJHctM3cv1Ce-cmbw5CZ3YDOyEWZwkDNiFjMjNDM2IWY1gTY1IDMzEmNiVTNx8CXxIzLcFTM5EDMy8CXn9Gbi9CXzV2Zh1WavwVbvNmLvR3YxUjLxM3Lc9CX6MHc0RHaiojIsJye.png)
再運作指令
[root@localhost ~]#grub2-mkconfig -o /boot/grub2/grub.cfg
重新開機系統
[root@localhost ~]#reboot
5.擷取安裝包
百度網盤位址:
位址:https://pan.baidu.com/s/1y8JyQJIUWnzDiH0fX2EpcQ
密碼:76cm
二、安裝
待初始化系統完成以後,我們進行BigOps環境和BigOps軟體安裝
(1)安裝MySQL(推薦使用)
[root@localhost src]# wget -O mysql80.sh https://raw.githubusercontent.com/yunweibang/bigops-install/master/mysql80.sh
[root@localhost src]#chmod +x mysql80.sh
[root@localhost src]# sh mysql80.sh
看到下面提示,輸入[email protected]使用者密碼,儲存好一會使用。另外root@localhost密碼為空
please input [email protected] password, default bigops
/>輸入你的密碼
優化MySQL,修改/etc/my.cnf裡innodb_buffer_pool_size的值,用指令計算:
說明:BigOps系統占用4G,是以innodb_buffer_pool_size等于總記憶體減去4G後的70%到80%
[root@localhost ~]# free -g|egrep -i ^mem|awk '{if($2<7) print "memory is too small";else print int(($2-4)*0.8)"G"}'
比如上面指令傳回8G,就這樣設定:
innodb_buffer_pool_size=8G
修改完後需要重新開機MySQL
(2) 安裝BigOps程式
[root@localhost src]#tar -zxvf bigops-1.0.1.tar.gz
[root@localhost src]# mv bigops-1.0.1 bigops
[root@localhost src]# cd bigops/bin/
[root@localhost bin]# chmod +x bigserver.sh
[root@localhost bin]# sh bigserver.sh
根據提示填寫相關資訊,設定完後服務會自動啟動。
dbhost不要填localhost,填127.0.0.1或對應IP
檢查BigOps資料庫的tables是否是大小寫組合拼寫。如果表名都是小寫就有問題
如果不是請根據官方常見問題文檔進行修改。URL:http://docs.bigops.com/er-jin-zhi-an-zhuang/an-zhuang-chang-jian-wen-ti.html
檢查服務端口有無啟動
[root@localhost bin]# netstat -nptl | grep 3000
檢查Nginx狀态
檢查Nginx域名是否配置正确
[root@localhost ~]#cat /etc/nginx/conf.d/sso.conf
[root@localhost ~]#cat /etc/nginx/conf.d/work.conf
[root@localhost bin]# ps aux|grep nginx.conf
注:
問題
在此處我遇到sso.conf和work.conf、default.conf、zabbix.conf檔案是空白的,服務重新開機後Nginx服務無法啟動。
解決
下載下傳配置檔案,替換并修改sso.conf、default.conf、work.conf、zabbix.conf裡的域名為你網站的域名
[root@localhost ~]#wget -O /etc/nginx/nginx.conf https://raw.githubusercontent.com/yunweibang/bigops-install/master/nginx/nginx.conf
[root@localhost ~]#wget -O /etc/nginx/conf.d/default.conf https://raw.githubusercontent.com/yunweibang/bigops-install/master/nginx/conf.d/default.conf
[root@localhost ~]#wget -O /etc/nginx/conf.d/sso.conf https://raw.githubusercontent.com/yunweibang/bigops-install/master/nginx/conf.d/sso.conf
[root@localhost ~]#wget -O /etc/nginx/conf.d/work.conf https://raw.githubusercontent.com/yunweibang/bigops-install/master/nginx/conf.d/work.conf
[root@localhost ~]#wget -O /etc/nginx/conf.d/zabbix.conf https://raw.githubusercontent.com/yunweibang/bigops-install/master/nginx/conf.d/zabbix.conf
替換修改後Nginx服務正常啟動
檢查sso服務是否正常啟動
[root@localhost bin]# curl 127.0.0.1:30001/signin/login
如果傳回值包括「sso系統正常」,說明運作正常,如果沒有傳回值說明有問題,需要詳細檢查資料庫配置。
檢查work服務是否正常啟動
[root@localhost bin]# curl 127.0.0.1:30003/api/common/ssourl/
{"code":0,"message":"ok","data":{"url":"http://sso.swwbigops.com"}}[root@localhost bin]#
如果傳回「message」為ok就是正常
啟動bigserver,bigserver服務用于執行一些内置任務
[root@localhost ~]#/usr/local/src/bigops/bin/bigserver.sh restart
bigserver配置檔案在/usr/local/src/bigops/bin/bigserver.properties
可以根據需要調整輪詢時間
設定定時清理日志
[root@localhost ~]#crontab -e
00 01 * /bin/sh /opt/bigops/bin/clean_log.sh
添加開機啟動服務
[root@localhost ~]#wget -O /usr/lib/systemd/system/bigweb.service https://raw.githubusercontent.com/yunweibang/bigops-install/master/bigweb.service
[root@localhost ~]#systemctl enable bigweb
[root@localhost ~]#chmod 754 /usr/lib/systemd/system/bigweb.service
[root@localhost ~]#wget -O /usr/lib/systemd/system/bigserver.service https://raw.githubusercontent.com/yunweibang/bigops-install/master/bigserver.service
[root@localhost ~]#systemctl enable bigserver
[root@localhost ~]#chmod 754 /usr/lib/systemd/system/bigserver.service
[root@localhost ~]#systemctl enable nginx
[root@localhost ~]#systemctl enable mysqld
登入測試
通路域名:http://work.swwbigops.com (就是你剛才設定的home url)
預設賬号:admin
預設密碼:bigops
登陸後請盡快修改密碼。
軟體登入界面展示