(Plus Web Server httpd, mariaDB, php)
This template is for virtualbox use, output will be ovf file and vmdk file. You could use this template to create a virtual centOS based web server by import the ovf file to virtualbox.
- Packer
- Virtualbox
- ISO Images - CentOS 8
- Text Editor - Whatever you like
- Install virtualbox in host machine
- Download & Install Packer to host machine
- Run Packer with the template
- Download packer from the website
- Extract packer, the output is a file named "packer"
- Move/copy the file to /usr/lib/bin
$ mv packer /usr/lib/bin`
- Update PATH to packer
$ export PATH=$PATH:/usr/lib/bin/packer $ source ~/.bashrc
- Run Packer
- Validate file template packer :
$ packer validate template.json
- Build Packer Virtualbox Image :
$ packer build template.json
- Validate file template packer :
In CentOS-template.json, don't forget to change this line :
"iso_url": "/PATH/TO/YOUR/ISO FILE",
"iso_checksum": "OUTPUT FROM ISO CHECKSUM",
"ssh_password": "1234",
In ks.cfg file, change this line to your choice
rootpw --plaintext 1234
timezone Asia/Jakarta --isUtc
useradd febryan
echo "febryan" | passwd febryanpass --stdin
gpasswd -a febryan wheel
echo "febryan ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/febryan
In lamp.sh, change this line to your choice
NEW_MYSQL_PASSWORD="1234"
Moch. Febryandana Nurfahri ([email protected])