Posted by: nakuls77 | October 18, 2008

Installing Memcached from Source on CentOS 5

 

This is a quick summary for this process so that I can refer to it later on, and hopefully someone will find it useful as well.

Memcached requires libevent to handle its network IO stuff. The bundled libevent in the standard yum repository is old so it’s pretty useless. The newer versions memcached runs on newer libevent library so I ended up compiling libevent and memcached from the latest stable sources. I’m using libevent-1.4.4-stable and memcached-1.2.5.

First off, uninstall the libevent that yum may have installed on your machine

# sudo yum remove libevent

Download the sources for libevent and memcached , unzip( # gunzip *.gz ), untar (# tar -xvf *.tar), CD to the libevent folder. We will compile the libevent first.

# ./configure –prefix=/usr/local

# make

# make install

Basically we are telling libevent to install itself under /usr/local/lib/. When we compile memcached, we need to point it to the correct location as well. Once libevent is done installing (it’s really quick), we can move on and complie memcached.

CD to the un-tar memcached folder,

# ./configure –with-lib-event=/usr/local/

# make

# make install

After memcached is installed, you can try

# memcached

In my situation, I ran into an error

error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory

It turned out that the new libevent get installed, it doesn’t “register” the actual library file (similar to DLL on Windows) with the system. When Memcached runs, it tries to look for the libevent-1.4.so.2 file but since libevent is still playing hide and seek somewhere, memcached cries.

To fix this, we need to manually load the libevent library file into the system via the ld configuration. From the man page of ld:

ld combines a number of object and archive files, relocates their data and ties up symbol references. Usually the last step in compiling a program is to run ld.

I like to think ld as the regsrv32 used to register DLL’s on Windows. Now to fix up the reference to the libevent so file, we need to create a file under /etc/ld.so.conf.d/

# vi /etc/ld.so.conf.d/libevent-i386.conf

then enter

/usr/local/lib/

Write and quit (:wq!)

The path in the libevent-i386.conf is the path where the actual .so files are located at. We set this path when we run the ./configure –prefix=/usr/local/ during the libevent compilation. Reloading the ld configuration with

# ldconfig

now, you can start memcached in verbose mode (-vv) for testing

# memcached -vv

If you see something like ..

slab class 1: chunk size 104 perslab 10082

slab class 2: chunk size 136 perslab 7710

slab class 3: chunk size 176 perslab 5957

slab class 4: chunk size 224 perslab 4681

slab class 5: chunk size 280 perslab 3744

….

slab class 37: chunk size 367192 perslab 2

slab class 38: chunk size 458992 perslab 2

<6 server listening

<7 send buffer was 126976, now 268435456

<7 server listening (udp)

Congratulations! Memcached is up and running!

Posted by: nakuls77 | October 18, 2008

Installing Request Tracker

This installs:

MySQL 4.0.23

OpenSSL 0.9.7e

Apache 1.3.33

  + mod_ssl 2.8.22-1.3.33

  + mod_perl 1.29 (static)

  + mm 1.3.1

Perl 5.8.5 (plus RT-required modules)

PHP 4.3.10

Request Tracker 3.2.3
 

GET ALL REQUIRED SOURCE PACKAGES AND UNPACK

mkdir -p /usr/local/src

cd /usr/local/src

wget http://www.perl.com/CPAN/src/perl-5.8.5.tar.bz2

wget http://mysql.he.net/Downloads/MySQL-4.0/mysql-4.0.23.tar.gz

wget http://www.openssl.org/source/openssl-0.9.7e.tar.gz

wget ftp://ftp.ossp.org/pkg/lib/mm/mm-1.3.1.tar.gz

wget http://www.modssl.org/source/mod_ssl-2.8.22-1.3.33.tar.gz

wget http://perl.apache.org/dist/mod_perl-1.29.tar.gz

wget http://apache.swift-networks.com/httpd/apache_1.3.33.tar.gz

wget http://us2.php.net/distributions/php-4.3.10.tar.bz2

wget http://download.bestpractical.com/pub/rt/release/rt-3.2.3.tar.gz

wget http://easynews.dl.sourceforge.net/sourceforge/expat/expat-1.95.8.tar.gz

tar zxf mysql-4.0.23.tar.gz

bunzip2 perl-5.8.5.tar.bz2

tar xf perl-5.8.5.tar

tar zxf openssl-0.9.7e.tar.gz

tar zxf mm-1.3.1.tar.gz

tar zxf mod_ssl-2.8.22-1.3.33.tar.gz

tar zxf mod_perl-1.29.tar.gz

tar zxf apache_1.3.33.tar.gz

bunzip2 php-4.3.10.tar.bz2

tar xf php-4.3.10.tar

tar zxf rt-3.2.3.tar.gz

tar zxf expat-1.95.8.tar.gz

chown -R root.root *

ADD RT USER/GROUP

groupadd rt

useradd -g rt -c “RT User” -d /dev/null -s /sbin/nologin rt
 

INSTALL/UPGRADE PERL

cd /usr/local/src/perl-5.8.5

rm -f config.sh Policy.sh

sh Configure \

-Duseshrplib=y \

-des

make && make test && make install

/usr/local/bin/perl -MCPAN -eshell

# manual steps here:

# – selecting the “follow” option during initial Perl setup will make

# installation of RT dependency Perl modules later much easier and

# more automated.

# – install Bundle::CPAN

# – install LWP::UserAgent (mod_perl will need this later)
 

Install MySQL 4.0.23

groupadd mysql

useradd -g mysql -c “MySQL Server” -d /dev/null -s /sbin/nologin mysql

cd /usr/local/src/mysql-4.0.23

./configure \

–prefix=/opt/mysql \

–localstatedir=/opt/mysql/data \

–disable-maintainer-mode \

–with-mysqld-user=mysql \

–with-unix-socket-path=/tmp/mysql.sock \

–without-comment \

–without-debug \

–without-bench

make && make install

./scripts/mysql_install_db

chown -R root:mysql /opt/mysql

chown -R mysql:mysql /opt/mysql/data

cp support-files/my-medium.cnf /etc/my.cnf

chown root:sys /etc/my.cnf

chmod 644 /etc/my.cnf

echo “/usr/local/mysql/lib/mysql” >> /etc/ld.so.conf

ldconfig

cd /opt/mysql/bin

for file in *; do ln -s /opt/mysql/bin/$file /usr/bin/$file; done

# manual step – edit /etc/my.cnf for security reasons

# see my notes (http://www.lamphowto.com/linux/lampssl.htm) for info

# DO NOT remove the test database yet – we’ll need it later to install DBD::Mysql

cd ~

/etc/rc.d/rc3.d/S90mysql start

mysqladmin -u root password new-password
 

BUILD OPENSSL

cd /usr/local/src/openssl-0.9.7e

./config \

–prefix=/usr/local/openssl \

-fPIC

make && make test && make install
 

BUILD MM

cd ../mm-1.3.1

./configure \

–disable-shared \

–with-pic

make && make install

echo “/usr/local/lib” >> /etc/ld.so.conf

ldconfig
 

CONFIGURE MOD_SSL

cd ../mod_ssl-2.8.22-1.3.33

./configure \

–with-apache=../apache_1.3.33 \

–with-ssl=../openssl-0.9.7e \

–with-mm=../mm-1.3.1
 

CONFIGURE MOD_PERL

cd ../mod_perl-1.29

perl Makefile.PL \

EVERYTHING=1 \

APACHE_SRC=../apache_1.3.33/src \

USE_APACI=1 \

PREP_HTTPD=1 \

DO_HTTPD=1

make && make install
 

CONFIGURE APACHE

cd ../apache_1.3.33

SSL_BASE=../openssl-0.9.7e \

EAPI_MM=../mm-1.3.1 \

./configure \

–prefix=/usr/local/apache \

–enable-module=ssl \

–enable-shared=ssl \

–enable-module=rewrite \

–enable-module=most \

–enable-module=so \

–enable-shared=max \

–activate-module=src/modules/perl/libperl.a \

–enable-module=perl

make

make certificate TYPE=custom

make install
 

INSTALL PHP

cd ../php-4.3.10

CFLAGS=’-O2 -I/usr/local/src/openssl-0.9.7e -DEAPI’ \

./configure \

–with-apxs=/usr/local/apache/bin/apxs \

–disable-debug \

–enable-calendar \

–enable-exif \

–enable-ftp \

–enable-inline-optimization \

–enable-magic-quotes \

–enable-mbstring \

–enable-safe-mode \

–enable-sockets \

–enable-track-vars \

–enable-trans-sid \

–enable-wddx=shared \

–enable-xml \

–with-bz2 \

–with-gd \

–with-gettext \

–with-jpeg-dir \

–with-mime-magic \

–with-mysql=/opt/mysql \

–with-mysql-sock=/tmp/mysql.sock \

–with-openssl=/usr/local/openssl \

–with-pear \

–with-png-dir \

–with-regex=system \

–with-xml \

–with-zlib \

–with-zlib-dir=/usr/lib

make && make install

cp php.ini-dist /usr/local/lib/php.ini

# manual step – wrote PEAR system config file at: /usr/local/etc/pear.conf

# Add /usr/local/lib/php to /usr/local/lib/php.ini (include_path)
 

INSTALL RT DEPENDENCY PERL MODULES

# first install expat (http://sourceforge.net/projects/expat/)

cd /usr/local/src/expat-1.95.8

./configure

make && make install

Install CORE dependencies

cd /usr/local/src

perl -MCPAN -e’install URI’

wget http://cpan.org/modules/by-module/Net/Net_SSLeay.pm-1.25.tar.gz

tar zxf Net_SSLeay.pm-1.25.tar.gz

cd Net_SSLeay.pm-1.25

echo “/usr/local/openssl” >> openssl_path

perl Makefile.PL /usr/local/openssl -t

make && make test

# an error on www.ubs.com is ok

make install

RT does provide an ‘auto-install‘ script that should get all the Perl modules in place for you. Try it with the command:

make fixdeps

If it doesn’t work for you, here is a list of the Perl modules you will need, grouped in some semblance of order and sequence to eliminate dependency errors:

perl -MCPAN -e’install IO::Socket::INET’

perl -MCPAN -e’install IO::Socket::SSL’

perl -MCPAN -e’install Module::Build’

perl -MCPAN -e’install Params::Validate’

perl -MCPAN -e’install DBI’

perl -MCPAN -e’install Apache::DBI’

perl -MCPAN -e’install Test::Inline’

perl -MCPAN -e’install Class::ReturnValue’

perl -MCPAN -e’install DBIx::SearchBuilder’

perl -MCPAN -e’install Text::Template’

perl -MCPAN -e’install HTML::Entities’

perl -MCPAN -e’install HTML::Scrubber’

perl -MCPAN -e’install Log::Dispatch’

perl -MCPAN -e’install Locale::Maketext::Lexicon’

perl -MCPAN -e’install Locale::Maketext::Fuzzy’

perl -MCPAN -e’install MIME::Entity’

perl -MCPAN -e’install Mail::Mailer’

perl -MCPAN -e’install Text::Wrapper’

perl -MCPAN -e’install Time::ParseDate’

perl -MCPAN -e’install Text::Autoformat’

perl -MCPAN -e’install Text::Quoted’

perl -MCPAN -e’install Tree::Simple’

perl -MCPAN -e’install Module::Versions::Report’

perl -MCPAN -e’install XML::Parser’

perl -MCPAN -e’install FCGI’
 

DEV dependencies:

perl -MCPAN -e’install Regexp::Common’

perl -MCPAN -e’install Test::Inline’

perl -MCPAN -e’install Test::Memory::Cycle’

perl -MCPAN -e’install Test::Pod’

perl -MCPAN -e’install Test::Pod::Coverage’

perl -MCPAN -e’install Test::Taint’

perl -MCPAN -e’install Test::Warn’

perl -MCPAN -e’install Apache::Test’

 

# enter /usr/local/apache/bin/httpd for httpd location

# enter /usr/local/apache/bin/apxs for apxs location

perl -MCPAN -e’install HTML::Form’

# answer ‘y’ to libwww app installation

perl -MCPAN -e’install HTML::TokeParser’

wget http://cpan.org/modules/by-module/WWW/WWW-Mechanize-1.12.tar.gz

tar zxf WWW-Mechanize-1.12.tar.gz

cd WWW-Mechanize-1.12

perl Makefile.PL

make && make install
 

MAILGATE dependencies

perl -MCPAN -e’install HTML::TreeBuilder’

perl -MCPAN -e’install HTML::FormatText’
 

MASON dependencies

perl -MCPAN -e’install Params::Validate’

perl -MCPAN -e’install Cache::Cache’

perl -MCPAN -e’install Exception::Class’

perl -MCPAN -e’install HTML::Mason’

perl -MCPAN -e’install MLDBM’

perl -MCPAN -e’install FreezeThaw’

perl -MCPAN -e’install Apache::Session’

perl -MCPAN -e’install XML::RSS’
 

MYSQL dependency

# this step requires the ‘test’ database to still be installed for MySQL

wget http://cpan.org/modules/by-module/DBD/DBD-mysql-2.9005_3.tar.gz

tar zxf DBD-mysql-2.9005_3.tar.gz

cd DBD-mysql-2.9005_3

perl Makefile.PL \

–libs=”-L/opt/mysql/lib/mysql -lmysqlclient -lz” \

–cflags=-I/opt/mysql/include/mysql \

–testuser=xxx \ # <- enter your MySQL root username (usually ‘root’)

–testpassword=yyy # <- enter your MySQL root user password

make && make test && make install
 

INSTALL REQUEST TRACKER

cd /usr/local/src/rt-3.2.3

./configure \

–prefix=/opt/rt \

–exec-prefix=/opt/rt \

–with-bin-owner=root \

–with-db-database=tickets \ <- this is the database name RT will use

–with-db-dba=sqladmin \ <- put in your MySQL root username here

–with-db-host=localhost \

–with-db-rt-host=localhost \

–with-db-rt-pass=t1cket \ <- this is the password for the RT MySQL user

–with-db-rt-user=rt_user \ <- this is the username for the RT MySQL user

–with-db-type=mysql \

–with-libs-owner=root \

–with-libs-group=bin \

–with-rt-group=rt \

–with-web-group=httpd \ <- this needs to match httpd.conf

–with-web-user=httpd <- this needs to match httpd.conf

make testdeps

make install

make initialize-database

cd /opt/rt/etc

cp RT_Config.pm RT_SiteConfig.pm

#edit RT_SiteConfig.pm and make relevant changes

# – rtname, Organization, Timezone, OwnerEmail, RTAddressRegexp,

# CanonicalizeEmailAddressMatch, CanonicalizeEmailAddressReplace,

# FriendlyFromLineFormat, FriendlyToLineFormat,

# RT::WebPath
 

CONFIGURE APACHE

Edit /usr/local/apache/httpd/conf/httpd.conf, and add:

NameVirtualHost ip.ad.re.ss

<VirtualHost xx.xx.xx.xx:80>

ServerName host.domain.tld

ServerAdmin email@host.domain.tld

DocumentRoot /home/rt/share/html

AddDefaultCharset UTF-8

PerlModule Apache::DBI

PerlRequire /home/rt/bin/webmux.pl

ErrorLog /var/log/httpd/rt-error_log

CustomLog /var/log/httpd/rt-access_log common

<Location />

SetHandler perl-script

PerlHandler RT::Mason

</Location>

</VirtualHost>

# need to add the step for SSL vsite as well

/usr/local/apache/bin/apachectl stop

/usr/local/apache/bin/apachectl start

Remember that when logging into RT for the first time, use the username

root with password password (and then change the password right away!)
Originally posted on : brucetimberlake.com

Posted by: nakuls77 | September 14, 2008

Changing server time/date & timezone

SSH to your server as root and change directory to:
/usr/share/zoneinfo

Perform an ls –l on the directory and you will see a variety of timezones. To set the server’s local timezone, you will want to copy the timezone file for your timezone and replace the file called /etc/localtime.

For example:
cp EST /etc/localtime

Now that you have configured the proper timezone for your server, you will want to have the time adjusted for your timezone. Perform the following command to have your server contact a remote NTP server and re-establish the proper time:

rdate -s time.nist.gov

Afterwards, you will want to set your hardware clock to the same as well. Use the following command to do this:
/sbin/hwclock –systohc

And that’s it you’ve sucessfully set the date & time as per your preferance.

Posted by: nakuls77 | September 14, 2008

World Time Zone Difference Chart

City Country GMT +/- Hrs
Abu Dhabi UAE +4
Addis Ababa Ethiopia +3
Amsterdam Netherlands +1
Anchorage Alaska -10
Antigua West Indies -4
Athens Greece +2
Auckland New Zealand +12
Baghdad Iraq +3
Bahrain Bahrain +4
Bangkok Thailand +7
Barbados Bermuda -4
Bogotá Colombia -4
Bombay India +5.5
Boston USA -5
Brisbane Australia +10
Brisbane Belgium +1
Budapest Hungry +1
Cairo Egypt +2
Calcutta India +5.5
Caracas Venezuela -4
Chicago USA -6
Colombo Sri Lanka +5.5
Copenhagen Denmark +1
Dacca Bangladesh +6
Darwin Australia +9.5
Delhi India +5.5
Detroit USA -5
Dhahran Saudi Arabia +3
Dubai U.A.E. +4
Entebbe Uganda +3
Frankfurt Germany +1
Georgetown Guyana +1
Hong Kong Hong Kong +8
Honolulu Hawaii -10
Istanbul Turkey +2
Jeddah Saudi Arabia +3
Khartoum Sudan +2
Kingston Jamaica -5
Kuala Lumpur Malaysia +8
Kuwait Kuwait +3
Leningrad Russia +2
Lima Peru -5
London England 0
Los Angeles USA -8
Lusaka Zambia +2
Madrid Spain +1
Mauritius Mauritius +4
Melbourne Australia +10
Mexico City Mexico -6
Miami USA -5
Montreal Canada +5
Manila Philippines +8
Moscow Russia +3
Nairobi Kenya +3
Nadi Fiji +12
New York USA -5
Nicosia Cyprus +2
Osaka Japan +9
Oslo Norway +1
Paris France +1
Perth Australia +8
Prague Czechoslovakia +1
Rome ltaly +1
St. Lucia West Indies -4
Seychelles Seychelles Island +4
Singapore Singapore +8
Stockholm Sweden +1
Sydney Australia +10
Tokyo Japan +9
Toronto Canada -5
Valetta Malta +1
Vienna Austria +1
Washington USA +5
Zurich Switzerland +1
Posted by: nakuls77 | September 14, 2008

Configuring SSH Port & Disabling Direct Root Login

Changing the SSH port & disabling root login is something that everyone should do as it adds an extra level of protection to your server.

Login to your server using root

Edit /etc/sshd/sshd_config

At the top of the file, you will see something similar to:
Port 22
Protocol 2, 1

Change the Protocol line to 2

The port option, it really is up to you what port you use. Just make sure with netstat that it is not being used for anything else. Some common secondary SSH ports are 1024 or 2222.

Scroll down and disable direct root login
PermitRootLogin no

If there is a # in front of the line, make sure to remove it. Now just save the file and exit your editor.

Restart SSH:
/etc/init.d/sshd restart

That’s it, try opening a new session without closing the existing one, just in case you need to roolback the changes or edit anything and check ifi t’s done.

Posted by: nakuls77 | September 14, 2008

Root Login Email Notification

configuring your server so that when someone logs in with root or su, your server will notify you via email.

Please use an email address that is NOT hosted on your server as a hacker could merely delete the emails right off the server.

Login to your server with root

Use any editor to edit .bash_profile

At the end of the file, place the following lines:

echo ‘WARNING – Root Login detected on:’ `date` `who` | mail -s “WARNING -
Root Login: `who | awk ‘{print $6}’`” youremail@domain.com

Now anytime someone gains root access you will be notified via email.

Posted by: nakuls77 | September 14, 2008

Remove Logging of lame server from BIND

Remove the annoying lame server message from BIND that appears on a daily basis in /var/log/messages.

Lame server
A lame server is when the NS record for a domain specifies a server that is not authoritative for the domain. For example, the NS record for www.domain.com may list ns1.domain.com as one of its nameserver; however, if you actually query ns1.domain.com, the nameserver does not answer as an authoritative server.

Turning off logging of lame server
Add the following lines to your /etc/named.conf:
logging {
category lame-servers { null; };
};

This just prevents you from seeing the messages. You can also configure your BIND so that it only answers for domains that it is the authoritative server for by adding the following lines to your /etc/named.conf

acl localip { 127.0.0.1; aaa.bbb.ccc.ddd; };
// replace aaa.bbb.ccc.ddd with your server’s IP address. if you have multiple IP addresses, you should add them all, separated by semi-colons

options {
allow-transfer {
localip;
};
allow-recursion {
localip;
};
}

Once you are done making modifications, restart named and your lame server messages should go away!

Posted by: nakuls77 | September 14, 2008

Using VI editor

Vi is a very powerful editor that has been part of nearly every linux/unix distro for a very long time. Many people stray away from Vi due to the curve involved in learning this editor. This guide will help you dive into the world of Vi. Once you do, you will understand why many prefer Vi over other editors.

There are countless options for Vi that can be set up inside the /etc/vimrc file.

Auto-indent and creating a macro to change the color of the background.
# vi /etc/vimrc

Auto-Indent Option -
This option is so when you tab-space out a line and then press enter, the cursor will move to the next line, automatically indented to the start of the previous line. This helps programmers indent out code easily to create clean looking code. To implement this feature, please add the following line to the bottom of your /etc/vimrc file:

set ai

Please note that generally speaking only programmers will want to turn ON auto-indent.

Background Color -
Some SSH clients have white backgrounds and some have black backgrounds. This can make it very difficult to see the screen depending on the color of the text. This macro allows you to configure F11 to change the background color & color of the text. To implement this feature, please add the following lines to the bottom of your /etc/vimrc file:

set background=dark
map :let &background = ( &background == “dark”? “light” : “dark” )

I would highly recommend adding in the Background Color option. However if you do not wish to implement either of these features, then please proceed on in the guide.

Commands

Cursor Movement
0  (Zero) Start of Line
^ – First non-Blank Character of Line
$ – End of Line
G  Go To Command (prefix with number 5G goes to line 5)

Insert Mode  Inserting/Appending Text
Insert  Start Insert Mode at Cursor

A  Append at the end of the Line
o  open (append) blank link below current line
I  Open blank line above current line
Esc  Exit Insert Mode

Editing
r  Replace a single character (does not use insert mode)
J  Join line below with the current one
cc  Change (replace) an entire line
cw  Change (replace) to the end of word
c$ – Change (replace) to the end of line
s  Delete character at cursor and substitute text
S  Delete line at cursor and substitute text (same as cc)
u  Undo
. – Repeat last command

Cut and Paste
yy  Copy(yank) a line
2yy  Copy(yank) two lines
yw  Copy(yank) word
p  Paste the clipboard after the cursor
P  Paste the clipboard before the cursor
dd  Delete a line
dw  Delete the current word
x  Delete the current character

Exiting
:w  Write (save) the file, but don’t exit
:wq  Write & Quit
:q  Quit
:q! – Quit and don’t save changes

Searching
/pattern  Search for a pattern
?pattern  Search backward for a pattern
n  Repeat last search in same direction
N  Repeat last search in opposite direction
:%2/old/new/g  Replace all old with new throughout file
:%s/old/new/gc  Replace all old with new throughout file with confirmations

Working with Multiple Files
:e filename  Edit a file in a new buffer
:bn  Go to next buffer
:bp  Go to previous buffer
:bd  Close file(buffer)
:sp filename  Open a file in a new buffer and split window
ctrl-ws  Split windows
ctrl-ww  Switch between windows
ctrl-wq  Quite a window
ctrl-wv  Split windows vertically

Using VI
When you first enter vi you are in it’s default mode. This mode allows you to use any of the commands above to perform various functions. Please note that in notepad, or pico, or most other editors, you are by-default put in what VI calls Insert Mode. This means you can insert new text into the document. In order to enter Insert Mode with VI, you press Insert. The word Insert should appear at the bottom of the screen as an indication. To exit Insert mode(so you can save files or whatnot), press Escape.

It does take a little getting used-to, switching between Insert Mode and Vi’s default command mode. You must be in command mode to issue the Quit or Save commands. Once you get used to it, you won’t ever want to go back to pico/nano.

Posted by: nakuls77 | September 14, 2008

Traceroute

What is a trace route (tracert)? How do I run one?
A “traceroute” is a function which traces the path from one network to another. It allows us to diagnose the source of many problems. To be effective, the traceroute must be run during a time when you are experiencing the problem, from a computer that is experiencing the problem. A trace when you are able to connect, or one from another computer, is not helpful. Therefore, you should try to connect to your site again just before you run it. If the problem is no longer occurring, you will have to wait until the next time the problem occurs before running your trace route.

WINDOWS:
In Windows 98 or ME, Go to “Start” > “Run”. Type “command” and press the “Enter” key.
In Windows 2000 or XP, go to “Start” > “Run” and type “cmd” and press the “Enter” key.

This will bring up a ‘command prompt” window. It have a line that looks like this:
C:\Documents and Settings\yourname> _   with a cursor blinking next to the “>” symbol.

To run the traceroute type “tracert [hostname]” where the [hostname] is the name of the server that you are connection testing. This test will proceed some up to a minute or more. It will generate a list of the connection along the way and some information about the speed of the steps along the way. Then you would send us the complete results (every line) for analysis.

If you have difficulty copying the traceroute information, or if it runs off the screen, you can instead type
“tracert yourdomain.name > C:\trace1.txt”.

This would write the command results to a text file named trace1.txt in the root of your C: drive.

MACINTOSH:
If you have OS X, you can use the built-in network tools. Double-click the Hard Drive icon > Applications folder > Utilities folder > Network Utility program. Select the Traceroute tab and enter the hostname.

If you have an older Macintosh, you may need to acquire third party software utility software. Go to http://www.tucows.com and do a search for “Trace” on “Macintosh”. Programs like the ‘DNS Expert Professional’ will allow you to run a “trace route”.

FOR BOTH SYSTEMS:
Please note that “[hostname]” should be replaced with whatever site is not working for you.  If you cannot access your e-mail server, you would actually be running a tracert to mail.yourdomain.name.

If you are having trouble accessing our website, the tracert be to the website’s URL address. Please also note that even if the problem seems to occur at your host, it may actually be a problem at your ISP.

If you like, you can run a secondary traceroute, for your own information, by going to http://visualroute.visualware.com/

I hope this helps. :)

Posted by: nakuls77 | September 14, 2008

Installing phpMyAdmin

This guide will help you install phpMyAdmin into your server and discuss some of the more popular ways of configuring it to operate.

The first step is to download phpMyAdmin. The current version as of the time of this writing can be found at:
http://switch.dl.sourceforge.net/sourceforge/phpmyadmin/phpMyAdmin-2.8.0.2.tar.gz

If 2.8.0.2 is no longer the current version, you can download the newest version from this page:
http://www.phpmyadmin.net/home_page/downloads.php

When you download the file, place it into it’s own directory on your server. I personally prefer a folder called ‘myadmin’ inside my website’s root directory. Go ahead and untar/gunzip the file:
# tar zxvf phpMyAdmin-*.gz

Move the contents of your unzipped folder to the current so ‘myadmin’ is the root folder:
# mv phpMyAdmin-*/* .

Create the config file and set the ownership to your apache webserver. Please note that you will want to change the user & group below to match what your Apache runs as.

# touch config.inc.php ; chown apache:apache config.inc.php

Next you will want to create a temporary folder to store uploads of databases. Again you will want to replace the user & group with that of your Apache server.
# mkdir tmp ; chown apache:apache tmp

Next create a mySQL username, password, and database for phpMyAdmin to use for advanced features.

Using your favorite editor, open the file config.inc.php. You will want to add the following as contents, modifying it as stated below:

//You’ll want to replace your blowfish_secret with a random sequence of letters and numbers.
$cfg['blowfish_secret'] = ‘441b523f1c6c00.312729902′;

//This is the address to your mysql server. In most cases this should be left alone.
$cfg['Servers'][1]['host'] = ‘localhost’;

//This is the extension that phpmyadmin will use to communicate with your mysql server.
$cfg['Servers'][1]['extension'] = ‘mysql’;

//This is the absolute path to your mysql.sock file
$cfg['Servers'][1]['socket'] = ‘/var/lib/mysql/mysql.sock’;

//You will want to leave this at socket unless you are connecting to a remote mysql server
$cfg['Servers'][1]['connect_type'] = ’socket’;
$cfg['Servers'][1]['compress'] = true;

//This is your root mysql username
$cfg['Servers'][1]['controluser'] = ‘phpmyadmin’;

//This is your root mysql password
$cfg['Servers'][1]['controlpass'] = ‘myadmin4ogr’;
$cfg['Servers'][1]['auth_type'] = ‘cookie’;

//This is the mySQL database that you have set aside for phpMyAdmin to use
$cfg['Servers'][1]['pmadb'] = ‘phpmyadmin’;

//You’ll want to leave the rest of these options alone as they are related to the phpMyAdmin database.
$cfg['Servers'][1]['bookmarktable'] = ‘pma_bookmark’;
$cfg['Servers'][1]['relation'] = ‘pma_relation’;
$cfg['Servers'][1]['table_info'] = ‘pma_table_info’;
$cfg['Servers'][1]['table_coords'] = ‘pma_table_coords’;
$cfg['Servers'][1]['pdf_pages'] = ‘pma_pdf_pages’;
$cfg['Servers'][1]['column_info'] = ‘pma_column_info’;
$cfg['Servers'][1]['history'] = ‘pma_history’;

$cfg['UploadDir'] = ‘tmp’;
$cfg['SaveDir'] = ‘tmp’;
$cfg['GD2Available'] = ‘auto’;
?>

Once you are done modifying this, merely save the config file and pull up your phpMyAdmin site and log in!

http://yoursite/myadmin

« Newer Posts - Older Posts »

Categories