Created
December 28, 2017 20:19
-
-
Save pjmazenot/2785c482d7e94d3c9ba67d0acf183d78 to your computer and use it in GitHub Desktop.
Install Nagios 3 on Ubuntu 14.04 (Apache 2.4, PHP 7.0)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Install Apache 2.4 | |
export DEBIAN_FRONTEND=noninteractive && apt update && apt full-upgrade -y | |
apt-get install -y python-software-properties software-properties-common gcc make re2c libpcre3-dev curl sshpass apt-utils | |
apt-get -y install apache2 | |
# 2. Install custom apt repository for PHP 7.0 | |
apt install -y locales && locale-gen en_US.UTF-8 && locale -a | |
LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 add-apt-repository -y ppa:ondrej/php | |
# 3. Install php 7.0 | |
export DEBIAN_FRONTEND=noninteractive && apt update && apt full-upgrade -y | |
aptitude install -y pkg-php-tools libapache2-mod-php7.0 php7.0 php7.0-dev php7.0-cgi php7.0-cli php7.0-common php7.0-curl php7.0-gd php7.0-zip php7.0-imap php7.0-intl php7.0-mysql php7.0-pspell php7.0-sqlite3 php7.0-tidy php7.0-opcache php7.0-json php7.0-bz2 php7.0-mcrypt php7.0-readline php7.0-xmlrpc php7.0-enchant php7.0-xsl php7.0-ldap php7.0-mbstring | |
# 4. Install Nagios 3 | |
# The admin password will be asked during the install process | |
apt-get -y install nagios3 nagios-plugins-basic | |
# 5. Configure and restart apache2 (the default nagios install script reactivate php5 and prevent apache from restarting) | |
a2dismod php5 | |
a2enmod rewrite | |
a2enmod php7.0 | |
service apache2 restart | |
# Access through | |
# http://<server-ip>/nagios3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment