Archive for category note

How do I change my server’s name

Running as root:

* hostname acme.dev.nul

(assuming you wish to name the host: ‘acme.dev.nul’), and adding or editting the “HOSTNAME=” line in:

* /etc/sysconfig/network

appropriately will do the trick.

Some applications also want to be able to do a lookup of hostname to IP, and for that purpose, editting /etc/hosts is often done. Another and better solution to that second question is to place the server in an environment with a working forward and reverse DNS and letting the initscripts manage the matter. We just answer the question about changing a server’s name here.

See also the file documentation concerning the initscripts, which in the first instance handle the setting of the server name based on the values found in /etc/sysconfig/network or /etc/sysconfig/network-scripts/ifcfg-ethX:

* rpm -ql initscripts | grep doc

No Comments

Centos PHP 5.2 yum remi repos

instalar los dos repos:
rpm -Uhv

http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-2.noarch.rpm

rpm -Uhv

http://rpms.famillecollet.com/el5.i386/remi-release-5-6.el5.remi.noarch.rpm

activar el repo de remi:
en /etc/yum.repos.d/remi.repo buscas el primer “enabled=0″ y lo cambias
por “enabled=1″

luego:
yum update -y && yum install php php-mbstring php-mysql php-mcrypt -y

No Comments

Unix / Linux change a user’s home directory – usermod

usermod -d /path/to/new/homedir/ username

No Comments