0
NFS configuration for central storage
Posted by
DevOps
Configuring The NFS Server
1. Edit the /etc/exports file to allow NFS mounts of the /home directory with read/write access.
/home *(rw,sync,no_subtree_check)
The option listing for each machine will describe what kind of access that machine will have. Important options are:
ro: The directory is shared read only; the client machine will not be able to write to it. This is the default.
rw: The client machine will have read and write access to the directory.
no_root_squash: By default, any file request made by user root on the client machine is treated as if it is made by user nobody on the server. (Excatly which UID the request is mapped to depends on the UID of user "nobody" on the server, not the client.) If no_root_squash is selected, then root on the client machine will have the same level of access to the files on the system as root on the server. This can have serious security implications, although it may be necessary if you want to perform any administrative work on the client machine that involves the exported directories. You should not specify this option without a good reason.
no_subtree_check: If only part of a volume is exported, a routine called subtree checking verifies that a file that is requested from the client is in the appropriate part of the volume. If the entire volume is exported, disabling this check will speed up transfers.
sync: By default the exportfs command will use async behavior, telling a client machine that a file write is complete - that is, has been written to stable storage - when NFS has finished handing the write over to the filesysytem. This behavior may cause data corruption if the server reboots, and the sync option prevents this.
2. Let NFS read and make /home available to the network with the exportfs command.
# exportfs -a
3. Make sure the required nfs, nfslock, and portmap daemons are running and configured to start after the next reboot.
# chkconfig nfslock on
# chkconfig nfs on
# chkconfig portmap on
# service portmap start
# service nfslock start
# service nfs start
Configuring The NFS Client
1. Make sure the required netfs, nfslock, and portmap daemons are running and configured to start after the next reboot.
# chkconfig nfslock on
# chkconfig netfs on
# chkconfig portmap on
# service portmap start
# service netfs start
# service nfslock start
2) Now mount the NFS (server) /home to this client
# mount server:/home /home/
3) Configure autofs edit your /etc/auto.master file to refer to file /etc/auto.home for mounting information whenever the /home directory is accessed. After five minutes, autofs unmounts the directory.
# vi /etc/auto.master
/home /etc/auto.home --timeout 600
4) Edit file /etc/auto.home to do the NFS mount whenever the /home directory is accessed.
# vi /etc/auto.home
* -fstype=nfs,soft,intr,rsize=8192,wsize=8192,nosuid,tcp server:/home/&
Read more
1. Edit the /etc/exports file to allow NFS mounts of the /home directory with read/write access.
/home *(rw,sync,no_subtree_check)
The option listing for each machine will describe what kind of access that machine will have. Important options are:
ro: The directory is shared read only; the client machine will not be able to write to it. This is the default.
rw: The client machine will have read and write access to the directory.
no_root_squash: By default, any file request made by user root on the client machine is treated as if it is made by user nobody on the server. (Excatly which UID the request is mapped to depends on the UID of user "nobody" on the server, not the client.) If no_root_squash is selected, then root on the client machine will have the same level of access to the files on the system as root on the server. This can have serious security implications, although it may be necessary if you want to perform any administrative work on the client machine that involves the exported directories. You should not specify this option without a good reason.
no_subtree_check: If only part of a volume is exported, a routine called subtree checking verifies that a file that is requested from the client is in the appropriate part of the volume. If the entire volume is exported, disabling this check will speed up transfers.
sync: By default the exportfs command will use async behavior, telling a client machine that a file write is complete - that is, has been written to stable storage - when NFS has finished handing the write over to the filesysytem. This behavior may cause data corruption if the server reboots, and the sync option prevents this.
2. Let NFS read and make /home available to the network with the exportfs command.
# exportfs -a
3. Make sure the required nfs, nfslock, and portmap daemons are running and configured to start after the next reboot.
# chkconfig nfslock on
# chkconfig nfs on
# chkconfig portmap on
# service portmap start
# service nfslock start
# service nfs start
Configuring The NFS Client
1. Make sure the required netfs, nfslock, and portmap daemons are running and configured to start after the next reboot.
# chkconfig nfslock on
# chkconfig netfs on
# chkconfig portmap on
# service portmap start
# service netfs start
# service nfslock start
2) Now mount the NFS (server) /home to this client
# mount server:/home /home/
3) Configure autofs edit your /etc/auto.master file to refer to file /etc/auto.home for mounting information whenever the /home directory is accessed. After five minutes, autofs unmounts the directory.
# vi /etc/auto.master
/home /etc/auto.home --timeout 600
4) Edit file /etc/auto.home to do the NFS mount whenever the /home directory is accessed.
# vi /etc/auto.home
* -fstype=nfs,soft,intr,rsize=8192,wsize=8192,nosuid,tcp server:/home/&
12
Read more
Multimedia support in OpenSuse 11.1 (MP3, MPEG-4, DiVX, etc.)
Posted by
DevOps
Why doesn’t OpenSuSe support MP3 ‘out of the box’?
Follow these instructions to get mp3 and other multimedia support on your OpenSuSe 11.1.
If you are using KDE - Download and run (execute) this
If you are using Gnome - Download and execute this
Want VLC player - Download and run this
This will enable you to have:
Flash
Java
Latest Amarok (with MP3 Support) for KDE, or Helix-Banshee for GNOME users
Encrypted DVD (libdvdcss)
Extra XINE Codecs, for DivX/Xvid etc. (libxine1)
K3b with MP3 Support (k3b-codecs)
Win 32 Codecs (w32codec-all)
And after sucesfull installation you should be able to play any media files.
OpenSuSe cannot include support for MP3 or DVD video playback or recording. MP3 formats are patented, and the patent holders have not provided the necessary licenses. OpenSuSe also excludes other multimedia software due to patent, copyright, or license restrictions, such as Adobe Flash Player and RealNetworks RealPlayer.That doesn’t mean you can’t play .mp3 files in OpenSuSe , it just takes a bit of work (not much).
Follow these instructions to get mp3 and other multimedia support on your OpenSuSe 11.1.
If you are using KDE - Download and run (execute) this
If you are using Gnome - Download and execute this
Want VLC player - Download and run this
This will enable you to have:
Flash
Java
Latest Amarok (with MP3 Support) for KDE, or Helix-Banshee for GNOME users
Encrypted DVD (libdvdcss)
Extra XINE Codecs, for DivX/Xvid etc. (libxine1)
K3b with MP3 Support (k3b-codecs)
Win 32 Codecs (w32codec-all)
And after sucesfull installation you should be able to play any media files.
1
How to change the Mysql users and root password
Posted by
DevOps
There are two way to change the mysql user and root password
mysqladmin
If you have never set a root password for MySQL, the server does not require a password at all for connecting as root. To setup root password for first time, use mysqladmin command at shell prompt as follows:
$ mysqladmin -u root password NEWPASSWORD
However, if you want to change (or update) a root password, then you need to use following command
$ mysqladmin -u root -p oldpassword newpass
Enter password:
Change MySQL password for other user
To change a normal user password you need to type (let us assume you would like to change password for nikesh):
$ mysqladmin -u nikesh -p oldpassword newpass
Changing MySQL root user password using mysql sql command
This is another method. MySQL stores username and passwords in user table inside MySQL database. You can directly update password using the following method to update or change password for user vivek:
1) Login to mysql server, type following command at shell prompt:
$ mysql -u root -p
2) Use mysql database (type command at mysql prompt):
mysql> use mysql;
3) Change password for user nikesh:
mysql> update user set password=PASSWORD("NEWPASSWORD") where User='nikesh';
4) Reload privileges:
mysql> flush privileges;
mysql> quit
Read more
mysqladmin
If you have never set a root password for MySQL, the server does not require a password at all for connecting as root. To setup root password for first time, use mysqladmin command at shell prompt as follows:
$ mysqladmin -u root password NEWPASSWORD
However, if you want to change (or update) a root password, then you need to use following command
$ mysqladmin -u root -p oldpassword newpass
Enter password:
Change MySQL password for other user
To change a normal user password you need to type (let us assume you would like to change password for nikesh):
$ mysqladmin -u nikesh -p oldpassword newpass
Changing MySQL root user password using mysql sql command
This is another method. MySQL stores username and passwords in user table inside MySQL database. You can directly update password using the following method to update or change password for user vivek:
1) Login to mysql server, type following command at shell prompt:
$ mysql -u root -p
2) Use mysql database (type command at mysql prompt):
mysql> use mysql;
3) Change password for user nikesh:
mysql> update user set password=PASSWORD("NEWPASSWORD") where User='nikesh';
4) Reload privileges:
mysql> flush privileges;
mysql> quit
0
Recovering deleted file using Foremost
Posted by
DevOps
Ever deleted an important file? I haven’t recently done this on Linux, but when I used Windows I had a utility for recovering deleted files.
Foremost is a command line utility for finding and recovering deleted files based on their type. It was origionally developed for the US Air Force Office of Special Investigations.
How is this type of data recovery possible? When you delete a file, the data is not really overwritten. The pointer in the filesystem to the file is simply removed so the disk area can be overwritten when necessary. The more the disk is written to after the file is deleted, the larger the chance it will be overwritten and become unrecoverable.
I decided to test out Foremost in a virtual machine. First, I created some JPEG images, deleted them, and emptied the trash. Next, I shutdown the system and booted up the Ubuntu 8.04 Beta live-CD. Live-CDs don’t write to the hard disk, so they work well for data recovery.
To install in Ubuntu is rather simple, just issue the standard “sudo apt-get install foremost” command. You will have to check if you use another distro if it’s in your repositories, if not, the source can be grabbed at the link at the top of the screen and can be compiled - check this.
You need to know your target partition’s path to recover from it. You can simply start System-Administration->Partition Editor in Ubuntu, or use fdisk, Qtparted or any partition editor to see what discs are for what purpose. I saw the the home partition is /dev/sda1 on my machine.
Let’s recover some JPEG images:
sudo foremost -t jpeg -i /dev/sda1
Now the -t switch denotes that you’re looking for a file type. The -i switch denotes you’re looking on a particular device. This command causes Foremost to create a directory called output and put every file it can recover in. This could take a while.
Foremost isn’t the greatest solution; it recovers every file it sees and doesn’t support very many file types. It is possible to add types to the /etc/foremost.conf file, but it doesn’t look an easy task. However, if you’ve lost a bunch of photos or documents, Foremost could be just what you need.
Check out the man pages for more.
Read more
Foremost is a command line utility for finding and recovering deleted files based on their type. It was origionally developed for the US Air Force Office of Special Investigations.
How is this type of data recovery possible? When you delete a file, the data is not really overwritten. The pointer in the filesystem to the file is simply removed so the disk area can be overwritten when necessary. The more the disk is written to after the file is deleted, the larger the chance it will be overwritten and become unrecoverable.
I decided to test out Foremost in a virtual machine. First, I created some JPEG images, deleted them, and emptied the trash. Next, I shutdown the system and booted up the Ubuntu 8.04 Beta live-CD. Live-CDs don’t write to the hard disk, so they work well for data recovery.
To install in Ubuntu is rather simple, just issue the standard “sudo apt-get install foremost” command. You will have to check if you use another distro if it’s in your repositories, if not, the source can be grabbed at the link at the top of the screen and can be compiled - check this.
You need to know your target partition’s path to recover from it. You can simply start System-Administration->Partition Editor in Ubuntu, or use fdisk, Qtparted or any partition editor to see what discs are for what purpose. I saw the the home partition is /dev/sda1 on my machine.
Let’s recover some JPEG images:
sudo foremost -t jpeg -i /dev/sda1
Now the -t switch denotes that you’re looking for a file type. The -i switch denotes you’re looking on a particular device. This command causes Foremost to create a directory called output and put every file it can recover in. This could take a while.
Foremost isn’t the greatest solution; it recovers every file it sees and doesn’t support very many file types. It is possible to add types to the /etc/foremost.conf file, but it doesn’t look an easy task. However, if you’ve lost a bunch of photos or documents, Foremost could be just what you need.
Check out the man pages for more.
Subscribe to:
Posts (Atom)

