This file contains 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
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm | |
dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm | |
dnf module enable php:remi-7.4 | |
dnf install php php-cli php-common | |
php -v |
This file contains 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
yum install mod_security -y | |
cd /etc/httpd/conf.d | |
ll mod_security.conf | |
httpd -M | grep security | |
yum -y install mod_security_crs | |
#deactivate if not use | |
/etc/httpd/modsecurity.d/activated_rules | |
service http restart |
This file contains 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 configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# execute it with the following command: | |
# bash set-wordpress-permissions.sh /var/www/<site_folder> | |
# | |
OWNER=apache # <-- wordpress owner | |
GROUP=apache # <-- wordpress group |
This file contains 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
ps aux | awk '{print $6/1024 " MB\t\t" $11}' | sort -n |
This file contains 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
nano /etc/yum.repos.d/MariaDB.repo | |
[mariadb] | |
name = MariaDB-10.3.14 | |
baseurl=http://yum.mariadb.org/10.3.14/centos7-amd64 | |
# alternative: baseurl=http://archive.mariadb.org/mariadb-10.3.14/yum/centos7-amd64 | |
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB | |
gpgcheck=1 | |
This file contains 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
yum install python-setuptools && easy_install pip | |
pip install shadowsocks | |
ssserver -p 443 -k password -m rc4-md5 | |
OR | |
sudo ssserver -p 443 -k password -m rc4-md5 --user nobody -d start | |
sudo ssserver -d stop |
This file contains 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
grep -rlw "tecadmin" /var/log |
This file contains 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
nano /etc/yum.repos.d/maria10-3.repo | |
[mariadb] | |
name = MariaDB | |
baseurl = http://yum.mariadb.org/10.3/centos7-amd64 | |
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB | |
gpgcheck=1 | |
yum -y upgrade maria* | |
systemctl restart mariadb |
This file contains 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
<VirtualHost *:80> | |
DocumentRoot /var/www/html/cloud | |
Redirect / https://192.168.100.131/ | |
</VirtualHost> | |
<VirtualHost *:443> | |
DocumentRoot /var/www/html/cloud | |
SSLEngine On | |
SSLCertificateFile /etc/ssl/certs/apache-selfsigned.crt | |
SSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key | |
</VirtualHost> |
This file contains 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
fdisk -l | |
fdisk /dev/sda2? | |
-->p | |
-->n | |
-->p | |
-> | |
-> | |
-->3 | |
-->w | |
reboot |