11 useful commands for Linux/Unix administrators

Command line is more powerful because you can do  lot with them,  you can tell your computer exactly what you want and get the appropriate answer, while GUI application can only tell your computer what the GUI programmer has defined.  Recently, CLI is mostly used by Linux/Unix administrators since most popular linux distros come with a complete set of GUI applications that make the user use less and less the command line.

Continue reading

install packages in Opensolaris from Blastwave

Blastwave is a collective effort to create a set of binary packages of free software, that can be automatically
installed to a Solaris computer (sparc or x86 based) over the network. Blastwave has a substantial build server
farm for the use of the software developers and maintainers in the Solaris community. All software is built and
tested in a standardized build environment using Sun ONE Studio 8, Sun ONE Studio 10, Studio 11 tools as
well as GCC.

 

Continue reading

install DATA protector client in Linux

HP Data Protector software automates high-performance backup and recovery from disk or tape to enable 24×7 business continuity at a compelling price-to-performance ratio. Appropriate for medium and large companies, this software helps you reduce IT costs and complexity while delivering the reliability and scalability needed to grow from a single server environment to the largest distributed enterprise infrastructure. With more than 22,000 customers worldwide, HP Data Protector software is used by nearly half of Global 500 corporations. (from HP)

Continue reading

Change IP or Hostname inSolaris

 

How  to change  IP  in  Solaris  10:  (reboot is  not  needed)

 

1. Edit ->
Code:

#/etc/hosts and  /etc/inet/ipnodes files

2. Restart network :
Code:

# svcadm restart network/physical

 

3. To ensure that IP address has been changed,
Code:
/etc/netmasks

 

Change  Hostname  in   Solaris  10  (reboot  needed)

Change the hostname in the following files:

/etc/nodename

/etc/hostname.*interface

/etc/inet/hosts

/etc/inet/ipnodes

and rename directory under /var/crash

# cd /var/crash

# mv oldname newname

 

 

How  to change   IP  and  Hostname   in Solaris 8/9?

Use  this  Command   :  /usr/sbin/sys-unconfig and  answer  some  questions to reconfigure  your  system

 

or  

 edit   

/etc/defaultdomain     Set the default NIS domain name, if any, if it changed.


/etc/defaultrouter   Set the default router’s IP address, if it changed.


/etc/hostname.le0 (or .hme0 or ?) Update if the hostname changed.


/etc/hostname6.le0 (or .hme0 ;bge0;or ?) Ditto, if you use IPv6.


/etc/hostname6.ip.tun0 Update if you use a IPv4/IPv6 tunnel (e.g., 6bone)


/etc/nodename Update if the hostname changed.


/etc/nsswitch.conf Update if your name resolution method/order changed.


/etc/resolv.conf Update if your name servers/domain changed (DNS only).


/etc/inet/hosts Make sure your IP address is updated or added here.


                         List your FQDN is first, before the short hostname.

                         E.g., "192.168.1.102  user.unixmen.net  user"

/etc/inet/ipnodes IPv6 version of hosts file (Solaris 8+).


/etc/inet/netmasks Set your network number & netmask, if it changed.

/etc/inet/networks Set your network name, if it changed.


/etc/net/ticlts/hosts For the streams-level loopback interface.


/etc/net/ticots/hosts For the streams-level loopback interface.


/etc/net/ticotsord/hosts For the streams-level loopback interface.


Now  reboot  the  syhstem to  activate  the  new  ip adress 
 

 

MyDNS & MyDNSConfig 3 On Fedora 11

Install MyDNSConfig

MyDNSConfig is a web-interface that allows to administrate/create/delete DNS records easily. All data is stored in a MySQL database, and this MySQL database is used by the MyDNS-NG name server to retrieve the DNS records.

MyDNS comes with its own web-interface which we found quite hard to use, especially for newbies, that’s why we created MyDNSConfig.

MyDNSConfig uses the same technology as ISPConfig version 3, and it is also part of ISPConfig 3 to allow the management of DNS records.

let start :

Download and install mysql :

yum install mysql mysql-server  -y

make the mysql deamon start automatic :

chkconfig --levels 235 mysqld on
 /etc/init.d/mysqld start

 make mysql root pass :

mysqladmin -u root password yourrootsqlpassword

Download and install virtual web logfile rotater/parser

vlogger is a little piece of code i wrote to handle dealing with large amounts
of virtualhost logs. its bad news to let apache deal with these itself (ask anyone who
runs a large webfarm about the interesting things apache does when it has 500 open logfiles)
so vlogger was born. it takes piped output from apache, splits off
the first field, and writes the logs to logfiles in subdirectories. it uses a file handle
cache so it can’t run out of file descriptors. it will also start a new logfile every night
at midnight, and maintain a symlink to the most recent file. for security, it can drop privileges
and do a chroot to the logs directory.

wget http://n0rp.chemlab.org/vlogger/vlogger-1.3.tar.gz
tar xvfz vlogger-1.3.tar.gz
mv vlogger-1.3/vlogger /usr/sbin/

Install apache php and PhpMyAdmin :

yum install httpd php php-mysql php-mbstring php php-devel php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-eaccelerator php-mcrypt php-mhash php-mssql php-snmp php-soap php-tidy curl curl-devel perl-libwww-perl ImageMagick libxml2 php-cli phpMyAdmin

vi /etc/httpd/conf.d/phpMyAdmin.conf

and make it to garant acces from all hosts :

#   order deny,allow#   deny from all allow from all 

 

restart httpd and make it to start avery boot :

 

chkconfig –levels 235 httpd on
/etc/init.d/httpd start

 

 

you can now user phpmyadmin on user server with your browser :

 

http://serverx.com/phpmyadmin

 

installing MyDNS

MyDNS is a free DNS server for UNIX. It was implemented from scratch and is designed to serve records directly from an SQL database (currently either MySQL or PostgreSQL).

 

rpm -ivh http://mydns.bboy.net/download/mydns-mysql-1.1.0-1.i386.rpm

 

edit : /etc/init.d/mydns

 

and change # chkconfig: 345 52 50 to # chkconfig: 345 65 50

 

make MyDns to start with boot :

chkconfig –levels 235 mydns on

 

Installing MyDNSConfig 3

 

 

When installing this command :


wget http://downloads.sourceforge.net/mydnsconfig/MyDNSConfig-3.0.1.tar.gz?use_mirror=
tar xvfz MyDNSConfig-3.0.1.tar.gz
cd mydnsconfig/install/
php -q install.php

 

you will get This Error because the fedora 11 is not yet defined the install script :

[root@localhost install]# php -q install.php

——————————————————————————–
__ __ _____ _ _ _____ _____ __ _
| / | | __ | | |/ ____|/ ____| / _(_)
| / |_ _| | | | | | (___ | | ___ _ __ | |_ _ __ _
| |/| | | | | | | | . ` |___ | | / _ | ‘_ | _| |/ _` |
| | | | |_| | |__| | | |____) | |___| (_) | | | | | | | (_| |
|_| |_|__, |_____/|_| _|_____/ ________/|_| |_|_| |_|__, |
__/ | __/ |
|___/ |___/
——————————————————————————–

>> Initial configuration

PHP Notice: Undefined variable: distver in /root/mydnsconfig/install/lib/instal
l.lib.php on line 135
PHP Notice: Undefined variable: distid in /root/mydnsconfig/install/lib/install
.lib.php on line 135
PHP Notice: Undefined variable: distbaseid in /root/mydnsconfig/install/lib/ins
tall.lib.php on line 135

 

FOTO1

 

to Solved this issue :

vi /root/mydnsconfig/install/lib/install.lib.php

anc change this scirpt :

if(stristr($content,’Fedora release 10 (Cambridge)’)) {
$distname = ‘Fedora’;
$distver = ’10′;
$distid = ‘fedora9′;
$distbaseid = ‘fedora’;
swriteln(“Operating System: Fedora 10 or compatiblen”);

 

 

with

 

if(stristr($content,’Fedora release 11 (Leonidas)’)) {
$distname = ‘Fedora’;
$distver = ’11′;
$distid = ‘fedora9′;
$distbaseid = ‘fedora’;
swriteln(“Operating System: Fedora 11 or compatiblen”);
}

 

 

 

save and exit :

 

start ths script again :

 

FOTO2

 

then answer the question and start browser with localhost:8080 :)

 

login with admin:admin

 

 

FOTO3