Linux

Ubuntu boots to initramfs BusyBox message

0

Thinking that installing a virtual kernel for Ubuntu 11.04 would allow my VM to run as paravirtualized (PV) and allow my XenServer Tools to work, I was sadly mistaken.

Once the XenServer Ubuntu VM rebooted, I was no longer able to boot and just received a BusyBox initramfs prompt.

Grub2 is supposed to allow you to hold Shift to get to the grub menu but this did not work at all for me. Just kept seeing a blank screen and eventually the initramfs screen. I think this is a XenServer limitation, as I was trying from the VM console.

The version of grub2 is 1.99 beginning with Ubuntu 11.04 and we can boot with the LiveCD to ChRoot and remove the wrong kernel. Older versions should work too, but I am just letting you know what I was facing.

Boot the appropriate Ubuntu LiveCD (needs to be the exact same bit/version of your installed OS).

Next, mount your disk assuming your /boot partition is not on a separate partition:

sudo mount /dev/sda1 /mnt
for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt$i; done
sudo chroot /mnt

Once ChRooted run apt-get remove linux-image-<your-version-to-remove> (review boot/grub/grub.cfg to see what the version is you want to remove: vmlinuz-2.6.32-13-virtual):

apt-get remove linux-image-2.6.38-13-virtual
exit chroot by pressing CTRL-D
for i in /sys /proc /dev/pts /dev; do sudo umount /mnt$i; done
sudo umount /mnt
sudo reboot

For further details please review the Ubuntu Community Help on ChRoot

Install Adobe Flash Player on CentOS

0

After installing CentOS 6.2 you will want to make Firefox happier and get Adobe Flash Player.

Once finished, select open with Package Installer, press OK, and input your root password when prompted.

Exit Firefox and reopen it and you’re done.

 

Upgrade Openfire on Red Hat Enterprise Linux

1

How to upgrade from Openfire 3.7.0 to Openfire 3.7.1 with a MySQL database on RHEL

 

Download the Openfire RPM package

wget http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire-3.7.1-1.i386.rpm

 

 

Stop the openfire service

sudo /sbin/service openfire stop

 

 

Backup the openfire directory and MySQL database to the current working directory

sudo tar -czf openfire-3.7.0.tgz -C / opt/openfire

mysqldump -u openfireuser -p openfire > openfire-3.7.0-1.sql

 

u – user name for this database

p – prompt for the database user password

(this is the database user password you created during the initial install of the Openfire)

 

 

Update using RPM

sudo rpm -Uvh openfire-3.7.1-1.i386.rpm

 

U – Upgrade

v – Verbose information

h – Hashes print to show extraction of package

 

 

Start the openfire service

sudo /sbin/service openfire start

 

Notes

The database will automatically be updated for you. There were no issues going from 3.7.0 to 3.7.1.

Prevent yum from updating RHEL to a new release

1

Sometimes you will run into a scenario where you need to keep an OS at certain version due to vendor support. Case in point, Citrix XenServer currently says it will support up to Red Hat Enterprise Linux 5.4 as a guest OS. You might also want to remain at a certain version due to change management policies.

In this example I like to use yum to keep my RHEL guest current with security and bug fixes. The problem I ran into is that Red Hat has released a new minor version of it’s Enterprise Linux 5.x, and so yum wants to update to it. Well have no fear, as there is one line you need to add to yum.conf to solve your problem.

sudo yum nano /etc/yum.conf

add this within [main]: exclude=redhat-release*

exit and save changes

Now you can run sudo yum update and you will still be at your RHEL 5.4 version (issue cat /etc/redhat-release to double check)

Cacti name-based virtual host for Apache

0

I wanted to monitor my networking gear using Cacti. Below is my Apache httpd.conf to use name-based virtual hosting.
CentOS / RHEL:

sudo nano /etc/httpd/conf/httpd.conf (needed to uncomment the following line)

NameVirtualHost *:80

sudo nano /etc/httpd/conf.d/cacti.conf (add the virtual host lines around the existing Directory ones..and change to your network address subnet)

<VirtualHost *:80>

ServerAdmin noc@mydomain.com
DocumentRoot /usr/share/cacti
ServerName traffic.mydomain.com

<Directory /usr/share/cacti/>
Order Deny,Allow
Allow from 192.168.1.0/24
</Directory>

LogLevel warn
ErrorLog logs/traffic.mydomain.com-error_log
CustomLog logs/traffic.mydomain.com-access_log combined

</VirtualHost>

To make the changes take effect: sudo /sbin/service httpd reload

To make sure the httpd service restarts at boot: sudo /sbin/chkconfig httpd on

Also don’t forget to turn on the Cacti cronjob that polls the devices,use sudo nano /etc/cron.d/cacti and uncomment the following line:  */5 * * * *     cacti   /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1

To get a better understanding on DNS issues and Apache read: HERE

Upgrade to RHEL 5.4 redhat-lsb depsolving issue

2

Today I went to upgrade my RedHat Enterprise Linux server and had a minor hiccup.  I received the following error when issuing: sudo yum update

Missing Dependency: /bin/cpio is needed by package redhat-lsb-3.1-12.3.EL.i386 (installed)

The fix is simply run sudo yum clean all OR you can remove the redhat-lsb package and then continue your update…either will work.
Command: sudo yum remove redhat-lsb (answer Y to continue the removal process)

After that re-issue sudo yum update and you should be well on your way to a happy 5.4 upgrade.

How to upgrade to Red Hat 5.4

sudo /sbin/service iptables stop (I had to do this as my box hung up trying to reboot)

sudo yum clean all

sudo yum update

sudo reboot

Update: I would like to thank the users providing the comments mentioning yum clean all.

How to install eAccelerator on Debian 5

1

Installing eAccelerator requires a matter of minutes of your time. Please read through all the steps before proceeding!

  1. sudo apt-get install build-essential re2c php5 php5-dev
  2. sudo mkdir -p /var/cache/eaccelerator
  3. sudo chown www-data:www-data /var/cache/eaccelerator
  4. sudo chmod 0644 /var/cache/eaccelerator
  5. wget http://bart.eaccelerator.net/source/0.9.5.3/eaccelerator-0.9.5.3.tar.bz2
  6. tar xjvf eaccelerator-0.9.5.3.tar.bz2
  7. cd eaccelerator-0.9.5.3
  8. phpize
  9. ./configure
  10. make && sudo make install
  11. sudo chmod 0644 /usr/lib/php5/20060613/eaccelerator.so
  12. sudo nano /etc/php5/conf.d/eaccelerator.ini (see below)
  13. sudo /etc/init.d/apache2 restart

In step 12 input the following content for eaccelator.ini:

extension="eaccelerator.so"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/var/cache/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"

All done! It really does help improve the performance of WordPress blogs and similar projects.

Upgrade Openfire via RPM

0

Upgrading Openfire is VERY simple to do with RPM. The following example is what I used on a RedHat server:

  1. wget http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire-3.6.4-1.i386.rpm
  2. sudo rpm -Uvh openfire-3.6.4-1.i386.rpm

This will upgrade your Openfire rpm installation as well as automatically stop and start the service. If you need to see how to install from scratch using RPM, see my previous post here.

In case you were wondering what the -Uvh portion of the command does:
U – tells rpm to upgrade the package
v – verbose, tells you what it’s doing
h – displays hash marks to show the upgrade’s progress

Free instant messaging server – Openfire 3.6.3

0

Looking for a free open source solution to deploy IM for your business?  Look no further. The folks over at Ignite Realtime have a great product that is painless to implement.

Pick your flavor of host. It will run on a myriad of operating systems: FreeBSD, Linux, and Windows to name a few.

If you prefer FreeBSD, openfire is in ports. I highly recommend that you install it that way, as it will create a startup script that can be very handy. Being that I very rarely have to reboot any of my *nix servers, I often forget that there were services that I have to manually start.  The only real heads up I will mention is that FreeBSD will have you manually dump a Sun java update into /usr/ports/distfiles.  The FreeBSD port installation will provide the link to get it- this is because of licensing reasons.  Note: you won’t be able to use wget, so just save yourself the hassle and fetch it on a Windows machine and (s)ftp the file over.

Is Linux your cup of tea? Try the .rpm as it includes the JRE to run the server.  However compiling openfire via ant is just as easy.

Administering the openfire service is simple as pie.  No apache or IIS to configure..it deploys it’s own webserver via java.

When it comes to the MySQL database setup I will say the documentation is a little lacking for novices. Here is a little help (assuming you have mysql already installed and configured)

mysql -u root -p
CREATE DATABASE openfire;
GRANT ALL PRIVILEGES ON openfire.* TO "openfireuser"@"localhost" IDENTIFIED BY "mysecretpassword";
FLUSH PRIVILEGES;
EXIT

In the above statement keep the quotes where you see them. Cut and Paste is your friend. Just change, as necessary, the pieces that are in italics.

Their provided documentation and community should be able to guide you through the rest of the install. When I get a chance I will post a document of all my steps.

DOWNLOAD HOWTO PDF

Go to Top