2016-03-08 174 views
0

我試圖在我的Linux服務器上安裝Bitbucket服務器。我按照步驟here。我被困在第3步。我已經安裝了Bitbucket服務器,現在當試圖「安裝Bitbucket服務器」時,我無法從我的瀏覽器訪問它。Bitbucket服務器安裝錯誤

我已經做了以下內容:

  1. 使用SSH我已經去了含有/atlassian/bitbucket/4.4.1/
  2. 我運行命令bin/start-bitbucket.sh的目錄。

它提供了以下消息:

Starting Atlassian Bitbucket as current user 

------------------------------------------------------------------------------- 
    JAVA_HOME "/usr/local/jdk" does not point to a valid Java home directory. 
------------------------------------------------------------------------------- 

---------------------------------------------------------------------------------- 
Bitbucket is being run with a umask that contains potentially unsafe settings. 
The following issues were found with the mask "u=rwx,g=rwx,o=rx" (0002): 
- access is allowed to 'others'. It is recommended that 'others' be denied 
    all access for security reasons. 
- write access is allowed to 'group'. It is recommend that 'group' be 
    denied write access. Read access to a restricted group is recommended 
    to allow access to the logs. 

The recommended umask for Bitbucket is "u=,g=w,o=rwx" (0027) and can be 
configured in setenv.sh 
---------------------------------------------------------------------------------- 
Using BITBUCKET_HOME:  /home/wbbstaging/atlassian/application-data/bitbucket 
Using CATALINA_BASE: /home/wbbstaging/atlassian/bitbucket/4.4.1 
Using CATALINA_HOME: /home/wbbstaging/atlassian/bitbucket/4.4.1 
Using CATALINA_TMPDIR: /home/wbbstaging/atlassian/bitbucket/4.4.1/temp 
Using JRE_HOME:  /usr/local/jdk 
Using CLASSPATH:  /home/wbbstaging/atlassian/bitbucket/4.4.1/bin/bitbucket-bootstrap.jar:/home/wbbstaging/atlassian/bitbucket/4.4.1/bin/bootstrap.jar:/home/wbbstaging/atlassian/bitbucket/4.4.1/bin/tomcat-juli.jar 
Using CATALINA_PID: /home/wbbstaging/atlassian/bitbucket/4.4.1/work/catalina.pid 
Existing PID file found during start. 
Removing/clearing stale PID file. 
Tomcat started. 

Success! You can now use Bitbucket at the following address: 

http://localhost:7990/ 

If you cannot access Bitbucket at the above location within 3 minutes, or encounter any other issues starting or stopping Atlassian Bitbucket, please see the troubleshooting guide at: 

我嘗試訪問http://myserveraddress:7990,但我收到ERR_CONNECTION_REFUSED消息。是否因爲消息JAVA_HOME "/usr/local/jdk" does not point to a valid Java home directory

我的服務器是否正在運行: CentOS Linux release 7.2.1511

而且我嘗試安裝 Bitbucket Server 4.4.1

回答

1
  1. 請確保您有運行的Java --version
  2. 如果它沒有安裝安裝Java,從那裏開始。如果已安裝,請通過運行find/-name java來驗證其中的位置
  3. 通過文本編輯器打開/root/.bash_profile。 (我喜歡用vi編輯器) 並粘貼下面兩行給出的(注意我下面的版本可能與你看到了什麼不同)

    出口JAVA_HOME =的/ usr/JAVA/jdk1.7.0_21 出口PATH = /usr/java/jdk1.7.0_21/bin:$PATH

  4. 現在使不重新啓動系統的Java變量(在系統重新啓動bydefault設置Java變量)

    源/root/.bash_profile

  5. 現在檢查Java版本,JAVA_HOME和PATH變量。它sho你會根據你的設置向你顯示正確的信息。

    的java --version

    回聲$ JAVA_HOME

    回聲$ PATH

下面是我的系統的根在.bash_profile文件

[[email protected] ~]# cat /root/.bash_profile 
# .bash_profile 

# Get the aliases and functions 
if [ -f ~/.bashrc ]; then 
. ~/.bashrc 
fi 

# User specific environment and startup  programs 

PATH=$PATH:$HOME/bin 

export PATH 

export JAVA_HOME=/usr/java/jdk1.7.0_21 
export PATH=/usr/java/jdk1.7.0_21/bin:$PATH 
[[email protected] ~]# 
+0

我的Java主位置爲: '/ usr/lib/jvm /' 和我的路徑變量設置爲: '/ usr/lib/jvm/jre-1.8.0 -openjdk-1.8.0.71-2.b15.el7_2.x86_64 /' 在我的root用戶bash配置文件中。我現在可以如何對Bitbucket進行適當的更改? – inspired

+0

你有沒有安裝tomcat? –

+0

我會問我的主人。如果是這樣,我會使用它來使Bitbucker服務器指向正確的目錄?它似乎指向/ usr/local/jvm /而不是/ usr/lib/jvm – inspired