Carolyn is a RHEL Sysdmin at Kodak. She has been tasked with setting up a MariaDB server using Docker. The MariaDB server should be available for all employees to use at 192.168.1.15. Please list all steps that Carolyn must complete to get the MariaDB server running.
To set up a MariaDB server using Docker on a RHEL system, Carolyn can follow these steps:
Install Docker: Carolyn should install Docker on the RHEL system if it is not already installed. She can follow the instructions for her specific RHEL version from the official Docker documentation.
Pull the MariaDB image: Carolyn should pull the official MariaDB Docker image from the Docker Hub registry using the following command:
- docker pull mariadb
- Run the MariaDB container: Carolyn can run a container from the MariaDB image with the following command:
- docker run --name my-mariadb -e MYSQL_ROOT_PASSWORD=my-secret-pw -d -p 192.168.1.15:3306:3306 mariadb
- Verify the MariaDB container: Carolyn can verify that the MariaDB container is running correctly by using the
docker pscommand, which lists all running containers. She should see a container with the name
my-mariadbin the list.
- docker ps
- Connect to the MariaDB server: Carolyn can connect to the MariaDB server using a MySQL client such as the
mysqlcommand-line tool. She can run the following command to connect to the server from the host system:
- mysql -u root -pmy-secret-pw -h 192.168.1.15
- This command connects to the MariaDB server running in the container with the root user and password specified earlier.
Once Carolyn completes these steps, the MariaDB server should be up and running and available for all employees to use at the IP address 192.168.1.15.