CentOS / Red Hat IPv6 Network Configuration
Setting up IPv6 on CentOS, and for that matter RHEL and Fedora Linux, is quite straight forward. You need to edit just two files:
1. /etc/sysconfig/network-scripts/ifcfg-
2. /etc/sysconfig/network
- Configure the IP address. For example, for interface eth0, edit /etc/sysconfig/network-scripts/ifcfg-eth0 and make the necessary changes as below.
DEVICE=eth0
HWADDR=00:22:15:17:CC:C1
BOOTPROTO=static
IPADDR=192.168.1.2
NETMASK=255.255.255.0
NETWORK=192.168.1.0
BROADCAST=192.168.1.255
IPV6INIT=yes
IPV6_AUTOCONF=no
IPV6ADDR=<ipv6 address>
ONBOOT=yes
Schedule tasks on Linux using crontab
If you’ve got a website that’s heavy on your web server, you might want to run some processes like generating thumbnails or enriching data in the background. This way it can not interfere with the user interface. Linux has a great program for this called cron. It allows tasks to be automatically run in the background at regular intervals. You could also use it to automatically create backups, synchronize files, schedule updates, and much more. Welcome to the wonderful world of crontab.
Crontab
The crontab (cron derives from chronos, Greek for time; tab stands for table) command, found in Unix and Unix-like operating systems, is used to schedule commands to be executed periodically. To see what crontabs are currently running on your system, you can open a terminal and run:
sudo crontab -l
To edit the list of cronjobs you can run:
sudo crontab -e
This wil open a the default editor (could be nano or pico, if you want you can change the default editor) to let us manipulate the crontab. If you save and exit the editor, all your cronjobs are saved into crontab. Cronjobs are written in the following format:
* * * * * /bin/execute/schedulescript.sh
Read more…
How to upgrade Linux kernel
How do I upgrade my Linux kernel? I would like to upgrade kernel without compiling from source code i.e. binary upgrade. How do I perform the actual upgrade of the kernel in Linux?
You need to compile kernel only if:
- You need custom made kernel for specific task such as embedded kernel.
- Apply third party security patches.
- You need to apply specific patch to Linux.
How to install UnixBench ?
UnixBench is the original BYTE UNIX benchmark suite, updated and revised by many people over the years.
The purpose of UnixBench is to provide a basic indicator of the performance of a Unix-like system; hence, multiple tests are used to test various aspects of the system’s performance. These test results are then compared to the scores from a baseline system to produce an index value, which is generally easier to handle than the raw scores. The entire set of index values is then combined to make an overall index for the system.
Read more…
10 Tips to Keep Email Out of the Spam Folder
by Tweak on October 6, 2010
in Domain/Hosting, Servers
1. Be Compliant with the CAN-SPAM Act
If you are sending “any electronic mail message, the primary purpose of which is the commercial advertisement or promotion of a commercial product or service,” then you must comply with the following 7 main requirements (or face penalties up to $16,000) [5]:
- Don’t use false or misleading header information
- Don’t use deceptive subject lines
- Identify the message as an ad
- Tell recipients where you’re located
- Tell recipients how to opt-out of receiving future email from you
- Honor opt-out requests promptly
- Monitor what others are doing on your behalf
If your email contains only transactional emails or relationship content, then you are exempt from these rules; however, you must still not include false or misleading routing information.
Read more…
Installing Nginx on CentOS 5
Nginx, pronounced “Engine X”, is a high-performance Web server and reverse proxy. It was created by Igor Sysoev for rambler.ru, Russia’s second-largest Web site. Rambler has used Nginx since summer 2004, and it’s currently serving about 500 million requests per day. Like Apache, Nginx is used by some of the largest Web sites in the US, including WordPress , Hulu and MochiMedia. As of May 2010, Nginx is the third most popular Web server across all domains.
Read more…
Config Nginx as a Reverse Proxy
Using Nginx as a reverse proxy is great for a few reasons. Firstly it handles static content very well. It is able to handle the requests and serve static content much faster and this has cut our page load time in about half (using YSlow with a clear cache). The memory footprint of Nginx is very small so this extra speed increase is worth every megabyte. Secondly, it allows for quick and easy migration of your Apache services to another server. Through the config files you are able to specify an IP of your server and a port. If your apache server is taking a pounding it wouldn’t be difficult to move it to another server and just change the proxy IP to your now remote server.
If you haven’t installed Nginx, please read here
Read more…
How to install memcached
Memcached is a very popular open source object caching server. It was developed to speed up livejournal.com by Danga Interactive. We use memcached for a lot of our sites. We use it for different purposes but one main purpose is to cache query results so we don’t have to keep hitting database. As most of the people who work with databases know it is costly to keep hitting database for same information over and over.
When you run the Memcached daemon, it runs and listens on a specific port. One of the things Memcached does lack is security. Memcached will let anybody who can make a connection to its port have full access to all objects. So you would have to run a firewall to block unauthorized access. It is usually wise to do put firewall on it even if you trust everybody on the same network since accidents do happen. That said, let’s get memcached installed!
Read more…
Benchmarking Your Site with ‘http_load’
http_load is a stunningly useful HTTP benchmarking utility that gives you a rough idea of how many hits per second a server is capable of serving. You simply tell it what pages to grab, and how many “clients” it should run in parallel; it gives you back useful information about the average fetches per second and the average, minimum, and maximum response times. It’s no substitute for a solid profiler to dig into the hows and whys of your application’s performance, but it’s great at telling you when you’re “good enough” to launch.
Installing http_load on OS X
- Download from http://www.acme.com/software/http_load/
- Open terminal, cd to the directory where the archive is and unzip
$ tar xvzf http_load-12mar2006.tar.gz - Move to that directory
$ cd http_load-12mar2006 - Run
$ make - Run
$ sudo make install
Check / List Running Services
Q. How do I list all currently running services in CentOS / RHEL / Fedora Linux server ?
A. There are various ways and tools to find and list all running services under CentOS / RHEL / Fedora Linux systems.
service command – list running services
service --status-all
service --status-all | grep ntpd
service --status-all | less
Read more…