CentOS

Mounting an FTP/SMB site as a Linux Share


sudo apt-get install curlftpfs
mkdir mntdir #make mountpoint
FTPPW=12345678
FTPUSER=username%40site.org # if contains @ then use %40
sudo curlftpfs -o allow_other,uid=1000 ftp://$FTPUSER:$FTPPW@ftp.site.org 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

Resources

There is an article at: http://www.howtoforge.com/ubuntu-8.04-server-install-xen-from-ubuntu-rep... which is the basis, but *don't do the wget and dpkg steps* since the patches are now in hardy

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
  • make a directory and mount a remote file system on it
mkdir /music
sshfs -o allow_other root@sv.isnew.org:/backups/music /music
  • to unmount system
fusermount -u /music
  • to mount a samba/windows share:
sudo smbmount //sv/comm

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 server1.example.com > /etc/hostname   #and here
hostname server1.example.com   #and here for good measure
/sbin/service network restart    #restart the network

for Ubuntu you just need

echo server1.example.com > /etc/hostname   #here
vi /etc/hosts                              #and here

Regenerate ssh server key

  • The standard way to do this is:
rm /etc/ssh/ssh_host_*
dpkg-reconfigure openssh-server

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

Resources

There is an article at: http://www.howtoforge.com/ubuntu-7.10-server-install-xen-from-ubuntu-rep... 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

Installing Drupal on RimuHosting.com

Here is how to install Drupal on a CentOS 5.4 Linux installation, hosted on http://RimuHosting.com

Installing Drupal on Centos5

Please note that more up-to-date instructions are available here:
http://drup.org/installing-drupal-rimuhostingcom

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:
    WMVER=1.630-1
    wget http://prdownloads.sourceforge.net/webadmin/webmin-$WMVER.noarch.rpm
    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: http://drup.org/acquia-drupal-svn
  22. Well done! You are finished
Syndicate content