You are here


Mounting an FTP/SMB site as a Linux Share

sudo apt-get install curlftpfs
mkdir mntdir #make mountpoint
FTPPW=12345678 # if contains @ then use %40
sudo curlftpfs -o allow_other,uid=1000 ftp://$FTPUSER:$ mntdir

The uid is needed if you want write access for a non-root user. Find it by typing id at the console.
You will have to edit /etc/fuse.conf to allow_other and also make sure the current user is a member of the fuse group:

adduser andrewf fuse

Add to /init/fstab using:

How to install an Ubuntu Hardy VM under CentOS/Red Hat Xen

My process is to create the VM under Ubuntu/Hardy and then move it across

fuse filesystem with SSH

  • install fuse on Ubuntu:
apt-get install sshfs smbfs
yum install kernel-devel
yum install --enablerepo=rpmforge fuse dkms dkms-fuse

Creating a new Xen Windows XP VM in CentOS 5.1

  1. /usr/sbin/lvcreate -L 10G -n vm_mymachine VolGroup00 #first create a logical volume for the machine
  2. dd if=/dev/scd0 of=/var/lib/xen/images/media/winxp.iso #create an ISO image of the XP cd-rom
  3. run the graphical virtual machine manager
  4. make the source of the installation: /var/lib/xen/images/media/winxp.iso
  5. format partition to FAT since then it is editable from within CentOS host
  6. the first reboot will fail. Before restarting, do the following:

Set hostname

To set the hostname in Red Hat / CentOS 5:

vi /etc/sysconfig/network   #change it here
vi /etc/hosts               #and here
echo > /etc/hostname   #and here
hostname   #and here for good measure
/sbin/service network restart    #restart the network

for Ubuntu you just need


How to install an Ubuntu VM under CentOS/Red Hat Xen

My process is to create the VM under Ubuntu/Gutsy and then move it across


There is an article at: which unfortunately has a number of flaws. For more information, see:

Creating a new Xen VM in CentOS 5.1

I would recommend not using LVM within a VM because it makes it harder to back up the files within the VM

/usr/sbin/lvcreate -L 5G -n vm_testvm VolGroup00 #first create a logical volume for the machine
/usr/sbin/lvcreate -L 512M -n vm_testvm_swp VolGroup00 #create the LV swap file
/sbin/mkswap /dev/VolGroup00/vm_testvm_swp


Installing Drupal on

Here is how to install Drupal on a CentOS 5.4 Linux installation, hosted on

  1. log in as root
    Update to latest version with:
    rm -f /etc/localtime
    ln -s /usr/share/zoneinfo/America/Toronto /etc/localtime
    apt-get update -y ; apt-get upgrade

Installing Drupal on Centos5

Please note that more up-to-date instructions are available here:

Here is how to install Drupal on a Centos5 Linux installation

  1. Install Centos5 including web server and mysql
  2. log in as root
  3. Update to latest version with: yum -y update yum ; yum -y update
  4. Install modules with: yum -y install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel system-config-securitylevel-tui
    Note that this is called system-confi-firewall in CentOS 6
  5. Enable .htaccess: cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.original
    vi /etc/httpd/conf/httpd.conf
    and in two places change AllowOverride None to All (may not be needed in CentOS 6
  6. Uncomment NameVirtualHost *:80
  7. Start apache with: service httpd start
  8. Run: system-config-securitylevel-tui and enable firewall for ssh and http, plus port 10000 for webmin
  9. Open a browser window pointed to the server to check if apache is running
  10. Create default page: echo "<html><head><title>Name of Server</title></head><body><h1>Name of Server</h1></body></html>" > /var/www/html/index.html
  11. Make sure server is running by visiting: http://servername/
  12. Create test script: echo "<html><head><title>Test Page</title></head><body><?php phpinfo(); ?></body></html>" > /var/www/html/testphp.php
  13. Make sure php is running by visiting: http://servername/testphp.php
  14. download and install webmin:
    rpm -U webmin-$WMVER.noarch.rpm
    system-config-firewall #to open port 10000
  15. Check it is working by visiting: http://servername:10000
  16. Use webmin to create a virtual server at /var/www/html with no server name. (This will be the default and must come first)
  17. Install MySQL with: yum -y install php-mysql mod_auth_mysql mysql-server php-gd php-mbstring
  18. Start MySQL: /etc/init.d/mysqld start
  19. Now setup MySQL: mysqladmin -u root password rootsqlpassword
  20. Make sure mysqld and httpd start on boot by checking the boxes: webmin / system / bootup and shutdown
  21. Download and install Drupal following the instructions here:
  22. Well done! You are finished


Subscribe to RSS - CentOS