Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Change Samba server Name?

Status
Not open for further replies.

Yescha

Programmer
Aug 10, 2002
16
CA
Hello;
I saw my samba server name as LOCALHOST and sometimes when I click on it, "CAN'T ACCESS, SAME NAME ERROR( i think because of localhost).
I want to change name to "EasySamba". How can I do this?

And another, after every boot I have start my /usr/local/apache/bin/apachectl start and
/usr/local/tomcat/bin/startup.sh command for enabling the webserver.

How can I do this automatically while booting?

Thanks.
 
Hello yescah! Try to see my post "Samba Server Problem" it helps me alot to change my samba server! fluid11 is the men! THANKZ!
August
agencisa@yahoo.com
 
about your apache and tomcat maybe the services is not running automatically. to make it aumatically running during boot you must save the changes in service configuration. open service configuration select apache and tomcat check the app. box then choose file --> save changes before exiting. THANKZ!
August
agencisa@yahoo.com
 
August;
I think you're taking about the package install way. But, I installed with source file. So, when use command :
ntsysv => I can't see apache and tomcat.

Can you give idea how to then? Or Did I understand you wrong, then, give more detail clues on what you mean configuration file, which one?
Thanks.
 
You could write a rc script yourself. I wrote this rc script to start Apache when I'm running in runlevel 3-5:
#!/bin/bash

#Change this to the path to apachectl
fullpath=/usr/local/apache/bin/apachectl

case "$1" in
start)
$fullpath start
;;
stop)
$fullpath stop
;;
restart)
$fullpath restart
;;
*)
echo $"Usage: $prog {start|stop|restart}"
esac
Then I placed that file in /etc/rc.d/init.d and named it httpd. But to make it start when you boot, you have to create some symlinks to that file, like this:
ln -s /etc/rc.d/init.d/httpd /etc/rc.d/rc0.d/K50httpd
ln -s /etc/rc.d/init.d/httpd /etc/rc.d/rc1.d/K50httpd
ln -s /etc/rc.d/init.d/httpd /etc/rc.d/rc2.d/K50httpd
ln -s /etc/rc.d/init.d/httpd /etc/rc.d/rc3.d/S50httpd
ln -s /etc/rc.d/init.d/httpd /etc/rc.d/rc4.d/S50httpd
ln -s /etc/rc.d/init.d/httpd /etc/rc.d/rc5.d/S50httpd
ln -s /etc/rc.d/init.d/httpd /etc/rc.d/rc6.d/K50httpd
The 50 is just the priority, change it to whatever you want.
The K or S infront of the priority tells it if it should Kill or Start the service when you enter that runlevel.
To start Tomcat too, just add a /usr/local/tomcat/bin/startup.sh to the start part, and the stop/restart lines to the other parts.
HTH
//Daniel
 
The reason you don't see it in ntsysv is because you installed it from source. When you install from an RPM, rather than from source, then they usually include a startup script for you.

The easiest thing to do is to create a simple text file in the /etc/rc.d/rc3.d/ folder and put this in it...

/usr/local/apache/bin/apachectl start

Call the file Sapache and give the file execute permissions. Do the same for Tomcat and call it something like Stomcat. The 'S' tells init to start the process.

If you boot to the GUI, put these scripts in rc5.d also.


ChrisP ------------------------------------------------------------------------------
If somebody helps you, please click the link in the botton left hand corner that says "Mark this post as a helpful/expert post".
 
Hi; Fluid11
What you mean create simple text file? What will be the contents and extension of that file?
Is the content same as told by danielhozac (Programmer).

Looking forward for clarification.

BYE!!! Like Linux, Want to be Linux Guru
 
Just create the files in vi. You don't need file extensions in Linux.

For Apache, call it /etc/rc.d/rc3.d/Sapache and inside the file is just the one command to start Apache....

/usr/local/apache/bin/apachectl start

Do the same for Tomcat.

I didn't test it, but danielhozac's script looks like it will work also. danielshozacs solution also allows you to use the /sbin/service command to start, stop, and restart Apache since the script is located in the /etc/rc.d/init.d/ folder.

Either of the above two methods will work. My solution is very simple, but danielhozac's offers more functionality.


ChrisP ------------------------------------------------------------------------------
If somebody helps you, please click the link in the botton left hand corner that says "Mark this post as a helpful/expert post".
 
Hello Fluid11;
As I followed your footsteps, only Apache is starting but not tomcat.
As I checked these two commands:

root>/usr/local/apache/bin/apachectl start
MESSAGE: already running httpd

root>/usr/local/tomcat/bin/startup.sh
Staring all, all is ok. That means, it is not running I think. Because if it was running, then, message like already running ....

Another, when I check my internal server error
I can't view my files. But, when I start Tomcat, not apache it is working properly.

This proves that tomcat is not running.
I made those vi Stomcat and Sapache with
/usr/local/apache/bin/apachectl start
/usr/local/tomcat/bin/startup.sh contents and gave them 755 permissions;

Now, analyze it. Looking forward for your response.

BYE!!!
Like Linux, Want to be Linux Guru
 
Try doing a "ps -ef | grep tomcat" to see if Tomcat is running. I don't remember the name of the process, but I think it's tomcat. If that doesn't show you anything, it isn't running or the process's name is something else. //Daniel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top