Increase gpg file encryption security using AES256

In order to increase backup files or sensitive information using gpg you should specify gpg using AES256 cipher algo. AES256 will use 256 bit key, it’s open encryption algorithm and it’s been approved by the NSA for top secret information.

Add to the gpg the following switch:

–cipher-algo=AES256

The full command line to encrypt file using gpg with AES256 key:

gpg –cipher-algo=AES256 -c file.tgz

It’s quite of bit of typing every time and I prefer to set-up alias

alias gpg=’gpg –cipher-algo=AES256′

you can add it to your ~/.bashrc or any other profile file that is executed when you login into the system. The alias syntax may change if you are using different bash viagra india.

Encrypt your backup files for top security using GPG

Remember that you should have backups for your servers or web site. If a disaster strikes you can restore the data quickly and easily – you should keep the backup files SAFE, because backup usually includes system configuration, users, passwords and various other very important data. And by safe we mean that none except you can access it. We usually keep backup files on a remote server(s) to make sure no data backups are kept in one physical location.

For extra security we do encrypt backup files using gpg (Gnu Privacy Guard) a Linux command line software in our case. Gpg provides very high security level and encryption.

You can encrypt file using GPG:

gpg -c filename.tar

<enter password 2 x times>

If you are running gpg command first time a key may be generated before you can enter the password.

File unencryption can be done by:

gpg -c filename.tar.gpg

There you go 🙂

For folks who want to encrypt backup files or any other files using automated scripts use the following command:

echo PASSWORD_HERE | gpg –passphrase-fd 0 -c FILENAME_HERE

Linux or Windows platform for hosting

Sorry folks, I had finally some time to edit this original junk article and I have came up with a much better version now.

Linux or Windows platform for web hosting? This question is asked many times and let me show you what OS works the best for you.

Linux is free and you should not pay yearly renewal or update fees (a good choice is Centos, Debian, Fedora and others). Suse Enterprise (SLES) and Redhat Enterprise does have licensing costs and/or update subscriptions that cost recurring fees. If you go Windows route you will need to pay for OS and the fees are quite high for web servers. While you can download a lot of free software for Linux, Windows applications tend to cost something.

Many folks prefer to use Linux, Apache, MySQL and PHP (LAMP), indeed, you can run Apache MySQL and PHP on Windows OS as well. Developing PHP applications using MySQL as a database is quick and easy and it doesn’t cost a dime. Of course if you need to run ASP or use MS SQL as a database server you will need to go with Windows OS for your server hardware.

My suggestion is to always use Linux for hosting, unless you need to run Windows specific applications – ASP code, MS SQL as a database back end and other Windows specific software.

Don’t forget that you will need to manage the server and keep up with security patches etc – some people prefer Windows as it’s more user-friendly and easier to update, however it comes with a price.

Local port range sysctl tuning for high bandwidth Linux servers

Most of the Linux distributions specify local port range from 16384 to 65536 and this may be too low for very high bandwidth and busy boxes, let’s say SMTP, Hosting, POP3/Imap and Proxy servers.

You can adjust this setting by editing /etc/sysctl.conf file and replacing the default:

net.ipv4.ip_local_port_range = 16384 65536

with

net.ipv4.ip_local_port_range = 1024 65536
I like viagra sans ordonnance

MySQL information_schema error when using mysqldump utility

Some users report problem when backup is performed using mysqldump command line utility under the Linux OS. The version affected in our tests were 4.1.20.

mysqldump: Got error: 1044: Access denied for user ‘root’@’localhost’ to database ‘information_schema’ when using LOCK TABLES

To quickly fix this problem use the following switch when running mysqldump for MySQL database backups and upload to site.

mysqldump -u root -p –all-databases –single-transaction > all.sql

Cpanel upcp Yaml Syck problem

Some Cpanel systems miss Yaml::Syck package and /scripts/upcp display a bunch of errors. To fix this problem you may install YAML-Syck package by downloading tar package (at this time of writing the filename: YAML-Syck-0.91.tar.gz ) or you can always run perl Cpan shell to install it the easy way 😉

(login to root account and execute in shell:)

perl -MCPAN -e shell

install YAML::Syck

Enjoy 😉

Replace multiple file text string using grep and perl

If you have a folder with a lot of files in a directory and with a specific string that you want to change you can do it in seconds using grep and perl command line:

grep -R –files-with-matches ‘OLDSTRING’ . | sort | uniq | xargs perl -pi~ -e ‘s/OLDSTRING/NEWSTRING/’

Where OLDSTRING is the string you want to find and replace with NEWSTRING.

FFmpeg installation problem on the Linux

If you are installing ffmpeg from the SVN and getting the following error log after running ./configure:

./configure
Unable to create and execute files in /tmp.  Set the TMPDIR environment
variable to another directory and make sure that /tmp is not mounted
noexec.
Sanity test failed.
If you think configure made a mistake, make sure you are using the latest
version from SVN.  If the latest version fails, report the problem to the
ffmpeg-devel@mplayerhq.hu mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file “config.err” produced by configure as this will help
solving the problem.

This means that your /tmp directory has noexec flag and you need to disable it for a while.

Check your /etc/fstab

and locate /tmp

It probably shows something similar below:

LABEL=/tmp              /tmp                    ext3    defaults,noexec,nosuid        1 2

Remove noexec and it should be something like:

LABEL=/tmp              /tmp                    ext3    defaults,nosuid        1 2

Issue

umount /tmp && mount /tmp

And you are set, proceed with the installation of ffmpeg.

If you are  getting the following error after running umount and/or mount:

umount: /tmp: device is busy

Then some process is having a file handle open to /tmp directory. You will need to shutdown the daemon before issuing mount commands ukviagras.com.

List all installed rpm packages and it’s size

Virtual Private Server disk space are usually limited so it’s always good to know how much space on the hard drive takes some rpm package. You can delete it later – you will save your disk space and of course some bandwidth if updates are released later on.

rpm -qa –qf ‘%10{SIZE}\t%{NAME}\n’ | sort -k1,1n

This applies to Linux environment servers only vardenafil20mg.me.