Exemplo n.º 1
0
def _install_icinga_web(icinga_db_pass):
    """
    This installs the icinga web module. Only source of complexity is moking icinga accessible from the document root.

    """
    x("yum install -y icinga-web php php-cli php-pear php-xmlrpc php-xsl php-pdo php-soap php-gd php-ldap php-mysql"
      )

    # Setup icinga-web mysql
    icinga_web_db_bass = _setup_icinga_web_mysql()

    # Configure icinga web client config files
    _configure_icinga_web(icinga_db_pass, icinga_web_db_bass)

    # Allow icinga-web to issue icinga commands
    x("useradd -G icingacmd apache")

    # Make everything startup on reboot
    x("/sbin/chkconfig --level 3 httpd on")
    x("/sbin/chkconfig --level 3 mysqld on")
    x("/sbin/chkconfig --level 3 ido2db on")

    # Harden with iptables-chain
    iptables.add_httpd_chain()
    iptables.save()
Exemplo n.º 2
0
def setup_node():
    """
	Setup nodejs for deployments
	"""
    # Installing nodejs modules for system
    x("/usr/local/bin/npm -g install express express-generator supervisor")

    # Setup webbfront
    x("yum install httpd -y")
    # Config webfront to proxy all info to port 3000
    x("cp /opt/syco/var/nodejs/httpd/nodejs.conf /etc/httpd/conf.d/")
    x("chkconfig httpd on")
    x("/etc/init.d/httpd restart")
    # Configure iptables
    iptables.add_httpd_chain()
    iptables.save()
Exemplo n.º 3
0
def install_httpd(args):
  '''
  Apache installation

  '''
  app.print_verbose("Install Apache server version: %d" % SCRIPT_VERSION)
  version_obj = version.Version("Installhttpd", SCRIPT_VERSION)
  version_obj.check_executed()

  _install_httpd()
  _install_mod_security()
  _update_modsec_rules()
  _enable_se_linux()

  iptables.add_httpd_chain()
  iptables.save()
  set_file_permissions()
  x("/etc/init.d/httpd start")

  version_obj.mark_executed()
Exemplo n.º 4
0
def _install_icinga_web(icinga_db_pass):
    """
    This installs the icinga web module. Only source of complexity is moking icinga accessible from the document root.

    """
    x("yum install -y icinga-web php php-cli php-pear php-xmlrpc php-xsl php-pdo php-soap php-gd php-ldap php-mysql")

    # Setup icinga-web mysql
    icinga_web_db_bass = _setup_icinga_web_mysql()

    # Configure icinga web client config files
    _configure_icinga_web(icinga_db_pass, icinga_web_db_bass)

    # Allow icinga-web to issue icinga commands
    x("useradd -G icingacmd apache")

    # Make everything startup on reboot
    x("/sbin/chkconfig --level 3 httpd on")
    x("/sbin/chkconfig --level 3 mysqld on")
    x("/sbin/chkconfig --level 3 ido2db on")

    # Harden with iptables-chain
    iptables.add_httpd_chain()
    iptables.save()