@buster.gaylord
To install Zabbix server on Google Cloud, follow these steps:
- Create a new virtual machine instance on Google Cloud. Make sure to select an appropriate machine type and operating system for your setup.
- Once the instance is created, SSH into the virtual machine.
- Update the system packages by running the following command:
sudo apt update && sudo apt upgrade -y
- Install the required dependencies by running the following command:
sudo apt install apache2 mysql-server mysql-client php libapache2-mod-php php-mysql wget
- Configure and secure MySQL server by running the following command:
sudo mysql_secure_installation
Follow the prompts to set a root password, remove anonymous users, disallow remote root login, and remove test databases.
- Download and add the Zabbix repository key by running the following command:
wget https://repo.zabbix.com/zabbix/4.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_4.4-1+ubuntu18.04_all.deb
sudo dpkg -i zabbix-release_4.4-1+ubuntu18.04_all.deb
sudo apt update
- Install Zabbix server, frontend, and agent by running the following command:
sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-agent
During the installation, you will be prompted to enter the MySQL database details. Provide the necessary information and complete the installation.
- Configure the Zabbix server by editing the configuration file:
sudo nano /etc/zabbix/zabbix_server.conf
Update the following settings:
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=
- Import the initial database schema and data by running the following command:
sudo zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | sudo mysql -u zabbix -p zabbix
Enter the MySQL password when prompted.
- Configure PHP for Zabbix frontend by editing the configuration file:
sudo nano /etc/zabbix/apache.conf
Uncomment and update the timezone setting to match your timezone:
php_value date.timezone
- Enable and start the necessary services:
sudo systemctl enable zabbix-server zabbix-agent apache2
sudo systemctl start zabbix-server zabbix-agent apache2
- Access the Zabbix frontend by opening a web browser and entering the IP address of your Google Cloud instance. You will be prompted with the Zabbix installation page.
- Follow the on-screen instructions to complete the installation.
Once the installation is complete, you will have a functional Zabbix server running on Google Cloud.