Skip to content

Instantly share code, notes, and snippets.

@hariadi
Last active September 23, 2016 17:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hariadi/ed02183d93e6fe3d928cb2af143e631a to your computer and use it in GitHub Desktop.
Save hariadi/ed02183d93e6fe3d928cb2af143e631a to your computer and use it in GitHub Desktop.
RHEL 7.2

Rename Interface

vi /etc/default/grub

add net.ifnames=0 biosdevname=0 to end of GRUB_CMDLINE_LINUX

grub2-mkconfig -o /boot/grub2/grub.cfg
mv /etc/sysconfig/network-scripts/ifcfg-eno0 /etc/sysconfig/network-scripts/ifcfg-sgmt0

Edit /etc/sysconfig/network-scripts/ifcfg-sgmt0

Web Server

yum update
yum install -y policycoreutils-python setroubleshooting php-mysqli

Apache

systemctl start httpd.service
systemctl enable httpd.service

Firewall

firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload

SELinux

setsebool -P httpd_can_network_connect on
setsebool -P httpd_can_network_connect_db on
semanage fcontext -a -t httpd_sys_content_t "/var/www/jpa.gov.my(/.*)?"
semanage fcontext -a -t httpd_log_t "/var/www/jpa.gov.my/log(/.*)?"
semanage fcontext -a -t httpd_cache_t "/var/www/jpa.gov.my/cache(/.*)?"

MariaDB Database Server

Master Master Replication

firewall-cmd --permanent --add-port=3306/tcp

/etc/my.cnf.d/replication.cnf

bind-address = 10.21.1.10

server-id = 10 report_host = db01 log_bin = /var/log/mariadb/mariadb-bin log_bin_index = /var/log/mariadb/mariadb-bin.index relay_log = /var/log/mariadb/relay-bin relay_log_index = /var/log/mariadb/relay-bin.index

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment