【发布时间】:2017-06-16 08:25:09
【问题描述】:
我已经在我的 Ubuntu 机器上安装了 Jenkins,该机器在 Google Cloud 的计算引擎上运行。
为此,我运行了以下命令:
sudo apt-get update
sudo apt-get install apache2 libapache2-mod-php5 php5-mcrypt php5-mysql git openjdk-7-jre openjdk-7-jdk -y
wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update
sudo apt-get install jenkins
Jenkins 似乎安装得很好,但是当我转到端口 8080 上的公共 IP 地址时,那里什么也没有。我读到可能是因为 Apache 正在使用端口 8080,所以我编辑了/etc/default/jenkins 并将端口更改为 8081。我仍然没有在该端口上看到 jenkins。
我也重新启动了服务,但那里没有任何变化。如果我这样做:
sudo netstat -plntu
我明白了:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 422/sshd
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 9745/apache2
tcp6 0 0 :::22 :::* LISTEN 422/sshd
tcp6 0 0 :::8081 :::* LISTEN 17917/java
udp 0 0 0.0.0.0:53763 0.0.0.0:* 294/dhclient
udp 0 0 0.0.0.0:68 0.0.0.0:* 294/dhclient
udp 0 0 10.132.0.2:123 0.0.0.0:* 372/ntpd
udp 0 0 127.0.0.1:123 0.0.0.0:* 372/ntpd
udp 0 0 0.0.0.0:123 0.0.0.0:* 372/ntpd
udp6 0 0 :::9732 :::* 294/dhclient
udp6 0 0 :::33848 :::* 17917/java
udp6 0 0 ::1:123 :::* 372/ntpd
udp6 0 0 :::123 :::* 372/ntpd
udp6 0 0 :::5353 :::* 17917/java
如果我检查服务的状态,它似乎正在运行:
[ + ] acpid
[ + ] apache2
[ - ] bootlogs
[ - ] bootmisc.sh
[ - ] checkfs.sh
[ - ] checkroot-bootclean.sh
[ - ] checkroot.sh
[ + ] cron
[ + ] dbus
[ - ] generate-ssh-hostkeys
[ - ] hostname.sh
[ - ] hwclock.sh
[ + ] jenkins
[ - ] killprocs
[ + ] kmod
[ - ] motd
[ - ] mountall-bootclean.sh
[ - ] mountall.sh
[ - ] mountdevsubfs.sh
[ - ] mountkernfs.sh
[ - ] mountnfs-bootclean.sh
[ - ] mountnfs.sh
[ + ] networking
[ + ] ntp
[ + ] procps
[ + ] rc.local
[ - ] rmnologin
[ - ] rsync
[ + ] rsyslog
[ - ] screen-cleanup
[ - ] sendsigs
[ + ] ssh
[ - ] sudo
[ + ] udev
[ + ] udev-finish
[ - ] umountfs
[ - ] umountnfs.sh
[ - ] umountroot
[ - ] unattended-upgrades
[ + ] urandom
[ - ] uuidd
[ - ] x11-common
谁能告诉我我在这里做错了什么?
【问题讨论】:
标签: ubuntu jenkins installation port google-cloud-platform