Showing posts with label Solaris. Show all posts

How to configure apache web server in Solaris 10  

Posted by Unknown in , ,

Here are the steps...

  1. svcadm enable apache (or apache2)
  2. mv /etc/apache[2]/httpd.conf-example /etc/apache[2]/httpd.conf
  3. /usr/apache/bin/apachectl start

Then open your browser
http://localhost or http://127.0.0.1

For other IP address , you have to open your httpd.conf
then modify the default address 127.0.0.1 using your x.x.x.x IP address or your host name ( for valid dns )in " Server Name" line:

ServerName x.x.x.x

Check the current status: 'svcs -l apache[2]'

Restarting/reloading can be done through apachectl (/usr/apache[2]/bin/apachectl) but 'svcadm refresh apache[2]' is the preferred method.

Solaris Tips  

Posted by Unknown in ,


Important Solaris Files


Networking

  • /etc/hosts
  • /etc/hostname."ethernet_card" (pcn0,hme0,e1000g0)
  • /etc/netmasks
  • /etc/inet/ipnodes
  • /etc/nodename

Important Commands

  • ifconfig -a (lists all NIC cards + configuration)
  • fmadm faulty (command to find faulty devices)
  • shutdown -y -g0 -i(0-6)
  • /usr/X11/bin/Xorg -configure
  • /usr/X11/bin/xorgconfig
  • /usr/X11/bin/xorgcfg (recommended) (move resulting "xorg.conf" file to /etc/X11)
  • useradd -u 1025 -g 10 -d /export/home/username -m -s /bin/bash -c "comment username (use UID above 1023)
  • usermod (to modify user)
  • man -k (or apropos) "comman description" (to find a command)
  • catman (to index man pages. use it before using apropos)
  • echo $SHELL (prints your shell)

Some Abbreviations

SMF = Service Management Facility
SAN = Storage Area Network
SMC = Solaris Management Console
SMB = Server Message Block
LUN = Logical Unit Number

(LUNs are normally not individual disk drives but rather virtual partitions (or volumes) of a RAID set. In SCSI, LUNs are addressed in conjunction with the "Controller ID" of the host bus adapter (HBA), the "target ID" of the storage array, and an optional (no longer common) "slice ID". For example, "c1t2d3s4", would refer to controller 1, target 2, disk 3, slice 4)

How to disable root login through telnet, ftp
  • vi /etc/default/login
  • CONSOLE
If this variable is set then root is not allowed to login from anywhere but the console. Commenting this variable out allows root to login from anywhere and allows this vulnerability to take advantage of the telnet exploit. For ftp if the user exists in /usrftpd/ftpusers, that user is not allowed to connect using ftp. Check man page of ftpusers. If you want to enable ftp for root, remove root from /etc/ftpd/ftpusers.