wiredgorilla
This user hasn't shared any biographical information
Posts by wiredgorilla
Linux server tip: force reboot/shutdown
Apr 23rd
Forcing reboot
A Linux Server is not Windows XP and if reboot fail you usually still connect by SSH and do something. This commands will show you how to remotely hard reboot machine. Hard reboot mean that shutdown scripts will not run and machine reboot immediately without syncing hard disk drives, shutdown applications etc, it’s more like hitting the reset button.
echo 1 > /proc/sys/kernel/sysrq
echo b > /proc/sysrq-trigger
This commands enable sysrq and after this calls fast reboot. If you want to force shutdown machine try this.
Force shutdown
echo 1 > /proc/sys/kernel/sysrq
echo o > /proc/sysrq-trigger
This came handy, when I had a server that had some IO error and it can no longer read from disk, only few cached binaries into memory kept it running (kernel, SSHD, bash), I could still access the machine via SSH but can no longer do anything, forcing the reboot as mentioned above was my only resort, and it worked like charm…
How To Set Up A Load-Balanced MySQL Cluster With MySQL 5.1
Apr 18th
This tutorial is based on Falko Timme’s tutorial for MySQL Cluster 5.0. It shows how to configure a MySQL 5.1 cluster with five nodes: 1 x management, 2 x storage nodes and 2 x balancer nodes. This cluster is load-balanced by an Ultra Monkey package which provides heartbeat (for checking if the other node is still alive) and ldirectord (to split up the requests to the nodes of the MySQL cluster).
More >
How to update Virtuozzo Node to the newest Kernel
Apr 6th
Virtuozzo includes a utility to update itself and the included templates. To run this, you will need to ssh into the hardware node and execute the command:
vzup2date
In order to update the templates, add a -t to the command thusly:
vzup2date -t
It should be noted that if Virtuozzo is installed on the server, the standard Redhat up2date command should never be run.
If you are running Virtuozzo on a Windows server, then you can run the Virtuozzo update utility accessed through the Start menu.
E-mail Alert on Root SSH Login
Mar 27th
Want to be notified instantly when someone logs into your server as root?
No problem, check out this nice tutorial on email notification for root logins. Keeping track of who logs into your server and when is very important, especially when you’re dealing with the super user account. We recommend that you use an email address not hosted on the server your sending the alert from
Turbo charging MySQL by setting up the query cache
Mar 27th
To make sure MySQL uses the query cache, there are a few variables you need to set in the configuration file . Usually its my.cnf or my.ini so check on your server with the shell command locate , in our case we are running on a CentOS 5.2 distro and to its my.cnf located in /etc so we opened it by using : nano /etc/my.cnf
Moving mySQL DBs between servers
Mar 27th
Moving mySQL DBs from one server to another:
mysqldump -uUSER -pPASSWORD txp_database > txp_database.sql
puts the entire thing in one nicely portable text file.
on a new server it takes
mysql -uUSER -pPASSWORD txp_database < txp_database.sql
to import it.
Linux Cron Jobs Explained
Mar 27th
Cron allows users to automate repetitive system administration tasks such as tape backups, database reorganization, and general file cleanups (such as emptying log files and queues).
The Crontab File’s Syntax
To tell cron what you want it to run, and how often you want it to run it, you need to create a crontab file. A crontab file is just a text file with the following syntax:
Taking backup of mysql database using cron
Mar 27th
Taking backup of mysql database using cron
Create a file called database_backup.sh and also an empty directory called mysql_backup. The database_backup.sh script should have the following info :
PRM (Process Resource Monitoring) in Linux Servers
Mar 26th
The great people from R-FX Networks are bringing us a number of powerfull tools for the Linux Server enviroment
PRM (Process Resource Monitoring) monitors the process table on a given system and matches process id’s with set resource limits in the config file or per-process based rules. Process id’s that match or exceed the set limits are logged and killed; includes e-mail alerts, kernel logging routine and more…
How to Reset your Linux Root Password
Mar 26th
Whenever you can’t remember Root password, you can read this tutorial and do step by step to Reset it … You can log in with single-user mode and create a new root password.
Reboot your computer. When GRUB is presenting the menu list, follow those instructions:
CentOS – what happened to netconfig in 5.1
Mar 26th
For whatever reason CentOS decided to drop netconfig and renamed it to
system-config-network
Common SSH Commands and Linux Shell Commands
Mar 26th
We’ve put together some of the more frequently used SSH commands or linux shell commands, and organized them by name so you can easily find a command, their description and how to use it. This guide will continue to be updated and should not be considered a complete list of SSH commands or linux shell commands, but commands, we found, often used. If you would like to add to this guide, please email us and let us know.
The old JavaScript cPanel Server exploit
Mar 20th
The Javascript exploit has been an old saga on a few Linux distros running cPanel and Plesk .
The compromise is at the root level and a rootkit has been installed. This rootkit will attach to several syscalls within the kernel and begin serving malicious javascript to random web visitors.
This root compromise is not related to cPanel directly, as it has been reported on many different control panels on many different servers. The compromise is at the system level, and only Redhat 4, CentOS 4, and FC6 appear to be vulnerable at this time. We are actively researching this issue and will have an in-depth analysis of current information posted soon. More >
CentOS 5.1 Server Setup: LAMP, Email, DNS, FTP, ISPConfig (a.k.a. The Perfect Server)
Feb 26th
This tutorial shows how to set up a CentOS 5.1 based server that offers all services needed by ISPs and web hosters: Apache web server (SSL-capable), Postfix mail server with SMTP-AUTH and TLS, BIND DNS server, Proftpd FTP server, MySQL server, Dovecot POP3/IMAP, Quota, Firewall, etc. This tutorial is written for the 32-bit version of CentOS 5.1, but should apply to the 64-bit version with very little modifications as well.
How to install mod_gzip on a Linux server
Jan 27th
This guide will show you how to install mod_gzip on your Linux server
mod_gzip – what’s that, anyway?
mod_gzip – serving compressed content by the Apache webserver
mod_gzip is an external extension module for the WWW’s most popular web server Apache, created in autumn, 2000.
Its implementation allows for using the compression method gzip for a significant reduction of the volume of web page content served over the HTTP protocol.
Moving large files from one linux server to your new linux server
Jan 26th
Ok, so you like to move your 3 gig backup from your old server to your new server, but the the good old wget command is not doing the trick?
There is an easy way around with the scp command
How to check and stop if DDoS attack is going on.
Sep 20th
Distributed denial-of-service attacks
In a distributed attack, the attacking computers are often personal computers
with broadband connections to the Internet that have been compromised by viruses
or Trojan horse programs. These allow the perpetrator to remotely control machines
to direct the attack, and such an array of computers is called a botnet. With
enough such slave or zombie hosts, the services of even the largest and most well-connected
websites can be disrupted.
How can I repair corrupt MySQL tables?
Sep 12th
Every so often, MySQL
tables have a way of corrupting themselves. MySQL offers a quick and
painless method of repairing those tables.
How to mount and unmount a drive in linux
Aug 26th
How To Mount A Drive In Linux
This simple step by step guide will show you how to mount a new hard drive or partitions onto your Linux server
Downgrading MySQL5 to MySQL4.1 in cPanel
Aug 25th
For whatever reason , some people still want to run the old version of MySQL4.1 in there new cPanel servers, which seems a little issue , as the default database version in new cPanel server installs is MySQL5.
Here are the simple steps to downgrade the database (this should only be done on a new server without any account on it yet)
