Wednesday, 28 May 2014

Ways to check Linux OS is 32 bit or 64 Bit


uname -m

x86_64 ==> 64-bit kernel
i686   ==> 32-bit kernel

/bin/uname -m

x86_64 ==> 64-bit kernel
i686   ==> 32-bit kernel

getconf LONG_BIT

64 ==> 64-bit kernel
32 ==> 32-bit kernel

arch

x86_64 ==> 64-bit kernel
i686   ==> 32-bit kernel

file /sbin/init

/sbin/init: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped    ==> 64-bit kernel

/sbin/init: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped   ==> 32-bit kernel

In Ubuntu

dpkg --print-architecture

amd64 ==> 64-bit kernel
amd32 ==> 32-bit kernel

Ref: http://stackoverflow.com/questions/246007/how-to-determine-whether-a-given-linux-is-32-bit-or-64-bit



Tuesday, 27 May 2014

Change Run Levels in Linux


Find Out Current Run Level

who -r
run-level 3  2014-05-27 17:04

Or

runlevel
N 3

Use the init command to change rune levels:

init 1

To change the default run level:

vi /etc/inittab
id:5:initdefault:

Reboot the system to see changes:

reboot

Ref:
http://www.cyberciti.biz/tips/linux-changing-run-levels.html
http://www.ibm.com/developerworks/library/l-lpic1-v3-101-3/

Monday, 19 May 2014

Clear Memory Cache on Linux Server

Flush file system buffers by executing,

# sync

Kernels 2.6.16.x and newer versions of kernel provide a mechanism to have the kernel drop the page cache and/or inode and dentry caches on command, which can be helpful to free up a lot of memory.

To free page cache:

# echo 1 > /proc/sys/vm/drop_caches

To free dentries and inodes:

# echo 2 > /proc/sys/vm/drop_caches

To free page cache, dentries and inodes:

echo 3 > /proc/sys/vm/drop_caches

or

sync; echo 3 > /proc/sys/vm/drop_caches

Sync should be run because this is a non-destructive operation, and dirty objects are not freeable.
So you run sync in order to make sure all cached objects are freed.

To do clearing memory cache on a particular interval, just add the command to cron job

vi cacheclear.sh

#!/bin/sh
sudo sh -c "sync; echo 3 > /proc/sys/vm/drop_caches"

Ref: http://www.unixmen.com/how-to-clear-memory-cache-on-linux-servers/

Sunday, 18 May 2014

Force fsck in Linux


fsck stands for "file system check" and it is used to check and optionally repair one or more Linux file systems. Normally, the fsck program will try to handle filesystems on different physical disk drives in parallel to reduce the total amount of time needed to check all of the filesystems

Login as the root:
su root

Change directory to root (/) directory:
cd /

Create a file called forcefsck:
touch /forcefsck

Now reboot the system:
reboot

login as root and type the following command to reboot and run fsck:

shutdown -rF now

The -F option force fsck on reboot.


Ref:
http://www.cyberciti.biz/faq/linux-force-fsck-on-the-next-reboot-or-boot-sequence/
https://wiki.archlinux.org/index.php/fsck


Thursday, 15 May 2014

Recursively list all hidden files and directories


The basic syntax is as follows:

find /dir/to/search/ -name ".*" -print

find /dir/to/search/ -name ".*" -ls

search only hidden files:

find /dir/to/search/ -type f -iname ".*" -ls

search only hidden directories:

find /dir/to/search/ -type d -iname ".*" -ls
find /dir/to/search -path '*/.*' -print
find /dir/to/search -path '*/.*' -ls

In this example, search $HOME for all hidden files and dirs:

find $HOME -name ".*" -ls

135237    4 -rw-r--r--   1 root     root           18 May 20  2009 /root/.bash_logout
137605    4 -rw-------   1 root     root           32 May 15 01:08 /root/.mysql_history
135240    4 -rw-r--r--   1 root     root          100 Sep 22  2004 /root/.cshrc
131153    4 drwxr-----   3 root     root         4096 Feb 27 19:28 /root/.pki
136444    4 -rw-r--r--   1 root     root          686 Feb 27 07:22 /root/.bash_profile
137510    4 drwx------   2 root     root         4096 May  8 02:00 /root/.ssh
135241    4 -rw-r--r--   1 root     root          129 Dec  3  2004 /root/.tcshrc
136494    4 -rw-r--r--   1 root     root          310 Feb 27 07:22 /root/.bashrc
137490   16 -rw-------   1 root     root        14970 May 15 01:02 /root/.bash_history

Ref: http://www.cyberciti.biz/faq/unix-linux-centos-ubuntu-find-hidden-files-recursively/

Recursively list all files and directories


ls -alR

find . -exec ls -dl \{\} \; | awk '{print $3, $4, $9}'

find . -printf "%u %g %p\n"

tree -p -u -g -f -i

tree -p -u -g -f

find $PWD -type f

find . -ls

List only .html files

find . -name "*.html"

Ref: http://stackoverflow.com/questions/501367/how-to-recursively-list-all-files-and-directories

Wednesday, 14 May 2014

History Command in Linux


List All Executed Commands in Linux

history

List All Commands with Date and Timestamp

export HISTTIMEFORMAT='%F %T  '
history
%F Equivalent to %Y - %m - %d
%T Replaced by the time ( %H : %M : %S )

Filter Commands in History

export HISTIGNORE='ls -l:pwd:date:'
history

Ignore Duplicate Commands in History

export HISTCONTROL=ignoredups
history

Unset export Command

unset export HISTCONTROL
history

Save export Command Permanently

vi .bash_profile
PATH=$PATH:$HOME/bin
export PATH

Disable Storing History of Commands

vi .bash_profile
PATH=$PATH:$HOME/bin
HISTSIZE=0
export PATH
.bash_profile (END)

source .bash_profile

Delete or Clear History of Commands

history -c

Search Commands in History Using Grep Command

history | grep pwd

Recall Lastly Executed Command

Bang and 8 (!8)

Recall Lastly Executed Specific Command

!net

List last 25 commands

history 25

Ref: 

http://www.tecmint.com/history-command-examples/
https://www.digitalocean.com/community/articles/how-to-use-bash-history-commands-and-expansions-on-a-linux-vps

DoS and DDoS attack

A denial-of-service attack (DoS attack) or distributed denial-of-service attack (DDoS attack) is a attack in which the server resources become unavailable to its intended users.

A DOS attack is an attempt to make a system or server unavailable for legitimate users and, finally, to take the service down. This is achieved by flooding the server’s request queue with fake requests. After this, server will not be able to handle the requests of legitimate users.

In general, there are two forms of the DOS attack. The first form is on that can crash a server. The second form of DOS attack only floods a service.

In simple words DDOS attack is, when a server system is being flooded from fake requests coming from multiple sources (potentially hundreds of thousands), it is known as a DDOS attack. In this case, blocking a single or few IP address does not work. The more members in the zombie network, more powerful the attack it. For creating the zombie network, hackers generally use a Trojan.

There are basically three types of DDOS attacks:

Application layer DDOS attack: Application-layer DDOS attacks are attacks that target Windows, Apache, OpenBSD, or other software vulnerabilities to perform the attack and crash the server.

Protocol DDOS attack: A protocol DDOS attacks is a DOS attack on the protocol level. This category includes Synflood, Ping of Death, and more.

Volume-based DDOS attack: This type of attack includes ICMP floods, UDP floods, and other kind of floods performed via spoofed packets.

How to troubleshoot,

list of IP’s with maximum number of connections to server,

netstat -anp |grep 'tcp\|udp' | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n

remember that ddos becomes more complex as attackers are using fewer connections with more number of attacking IP’s,

the number of active connections open to server,

netstat -n | grep :80 |wc -l

netstat -n | grep :80 | grep SYN |wc -l

Ex:
cd /edu-log/edurite/
cat 20140505.access.log | awk '{print $1}' |sort |uniq -c |sort -nr |more

------------
110.85.112.16
27.153.209.89
120.33.245.187
27.150.229.164
121.205.197.8
121.205.196.173
27.153.186.129
------------

Trace the IP using the follwoing URL,

http://tools.whois.net/whoisbyip/

One example for how to block a particular IP on the server,

iptables -A INPUT -s 27.153.186.129 -j DROP

/etc/init.d/iptables save
/etc/init.d/firewall restart

Ref:

http://webhosting.uk.com/kb/how-to-check-if-your-linux-server-is-under-ddos-attack/
http://resources.infosecinstitute.com/dos-attacks-free-dos-attacking-tools/

Monday, 28 April 2014

Configure NFS in Linux

Three rpm's are required to configure nfs server.
nfs, portmap and xinetd, check them if not found then install them,

rpm -qa nfs*
nfs-utils-1.0.9-66.el5
nfs-utils-lib-1.0.8-7.9.el5

rpm -qa portmap*
portmap-4.0-65.2.2.1

rpm -qa xinetd*
xinetd-2.3.14-17.el5


/etc/init.d/portmap restart
/etc/init.d/xinetd restart
/etc/init.d/nfs restart


chkconfig portmap on
chkconfig xinetd on
chkconfig nfs on

mkdir /data
chmod 777 /data
vi /etc/exports

/data   192.168.209.128 (rw,sync)

exportfs -r

showmount -e 192.168.209.128

Export list for 192.168.209.128:
/data (everyone)

mount -t nfs 192.168.209.128:/data/ /mnt

cd /mnt/

cat > test
This is testfile

cd
umount /mnt

mkdir /temp

vi /etc/fstab

192.168.209.128:/data /temp nfs defaults 0 0

reboot

cd /temp
ls
test

ref : http://computernetworkingnotes.com/network-administrations/nfs-server.html

Windows Useful Commands


Application = Command

Accessibility Controls = access.cpl
Add Hardware Wizard = hdwwiz.cpl
Add/Remove Programs = appwiz.cpl
Administrative Tools = control admintools
Automatic Updates = wuaucpl.cpl

Bluetooth Transfer Wizard = fsquirt
Calculator = calc
Certificate Manager = certmgr.msc
Character Map = charmap
Check Disk Utility = chkdsk

Clipboard Viewer = clipbrd
Command Prompt = cmd
Component Services = dcomcnfg
Computer Management = compmgmt.msc
Date and Time Properties = timedate.cpl

DDE Shares = ddeshare
Device Manager = devmgmt.msc
Direct X Control Panel (If Installed)* = directx.cpl
Direct X Troubleshooter = dxdiag
Disk Cleanup Utility = cleanmgr

Disk Defragment = dfrg.msc
Disk Management = diskmgmt.msc
Disk Parmelonion Manager = diskpart
Display Properties = control desktop/desk.cpl
Dr. Watson System Troubleshooting Utility = drwtsn32

Driver Verifier Utility = verifier
Event Viewer = eventvwr.msc
File Signature Verification Tool = sigverif
Findfast = findfast.cpl
Folders Properties = control folders

Fonts = control fonts
Fonts Folder = fonts
Free Cell Card Game = freecell
Game Controllers = joy.cpl
Group Policy Editor (XP Prof) = gpedit.msc

Hearts Card Game = mshearts
Iexpress Wizard = iexpress
Indexing Service = ciadv.msc
Internet Properties = inetcpl.cpl
IP Configuration = ipconfig

Java Control Panel (If Installed) = jpicpl32.cpl
Java Application Cache Viewer (If Installed) = javaws
Keyboard Properties = control keyboard
Local Security Settings = secpol.msc
Local Users and Groups = lusrmgr.msc

Logs You Out Of Windows = logoff
Microsoft Chat = winchat
Minesweeper Game = winmine
Mouse Properties = control mouse
Mouse Properties = main.cpl

Network Connections = control netconnections
Network Connections = ncpa.cpl
Network Setup Wizard = netsetup.cpl
Notepad = notepad
Nview Desktop Manager (If Installed) = nvtuicpl.cpl

Object Packager = packager
ODBC Data Source Administrator = odbccp32.cpl
On Screen Keyboard = osk
Opens AC3 Filter (If Installed) = ac3filter.cpl
Password Properties = password.cpl

Performance Monitor = perfmon.msc
Performance Monitor = perfmon
Phone and Modem Options = telephon.cpl
Power Configuration = powercfg.cpl
Printers and Faxes = control printers

Printers Folder = printers
Private Character Editor = eudcedit
Quicktime (If Installed) = QuickTime.cpl
Regional Settings = intl.cpl
Registry Editor = regedit

Registry Editor = regedit32
Remote Desktop = mstsc
Removable Storage = ntmsmgr.msc
Removable Storage Operator Requests = ntmsoprq.msc
Resultant Set of Policy (XP Prof) = rsop.msc

Scanners and Cameras = sticpl.cpl
Scheduled Tasks = control schedtasks
Security Center = wscui.cpl
Services = services.msc
Shared Folders = fsmgmt.msc

Shuts Down Windows = shutdown
Sounds and Audio = mmsys.cpl
Spider Solitare Card Game = spider
SQL Client Configuration = cliconfg
System Configuration Editor = sysedit

System Configuration Utility = msconfig
System File Checker Utility = sfc
System Properties = sysdm.cpl
Task Manager = taskmgr
Telnet Client = telnet

User Account Management = nusrmgr.cpl
Utility Manager = utilman
Windows Firewall = firewall.cpl
Windows Magnifier = magnify
Windows Management Infrastructure = wmimgmt.msc

Windows System Security Tool = syskey
Windows Update Launches = wupdmgr
Windows XP Tour Wizard = tourstart
Wordpad = write

Friday, 25 April 2014

Increasing group_concat_max_len param in MySQL


SET GLOBAL group_concat_max_len=1024M

vi /etc/my.cnf

group_concat_max_len = 1024M

/etc/init.d/mysql restart

Shutting down MySQL......                                  [  OK  ]
Starting MySQL..                                           [  OK  ]

mysql -u root -p

Enter password:

mysql>SHOW VARIABLES LIKE "%group_concat_max_len";
+----------------------+------------+
| Variable_name        | Value      |
+----------------------+------------+
| group_concat_max_len | 1073741824 |
+----------------------+------------+
1 row in set (0.00 sec)

Copying files using pscp

Copying files from your UNIX host to your Windows PC

C:\Program Files (x86)>pscp "H:\Digitally_3.6_International\vmware.log" root@172
.16.0.134:/tmp/

root@172.16.0.134's password:
vmware.log                | 84 kB |  84.0 kB/s | ETA: 00:00:00 | 100%

http://www.nber.org/pscp.html

Limit number of simultaneous logins attempts for a user


To limit the max number of logins to 2 for user vivek

vi /etc/security/limits.conf

vivek         hard    maxlogins       2

ref:http://nixcraft.com/centos-rhel-fedora/13764-ssh-limit-number-simultaneous-logins-attempts-each-user.html

Thursday, 24 April 2014

Change SVN Server IP


Modify when SVN server IP address changes

cd /data/mysql-svn-bkp/ObjectMap/

svn switch --relocate svn://172.16.0.25/db-backup/Trunk/mysql/ svn://10.98.33.63/db-backup/Trunk/mysql/


Shrink VMware Virtual Disk File (.vmdk)


To remove any unneeded files from the virtual machine to free space

yum clean

To fill the unused space with zeros

cat /dev/zero > zero.fill;sync;sleep 1;sync;rm -f zero.fill

poweroff

Start cmd

C:\Program Files (x86)\VMware\VMware Player>vmware-vdiskmanager.exe -k "H:\Digit
ally_3.6\Edulinux_en-gb.vmdk"

  Shrink: 100% done.
Shrink completed successfully.

Ref:- http://www.howtoforge.com/how-to-shrink-vmware-virtual-disk-files-vmdk

Wednesday, 23 April 2014

Change the MySQL data default directory


Steps for MySQL data directory change,

Stopping the MySQL server

service mysql stop

Create a new data directory and move the content from the old data directory

mkdir /data/var/lib/mysql

chown mysql:mysql /data/var/lib/mysql

mv /var/lib/mysql/* /data/var/lib/mysql

Correct the MySQL configuration file

vi /etc/my.cnf

[mysqld]

datadir = /data/var/lib/mysql

socket = /data/var/lib/mysql/mysql.sock

slow_query_log_file = /data/var/lib/mysql/mysql-slow.log

general_log_file = /data/var/lib/mysql/general.log

[client]

socket = /data/var/lib/mysql/mysql.sock

Adjust SELinux parameters to accept our new change

getenforce
Disabled

If semanage SELinux Command Not Found

yum install policycoreutils-python

man semanage

rpm -qf `which semanage`
policycoreutils-python-2.0.83-19.39.el6.x86_64

semanage fcontext -a -t mysqld_db_t "/data/var/lib/mysql(/.*)?"

grep -i mysql /etc/selinux/targeted/contexts/files/file_contexts.local
/data/var/lib/mysql(/.*)?    system_u:object_r:mysqld_db_t:s0

restorecon -Rv data/var/lib/mysql

Starting the MySQL server

service mysql start

mysql -u root -p

mysql> show databases;

Optionally you can just use

mysql -u root -p --protocol tcp


Ref:-  

 http://crashmag.net/change-the-default-mysql-data-directory-with-selinux-enabled

https://blogs.oracle.com/jsmyth/entry/selinux_and_mysql

https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Managing_Confined_Services/sect-Managing_Confined_Services-MySQL-Configuration_Examples.html

Restore Power School Database


Stop Power Teacher Services

Stop Report Works Services

start cmd

cd \oracle\scripts

DropSchema.bat PRODDB

(Restart Oracle Services if schemas are fail to drop)

sqlplus / as sysdba

create user PS identified by password;

create user PS_MGMT identified by password;

grant create session, dba to PS;

grant create session, dba to PS_MGMT;

CREATE OR REPLACE DIRECTORY DATA_PUMP_DIR AS 'E:\oradata\PSPRODDB\data_pump_dir';

GRANT READ, WRITE ON DIRECTORY DATA_PUMP_DIR TO PS;

exit

replace the .dmp file in data_pump_dir

SYS@PSPRODDB AS SYSDBA>Import.bat PRODDB EXPDP_FULLDB Y

Start Power Teacher Services

Start Report Works Services


To reset user Passowrd

SYS@PSPRODDB AS SYSDBA>ALTER USER PS IDENTIFIED BY edurite;

User altered.

SYS@PSPRODDB AS SYSDBA>ALTER USER PS_MGMT IDENTIFIED BY edurite;

User altered.


To Unlock the user Accounts

SYS@PSPRODDB AS SYSDBA>ALTER USER PS_MGMT IDENTIFIED BY edurite ACCOUNT UNLOCK;

User altered.

SYS@PSPRODDB AS SYSDBA>ALTER USER PS IDENTIFIED BY edurite ACCOUNT UNLOCK;

User altered.



Backup Oracle Database in Windows Server


Start cmd

sqlplus / as sysdba

SYS@PRODDB AS SYSDBA>CREATE OR REPLACE DIRECTORY DATA_PUMP_DIR1 AS 'E:\Oracle_Backup';

Create Oracle_Backup directory if necessary.

E:\oracle\product\11.2.0\dbhome_1\BIN>expdp.exe '/ as sysdba' full=y directory=DATA_PUMP_DIR1 dumpfile=expdp_fulldb.dmp logfile=expdp_fulldb.log


Tuesday, 15 April 2014

httpd and php Installation in RHEL 6

httpd 2.2.15-30 and php 5.5.9-1 Installation in RHEL 6

2.6.32-431.3.1.el6.x86_64

yum install httpd

rpm -qa | grep httpd
httpd-tools-2.2.15-30.el6_5.x86_64
httpd-2.2.15-30.el6_5.x86_64

vi /etc/httpd/conf/httpd.conf
AllowOverride All

http://rpm.pbone.net/
search php55w-common-5.5.9-1.w6

wget ftp://ftp.pbone.net/mirror/repo.webtatic.com/yum/el6/x86_64/php55w-5.5.9-1.w6.x86_64.rpm
wget ftp://ftp.pbone.net/mirror/repo.webtatic.com/yum/el6/x86_64/php55w-cli-5.5.9-1.w6.x86_64.rpm
wget ftp://ftp.pbone.net/mirror/repo.webtatic.com/yum/el6/x86_64/php55w-common-5.5.9-1.w6.x86_64.rpm

rpm -ivh php55w-common-5.5.9-1.w6.x86_64.rpm
rpm -ivh php55w-cli-5.5.9-1.w6.x86_64.rpm
rpm -ivh php55w-5.5.9-1.w6.x86_64.rpm

wget ftp://ftp.pbone.net/mirror/repo.webtatic.com/yum/el6/x86_64/php55w-mcrypt-5.5.9-1.w6.x86_64.rpm
wget ftp://ftp.pbone.net/mirror/repo.webtatic.com/yum/el6/x86_64/php55w-soap-5.5.9-1.w6.x86_64.rpm
wget ftp://ftp.pbone.net/mirror/repo.webtatic.com/yum/el6/x86_64/php55w-pecl-apcu-devel-4.0.3-1.w6.x86_64.rpm
wget ftp://ftp.pbone.net/mirror/repo.webtatic.com/yum/el6/x86_64/php55w-opcache-5.5.9-1.w6.x86_64.rpm
wget ftp://ftp.pbone.net/mirror/repo.webtatic.com/yum/el6/x86_64/php55w-bcmath-5.5.9-1.w6.x86_64.rpm
wget ftp://ftp.pbone.net/mirror/repo.webtatic.com/yum/el6/x86_64/php55w-mysqlnd-5.5.9-1.w6.x86_64.rpm
wget ftp://ftp.pbone.net/mirror/repo.webtatic.com/yum/el6/x86_64/php55w-odbc-5.5.9-1.w6.x86_64.rpm
wget ftp://ftp.pbone.net/mirror/repo.webtatic.com/yum/el6/x86_64/php55w-xml-5.5.9-1.w6.x86_64.rpm
wget ftp://ftp.pbone.net/mirror/repo.webtatic.com/yum/el6/x86_64/php55w-pecl-apcu-4.0.3-1.w6.x86_64.rpm
wget ftp://ftp.pbone.net/mirror/repo.webtatic.com/yum/el6/x86_64/php55w-pecl-memcache-3.0.8-2.w6.x86_64.rpm
wget ftp://ftp.pbone.net/mirror/repo.webtatic.com/yum/el6/x86_64/php55w-pdo-5.5.9-1.w6.x86_64.rpm
wget ftp://ftp.pbone.net/mirror/repo.webtatic.com/yum/el6/x86_64/php55w-mbstring-5.5.9-1.w6.x86_64.rpm
wget ftp://ftp.pbone.net/mirror/repo.webtatic.com/yum/el6/x86_64/php55w-xmlrpc-5.5.9-1.w6.x86_64.rpm
wget ftp://ftp.pbone.net/mirror/repo.webtatic.com/yum/el6/x86_64/php55w-devel-5.5.9-1.w6.x86_64.rpm
wget ftp://ftp.pbone.net/mirror/repo.webtatic.com/yum/el6/x86_64/php55w-pecl-xdebug-2.2.3-2.w6.x86_64.rpm
wget ftp://ftp.uni-bayreuth.de/pub/redhat.com/fedora/linux/releases/10/Everything/ppc/os/Packages/php-pear-1.7.2-2.fc10.noarch.rpm

rpm -ivh php55w-bcmath-5.5.9-1.w6.x86_64.rpm
rpm -ivh php55w-mbstring-5.5.9-1.w6.x86_64.rpm
rpm -ivh php55w-pdo-5.5.9-1.w6.x86_64.rpm
rpm -ivh php55w-mysqlnd-5.5.9-1.w6.x86_64.rpm
rpm -ivh php55w-soap-5.5.9-1.w6.x86_64.rpm
rpm -ivh php55w-xmlrpc-5.5.9-1.w6.x86_64.rpm

yum install autoconf automake pcre-devel
rpm -ivh php55w-devel-5.5.9-1.w6.x86_64.rpm


wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/csbuild:/centosextra/RHEL_5/x86_64/libtool2-ltdl-2.2.6b-3.4.x86_64.rpm
wget ftp://ftp.univie.ac.at/systems/linux/fedora/epel/6/x86_64/libmcrypt-2.5.8-9.el6.x86_64.rpm

rpm -ivh libmcrypt-2.5.8-9.el6.x86_64.rpm
rpm -ivh libtool2-ltdl-2.2.6b-3.4.x86_64.rpm

rpm -ivh php55w-mcrypt-5.5.9-1.w6.x86_64.rpm

wget ftp://ftp.muug.mb.ca/mirror/centos/6.5/os/x86_64/Packages/unixODBC-2.2.14-12.el6_3.x86_64.rpm

rpm -ivh unixODBC-2.2.14-12.el6_3.x86_64.rpm
rpm -ivh php55w-odbc-5.5.9-1.w6.x86_64.rpm

wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/tsariounov:/tools/RedHat_RHEL-6/x86_64/libxslt1-1.1.28-66.1.x86_64.rpm
rpm -ivh libxslt1-1.1.28-66.1.x86_64.rpm
rpm -ivh php55w-xml-5.5.9-1.w6.x86_64.rpm

wget ftp://ftp.icm.edu.pl/vol/rzm2/linux-fedora-secondary/archive/development/ia64/os/Packages/php-pear-1.7.2-2.fc10.noarch.rpm
rpm -ivh php-pear-1.7.2-2.fc10.noarch.rpm

rpm -ivh php55w-pecl-apcu-4.0.3-1.w6.x86_64.rpm
rpm -ivh php55w-pecl-apcu-devel-4.0.3-1.w6.x86_64.rpm
rpm -ivh php55w-pecl-memcache-3.0.8-2.w6.x86_64.rpm
rpm -ivh php55w-pecl-xdebug-2.2.3-2.w6.x86_64.rpm

rpm -ivh php55w-opcache-5.5.9-1.w6.x86_64.rpm

pear list

Installed packages, channel pear.php.net:
=========================================
Package          Version State
Archive_Tar      1.3.7   stable
Console_Getopt   1.2.3   stable
PEAR             1.9.4   stable
Structures_Graph 1.0.4   stable
XML_RPC          1.5.4   stable
XML_Util         1.2.1   stable

pear install Auth_SASL Config Log MDB2 MDB2_Driver_mysqli Mail Mail_Mime Mail_mimeDecode Net_SMTP Net_Socket XML_Parser

pear list

Installed packages, channel pear.php.net:
=========================================
Package            Version State
Archive_Tar        1.3.2   stable
Auth_SASL          1.0.6   stable
Config             1.10.12 stable
Console_Getopt     1.2.3   stable
Log                1.12.7  stable
MDB2               2.4.1   stable
MDB2_Driver_mysqli 1.4.1   stable
Mail               1.2.0   stable
Mail_Mime          1.8.8   stable
Mail_mimeDecode    1.5.5   stable
Net_SMTP           1.6.2   stable
Net_Socket         1.0.14  stable
PEAR               1.7.2   stable
Structures_Graph   1.0.2   stable
XML_Parser         1.3.4   stable
XML_RPC            1.5.1   stable
XML_Util           1.2.1   stable

vi /var/www/html/index.php

<?php
 phpinfo();
?>

:wq

/etc/init.d/httpd restart

Now browse on any web browser with IP



Monday, 14 April 2014

Grant usage for a specific user in MySQL


Grant usage for a specific user

mysql -u root -p
Enter password:

mysql> use mysql;

mysql> grant all on *.* to 'username'@'%' identified by 'password';

mysql> flush privileges;