Find Linux RAM Information Command and system information

Linux yum

  You need to use the free command: # free # free -m total used free shared buffers cached Mem: 7930 4103 3826 0 59 2060 -/+ buffers/cache: 1983 5946 Swap: 15487 0 15487 For system information: You need to use the dmidecode command: # dmidecode –type 17 OR # dmidecode –type memory OR # … Read more

Mount.cifs cannot allocate memory mounting

Linux yum

Mounting a Windows (SMB) share on Ubuntu gives us a “cannot allocate memory” error. Executing a command like this: mount -t cifs //toad/Backup /media/backup -o user=username,password=password,iocharset=utf8,file_mode=0777,dir_mode=0777 We get an error like this: mount error(12): Cannot allocate memory Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) Solution: First, check the permissions on your shared folder. … Read more

Startup: Unable to load dynamic library ‘/usr/lib/php/modules/module.so’

this error come up while running a shell script to get the parameter from php file PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php/modules/module.so’ – /usr/lib/php/modules/module.so: cannot open shared object file: No such file or directory in Unknown on line 0  This is cause by mcrypt extension. Edit /etc/php.d/mcrypt.ini and change ; Enable … Read more

SQL FOREIGN KEY Constraint

CREATE TABLE product ( category INT NOT NULL, id INT NOT NULL, price DECIMAL, PRIMARY KEY(category, id) ) ENGINE=INNODB; CREATE TABLE customer ( id INT NOT NULL, PRIMARY KEY (id) ) ENGINE=INNODB; CREATE TABLE product_order ( no INT NOT NULL AUTO_INCREMENT, product_category INT NOT NULL, product_id INT NOT NULL, customer_id INT NOT NULL, PRIMARY KEY(no), … Read more

Creating a table with auto_increment

CREATE TABLE example_autoincrement ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, data VARCHAR(100) ); CREATE TABLE example_innodb ( id INT, data VARCHAR(100) ) TYPE=innodb;

copy a folder under linux server to windows server

MS-Windows shared folder: You can share data between windows and linux system for such use : For example you would like to access MS-Windows share called //windowsserver/sharename by mounting to /mnt/win directory under Linux system. So execute these commands: mkdir -p /mnt/win mount -t smbfs -o username=winntuser,password=mypassword //windowsserver/sharename /mnt/win Next create the password file /etc/sambapasswords: … Read more