I've installed Jenkins on my Ubuntu machine running on compute engine in Google Cloud.
To do so I have run these commands:
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 seems to be installing fine but when i go to the public IP address on port 8080 there nothing there. I read that it may be so that Apache is using port 8080 so I edited /etc/default/jenkins and changed the port to 8081. Still I don't see jenkins on that port.
I've also restarted the service but no change there. If I do:
sudo netstat -plntu
I see:
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
If I check the status of the services it seems to be running:
[ + ] 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
Can someone tell me what I am doing wrong here?