29 Search results

For the term "update-rc.d".

Some Bash Scripts to Manage Remote Server

Script to Update and Upgrade #! /bin/bash chmod 700 /usr/bin/apt-get chmod 700 /usr/bin/aptitude chmod 700 /usr/bin/dpkg swapoff -a chown username:username /home/username/* chmod 700 /home/username/* apt-get update && apt-get upgrade –show-upgraded -y Script to End session and Harden some critical files #! /bin/bash swapon -a chmod 000 /usr/bin/apt-get chmod 000 /usr/bin/aptitude chmod 000 /usr/bin/dpkg find /home/username/ -size 0 -exec rm '{}'...

Php 7.3 How to Upgrade Debian Linux 9

This is not as simple as even the most popular blogs explain. sudo apt update sudo apt -y install software-properties-common dirmngr apt-transport-https lsb-release ca-certificates sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg echo “deb https://packages.sury.org/php/ $(lsb_release -sc) main” | sudo tee /etc/apt/sources.list.d/php7.3.list sudo apt update sudo apt -y install php7.3 php7.3-cli php7.3-fpm php7.3-json php7.3-pdo php7.3-mysql php7.3-zip php7.3-gd php7.3-mbstring php7.3-curl php7.3-xml php7.3-bcmath php7.3-json sudo...

Linux Services | View All | Stopping and Starting

How To see all services available, type in terminal; sudo service –status-all How To see all services running and ports, type in terminal; sudo netstat -plunt How To remove a service from startup at boot sudo update-rc.d -f [service] remove How To enable a service to run on boot sudo update-rc.d [service] defaults

Ubuntu Dynamic MOTD Message of the Day

How to create Dynamic Message of the Day in Ubuntu cd /etc/update-motd.d/ any script you want ubuntu to run and display at login is here. create your own or modify those in this directory.

Customize Debian Linux grub2

I wanted to remove the splash image while booting Debian 7 Wheezy and watch the code execute, while also use the full screen resolution.

Harden Debian 7 Server with PSAD

Install Port Scan Attack Detector on Debian 7 Server sudo apt-get install psad sudo vi /etc/psad/psad.conf change these lines EMAIL_ADDRESSES me@seleads.com; HOSTNAME my.seleads.com; HOME_NET NOT_USED; ALERTING_METHODS noemail; IPT_SYSLOG_FILE /var/log/syslog; EMAIL_LIMIT_STATUS_MSG N; ENABLE_AUTO_IDS Y; AUTO_IDS_DANGER_LEVEL 2; AUTO_BLOCK_TIMEOUT 2592000; ENABLE_AUTO_IDS_EMAILS N; Restart psad psad -R psad –sig-update psad -H sudo vi /etc/cron.hourly/save-bad-ips #!/bin/sh PATH=/usr/share:/usr/sbin:/usr/bin:/sbin:/bin /sbin/iptables-save -c > /tmp/iptables-save.txt #echo “SELECT lockdown_IP FROM...

Change Default Editor at System Level

In a terminal type sudo apt-get install vim sudo update-alternatives –config editor Follow the instructions to choose vim.basic – your display will vary Debian Ubuntu Change Default Editor Nano VI Gedit at System Level sudo vi /etc/vim/vimrc uncomment line 20 – syntax on logout & login

How To Uninstall Google Talk

sudo apt-get purge google-talkplugin /usr/share/doc/google-talkplugin —————————————- sudo add-apt-repository ppa:ubuntu-audio-dev/ppa sudo apt-get update sudo apt-get install linux-alsa-driver-modules-$(uname -r) alsa-driver alsa-utils

ddclient for DynDNS Setup on Debian 7

# Configuration file for ddclient # # /etc/ddclient.conf ## ddclient configuration file daemon=600 # check every 600 seconds syslog=yes ## Default options protocol=dyndns2 ## Detect IP with our CheckIP server use=web, web=checkip.dyndns.com, web-skip=’IP Address’ server=members.dyndns.org # log update msgs to syslog mail-failure=user@gmail.com # Mail failed updates to user pid=/var/run/ddclient.pid # record PID in file. ## DynDNS username and password here...

Install Virtualbox on Debian 7

I have had some problems getting backups (of VMs) to run on new Debian Desktop installations. Best practice seems to be as follows: sudo apt-get install dkms Use the latest from https://www.virtualbox.org/wiki/Linux_Downloads sudo vi /etc/apt/sources.list deb http://download.virtualbox.org/virtualbox/debian wheezy contrib deb http://http.debian.net/debian/ wheezy-backports main contrib wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add – sudo apt-get update sudo apt-get install virtualbox-4.3

Setup a LAMP Server on Debian or Ubuntu

This setup is for Virtual Host server – not a dedicated server with a single domain SSH to your server ssh root@IP Update Debian/Ubuntu apt-get update && apt-get upgrade –show-upgraded -y Create User How To Create a User in Linux Setup SSH for Remote Access With GPG Keys – No Password How To Setup SSH for Remote Access IMPORANT –...

LAMP upgrade to mysql 5.6 PHP installation appears to be missing the MySQL extension which is required by WordPress

WordPress Running on Debian 7 LAMP After upgrading to MYSQL 5.6 from 5.5 I encountered several problems, first of which was a completely broken MySQL then Apache2.3 and PHP complained. This ultimately cleaned up the mess: sudo dpkg –purge mysql-client-core-5.6 sudo dpkg –purge mysql-client sudo dpkg –purge mysql-server-core-5.6 sudo dpkg –purge mysql-common sudo dpkg –purge mysql sudo apt-get –purge remove...

SEO Sitemap

What is a sitemap? A sitemap is a exactly what it says, a map of pages you want the search engines (and people) to know about. Generally they are for search engines to quickly read and index your site. A sitemap is more important for a new website or for a site with poorly designed navigation. But it is widely...

How To Manage Fail2ban Using Perl Script On Remote Servers and A Control Mysql Database

Earlier I posted how to use a text file created by a script to similarly manage the rogue IPs that Fail2ban bans. The problem with using scripts and crontab is that it is not reporting in real-time. The method here works in real-time because Fail2ban reports directly to the MySQL on the control server. On each remote you’ll want to...