Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Access windows shared folders from Linux

You’ll need the cifs-utils package in order to mount SMB shares:

     sudo apt-get install cifs-utils

After that, just make a directory and mount the share to it. In this example, we will mount the folder to our Desktop for easy access.

     mkdir /path/to/mount_folder
     sudo mount.cifs //IP_of_winPC/Share   /path/to/mount_folder  -o user=windowUser

Then enter password & enjoy :) 
     cd /path/to/mount_folder

OCFS2 cluster – quick setup guide



OCFS2 is a POSIX-compliant shared-disk cluster file system for Linux capable of providing both high performance and high availability. Cluster-aware applications can make use of parallel I/O for higher performance. OCFS2 is mostly used to host Oracle Real application clusters (RAC) database on Linux clusters.

The below steps shows how to create ocfs2 filesystem on top a multipath’d SAN lun and mount it on Linux clusters.

1. Identify the nodes that will be part of your cluster.

2. Export/Zone the LUNs on the SAN end and check whether they are accessible on all the hosts of the cluster. (fdisk -l or multipath -ll)

3. If you need multipathing, configure multipath and the multipathing policy based on your requirement. For Linux multipath setup, refer Redhat’s multipath guide.

4. Create OCFS2 configuration file (/etc/ocfs2/cluster.conf) on all the cluster nodes.

Cài đặt thêm extension openssl vào PHP

Tải bản PHP tương ứng với bản đang chạy về server, giải nén
cd {php_dir (vừa giải nén)}/ext/openssl 
Chạy phpize (lưu ý phải chạy đúng với phiên bản php đang chạy trong trường hợp cài nhiều bản php trên server) Ví dụ:  sudo /u01/app/httpd2/php/bin/phpize
./configure –with-php-config=/u01/app/httpd2/php/bin/php-config
make
make install
Lưu ý: 
- Có thể file {php_dir (vừa giải nén)}/ext/openssl/config.m4  không tồn tại hoặc bị sai tên –> tìm file khác hoặc đổi lại tên là được.


How to remove all .svn directories from my application directories



xargs takes input, usually separated by newlines, and places them on the command line, so adding xargs makes what you had work:

find . -name .svn | xargs rm -fr

xargs is intelligent enough that it will only pass as many arguments to rm as it can accept. Thus, if you had a million files, it might run rm 1,000,000/65,000 times (if your shell could accept 65,002 arguments on the command line {65k files + 1 for rm + 1 for -fr}).

As persons have adeptly pointed out, the following also work:
find . -name .svn -exec rm -rf {} \; 
find . -depth -name .svn -exec rm -fr {} \; 
find . -type d -name .svn -print0|xargs -0 rm -rf 

The first two -exec forms both call rm for each folder being deleted, so if you had 1,000,000 folders, rm would be invoked 1,000,000 times. This is certainly less than ideal. Newer implementations of rm allow you to conclude the command with a + indicating that rm will accept as many arguments as possible:
find . -name .svn -exec rm -rf {} +

VirtualBox Add new resolutions into Virtual machine

Add new resolutions into Virtual machine
1. Shutdown virtual machine
2. Run command: VBoxManage setextradata “window xp sp3″ CustomVideoMode1 1366x768x32
(“window xp sp3″ is the machine name. )
3. Start virtual machine and change your display resolution.