Hi all....
I'm installing the Zabbix server 3.2 for Ubuntu using the following instructions page
Everything went fine... no errors.
But few things are not right
1. There's no /usr/share/doc/zabbix-server-mysql/create.sql.gz as stated in the documentation.
- I did find 3 files in /usr/share/zabbix-server-mysql: data.sql.gz, images.sql.gz, and schema.sql.gz.
- I ran these files in order: schema, images, data. I really don't know if that's the right order... I used my best judgement.
2. There's no /etc/zabbix/apache.conf.
- I did find this file at the same location of the sql scripts and copied over
- I added the several lines to it as indicated in the instructions
- This file alone being there doesn't offer any good. It has to be referenced by /etc/apache2/apache2.conf using this line: "Include /etc/zabbix/apache.conf". This should be mentioned in the documentation.
3. MySQL, zabbix-server and apache2 start OK
But when hitting the front-end with a browser... I got the code spitting out syntax instead of the page. I'm yet to figure out why... If anybody has seen this before and got it working, could you share ?
array(T_ZBX_STR, O_NO, null, NOT_EMPTY, 'isset({enter})', _('Username')), 'password' => array(T_ZBX_STR, O_OPT, null, null, 'isset({enter})'), 'sessionid' => array(T_ZBX_STR, O_OPT, null, null, null), 'reconnect' => array(T_ZBX_INT, O_OPT, P_SYS|P_ACT, BETWEEN(0, 65535), null), 'enter' => array(T_ZBX_STR, O_OPT, P_SYS, null, null), 'autologin' => array(T_ZBX_INT, O_OPT, null, null, null), 'request' => array(T_ZBX_STR, O_OPT, null, null, null) ); check_fields($fields); // logout if (isset($_REQUEST['reconnect'])) { DBstart(); add_audit_details(AUDIT_ACTION_LOGOUT, AUDIT_RESOURCE_USER, CWebUser::$data['userid'], '', _('Manual Logout'), CWebUser::$data['userid'] ); DBend(true); CWebUser::logout(); redirect('index.php'); } $config = select_config(); if ($config['authentication_type'] == ZBX_AUTH_HTTP) { if (!empty($_SERVER['PHP_AUTH_USER'])) { $_REQUEST['enter'] = _('Sign in'); $_REQUEST['name'] = $_SERVER['PHP_AUTH_USER']; } else { access_deny(ACCESS_DENY_PAGE); } } // login via form if (isset($_REQUEST['enter']) && $_REQUEST['enter'] == _('Sign in')) { // try to login $autoLogin = getRequest('autologin', 0); DBstart(); $loginSuccess = CWebUser::login(getRequest('name', ''), getRequest('password', '')); DBend(true); if ($loginSuccess) { // save remember login preference $user = array('autologin' => $autoLogin); if (CWebUser::$data['autologin'] != $autoLogin) { API::User()->updateProfile($user); } $request = getRequest('request'); $url = zbx_empty($request) ? CWebUser::$data['url'] : $request; if (zbx_empty($url) || $url == $page['file']) { $url = 'dashboard.php'; } redirect($url); exit; } // login failed, fall back to a guest account else { CWebUser::checkAuthentication(null); } } else { // login the user from the session, if the session id is empty - login as a guest CWebUser::checkAuthentication(CWebUser::getSession Cookie()); } // the user is not logged in, display the login form if (!CWebUser::$data['alias'] || CWebUser::$data['alias'] == ZBX_GUEST_USER) { switch ($config['authentication_type']) { case ZBX_AUTH_HTTP: echo _('User name does not match with DB'); break; case ZBX_AUTH_LDAP: case ZBX_AUTH_INTERNAL: if (isset($_REQUEST['enter'])) { $_REQUEST['autologin'] = getRequest('autologin', 0); } if ($messages = clear_messages()) { $messages = array_pop($messages); $_REQUEST['message'] = $messages['message']; } $loginForm = new CView('general.login'); $loginForm->render(); } } else { redirect(zbx_empty(CWebUser::$data['url']) ? 'dashboard.php' : CWebUser::$data['url']); }
Note: As I attempt to hit the site... neither zabbix-server nor mysql logs indicate that apache2 has contacted them. Have I done something wrong at apache? Thanks guys!
I'm installing the Zabbix server 3.2 for Ubuntu using the following instructions page
Everything went fine... no errors.
But few things are not right
1. There's no /usr/share/doc/zabbix-server-mysql/create.sql.gz as stated in the documentation.
- I did find 3 files in /usr/share/zabbix-server-mysql: data.sql.gz, images.sql.gz, and schema.sql.gz.
- I ran these files in order: schema, images, data. I really don't know if that's the right order... I used my best judgement.
2. There's no /etc/zabbix/apache.conf.
- I did find this file at the same location of the sql scripts and copied over
- I added the several lines to it as indicated in the instructions
- This file alone being there doesn't offer any good. It has to be referenced by /etc/apache2/apache2.conf using this line: "Include /etc/zabbix/apache.conf". This should be mentioned in the documentation.
3. MySQL, zabbix-server and apache2 start OK
But when hitting the front-end with a browser... I got the code spitting out syntax instead of the page. I'm yet to figure out why... If anybody has seen this before and got it working, could you share ?
array(T_ZBX_STR, O_NO, null, NOT_EMPTY, 'isset({enter})', _('Username')), 'password' => array(T_ZBX_STR, O_OPT, null, null, 'isset({enter})'), 'sessionid' => array(T_ZBX_STR, O_OPT, null, null, null), 'reconnect' => array(T_ZBX_INT, O_OPT, P_SYS|P_ACT, BETWEEN(0, 65535), null), 'enter' => array(T_ZBX_STR, O_OPT, P_SYS, null, null), 'autologin' => array(T_ZBX_INT, O_OPT, null, null, null), 'request' => array(T_ZBX_STR, O_OPT, null, null, null) ); check_fields($fields); // logout if (isset($_REQUEST['reconnect'])) { DBstart(); add_audit_details(AUDIT_ACTION_LOGOUT, AUDIT_RESOURCE_USER, CWebUser::$data['userid'], '', _('Manual Logout'), CWebUser::$data['userid'] ); DBend(true); CWebUser::logout(); redirect('index.php'); } $config = select_config(); if ($config['authentication_type'] == ZBX_AUTH_HTTP) { if (!empty($_SERVER['PHP_AUTH_USER'])) { $_REQUEST['enter'] = _('Sign in'); $_REQUEST['name'] = $_SERVER['PHP_AUTH_USER']; } else { access_deny(ACCESS_DENY_PAGE); } } // login via form if (isset($_REQUEST['enter']) && $_REQUEST['enter'] == _('Sign in')) { // try to login $autoLogin = getRequest('autologin', 0); DBstart(); $loginSuccess = CWebUser::login(getRequest('name', ''), getRequest('password', '')); DBend(true); if ($loginSuccess) { // save remember login preference $user = array('autologin' => $autoLogin); if (CWebUser::$data['autologin'] != $autoLogin) { API::User()->updateProfile($user); } $request = getRequest('request'); $url = zbx_empty($request) ? CWebUser::$data['url'] : $request; if (zbx_empty($url) || $url == $page['file']) { $url = 'dashboard.php'; } redirect($url); exit; } // login failed, fall back to a guest account else { CWebUser::checkAuthentication(null); } } else { // login the user from the session, if the session id is empty - login as a guest CWebUser::checkAuthentication(CWebUser::getSession Cookie()); } // the user is not logged in, display the login form if (!CWebUser::$data['alias'] || CWebUser::$data['alias'] == ZBX_GUEST_USER) { switch ($config['authentication_type']) { case ZBX_AUTH_HTTP: echo _('User name does not match with DB'); break; case ZBX_AUTH_LDAP: case ZBX_AUTH_INTERNAL: if (isset($_REQUEST['enter'])) { $_REQUEST['autologin'] = getRequest('autologin', 0); } if ($messages = clear_messages()) { $messages = array_pop($messages); $_REQUEST['message'] = $messages['message']; } $loginForm = new CView('general.login'); $loginForm->render(); } } else { redirect(zbx_empty(CWebUser::$data['url']) ? 'dashboard.php' : CWebUser::$data['url']); }
Note: As I attempt to hit the site... neither zabbix-server nor mysql logs indicate that apache2 has contacted them. Have I done something wrong at apache? Thanks guys!
Comment