Thursday, September 27, 2007

installing vserver in FC6

I had a project where I needed lot of virtual machines. I looked through the systems that are available, and found vserver to be the most suitable one for me. There are advantages and disadvantages of using vserver. On the positive side I can create a large number a of VMs with little hardware resources. This is to me the most important. On the other hand I had to compromise by having to settle to have all my VMs as same as my host OS. vserver have only one kernel so if for example my host is FC6 so is all my VMs. I dont think vserver is supported by Windows, but almost all LINUX flavors do.

'http://linux-vserver.org/Installation_on_Fedora' is a good place to find out how to install vserver on FC6, or any FC for that matter. I followed it and its very helpful, though I ran into some problems and had to fight through them, fun times :).

I had yum not working properly most of the time and had to reinstall couple of times...
then the most important thing when you remove the current kernel and install the new kernel (vserver enabled kernel).
1. check whether its installing during yum; see whether its going to the correct repo. then its about 16M
2. go to /boot and check whether all the files are relating to the new kernel installed.
3. most important, for me it didnt change the 'menu.list' file so I had to do it manually
*title is just the name, this is shown during boot time
*kernel should be given the file with 'vmlinuz' last part of it 'root=...' leave it alone
*initrd should have the img file
now reboot.
keep your fingers crossed hopefully you dont have to discover anything...

Wednesday, September 26, 2007

giving sudo permisions to user

its good practice not to work as 'root' all the time. Use root only when you really need to (root is too powerful be used as a regular user). Ubuntu by default will not let you login as 'root'. It always uses 'sudo' command. But this is not the case with FC, in FC you can be root. So better practice lets give the user sudo permissions.

Users who can use 'sudo' command is controlled by the sudoers file in /etc. you have to add the user to this file with level of permissions you are willing to give him. In my case I need to do everything so the following command will make me a sudoers user and give me all permissions.

echo ' username ALL=(ALL)ALL' >>/etc/sudoers

to limit the level of permission on sudo read the sudoers file in /etc

Wednesday, July 18, 2007

Installing apache2 and php5 on linux

first if there is any of these already exist in your system disable them (or make your life easy and use them). there is a great site describe this step by step.

http://dan.drydog.com/apache2php.html

if you are using Fedora (I use FC6) after installing https you should disable SELinux feature. Otherwise when you try to run httpd it will give you an error.
When giving the options to "./configure" in both httpd and php, give the ones you only need. Giving etra optins will not harm you but might have to do more edditing on config files. I recomend just configureing the opting you are going to use.
When compiling source (if you are like me) rather than installing from a rpm, its good practice to compile not as root. For security reasons and for the sake of simplisity.



Monday, April 23, 2007

common Linux commands

unpack archive:
tar -zxvf file_name.tar.gz
tar -xvf file_name.tar

create archive:
tar -czvvf file_name.tar.gz folder_name

copy files:
cp source_file1 source_file2 ... destination_folder/
cp -r source_folder destination_folder/ (-r for recursive -f force)
scp filename_path user@hostname:/destination/path/ (-r recursive -f force)

make directory:
mkdir folder_name

remove file(s):
rm file_name (-r recursive 'use when removing directories', -f to force 'when you dont want to keep answering yes to all the prompts)

Sunday, April 22, 2007

intro

this blog contain info on different software and related technical information. This for my personal use and anyone looking for information in this area.