This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@rhel7 ~]# id || pwd | |
uid=0(root) gid=0(root) groups=0(root) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@rhel7 ~]# foo || id | |
-bash: foo: command not found | |
uid=0(root) gid=0(root) groups=0(root) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 | |
[root@rhel7 ~]# foo && id | |
-bash: foo: command not found | |
[root@rhel7 ~]# foo ; id | |
-bash: foo: command not found | |
uid=0(root) gid=0(root) groups=0(root) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@localhost ~]# groupadd admin | |
[root@localhost ~]# useradd -G admin user1 | |
[root@localhost ~]# useradd -G admin user2 | |
[root@localhost ~]# useradd -G admin user3 | |
[root@localhost ~]# useradd -u 300 user4 | |
[root@localhost ~]# id user4 | |
uid=300(user4) gid=506(user4) groups=506(user4) | |
[root@localhost ~]# echo "user" | passwd --stdin user1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@rhel7 ~]# yum install nfs nfs-utils -y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Hostname | |
[root@localhost ~]# hostnamectl set-hostname db.example.corp | |
[root@localhost ~]# init 6 | |
[root@db ~]# | |
# dba | |
[root@db ~]# groupadd oinstall | |
[root@db ~]# groupadd dba | |
[root@db ~]# useradd -g oinstall -G dba oracle | |
[root@db ~]# passwd oracle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setsebool -P httpd_read_user_content 1 | |
setsebool -P httpd_anon_write 1 | |
setsebool -P httpd_can_network_connect_db 1 | |
setsebool -P httpd_can_check_spam 1 | |
setsebool -P httpd_can_network_memcache 1 | |
setsebool -P httpd_can_sendmail 1 | |
setsebool -P httpd_enable_homedirs 1 | |
setsebool -P httpd_execmem 1 | |
setsebool -P httpd_mod_auth_pam 1 | |
setsebool -P httpd_use_sasl 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chown -R apache.apache /var/www/html/ | |
find /var/www/html/ -type f -exec chmod 640 {} \; | |
find /var/www/html/ -type d -exec chmod 750 {} \; | |
yum install policycoreutils-python -y | |
semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/storage(/.*)?" | |
semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/bootstrap/cache(/.*)?" | |
restorecon -Rv /var/www/html/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# disable selinux | |
echo SELINUX=disabled > /etc/sysconfig/selinux | |
echo SELINUXTYPE=targeted >> /etc/sysconfig/selinux | |
setenforce 0 | |
# disable firewall | |
systemctl disable firewalld |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script will check the selinux value in both bash and /etc/sysconfig/selinux | |
# This block checks selinux value in /etc/sysconfig/selinux | |
echo "==============================================================" | |
echo -e "Checking Selinux value in /etc/sysconfig/selinux:\n" | |
mode=$(grep ^SELINUX /etc/sysconfig/selinux | head -1 | cut -f2 -d'=') | |
case $mode in | |
"permissive") echo "Selinux is in PERMISSIVE mode in /etc/sysconfig/selinux"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
wait_for_cr() { | |
observatorium_cr_status="" | |
target_status="Finished" | |
timeout=$true | |
interval=0 | |
intervals=600 | |
while [ $interval -ne $intervals ]; do | |
echo "Waiting for" $1 "currentStatus="$observatorium_cr_status |