LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 01-09-2011, 10:06 PM   #16
linuxcoo
LQ Newbie
 
Registered: Mar 2010
Posts: 17

Original Poster
Rep: Reputation: 0

Hi all,

Before I transfer the database. I'd like to check the version of mysql and php.

I, however, could not find php version.

I've already tried: php -v, /usr/local/php/bin, /usr/local/bin

I could not find php file(command file).

I also search like this, find / -name 'php*'

Still, no luck. Please help. I appreciate it.
 
Old 01-09-2011, 10:29 PM   #17
linuxcoo
LQ Newbie
 
Registered: Mar 2010
Posts: 17

Original Poster
Rep: Reputation: 0
When I checked the version of mysql, I have to go the path eg. /usr/local/mysql/bin to execute the command like mysql to get the info.


Some people just type the command in "/", then they can get the info.

How to make my redhat to do this?

Thank you
 
Old 01-10-2011, 12:15 AM   #18
linuxcoo
LQ Newbie
 
Registered: Mar 2010
Posts: 17

Original Poster
Rep: Reputation: 0
Another example: when I type mysql -u root -p, it says command not found.

Does anyone know why? Thank you
 
Old 01-10-2011, 07:06 AM   #19
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Quote:
Before I transfer the database. I'd like to check the version of mysql and php
You could always look at the installed packages. Something like rpm -i packagename might do the trick. Given how old your install is, have a quick look at the rpm man page for correct syntax.

Quote:
Some people just type the command in "/", then they can get the info.

How to make my redhat to do this?
I suspect that it has something to do with your PATH environment variable. If you type $PATH into a console, that will show all the directories PATH knows about. If you need to add /usr/local/mysql/bin to your path, it would probably be best to do it in your ~./bash_profile file.
Quote:
Another example: when I type mysql -u root -p, it says command not found.

Does anyone know why? Thank you
I suspect that is also PATH related.
 
Old 01-10-2011, 12:22 PM   #20
Dani1973
Member
 
Registered: Dec 2010
Distribution: Debian testing
Posts: 148

Rep: Reputation: 16
Seriously check the content of the php you will be transfering!!!

Check with the one who developed the site if there are any suspicious files before putting them on another server.
If you blindly transfer files it's possible the problems will start over.

Hackers like using tools like for example C40Shell (just type c40shell in google and you will be amazed how many results you get of infected sites)
Such scripts allow the hackers to the content of all your php files to gather information (sql passes, ... etc) and they can even modify and upload new files if permissions are not set safely (like directories that have been chmod to 777)
Even worse, if PHP is not well configured and 'jailed' (see open_basedir for example) the hacker can just read and/or write anywhere in your operating system where permissions allow it.
Often you will also find stuff like torrentflux (mostly in a directory named 'tf') or other 'applictaions' which are in fact torrent clients/servers.
It is mostly those torrent and other p2p tools that eat you bandwidth.

Also check you mailserver on that machine since lots of hackers tend to use the hacked machines for sending spam (if it is the case you will probably find tons of deferred mails). Find out how the hacker did this and secure it.

Once you transfered and secured the site make sure to continue monitoring it and keep the OS updated.

It is not enough to install a secure OS system, you have to monitor it on a frequent base to see if someone is trying to mess arround with it.

Last edited by Dani1973; 01-10-2011 at 12:25 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
my clock is jacked up under slackware 12.1 ninja master Slackware 6 01-27-2009 11:47 PM
That penguin jacked my ip alltaken Linux - Networking 6 04-05-2005 11:38 PM
jacked up glibc rdanda Slackware 6 04-10-2003 10:45 PM
man pages jacked up whansard Linux - Software 1 03-05-2003 01:05 AM
jacked up the firewall elpresidente Linux - Networking 4 06-15-2002 07:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 07:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration