Category: Linux

Manual Compile of NGINX on CentOS 7

Summary:Normal NGINX that has been installed from repositories does not forward raw TCP packets. Since…

Installing Apache on Centos 7

The easy methodsudo yum clean allsudo yum -y updatesudo yum -y install httpd php-pearsudo firewall-cmd…

How to Use Google SMTP Relay with Sendmail

Check to see if TLS is enabled:# sendmail -d0.1 -bv rootMake a certs directory:# mkdir…

A Few Todos while Securing Apache Server

- Install mod_security - Set expose_php = Off in php.ini - Set SecResponseBodyAccess Off in…

How to Remove Apps in CentOS/Redhat

Check the repo directory: [root@localhost ~]# ls /etc/yum.repos.d CentOS-Base.repo CentOS-Sources.repo CentOS-CR.repo CentOS-Vault.repo CentOS-Debuginfo.repo docker-ce.repo CentOS-fasttrack.repo…

How to Install HAProxy using PKGSRC

How To use PKGSRC: https://www.netbsd.org/docs/pkgsrc/creating.htmlInstall dependencies:yum install epel-release -yyum groupinstall "Development Tools" -yyum install vim…

Network Time Service for Centos 7

yum install -y ntp ntpdatesystemctl start ntpdsystemctl enable ntpdntpdate -u -s 0.north-america.pool.ntp.org 1.north-america.pool.ntp.org 2.north-america.pool.ntp.org 3.north-america.pool.ntp.orgsystemctl…

Some Common Gitlab Commands

To ignore SSL Cert errors: git config --global http.sslVerify "false"   # checkout changed file…

How To Compile Package Source

Notice: currently, we know of a few releases of PKGSRC that are usable as it…

Baseline Server Image

OS: CentOS 7 Minimal Obtain ISO from https://www.centos.org/download/ Create Bootable USB On a CentOS 6.5, Ubuntu…

Setup LAMP using RedHat 7

// Add a new user and set it with root privileges: sudo su useradd {root-user}…

Nginx Apache SSL Example

-------------- NGINX -> ** /etc/nginx/sites-available/domainx.conf**server {listen 80;servername xxxxx.domainx.com;return 301 https://$host$requesturi;}server {listen 443 ssl;servername xxxxx.domainx.com;sslcertificate /etc/nginx/ssl/cert_domainx.crt;sslcertificatekey…

Error: 502 Gateway Error

Explanation: 502 Gateway Error generally means connection problems with an upstream proxy. In this instance,…

Apache HTTPd

# Install Apacheyum install httpd# Configure Apachevim /etc/httpd/conf/httpd.conf##### Change portNameVirtualHost 127.0.0.1:8080Listen 127.0.0.1:8080######### Set DocumentRootDocumentRoot "/var/www/kimconnect"######…

NGINX

# Create nginx.repovim /etc/yum.repos.d/nginx.repo#### content ####[nginx]name=nginx repo baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/ gpgcheck=0 enabled=1###############sudo yum update nginxsudo service nginx…

Docker ShellInABox

docker run --privileged -p 9999:4200 -e SIAB_PASSWORD=password-e SIAB_SUDO=true sspreitzer/shellinabox:latestdocker run --privileged -d --name shellinabox -p…

Firewall-Cmd

# Show all zonesfirewall-cmd --get-zones# Show Active Zonesfirewall-cmd --get-active-zones# Show Trusted Zonefirewall-cmd --list-all --zone=trusted# Set…

Linux Swapfile

There's a more updated post here. Setup Swap on CentOS Localhost:# Check memory & swap…

Docker Alpine OpenSSH-Client

# Run Alpinedocker run --privileged --restart always --name alpine alpine:latest# Run these commands from inside…

MySQL on Localhost

Modern versions of MySQL is memory intensive; thus, it is a pre-requisite that an adequate…