# Gerson Barreiros - Technical Engineering Blog > Personal engineering notes, DevOps practices, Cloud Infrastructure (AWS, OCI, Kubernetes), Linux system administration, and high-performance server tuning by Gerson Barreiros. ## About - Author: Gerson Barreiros - Canonical URL: https://blog.gerson.barreiros.nom.br/ - Primary Topics: Cloud Architecture, Amazon Web Services (AWS), Oracle Cloud (OCI), Kubernetes, Linux SysAdmin, SSH Automation, Performance Tuning, High Availability - Feed: https://blog.gerson.barreiros.nom.br/feed/ - Full Context: https://blog.gerson.barreiros.nom.br/llms-full.txt ## Agent Navigation & Content Negotiation Any article on this blog can be consumed as clean Markdown without HTML noise by appending `?format=markdown` to the URL or by sending the HTTP header `Accept: text/markdown`. ## Core Technical Articles - [Proxy using SSH Tunnel](https://blog.gerson.barreiros.nom.br/proxy-using-ssh-tunnel/): Browse the web using your SSH Server by making it a proxy server (Published: 2015-06-20, Topics: Amazon AWS, SysAdmin, Tips, Ubuntu) - [How to auto start services on boot in Centos / Redhat / Oracle Linux?](https://blog.gerson.barreiros.nom.br/how-to-auto-start-services-on-boot-in-centos-redhat-oracle-linux/): To auto start services in Centos, Redhat or Oracle Linux, you can use builtin chkconfig utility. It is located in /sbin directory. If you are a regular user (non-root), then /sbin may not be in your path. Therefore, you may have to use the full path to access the chkconfig utility. (Published: 2015-01-23, Topics: SysAdmin, Tips) - [Display calibration](https://blog.gerson.barreiros.nom.br/display-calibration/): As i use the same monitor (LG W2486L) on my Nintendo Wii U and my Computer, i never payed attention to the fact that sometimes i couldn’t see some colors just for a wrong calibration on my display. I do use Adobe Lightroom on this PC to make enhancements to the photos, but how could […] (Published: 2014-10-13, Topics: Tips) - [YouTube Background for Android 2.2+](https://blog.gerson.barreiros.nom.br/youtube-background-for-android-2-2/): I made this app for a friend that wanted to play YouTube videos just to listen it’s audio. So it’s very simple, works by sharing the URL from YouTube video with the app or googleing the video. (for instance: go to google.com and type “YouTube lindsey”. Unfortunately, google removed this app from google play, so […] (Published: 2014-08-05, Topics: Android, Tips) - [AWS lowers cloud pricing by launching the T2 instance type that can burst to handle occasional workload spike](https://blog.gerson.barreiros.nom.br/aws-lowers-cloud-pricing-by-launching-the-t2-instance-type-that-can-burst-to-handle-occasional-workload-spike/): T2 instances are Burstable Performance Instances that provide a baseline level of CPU performance with the ability to burst above the baseline. The baseline performance and ability to burst are governed by CPU Credits. Each T2 instance receives CPU Credits continuously at a set rate depending on the instance size.  T2 instances accrue CPU Credits when they […] (Published: 2014-07-05, Topics: Amazon AWS, SysAdmin) - [htop](https://blog.gerson.barreiros.nom.br/htop/): htop is an interactive text-mode system-monitor process viewer for GNU/Linux. It aims to be a better ‘top’. It shows a frequently updated list of the processes running on a computer, normally ordered by the amount of CPU usage. Unlike top, htop provides a full list of processes running, instead of the top resource-consuming processes. htop […] (Published: 2014-06-30, Topics: SysAdmin, Ubuntu) - [Simplify your life with SSH config file and ClusterSSH](https://blog.gerson.barreiros.nom.br/simplify-your-life-with-ssh-config-file-and-clusterssh/): If you’re anything like me, you probably log in and out of a half dozen remote servers on a daily basis. And if you’re even more like me, you have trouble remembering all of the various usernames, remote addresses and command line options for things like specifying a non-standard connection port or forwarding local ports to the […] (Published: 2014-06-25, Topics: SysAdmin) - [Apache restrict access based on IP address to selected directories](https://blog.gerson.barreiros.nom.br/apache-restrict-access-based-on-ip-address-to-selected-directories/): Apache web server allows server access based upon various conditions. For example you just want to restrict access to url http://subdomain.domain.com/ (mapped to /var/www/subdomain directory) from 192.168.1.0/24 network (within intranet). Apache provides access control based on client hostname, IP address, or other characteristics of the client request using mod_access module. (Published: 2014-06-24, Topics: SysAdmin, Ubuntu) - [How to solve "Falling back to the standard locale" in ubuntu](https://blog.gerson.barreiros.nom.br/how-to-solve-falling-back-to-the-standard-locale-in-ubuntu/): Sometimes you can get a error like this: perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_PAPER = “pt_BR.UTF-8”, LC_ADDRESS = “pt_BR.UTF-8”, LC_MONETARY = “pt_BR.UTF-8”, LC_NUMERIC = “pt_BR.UTF-8”, LC_TELEPHONE = “pt_BR.UTF-8”, LC_IDENTIFICATION = “pt_BR.UTF-8”, LC_MEASUREMENT = “pt_BR.UTF-8”, LC_TIME = “pt_BR.UTF-8”, LC_NAME = “pt_BR.UTF-8”, LANG […] (Published: 2014-06-23, Topics: SysAdmin, Ubuntu) - [Powerful Redmine in AWS](https://blog.gerson.barreiros.nom.br/powerful-redmine-in-aws/): In this post i will show how to make a installation of Redmine in AWS with some nice tools from AWS (EC2, RDS, S3, SES, ElastiCache) and making it auto scalable. (Published: 2014-06-22, Topics: Amazon AWS, SysAdmin, Ubuntu) - [Amazon SES – Simple Email Service](https://blog.gerson.barreiros.nom.br/amazon-ses-simple-email-service/): Amazon Simple Email Service (Amazon SES) is a highly scalable and cost-effective bulk and transactional email-sending service for businesses and developers. Subscription is quick and is on pay-as-you-go basis. (Published: 2014-06-19, Topics: Amazon AWS, SysAdmin) - [How to use different user and group for just one Virtual Host in Apache](https://blog.gerson.barreiros.nom.br/use-different-user-group-just-one-virtual-host-apache/): With the mpm-itk that is a multi-processing module (MPM) you can run each virtualhost with it’s own user id and group id. This is basically used to make a shared hosting secured, since you don’t have to make all virtualhosts folders readeable by apache user. mpm-itk is based on the traditional prefork MPM, which means it’s non-threaded; […] (Published: 2014-06-13, Topics: SysAdmin, Ubuntu) - [How to fix "Can't locate Search/Xapian.pm in @INC"](https://blog.gerson.barreiros.nom.br/how-to-fix-cant-locate-search-xapian-pm-in-inc/): Error: Can’t locate Search/Xapian.pm in @INC (you may need to install the Search::Xapian module) (@INC contains: /path/to/something /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at (eval 143) line 2. BEGIN failed–compilation aborted at (eval 143) line 2. To fix this, in ubuntu 14.04, just type: sudo apt-get install libsearch-xapian-perl (Published: 2014-06-12, Topics: SysAdmin, Ubuntu) - [How to fix "Can't locate Sort/Naturally.pm in @INC"](https://blog.gerson.barreiros.nom.br/how-to-fix-cant-locate-sort-naturally-pm-in-inc/): Can’t locate Sort/Naturally.pm in @INC (you may need to install the Sort::Naturally module) (@INC contains: /path/to/something /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at (eval 145) line 2.BEGIN failed–compilation aborted at (eval 145) line 2. To fix this, in ubuntu 14.04, just type: sudo apt-get install libsort-naturally-perl (Published: 2014-06-10, Topics: SysAdmin, Ubuntu) - [How to disable apache logs](https://blog.gerson.barreiros.nom.br/how-to-disable-apache-logs/): To disable apache logs (access and error log) to avoid excessive writes on local server just open your /etc/apache2/apache2.conf file and change the following two configurations: Change the ErrorLog to: ErrorLog /dev/null Now, open /etc/apache2/conf.d/other-vhosts-access-log and comment the following line #CustomLog /var/log/apache2/other_vhosts_access.log vhost_combined In addition, you might have to change these files: /etc/apache2/sites-available/default-ssl /etc/apache2/sites-available/default and change […] (Published: 2014-06-10, Topics: SysAdmin, Ubuntu) - [Delete ElasticBeanstalk bucket](https://blog.gerson.barreiros.nom.br/delete-elasticbeanstalk-bucket/): If you can’t delete Elastic Beanstalk created bucket, first remove all files inside the bucket then remove de bucket policy. Go to the bucket’s policy (bucket –> properties –> permissions –> edit bucket policy) Save the change to the Bucket Policy. Now right click on the bucket and press delete. (Published: 2014-06-06, Topics: Amazon AWS, SysAdmin) - [AWS t1.micro 100% CPU](https://blog.gerson.barreiros.nom.br/aws-t1-micro-100-cpu/): Sometimes EC2 CloudWatch monitoring shows 100% CPU usage but when you ssh to your instance and try to see it with ‘top’ you can’t understand what is happening. Probably, Amazon is “borrowing” some of your CPU cycles to give to someone else who needs it – this is standard practice for a virtualised environment where physical server […] (Published: 2014-06-03, Topics: Amazon AWS, SysAdmin) - [Recovering a Lost Amazon EC2 SSH Key](https://blog.gerson.barreiros.nom.br/recovering-a-lost-amazon-ec2-ssh-key/): In case you lose your Amazon EC2 SSH Key, and can’t login in your instance. This isn’t a big problem if your instance is EBS based and you use an Elastic IP. 1. Upload your new SSH Key, or use one made by AWS 2. Make an AMI of your instance 3. Launch a new machine from your AMI, […] (Published: 2014-06-01, Topics: Amazon AWS, SysAdmin) - [RDS Instance Sizes, maximum concurrent connections](https://blog.gerson.barreiros.nom.br/rds-instance-sizes-maximum-concurrent-connections/): RDS Class max_connections t1.micro 34m1.small 125m1.medium 296m1.large 623m1.xlarge 1263m2.xlarge 1441m2.2xlarge 2900m2.4xlarge 5816 (Published: 2014-05-31, Topics: Amazon AWS, SysAdmin) - [How to waste less money with AWS](https://blog.gerson.barreiros.nom.br/how-to-waste-less-money-with-aws/): First of all, you need to carefully select the region where you are going to stablish your servers. US-EAST / US-WEST-2 are the cheaper regions by the time that i wrote. You can check the prices per regions on the links at the end of this post. Using AWS for almost a year in free tier, i […] (Published: 2014-05-02, Topics: Amazon AWS, SysAdmin) - [How to change timezone in ubuntu](https://blog.gerson.barreiros.nom.br/how-to-change-timezone-in-ubuntu/): To change timezone in ubuntu, just use that in terminal: sudo dpkg-reconfigure tzdata (Published: 2014-05-02, Topics: SysAdmin, Ubuntu) - [How to survive with AWS EC2 T1.Micro instance](https://blog.gerson.barreiros.nom.br/how-to-survive-with-aws-ec2-t1-micro-instance/): With my t1.micro, i can host my personal redmine, git and blog. But i couldn’t do that with default settings. I have used swap on file to it and here is how you can do it: Copy & paste the code below: sudo su -c 'dd if=/dev/zero of=/var/swapfile bs=4096 count=524288chown root:root /var/swapfilechmod 0600 /var/swapfilemkswap /var/swapfileswapon […] (Published: 2014-05-01, Topics: Amazon AWS, SysAdmin, Ubuntu) - [Zabbix](https://blog.gerson.barreiros.nom.br/zabbix/): Very cool tool for sysadmins! Check it out! 🙂 http://www.zabbix.com/ (Published: 2014-02-09, Topics: Tips) - [Android Virtual Device (aka AVD) tunning](https://blog.gerson.barreiros.nom.br/android-virtual-device-aka-avd-tunning/): In order to make the Android emulator run faster and be more responsive, you can configure it to take advantage of hardware acceleration, using a combination of configuration options, specific Android system images and hardware drivers… My AVD API 18 config have intel processor, 768 RAM + 128MB VM Heap + Host GPU + Intel […] (Published: 2013-12-05, Topics: Android) - [CLI Database optimization](https://blog.gerson.barreiros.nom.br/cli-database-optimization/): MariaDB & MySQL: sudo apt-get install mysql-client mysqlcheck -h yourdatabasehost -u root -p --auto-repair --check --all-databases mysqlcheck -h yourdatabasehost -u root -p --auto-repair --optimize --all-databases PostgreSQL: vacuumdb -afvz -h yourdatabasehost -U postgres reindexdb -a -h yourdatabasehost -U postgres   *updated* November, 04, 2021 Docker example: docker exec -it postgres-server vacuumdb -afvz -U postgres (Published: 2013-11-27, Topics: Tips) - [Amazon Web Services – Free Tier](https://blog.gerson.barreiros.nom.br/amazon-web-services-free-tier/): How to get started with AWS free? Just go to http://aws.amazon.com/free/ and make your account. Credicard will be needed even for a free account. What can be done with the free account? It’s up to you! If you are going to make a light traffic website free tier can handle it. 🙂 You can have up […] (Published: 2013-11-23, Topics: Amazon AWS, SysAdmin) - [Check you website performance](https://blog.gerson.barreiros.nom.br/check-you-website-performance/): WebPageTest, GTmetrix, PageSpeed Insights and Website Grader can test your website and your webserver and helps you to see if you are using optimal configurations! (Published: 2013-11-23, Topics: Tips) - [GNU/Linux cli image optimizer](https://blog.gerson.barreiros.nom.br/gnu-linux-cli-image-optimizer/): There are some benefit from lossless recompression utilizing optipng for PNGs, gifsicle for GIFs and jpegoptim for JPGs. Optimized graphics transfer faster and provide a faster perceived response for clients. The following example will recursively optimize (without any loss of quality) all the graphics and image files on a server with the above commands installed and available. ubuntu: sudo apt-get install […] (Published: 2013-08-31, Topics: Tips) ## Optional Links & Machine-Readable Resources - [Full LLM Context Archive](https://blog.gerson.barreiros.nom.br/llms-full.txt): Complete summaries and excerpts of all articles for single-turn ingestion. - [RSS / Atom Feed](https://blog.gerson.barreiros.nom.br/feed/): Machine-readable syndicate feed for recurring agent monitors. - [XML Sitemap](https://blog.gerson.barreiros.nom.br/sitemap.xml): Complete URL index.