hpchong7
asked on
Simple question
refer to :https://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=linux&qid=20184711
Dear all,
1.)Do you know what command should I issue such that I can know what current run level I am in?
2.)Do you know where to set the domain name?(now it is root@localhost.localdomain , I want to change
it to , say, root@abc.com)
Dear all,
1.)Do you know what command should I issue such that I can know what current run level I am in?
2.)Do you know where to set the domain name?(now it is root@localhost.localdomain
it to , say, root@abc.com)
ASKER
I am sorry that I've tried but it don't work
Hi,
To change your system name on a redhat or a mandrake, one of the way that you can use is to edit the file /etc/sysconfig/network, you just have to change or add the following line : HOSTNAME=mycomputername.ab c.com. You need to restart.
To know your runlevel the "runlevel" command should work on at least mandrake and redhat.
Hope this help.
Bye
PS : root@abc.com is an e-mail address and will depend the way you configure your e-mail software. Basically, with the above configuration the address of the user root on this machine will be root@mycomputername.abc.co m
To change your system name on a redhat or a mandrake, one of the way that you can use is to edit the file /etc/sysconfig/network, you just have to change or add the following line : HOSTNAME=mycomputername.ab
To know your runlevel the "runlevel" command should work on at least mandrake and redhat.
Hope this help.
Bye
PS : root@abc.com is an e-mail address and will depend the way you configure your e-mail software. Basically, with the above configuration the address of the user root on this machine will be root@mycomputername.abc.co
ASKER
Dear olidel,
Thank you very much!I changed /etc/sysconfig/network and it works!However, after I changed, the httpd seems to be not work!Each time I want to start it, the process fails!
httpd.................[fai l]
Only when I change back /etc/sysconfig/network to localhost.localdomain, then the httpd works again.May you tell me how to resolve it?Thanks!
Thank you very much!I changed /etc/sysconfig/network and it works!However, after I changed, the httpd seems to be not work!Each time I want to start it, the process fails!
httpd.................[fai
Only when I change back /etc/sysconfig/network to localhost.localdomain, then the httpd works again.May you tell me how to resolve it?Thanks!
Hi,
It' difficult for me to tell you what is wrong, I don't have enough informations. You should take a look in the logs of the system and/or the application e.g. /var/log/messages and/or /var/log/httpd/error_log you should have more informations in this files. You can also do a manual start from a comand line if you use the command "apachectl start".
Anyway, I suspect that there is maybe a configuration problem with httpd.conf or maybe the application cannot bind on port 80.
Hope this help.
Bye
It' difficult for me to tell you what is wrong, I don't have enough informations. You should take a look in the logs of the system and/or the application e.g. /var/log/messages and/or /var/log/httpd/error_log you should have more informations in this files. You can also do a manual start from a comand line if you use the command "apachectl start".
Anyway, I suspect that there is maybe a configuration problem with httpd.conf or maybe the application cannot bind on port 80.
Hope this help.
Bye
hi
edit /etc/httpd/httpd.conf
and change the ServerName attribute to ur new hostname and try
edit /etc/httpd/httpd.conf
and change the ServerName attribute to ur new hostname and try
ASKER
1.)
Say,
My hostname is xyz
My domain is abc.com
then should the ServerName attribute set to xyz or xyz.abc.com?
2.)if my IP is 192.168.0.10(which is private IP).Other machine on the same LAN can access my web server by typing 192.168.0.10 in internet explorer, but cannot access my web server by typing xyz.abc.com.Do you know what's the problem?May you teach me how to resolve it?Thank you very much!
Say,
My hostname is xyz
My domain is abc.com
then should the ServerName attribute set to xyz or xyz.abc.com?
2.)if my IP is 192.168.0.10(which is private IP).Other machine on the same LAN can access my web server by typing 192.168.0.10 in internet explorer, but cannot access my web server by typing xyz.abc.com.Do you know what's the problem?May you teach me how to resolve it?Thank you very much!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you very much!
u can use the runlevel command which tells u ur current runlevel.
As for changing hostname u can try editing the /etc/rc.sysconfig file and changing HOSTNAME=`/bin/hostname`. lemme know if this works. ull need to restart.