CentOS 6.5 install the OSA monitoring Wizard to monitor the host

Source: Internet
Author: User

CentOS 6.5 install the OSA monitoring Wizard to monitor the host

OSA monitoring is a free and easy-to-use open-source graphical monitor. You must configure the PHP environment before installation,

  yum install httpd mysql mysql-server php-mysql php* -y

Edit the http. conf file

Vi/etc/httpd/conf/httpd. conf 402 DirectoryIndex index.html index. php index.html. var // Add index. php to row 402

Edit the php. ini file

Vi/etc/php. ini 229 short_open_tag = On // The Off value of row 229 is also set to On 946 date. timezone = PRC // The Time of row 946

Restart Apache and Mysql

service httpd restartservice mysqld restart

Set the logon password for Mysql root

Mysqladmin-p password "P @ ssw0rd" // set the password to P @ ssw0rd

Compile the PHP test page

yum install elinks -y   echo -e "<?php\nphpinfo();\n?> " > /var/www/html/phpinfo.php chmod -R 755 /var/www/html/service httpd restart

Enable ports and 80 of the firewall

iptables -I INPUT -p tcp --dport 80 -j ACCEPTiptables -I INPUT -p tcp --dport 3306 -j ACCEPTservice iptables saveiptables -L -n --line   Chain INPUT (policy ACCEPT)num  target     prot opt source               destination         1    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:3306 2    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:80 3    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED 4    ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           5    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           6    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22 7    REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited 

Testing the PHP environment is successful.

elinks http://localhost/phpinfo.php

Start installing OSA .......

The following are examples of OSA:

  wget http://monitor.osapub.com/download/OSA_GUARD_BETA_V1.0.8.tar.gz

Create a storage path for OSA

mkdir -p /usr/local/osa

Decompress the OSA package to the local path.

 tar zxvf OSA_GUARD_BETA_V1.0.8.tar.gz -C /usr/local/osa/

Configure Apache and direct the directory to the program directory of OSA. The default directory of the OSA program is/usr/local/osa/ctrlphp.

Vi/etc/httpd/conf/httpd. conf // Add the following content to the last line <VirtualHost *: 80> DocumentRoot/usr/local/osa/ctrlphp ServerName 42.51.153.157 ErrorLog logs/logs .com-error_log CustomLog logs/osa.com-access_log common </VirtualHost> service httpd restart // after adding, remember to restart

Access your VM instance address with a host http://42.51.x.x/install/index.php will display the installation interface, then click I agree directly.

 

 

, The above error is prompted,

1. We need to manually execute the sh script under the installation directory

This script is used to install the py required by OSA and the associated resistance. It takes a while to wait. The output in Linux is/dev/null, which is already being executed.

./install/auto_prepare.sh

 

2. Set permissions for the/usr/local/osa directory

  chmod -R 777 /usr/local/osa/ctrlphp

3. Disable Selinux and restart Apache to re-detect the environment.

setenforce 0service httpd restart

Environment check successful, Next Set Mysql

We recommend that you use a separate account for the OSA monitoring genie (for security reasons, do not directly use root) to create a database and database account. The related statements are as follows:

mysql -uroot -pP@ssw0rdmysql> CREATE DATABASE `osa_guard` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; Query OK, 1 row affected (0.00 sec)mysql> GRANT ALL PRIVILEGES ON osa_guard.* TO osa@'127.0.0.1' IDENTIFIED BY 'osa1688';Query OK, 0 rows affected (0.00 sec)mysql> FLUSH PRIVILEGES;Query OK, 0 rows affected (0.00 sec)

Click Next. The installation is successful.

After the installation is successful, enter the address http: // Ip/index. the php user password is based on the following interface for successful installation. The rest are graphical, and you will be able to learn it for a while.

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.