Saturday, October 24, 2009

Installing Word Press

Word Press

Requirements:

PHP , MySql , Apache


1.Download the zip from http://wordpress.org/
2.Unzip the downloaded file .
3.copy the file into htdocs
4.Create a database for WordPress on your web server and give all privileges for accessing and modifying it.
5.Rename the wp-config-sample.php file to wp-config.php.
6.Edit wp-config-sample.php to change the file is as follows: DB_NAME , DB_USER , DB_PASSWORD , DB_HOST (99% chance you won't need to change this value)
7.Save the file.
8.Run the WordPress installation script by accessing wp-admin/install.php in browser.
9.WordPress in its own subdirectory called blog, for example, you should visit: http://localhost/blog/wp-admin/install.php


Reference

http://codex.wordpress.org/Installing_WordPress#Famous_5-Minute_Install

Create a new Multiple user accounts in Windows XP

Adding a new Window Xp User Accounts
The administrator or a user with administrator rights can create additional user accounts.
1.Click the Start button and click Control Panel.
2.In the Control Panel window, click User Accounts.
3.Under Pick a task, click Create a new account.
4.Under Name the new account, type the name of the new user and click Next.
5.Under Pick an account type, click one of the following options:
Computer administrator — You can change all computer settings.
Limited — You can change only your own personal settings, such as your password. You cannot install programs or use the Internet.
6. Click Create Account.
Adding a new Window Xp User Accounts using Dos Prompt.

To create a new account you have to type as follows :
net user USERNAME PASSWORD /ADD
Ex: net user sampleuser welcome /add

To delete the account type as follows :
net user USERNAME /del
Ex: net user sampleuser welcome /del

To get Admin rights type as follows :
net localgroup administrators username /add

The complete command is
[username [password | *] [options]] [/DOMAIN]
username {password | *} /ADD [options] [/DOMAIN]
username [/DELETE] [/DOMAIN]

To Create Folder for user :
mkdir username

To Create Folder for Multiple users :
mkdir username1 username2 username3 ...............usernameN

Save the Multiple user file as .bat and in Dos prompt
Ex :Sampleuserfile.bat
following commands are in Sampleuserfile.bat

net user sampleuser1 welcome /add
net user sampleuser2 welcome /add
net user sampleuser3 welcome /add
........................................
net user sampleuserN welcome /add

If we run Sampleuser.bat in Command Prompt or Double Click the Sampleuser.Bat file then following user accounts are created.
Sampleuser1
Sampleuser2
Sampleuser3
....................
SampleuserN
Ex : Sampleuserfolder.bat
username1
username2
..................
usernameN

When you share a folder from your Xdrive, you can control how others access the contents of that folder by setting folder permissions. When you allow others to upload new files to a folder, you can set a quota to limit the amount of space available to the users you are sharing with.

Tuesday, October 6, 2009

Installing MediaWiki

Required software:
Web Server such as Apache or IIS
PHP version 5.0 or Later, and
Database Server MySQL or PostgreSql
sudo apt-get install httpd
sudo apt-get install mysql-server
sudo apt get install php5
sudo apt-get install php5-mysql
sudo apt-get install php5-cli
If you want to use the GD library (instead of ImageMagick for image resizing)
sudo apt-get install libgd2-xpm
sudo apt-get install libgd2-xpm-dev
sudo apt-get install php5-gd
Configure MySQL
mysqladmin -u root password ""
history -c
Note: Remember this user (root) and password because you will need them when you configure
MediaWiki.
Configure PHP
Edit your php configuration file.
sudo nano /etc/php.ini
Maximum Upload Filesize
Assuming that various files are going to be uploaded to the Wiki as content, the limit on the
maximum size of an upload has to be adjusted. About one­half way down is the File Uploads
section. Change:
upload_max_filesize = 2M
to at least 8M. You may have to adjust this again in the future.
upload_max_filesize = 8M
Memory Limit
Some PHP scripts require a lot of memory to run. To increase the maximum amount of memory a
script can use, page down to about 21%, and change the following entry, if found, from
memory_limit = 8M
to
memory_limit = 12M
Extensions
PHP MySQL support has to be enabled. Page down a bit further (about 48%) and make sure the
following line is uncommented:
extension=mysql.so
If you use the GD graphics library to do image resizing (instead of ImageMagick), also uncomment:
extension=gd.so
Save and exit out of the editor and restart Apache:
sudo /etc/init.d/httpd restart
MediaWiki
Type the following commands (replace 1.13.3 with the version to download)...
cd /var/www/
we need to extract the files...
sudo tar vxfz mediawiki-1.13.3.tar.gz
rename the extracted directory name to wiki
sudo mv mediawiki-1.13.3 wiki
In order to configure the wiki you have to make the config subdirectory writable by the web server.
cd /var/www/wiki
sudo chmod a+w config
Configure MediaWiki
Navigate your browser to http://localhost/wiki and continue with the installation.
Fill out the configuration form and continue.

Google Apps set up process

1. Browse the below link to Goto the Google Apps Page.

http://www.google.com/apps/intl/en/group/index.html


2. Click the "Get Started" button on the right side of the page for Standard Edition.
3. Here We have to select "I want to use an existing domain name" tab.

4. On that tab, it shows the below two options.

a. Administrator: I own or control this domain

b. End-user: I am a member of this domain

5. Here we should select the below option.

"Administrator: I own or control this domain"

6. Then Enter your Domain Name and Click the "Get Started" Button.

(eg) your_domain (what ever you need)

7. After select the domain it ask some information about our's.

8. Fill all the Manditory fields and then click "continue" button.

9. Here we Should create a Administrator account for that Domain.

10. And then Click "I accept. Continue with set up >>" button.


11. Here we log into our Dashboard then click the following link to activate our Google Apps services.

Verify domain ownership

12. In Verify ownership page select "Change the CNAME Record" from the Dropdown list. After select it views some unique string.

13. Copy the unique string to create a new CNAME record for your domain.

unique string eg:- google4e9d0b25319a7bab

And then click "Verify" button.

14. Now do the following in godaddy account.

Godaddy Settings:-

1. Log in to your account at http://www.godaddy.com.
2. To Update the MX records for basic email services using the below link https://www.godaddy.com/gdshop/google/gmail_login.asp and provide your domain name.
3. On the godaddy home page, Click the "Domains" tab and select "My Domain" Names. You'll be directed to the “Manage Domains page”.
4. Click the domain that use with Google Apps.
5. After you select that Domain it views the specific Domain Details.
6. In this page click the Total DNS Control Link.
7. Second tab refers CNAME(Aliases) , Click the Add New CNAME Record button
8. Under the CNAME tab enter the Alias name as CNAME Unique string and Host Name as google.com then Click Ok.
9.
10. On the Total DNS Control Panel, expand the MX (Mail Exchange) section by clicking on the + icon next to the MX (Exchange) list item. A list of MX entries will appear.
11. Clear all existing MX Records by clicking on the X Icon under the Actions section. Note: Make sure that there are no entries left in the MX (Mail Exchange) section.
12. Once you've deleted all existing records, click Add New MX Record. The MX (Mail Exchangers) Record Wizard will appear.
13. For each MX Record, enter information according to the data in the table below:


PriorityValue HostName Goes To Address
(Mail Server) TTLValue
1 @ .s9a1.psmtp.com. 1 Hour
2 @ .s9a2.psmtp.com. 1 Hour
3 @ .s9b1.psmtp.com. 1 Hour
4 @ .s9b2.psmtp.com. 1 Hour

* For the Select the Priority Value drop-down menu, enter the priority value (Choose Custom).
* For Enter a Host Name, leave the default setting to @.
* For the Select TTL Value drop-down menu, enter 1 Hour. This will appear as 3600 seconds within the DNS system.
* For Enter Goes To Address enter the Gmail server name.
* Click OK. The interface will show a Pending… status in the Actions section after you've made changes to your records

15. Enter the domain name and then click confirm.
16. Once above steps done get back to same page of step 13 .


17. On the "Set up email delivery" page Click the "I have completed these steps" button.

Use this direct link to update the MX records in godaddy automatically while setting up Google Apps

https://www.godaddy.com/gdshop/google/gmail_login.asp.

configuring postgres for network connections

http://www.cyberciti.biz/tips/postgres-allow-remote-access-tcp-connection.html

Glassfish Server Setting


Step : 1

/domains/domain1/lib/ext/<MySql connector>

Step : 2(Project specific)

/domains/domain1/config/domain.xml

-----------------------------------------------------------------------------------------------------------
 

" object-type="user" pool-name="pool name>"/>

   attempts="0" connection-creation-retry-interval-in-seconds="10" connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0" connection-validation-method="auto-commit" datasource-classname="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource" fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="false" lazy-connection-association="false" lazy-connection-enlistment="false" match-connections="false" max-connection-usage-count="0" max-pool-size="32" max-wait-time-in-millis="60000" name="" non-transactional-connections="false" pool-resize-quantity="2" res-type="javax.sql.ConnectionPoolDataSource" statement-timeout-in-seconds="-1" steady-pool-size="8" validate-atmost-once-period-in-seconds="0" wrap-jdbc-objects="false">

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

      "/>

     

     

     

     

     

     

     

     

     

     

      "/>

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

      "/>

     

     

     

     

     

     

     

      "/>

     

     

     

     

     

     

     

     

     

     

      :/"/>

   



-------------------------------------------------------------------------------------------------------------------


Step : 3(Project specific)

/domains/domain1/config/login.conf

------------------------------------------------------------------

{

      com.sirahu.security.UserLoginModule required

      URL = "jdbc:mysql://:/"

        DRIVER_CLASS = "com.mysql.jdbc.Driver"

        USERID = ""

      PASSWORD=""

      QUERY = "";

    };

-----------------------------------------------------------------

Step : 4(Project specific)

/domains/domain1/config/server.policy





Step : 5

Restart the Glassfish server.


NOTE:

Items marked in Red are variables. Please refer the appendix for those items.


Appendix:

      : Glassfish Directory

                        : specify the project name

   : specify a name to the connection pool

                      : Data base user name

                         : Data base password

                              : Data base instance port no.

                        : Data base instance machine IP

                          : Data base schema name

                   : This is the name specified in the application level for JAAS login

                     : Always use mysql-connector-java-5.0.4-bin.jar

Nagios Twitter Plugin

Send your Nagios alarms to your twitter account

1-. Create a twitter bot user
2-. logon with your new twitter bot
3-. go to settings
4-. mark your updates as private
5-. logout
6-. logon with your regular twitter user
7-. follow your twitter bot
8-. logout
9-. logon again with your twitter bot
10-. accept the follow request
11-. logout
12-. logon again (Argh!) with your regular twitter user
13-. ssh/telnet to your nagios installation
14-. go to your nagios objects directory (/usr/local/nagios/etc/objects)
15-. paste this (change user and password) into commands.cfg

define command {
command_name alarma-twitter
command_line /usr/bin/curl --connect-timeout 30 --max-time 60 -u YOUR_TWITTER_BOT_USER:YOUR_TWITTER_BOT_PASSWORD -d status="$SERVICEDESC$@$HOSTNAME$ is $SERVICESTATE$ ** $SERVICEOUTPUT$ ** Date: $SHORTDATETIME$" http://twitter.com/statuses/update.xml
}

16-. paste this into templates.cfg

define contact {
name twitter_contact
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r,f,s
host_notification_options d,u,r,f,s
service_notification_commands alarma-twitter
host_notification_commands alarma-twitter
register 0
}

17-. paste this into contacts.cfg

define contact{
contact_name twitter_jorge
use twitter_contact
alias Twitter Jorge
}

18-. edit some service you have defined and select “twitter_jorge” as contact

define service{
use passive_service
hostgroup_name servidores_solaris
contacts twitter_jorge
service_description Prueba NSCA
}

19-. submit a passive check for this service
20-. go to your twitter homepage,

Formating a hard disk and create partition

Steps - Formating a hard disk and create partition
[ create partition first and format that partition ]
fdisk -l
fdisk /dev/sdb
    p - partition list
    n - new
    p - primary
    1
    p - partition list
    w - save
partprobe /dev/sdb
mkfs.ext3 /dev/sdb1
fdisk -l
mount /dev/sdb1 /u01
df -sh - to list disk file system
fsck.ext3 /dev/sdb1 - to check the file system

e2label /dev/sdb1 sdb1
mount LABEL=sdb1 /u01/

Create a Yum Repository from ISO Images

Fedora Core 3, Fedora Core 4, Fedora Core 6

  1. Create a yum repository from your DVD
    • # mkdir -p /path/to/your/repo/dvd
      # chcon -t mnt_t /path/to/your/repo/dvd
      # mount -r -o loop /path/to/FC-6-i386-DVD.iso /path/to/your/repo/dvd
      # cd /path/to/your/repo
      # rpm -Uvh dvd/Fedora/RPMS/createrepo*
      # createrepo .
      /!\ Be careful with your directory hierarchy; it is important that the only RPM files that live in the /path/to/your/repo directory or anywhere underneath that directory are the RPMs from your DVD ISO (i.e. the ones in the dvd/Fedora/RPMS directory); any other RPMs that may be present will also be found by createrepo and included in the repository, which is probably not what you want.
  2. Ensure that the DVD ISO image is mounted at every reboot
    • edit /etc/fstab and add new line:
      /path/to/FC-6-i386-DVD.iso /path/to/your/repo/dvd iso9660 ro,loop 0 0
  3. Configure yum to use your new repository
    • edit /etc/yum.repos.d/fedora.repo or /etc/yum.repos.d/fedora-core.repo, whichever one is present
    • comment out any line starting with baseurl or mirrorlist
    • add a new line:
      baseurl=file:///path/to/your/repo
You should then be able to use your local repository to install new packages etc.

Fedora Core 5

It's particularly useful to set up a local [core] repository in Fedora Core 5 because pirut, the standard GUI package manager application, is built on yum and will hence take files from your local repository instead of having to go to the Internet to get them - pirut currently doesn't support installation from CD/DVD natively.
/!\ The metadata on the Fedora Core 6 DVD uses media: URLs, which yum does not understand, so it's necessary to take the same approach as for Fedora Core releases 3 and 4 in Fedora Core 6.

Using DVD ISO

In Fedora Core 5, the installer is based on yum and so there is actually yum repository metadata present on the DVD. This makes the process of setting up the local repository even easier, since you don't need to create the metadata yourself.
  1. Create a directory for your repository and mount the DVD ISO there:
    • # mkdir -p /path/to/your/repo
      # mount -r -o loop /path/to/FC-5-i386-DVD.iso /path/to/your/repo
  2. Ensure that the DVD ISO image is mounted at every reboot
    • edit /etc/fstab and add new line:
      /path/to/FC-5-i386-DVD.iso /path/to/your/repo iso9660 ro,loop 0 0
  3. Configure yum to use your new repository
    • edit /etc/yum.repos.d/fedora-core.repo
    • comment out any line starting with baseurl or mirrorlist in the [core] repository section at the top
    • add a new line:
      baseurl=file:///path/to/your/repo

Using CD ISO images

/!\ Note: I don't have the CD ISO images myself so I haven't tested this procedure with Fedora Core 5.
Creating a repository from CD ISO images is somewhat more complicated, since there are multiple images. There are a number of approaches that could be taken to work around this:
  • Use something like jigdo to create a single image equivalent to the DVD ISO (jigdo templates for Fedora Core 5 can be found at http://www.jburgess.uklinux.net/jigdo/index.html)
  • Mount all of the CD images simultaneously and create a symlink farm to the packages on each CD
  • Copy the packages from the CD images and make a local repo that's independent of the original CD images
I've chosen to take the latter approach here.
  1. Create a directory on your system to hold the repository. It will need to be on a filesystem that has at least 3GB of free space. Then copy the RPM packages and comps.xml file from your CD images into it.
    • # mkdir -p /path/to/your/repo/RPMS
      # cd /path/to/your/repo
      # mkdir disc1 disc2 disc3 disc4 disc5
      # mount -r -o loop /path/to/FC-5-i386-disc1.iso disc1
      # mount -r -o loop /path/to/FC-5-i386-disc2.iso disc2
      # mount -r -o loop /path/to/FC-5-i386-disc3.iso disc3
      # mount -r -o loop /path/to/FC-5-i386-disc4.iso disc4
      # mount -r -o loop /path/to/FC-5-i386-disc5.iso disc5
      # cp disc*/Fedora/RPMS/* RPMS
      # cp disc1/repodata/comps.xml .
  2. You no longer need the CD images, so you can unmount them and remove the mountpoint directories.
    • # umount disc1 disc2 disc3 disc4 disc5
      # rmdir disc1 disc2 disc3 disc4 disc5
  3. Create the repository metadata.
    • # rpm -Uvh RPMS/createrepo*
      # createrepo -g comps.xml .
  4. Configure yum to use your new repository
    • edit /etc/yum.repos.d/fedora-core.repo
    • comment out any line starting with baseurl or mirrorlist in the [core] repository section at the top
    • add a new line:
      baseurl=file:///path/to/your/repo

Using Add/Remove Software With No Network Connection

If you want to use the Add/Remove Software application (pirut) with no network connection, you'll need to disable all of the yum repositories apart from your local one. By default, the only enabled repositories are core (which is now served by your local repository), updates, and extras. You can disable these repositories by changing the line enabled=1 to enabled=0 in /etc/yum.repos.d/fedora-updates.repo and /etc/yum.repos.d/fedora-extras.repo respectively.
If at a later time you have an Internet connection available and would like to update your system or install something from Fedora Extras, you can enable these repositories on the yum command line without needing to edit the .repo files again, e.g.:
# yum --enablerepo=updates --enablerepo=extras update
# yum --enablerepo=updates --enablerepo=extras install somepackage
 
 
iso images
==========

 
http://archive.fedoraproject.org/pub/archive/fedora/linux/core/6/i386/iso/ 

Create new SVN Repository

  Login into host.domain.org with root user credentials

  1. cd  /export/repositories/
  2. create new repository using the command "svnadmin create "
  3. cd  /etc/svn-auth/
  4. create authentication file for repository with first user using the command "htpasswd –cm svn-auth-file- "
  5. Enter the password for the username
  6. cd  /etc/httpd/svn/
  7. Create the apache .conf file for the repository in the /etc/httpd/svn/ folder with the following contents

    Server Name
    host.domain.org

    DAV svn
    SVNPath /export/repositories/
    AuthType Basic
    AuthName " Repository –host.domain.org "
    AuthUserFile /etc/svn-auth/svn-auth-file-<repo name>
    Require valid-user

  8. Restart the apache server using the command "/etc/init.d/httpd restart"
User management in the repository

  1. Login into the host.domain.org server using the root credentials.
  2. Goto the repository auth file folder using the command " cd /etc/svn-auth/"
  3. To create new user "htpasswd –m svn-auth-file- " and then give the password.
  4. To delete the user use the following command "htpasswd –D svn-auth-file- ''username"
  5. To change the user's password, use the following command "htpasswd –m svn-auth-file- " and then give the new password.
  6. To view the users in the SVN account,use the following command ''more svn-auth-file-reponame

Installing Glass Fish

Step:1

Extracting the glassfish installer jar file.

Command: java -jar fileName.jar

The above command will extract the jar file.

Step:2

Get into that extracted glassfish folder.

Step:3

Install glassfish by executing proper command for installation.

Command: lib/ant/bin/ant -f setup.xml

The above command may vary for Fedora Linux environment. Use internet to find the exact command.

Step:4

Get into glassfish/bin/

Double click asadmin file. This will open up one terminal.

Then type start-domain domain1

This will start the server.

Then GOTO browser and type http://localhost:4848

This should open up the server login page.

HTTP error/server response codes reference

Below is a brief explanation of various common HTTP browser error codes and server response codes.   
Code Number Browser
Error Message
Description
200 none This is the normal response where a page has been successfully fetched
301 none Page has moved permanently. usually a response from implementing a 301 redirect
302 none Page has moved temporarily
304 none Page has not been modified since last request (this is an OK response)
400 Bad Request The request could not be understood by the server due to incorrect syntax. 
401  Unauthorized User authentication is required.
403   Forbidden The server understood the request, but is refusing to fulfill it.
404  Page Not Found The server has not found anything matching the Request-URI.
405 Method Not Allowed The method specified in the Request-Line is not allowed for the resource identified by the Request-URI. 
406  Not Acceptable The server cannot generate a response that the requestor is willing to accept.
407 Proxy Authentication Required  This code is similar to 401 (Unauthorized), but indicates that the client must first authenticate itself with the proxy. 
408  Request Timed Out  The server stopped waiting for a client request.
409  Conflict The request could not be completed due to a conflict with the current state of the resource.
410  Gone The requested resource is no longer available at the server and no forwarding address is known. This condition is similar to 404, except that the 410 error condition is expected to be permanent.
411. Length Required The server requires a content-length in the request
412 Precondition Failed The precondition given in one or more of the request-header fields evaluated to false when it was tested on the server.
413 Request Entity Too Large The server is refusing to process a request because the request entity is larger than the server is willing or able to process. 
414  Request URL Too Long The server is refusing to service the request because the Request-URI is longer than the server is willing to interpret.
415 Unsupported Media Type The server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for the requested method. 
500  Server Error  Internal Web server error
501 No Server Function not implemented in Web server software 
502  Server Overload Bad Gateway; a server being used by this Web server has sent an invalid response.
503 Service Unavailable Service unavailable because of temporary overload or maintenance. 
504  Gateway Timeout A server being used by this server has not responded in time.
505  HTTP Version Not Supported The server does not support the HTTP protocol version that was used in the request message.

Redhat History


1968

ARPANET founded. The precursor to the Internet, it allows researchers to share code and information.

1969

Ken Thompson, researcher at Bell Labs, writes the first version of Unix.

1979

AT&T announces plans to commercialize Unix.

1983

Richard Stallman establishes the Free Software Foundation at MIT. The GNU project to construct an operating system based on Unix but for which the source code is freely available, begins. Stallman also establishes the idea of "copyleft" and the General Public License (GPL).

1987

Andrew Tanenbaum releases Minix, a version of Unix for the PC, Mac, Amiga, and Atari ST. Source code included.

1989

Michael Tiemann (Red Hat Vice President, Open Source Affairs) co-founds Cygnus Solutions, the first business to provide custom engineering and support services for free software.

1991

Linus Torvalds releases the Linux kernel.
Bob Young introduced to free software and UNIX by the system administrators of the New York City UNIX Users Group (Unigroup).

1993

Young incorporates ACC Corporation, a catalog business that sells Linux and Unix software accessories and books and distributes a magazine called New York UNIX

1994

Marc Ewing creates his own distribution of Linux which he names Red Hat Linux. Released in October, it becomes known as the Halloween release.

1995

Young buys Ewing's business, merges it with ACC Corporation, and names the new company Red Hat Software.
Red Hat Linux 2.0 is released, officially unveils the new package management system called RPM.

1996

Red Hat opens sales and administration functions to North Carolina, opens corporate headquarters in Durham.