Here’s a quick and dirty, no-frills bash script to install the HP Server Management Tools on Ubuntu Server. As is, it will install the command line utilities to configure ILO and your RAID controllers. You can look up the other package names available for your distribution by examining the Packages file as in this example here:
In Ubuntu, the best way to ensure that the firewall is up and running and that your packet filtering or mangling rules are in place any time the network connection comes up, you should create a rule in the /etc/network/if-up.d folder. An alternative approach to that would be to put a “post-up” rule on whatever interface in you /etc/network/interfaces file. From my experience, so that your firewall rules can be easily maintained as well having the ability to make comments for each rule, it’s ideal to take advantage of the iptables-save and iptables-restore functionality.
In order to follow this procedure, the first time you set up the firewall, you will have to manually add all the firewall rules and then issue the iptables-save command. For sake of saving time, I will just provide you with the contents of my config file that can be restored with the iptables-restore < config_file command. Continue reading “OpenMCU-ru – DSCP Based QoS Packet Tagging Rules for Linux IP Tables”
Backup Exec on Linux, otherwise known as RALUS, is great but it has no provisions for limiting it’s disk I/O or CPU usage during different periods of the day. Unfortunately, BE for Windows doesn’t have that option either, so get on it Symantec, nudge, nudge.
If you’re like me, you might have backup jobs on File Servers that span several terabytes worth of data that can essentially run for a day or two on their own. The problem is that people get really bitchy when things don’t run at the normal speed that they are used to and the inconsiderate assholes don’t give a shit when you explain why.
Well here are a few cron job tasks that I came up with to help relieve some of that pressure on your file server. Continue reading “BackupExec 2012 – How to Limit CPU Usage and Disk I/O on RALUS with Cron Jobs”
- From the bash prompt, log into the FTP server with your username and password.
- Change into the preferred directory with the “cd” command.
- If doing a restore, issue the “dir” command to list the directory’s contents to find the correct filename of the disk image you want to restore. Continue reading “Linux – How to Backup or Restore a Disk Image from an FTP Server”
I ran into a problem yesterday where I could SSH into a remote machine but a majority of the bash commands weren’t working and were giving an “Input/ouput error”, including the shutdown command. Upon further inspection, this particular machine, which was a thin client with 128 MB of flash storage, had run out of drive space. The suggestion on this stack exchange article worked perfectly so I just wanted to document it here for my own future reference.
As long as you have root access, you can run the following command to force a system reboot: Continue reading “Linux – Force Remote Reboot of System”
Pieced together from various tutorials on the web with a lot of my own additions, here is a snippet of SQL that will alter or convert all tables in a database from “MyISAM” to “InnoDB”. As long as your MySQL user account has privileges to create stored procedures, all you have to do is simply edit the @DATABASE_NAME variable at the top of the script and run it in PhpMyAdmin if you’ve got it. Enjoy! Continue reading “MySQL Script – Alter/Convert All Tables in a Database from MyISAM to InnoDB”
To greatly increase your server’s TCP performance, you can enable the use of Syn Cookies, increase the buffer size, and enable TCP window scaling. Creds go to this site. Edit the “etc/sysctl.conf” file and enter the following:
Continue reading “Ubuntu Server – Increase TCP Performance”
If you experience problems updating or installing packages on your server with “apt-get”, it may be because the package manager is trying to connect via IPv6 and is failing. I found this info here. To disable IPv6 completely, edit the “/etc/sysctl.conf” file and place the following text in there:
Continue reading “Ubuntu Server 14.04 – Disable IPv6”
As many of you may have noticed, upgrading to Apache 2.4 can either cause the “apache2” service to fail to start altogether or may render your websites more or less inoperable. Luckily, there are only a few minor changes to look for that will hopefully get you back up and running with a minimal period of downtime.
- During the upgrade, if you decided to keep your original versions of your config files like I did (always a good idea), you will then end up with some extra files with “.dpkg-dist” on the end of the filename. These are the latest version of the config files. As a best practice with any major config file changes, I would suggest to create a backup directory and get in the habit of copying any files with the date in the filename before you make changes. There have been many instances where this has come back to bite me in the past and I have learned my lesson over the years so save yourself some time, stress, and headaches.
cd /etc/apache2 mkdir backups mv apache2.conf backups/apache2.conf.09_25_2014 Continue reading "Ubuntu Server – Apache 2.4 Upgrade Changes"
MySQL Activity Report is a handy database reporting tool that uses RRD (Round Robin Database) to display hourly, daily, weekly, and monthly graphs and gives helpful performance tuning recommendations for your MySQL installation. Here are the steps to install it from source on Ubuntu Server 12.04.3 while logged in as root. This assumes that you have the build-essentials, header files, etc necessary to build software already installed.
1. Change into your local source directory
2. Download the source files for rrdtool and mysqlard
wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.8.tar.gz wget http://gert.sos.be/downloads/mysqlar/mysqlard-1.0.0.tar.gz
3. Unzip the files
tar -zxvf rrdtool-1.4.8.tar.gz tar -zxvf mysqlard-1.0.0.tar.gz
4. Change into the rrd directory
5. Install dependencies
apt-get install libpango1.0-dev libxml2-dev
6. Build rrdtool (will install to the /opt/rrdtool-1.4.8 directory)
Continue reading “Install MySQL Activity Report from Source”