Solaris – Adding User and Home Directory

To create a user newuser with shell /usr/bin/bash and home directory /export/home/user:
# mkdir /export/home/user
# useradd -s /usr/bin/bash -d /export/home/newuser newuser
# chown newuser:staff /export/home/newuser
# passwd newuser
New Password:
Re-enter new Password:
passwd: password successfully changed for newuser

To create a role with roleadd. The usermod and rolemod commands modify the properties of users and roles, respectively:
# usermod -s /usr/bin/csh newuser

userdel and roledel delete users and roles.
groupadd, groupmod, and groupdel manage groups.

Be the first to comment  Posted by Ferdy - January 14, 2012

Categories: Solaris   Tags:

Solaris Commands

Search a package
# pkg search -r openoffice

Installing a package
# pkg install openoffice

Uninstalling a package
# pkg uninstall openoffice

Hrdware details
# prtconf

Processor Information:
# psrinfo -pv

List all processes
# ps -ef

View the services
# svcs

View the system-log
# svcs system-log

Enable a service
# svcadm enable network/ftp

Be the first to comment  Posted by Ferdy - January 3, 2012

Categories: Solaris   Tags:

PHP 5 install Windows Apache Server

This notes is for PHP 5 installation on Windows 2003 using an Apache Web Server.
Download VC9 x86 Thread Safe PHP 5.3.8 (Server has MS 2008 C++ Compiler).
Installing as an Apache handler, PHP module.

1. Download and Install php-5.3.8-Win32-VC9-x86.msi

Change the Destination Folder to C:\PHP\

Web Server Setup:
Select Apache 2.2.x Module

Select Apache Configuration Directory:
C:\Program Files (x86)\Apache Software Foundation\Apache2.2\conf\


2. Configure httpd.conf

During installation, PHP will insert the following lines into your Apache httpd.conf configuration file to load the PHP module for Apache.

#BEGIN PHP INSTALLER EDITS – REMOVE ONLY ON UNINSTALL
PHPIniDir “”
LoadModule php5_module “php5apache2_2.dll”
#END PHP INSTALLER EDITS – REMOVE ONLY ON UNINSTALL

Add the path to php.ini
PHPIniDir “C:/php”

Next, need to insert these two lines to your Apache httpd.conf
Add
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
inside <IfModule mime_module></IfModule>
Example:
<IfModule mime_module>
.
.
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
</IfModule>

<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>
Change it to:
DirectoryIndex index.php

3. Make an index.php, example:

<html>
 <head>
  <title>PHP Test</title>
 </head>
 <body>
 <?php echo ‘<p><b>Hello!<b></p>’; ?>
 <?php phpinfo(); ?>
 </body>
</html>

Be the first to comment  Posted by Ferdy - September 28, 2011

Categories: PHP   Tags:

Next Page »