[solved]Moving server...need to find all hard code IP references
I'm moving my web server to a different datacenter.
OS is CentOS 5.8
Apache 2.2.3
qmail
NcFTPd
Its been 12 years since I relocated a server. Lots of brain cells lost since then...:-)
I need to identify all the config files that contain the server's IP addresses. Memory has provided these:
Network - /etc/sysconfig/network-scripts/* (duh)
httpd.conf
sshd_config
NcFTPd *.cf files
resolv.conf
named.conf
Q: Does anyone see anything I'm missing and/or is there a way to search all files on the server for the old IP addresses?
TIA for any assistance.
Sean
Update: Nothing like getting some sleep...ran this from the command line and got a list of all config files that contained the ip addresses:
This "script"
Scans files in /etc/init.d for the names of configuration files
Checks to see if the config file exists, if yes
Output the file name
grep --count for the number of times the IP is found in the file, writing to a temp file
grep for lines that do not contain a 0 count.
Resulting in...
It doesn't find config files that aren't referenced in /etc/init.d, of course, but it did catch a couple I'd missed.
Last edited by scasey; 10-27-2012 at 03:03 PM..
Reason: Solved
Hi all,
I am sorry if this is a repetitive question and would be happy if I get directed to a source where I can find details about this.
I have a laptop with windows 8, 8 GB RAM and 1 TB hard disk with most of the memory available for use.
I am trying to find a good option to install Linux... (8 Replies)
OK group, it's been 12 years since I worked with SCO. I need some direction here:
SCO Openserver 5.07
I have a server with a bad motherboard. I have moved the SCSI adapter and hard drive to another computer. This new server has different hardware so I must install the chipset drivers for... (1 Reply)
As the title suggests, I'm trying to install a second drive (really want an OS mirror) on a Sun Netra X1.
I've taken the spacer out, and had a go at with the drill-press so now I have a nice HDD tray. Have installed an IDE drive in the tray, plugged in the power and data cables that were... (0 Replies)
Hi,
I need to search and replace references to duplicated images in HTML code. There are several groups of duplicated images, which are visually the same, but with different filenames. I managed to find the duplicated files themselves, but now I need to clean the code too. I have a CSV file with... (9 Replies)
Hello everybody,
I've received yesterday a very old HP server: HP9000, A3579A, D380/2 with two 180 MHz PA-RISC CPUs, 256 MB RAM. Actual firmware is 38.40.
But no hard drives. I'm looking for 18 or 36 GB HD references.
Is 11i v3 HP-UX working on it? Or, what is the latest version? Is 256 MB... (4 Replies)
HI I have a list of files that are incorrectely names and I need to move them to new name .. I tried few things that has not worked so far can you help ?
I need to rename all thes eifle ( tere are over 100 )
xldn0357bap.orig.new
xldn0389bap.orig.new
xldn0439bap.orig.new... (12 Replies)
Hi all ,
I'm new to unix
I have a checked project , there exists a file called xxx.config .
now my task is to find all the files in the checked out project which references to this xxx.config file.
how do i use grep or find command . (2 Replies)
I'm trying to math all class references in a C++ file using grep with regular expression. I'm trying to know if a specific include is usuless or not, so I have to know if there is a refence in cpp.
I wrote this RE that searches for a reference from class ABCZ, but unfortunately it isn't working... (0 Replies)
hi
there is example (on link given below )of such code that contains java class reference in c++ program.
http://slackware.cs.utah.edu/pub/slackware/slackware-7.1/docs/Linux-HOWTO/Process-Monitor-HOWTO
I am new in linux environment. and not able to compile it.
when i compile it through... (1 Reply)