Archive

Posts Tagged ‘centOS’

How to make apache gzip

November 15, 2010 Leave a comment

How to use mod_deflate?

# Compress output
AddOutputFilterByType DEFLATE text/html text/css text/plain text/xml application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE !no-gzip !gzip-only-text/html

Categories: Apache, centOS, Zend Tags:

centOS – netbeans

February 20, 2010 1 comment

How to install netbeans 6.9m1

1. download the *.sh

2. [root@www Desktop]# chmod +x netbeans-6.9m1-linux.sh

3. [root@www Desktop]# ./netbeans-6.9m1-linux.sh
Configuring the installer…
Searching for JVM on the system…
Extracting installation data…
Running the installer wizard…

4. /usr/local/netbeans-6.9m1/bin/netbeans

done.

Categories: centOS, Fedora 12 Tags:

centOS – Microsoft Internet explorer, ie, linux ie

February 19, 2010 1 comment

How can i develope website for cross browser’s? As centOS server operator? (never looking back to microsoft).

1. IEs4Linux, project is doing that.

2. wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz

3. [root@www ~]# tar xvfz ies4linux-latest.tar.gz -C /root/

4. [root@www ies4linux-2.99.0.1]# ls
ies4linux lang lib LICENSE mac README ui winereg
[root@www ies4linux-2.99.0.1]# ./ies4linux
You need to install wine first!
Download it here: http://www.winehq.org

5. [root@www ies4linux-2.99.0.1]# yum install wine cabextract

centOS – crashed service need reinstall

February 7, 2010 Leave a comment

/etc/rc.d/rcX.d/S of KXXX script file changed, and service is crashed > resintall it

1. rpm -e –justdb –nodeps packagename
2. yum install packagename
3. chkconfig servicename –list
service servicename status

Categories: centOS, Fedora 12 Tags:

centOS – pop

January 28, 2010 Leave a comment

Lets make a co-location (point of presence) and our own MMR (meet me room)?

a. Home colocation? or b. Wirehouse pro colocations?

A. Home co-location:

What is VDSL?

VDSL stands for Very High Speed Digital Subscriber Line and offers a much faster transmission of data than standard DSL lines. It is delivered via a pair of copper lines twisted together to make a single line.
What’s so different about VDSL?

VDSL is deployed over ordinary phone lines, which makes it a much cheaper option for upgrading than fibre optics or new experimental methods that require power lines.

VDSL2 looks promising with possible bandwidths of up to 30MHz that will enable data transfer rates of up to 100Mbps for both up and down streaming.

This has some exciting prospects for high quality video, such as HDTV, on the Net. In addition, the seven different frequency bands used by VDSL means users can customise their upload and download rates.

ADSL vs VDSL

The existing ADSL and ADSL2+ broadband services have fixed bit rates for downloading and uploading, and cannot support high definition video because of bandwidth limitations. VDSL does not have these limitations and, understandably, VDSL2 has a much greater range than VDSL1. However, ADSL still performs better, in terms of how far away a computer is from a telephone exchange before the service is seriously compromised or unavailable, and is more cost-effective for the average user.

One downside is that while VDSL2 could start with a theoretical maximum of up to 250Mbps (if the computer was inside the telephone exchange), it quickly drops to 100Mbps if the computer moves just half a kilometre away. At one kilometre the rate halves to just 50Mbps. ADSL2+ matches the performance of VDSL if the computer moves to just 1.6km away from the telephone exchange.
Which countries have VDSL?

Japan and Korea are by far the most ardent supporters of VDSL and have made widespread use of it to date. Other countries have been slower to take up the technology, with only one or two providers in each participating country.

Australia only has one VDSL provider, TransACT, an Internet provider based in Canberra. VDSL services are aimed at businesses, not individuals, so it can be assumed the cost of accessing the service is extremely high at this stage. To date, TransACT does not offer VDSL2 services.

- thanks to this vdsl vs adsl tips writter. Now we know the home staff?

Doc: http://www.speedtouch.nl/docs/ConfigGuides/ConfigGuide_IPSec.pdf
Or i can use PSTN/ISDN: cisco soho/linksys (cisco), us robotics, dreytek

Categories: centOS, Fedora 12, Solaris, Unix/Linux Tags:

centOS – proFTPD

January 7, 2010 Leave a comment

Server FTP for Fedora 12

1. Query if installed?

[root@shamun html]# rpm -qa | grep ftp
gvfs-obexftp-1.4.3-1.fc12.i686
proftpd-1.3.2c-1.fc12.i686
lftp-4.0.4-1.fc12.i686
[root@shamun html]#

2. Install

[root@shamun html]# yum install proftpd.i686

3. Check if its on for root else add that line.

[root@shamun html]# cat /etc/proftpd.conf | grep RootLogin
RootLogin                       on
[root@shamun html]#

4. Restart service

[root@shamun html]# service proftpd restart
Shutting down proftpd:                                     [  OK  ]
Starting proftpd:                                          [  OK  ]

TEST? i use firefox > addons >  FireFTP > as a client to

Categories: centOS Tags:

centOS – noip2

January 6, 2010 3 comments

How to dynamic ip to static DNS?
[root@www noip-2.1.9-1]# uname -a
Linux .be 2.6.18-164.el5 #1 SMP Thu Sep 3 03:33:56 EDT 2009 i686 i686 i386 GNU/Linux

#####################################################

1. www.no-ip.com

2. have a account > After login > Hosts/Redirects

3. Add host > anyNames.no-ip.org > for the public ip

4. download the client noip2….tar.gz file

[root@www ~]# wget http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz
–2010-02-14 23:58:28–  http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz
Resolving www.no-ip.com… 204.16.252.112
Connecting to www.no-ip.com|204.16.252.112|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 134188 (131K) [application/x-gzip]
Saving to: `noip-duc-linux.tar.gz’

100%[===================================================================================================================>] 134,188     86.2K/s   in 1.5s

2010-02-14 23:58:30 (86.2 KB/s) – `noip-duc-linux.tar.gz’ saved [134188/134188]

[root@www ~]#

5. upzip

[root@www ~]# tar xvfz noip-duc-linux.tar.gz -C /root/
./._noip-2.1.9-1
noip-2.1.9-1/

6. make fail, use make install

[root@www noip-2.1.9-1]# cp binaries/noip2-i686 noip2
[root@www noip-2.1.9-1]# ls
binaries         gentoo.noip2.sh        LISEZMOI.ENPREMIER  noip2 README.FIRST.FRANCAIS  README.FIRST_PT     redhat.noip.sh
COPYING          LEEME.PRIMERO          mac.osx.startup     noip2.c       README.FIRST.ITALIANO  README.FIRST.pt_BR
debian.noip2.sh  LIESMICH.ERST.deutsch  Makefile            README.FIRST  README.FIRST.JAPANESE  README.FIRST-SWE
[root@www noip-2.1.9-1]# make install
if [ ! -d /usr/local/bin ]; then mkdir -p /usr/local/bin;fi
if [ ! -d /usr/local/etc ]; then mkdir -p /usr/local/etc;fi
cp noip2 /usr/local/bin/noip2
/usr/local/bin/noip2 -C -c /tmp/no-ip2.conf

Auto configuration for Linux client of no-ip.com.

Please enter the login/email string for no-ip.com  sha@gmail.com
Please enter the password for user ‘sha@gmail.com’  ****

Only one host [.no-ip.org] is registered to this account.
It will be used.
Do you wish to run something at successful update?[N] (y/N)  N

New configuration file ‘/tmp/no-ip2.conf’ created.

mv /tmp/no-ip2.conf /usr/local/etc/no-ip2.conf
[root@www noip-2.1.9-1]# mv /tmp/no-ip2.conf /usr/local/etc/no-ip2.conf
mv: cannot stat `/tmp/no-ip2.conf’: No such file or directory

7. Put a standard interval + start the process

[root@www noip-2.1.9-1]# noip2 -U 5
Process 9306 – update interval changed to 5.
Configuration data ‘/usr/local/etc/no-ip2.conf’ updated
[root@www noip-2.1.9-1]# noip2 -S
1 noip2 process active.

Process 9306, started as /root/noip-2.1.9-1/noip2, (version 2.1.9)
Using configuration from /usr/local/etc/no-ip2.conf
Last IP Address set 78.xxx.xxx.xxx
Account sha@gmail.com
configured for:
host  x.no-ip.org
Address check every 5 minutes, directly connected via /dev/eth0.

8. Done..

Categories: centOS, Fedora 12 Tags:

centOS – Postfix + Postfixadmin + Dovecot

January 4, 2010 4 comments

Postfixadmin Installation:

        [root@www /]# uname -a
        Linux www..be 2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT 2009 x86_64 x8 6_64 x86_64 GNU/Linux

1. google download postfixadmin

2. tar xvfz postfixadmin_2.3.tar.gz.tar.gz -C /usr/share/

3. yum install php-imap.i686
        * restart the httpd -k restart

4. vi /usr/share/postfixadmin-2.3/config.inc.php

        config.$CONF['configured'] = true;
        // Database Config
        $CONF['database_type']     = ‘mysql’;
        $CONF['database_host']     = ‘localhost’;
        $CONF['database_user']     = ‘root’;
        $CONF['database_password'] =;
        $CONF['database_name']     = ‘postfix’;
        // Encrypt
        $CONF['encrypt'] = ‘cleartext’; // shamun
        
        [SAVE]

5. http://localhost/postfixadmin/setup.php



6. when you make setup password, copy the given line and past in the following file.
        vi /usr/share/postfixadmin-2.3/config.inc.php
        $CONF['setup_password'] = 'b90d3eceb6e475e85e92b04eb5d6cbd1:e80d6fa140cb7ea3a65783e16e7afc3ebdaa712f';

7. you make admin account thats it.

Note important:

8. make a virtual domain like i did: shamun.be

9. make a virtual email like marie@shamun.be

- this will be needed for a test emails, at the end

Postfix Installation:

1. Add user
        [root@www ~]# useradd vmail
        [root@www ~]# id vmail
        uid=501(vmail) gid=501(vmail) groups=501(vmail) context=user_u:system_r:unconfined_t
        [root@www ~]#

2. Install postfix with mysql support (default is without mysql)
        [root@www etc]# vi /etc/yum.repos.d/CentOS-Base.repo
        
        #[base] and [update] sections of /etc/yum.repos.d/CentOS-Base.repo added
        exclude=postfix-*
        
        [centosplus]
        name=CentOS-$releasever - Plus
        mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
        #baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
        gpgcheck=1
        enabled=1
        gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
        includepkgs=postfix-*
        
        [root@www ~]# yum install postfix
        Installed:
                postfix.x86_64 2:2.3.3-2.1.centos.mysql_pgsql
        
        [root@www postfix]# postconf -m
        btree
        cidr
        environ
        hash
        ldap
        mysql
        nis
        pcre
        pgsql
        proxy
        regexp
        static
        unix
        
        [root@www ~]# whereis postfix
        postfix: /usr/sbin/postfix /etc/postfix /usr/libexec/postfix /usr/share/man/man1/postfix.1.gz
        

3. vi /etc/postfix/main.cf
        # My edits
        virtual_mailbox_domains = mysql:/etc/postfix/mysql-domains.cf
        virtual_mailbox_maps = mysql:/etc/postfix/mysql-users.cf
        virtual_alias_maps = mysql:/etc/postfix/mysql-aliases.cf
        virtual_mailbox_base = /home/vmail
        virtual_uid_maps = static:501
        virtual_gid_maps = static:501
# [optional] but important in production:
# important, this part of postfix is for incoming emails to receive
# when i send email from hellobello@gmail.com to this@setup.com
# Email bounced and gets fail: The error that the other server returned was: 550 550 5.1.1
# So, put this as following
local_recipient_maps = # leave empty incase you want public and local test get success
inet_interfaces = all # instead of localhost

#[optional] - spamm protect
# Spamm kill
permit_mynetwork= $mynetworks
check_relay_domains = $relay_domains, $inet_interfaces
smtpd_helo_required = yes
smtpd_recipient_restrictions =
 permit_mynetworks,
 check_client_access hash:/etc/postfix/clients,
 reject_rbl_client cbl.abuseat.org,
 reject_rbl_client pbl.spamhaus.org,
 reject_rbl_client sbl.spamhaus.org,
 reject_unauth_destination

# test local mail to outside
# test outside mail to inside
# (Test this from shell, that nobody using your box sending emails): telnet relay-test.mail-abuse.org

4. vi /etc/postfix/mysql-domains.cf
# config

host = localhost

user = root

password =

dbname = postfix

table = domain

select_field = domain

where_field = domain

additional_conditions = and backupmx = '0' and active = '1'

#

# Side work - postfixadmin

# add domains ex: mydomain.com

# add email address ex: me@mydomain.com

#
5. Test point 4

[root@www postfix]# postmap -q yourdomain.com mysql:/etc/postfix/mysql-domains.cf

yourdomain.com
6. vi /etc/postfix/mysql-users.cf

host = localhost

user = root

password =

dbname = postfix

table = mailbox

select_field = maildir

where_field = username

additional_conditions = and active = '1'

result_format = %sMaildir/
7. Test point 6

[root@www postfix]# postmap -q support@yourdomain.com mysql:/etc/postfix/mysql-users.cf

support@yourdomain.com/Maildir/

[root@www postfix]#
8. start postfix

[root@www postfix]# postfix reload

[root@www postfix]# service postfix restart

Shutting down postfix: [FAILED]

Starting postfix: [ OK ]

[root@www postfix]#
9. Send mail
[root@www postfix]# telnet localhost smtp

Trying 127.0.0.1...

Connected to localhost.localdomain (127.0.0.1).

Escape character is '^]'.

220 www.yourdomain.com ESMTP Postfix

ehlo host

250-www.yourdomain.com

250-PIPELINING

250-SIZE 10240000

250-VRFY

250-ETRN

250-ENHANCEDSTATUSCODES

250-8BITMIME

250 DSN

mail from: support@yourdomain.com

250 2.1.0 Ok

rcpt to: webmaster@yourdomain.com

250 2.1.5 Ok

data

354 End data with <CR><LF>.<CR><LF>

Dear Marie,

How are you? Alles goed?

Mvg

Shamun

.

250 2.0.0 Ok: queued as 4E20D5F88033

quit

221 2.0.0 Bye

Connection closed by foreign host.

[root@www postfix]#
[root@www home]# tree

.

|-- shamun

`-- vmail

`-- webmaster@yourdomain.com

`-- Maildir

|-- cur

|-- new

| `-- 1269444409.Vfd00I13d0017M216619.www.yourdomain.com

`-- tmp

7 directories, 1 file

[root@www home]#
Dovecot Installation:
1. Install dovecot (dovecot-mysql not need in centos 5.4)

[root@www home]# yum install dovecot.x86_64

Installed:

dovecot.x86_64 0:1.0.7-7.el5
2. Edit

[root@www home]# whereis dovecot

dovecot: /usr/sbin/dovecot /etc/dovecot.conf /usr/libexec/dovecot

[root@www home]# vi /etc/dovecot.conf

# Protocols we want to be serving: imap imaps pop3 pop3s

# If you only want to use dovecot-auth, you can set this to "none".

protocols = pop3 pop3s imap imaps

##

## Mailbox locations and namespaces

##

mail_location = maildir:~/Maildir/

##

## IMAP specific settings

##

protocol imap {

imap_client_workarounds = delay-newmail outlook-idle netscape-eoh

}

##

## POP3 specific settings

##

protocol pop3 {

pop3_uidl_format = %08Xu%08Xv

pop3_client_workarounds = outlook-no-nuls oe-ns-eoh

}

##

## Authentication processes

##

# For 64-bit users: Add the line login_process_size = 64 in the file /etc/dovecot.conf.

auth_username_format = %Lu

auth default {

passdb sql {

args = /etc/dovecot-mysql.conf

}

userdb static {

#args = uid=501 gid=501 home=/home/vmail/%d/%n

#/home/vmail/shamun.be/marie/Maildir/new

args = uid=501 gid=501 home=/home/vmail/%u

#/home/vmail/marie@shamun.be/Maildir/new i am using this way!

}

}


3. vi /etc/dovecot-mysql.conf

driver = mysql

connect = host=localhost dbname=postfix user=root password=

default_pass_scheme = PLAIN

password_query = SELECT password from mailbox where username = '%u'


4. Start dovecot

[root@www home]# service dovecot restart

Stopping Dovecot Imap: [FAILED]

Starting Dovecot Imap: [ OK ]
5. Test

[root@www home]# telnet localhost pop3

Trying 127.0.0.1...

Connected to localhost.localdomain (127.0.0.1).

Escape character is '^]'.

+OK Dovecot ready.

user webmaster@example.com

+OK

pass xxxxxxxxxx

+OK Logged in.

list

+OK 1 messages:

1 520

.

quit

+OK Logging out.

Connection closed by foreign host.

[root@www home]#

Categories: centOS, Fedora 12, MySQL, Unix/Linux Tags:

centOS – VI

January 4, 2010 Leave a comment

Open
vi filename

Close/Quit/Quit without save
:q = close the file, if you didnt modified anything
:q! = close the file even u modified and dont want to save it
:

Save/ Save quit
:wq = save and exit
:x = save and stay

Add

i = from cursor before start append
I = begin of line allow appending

a = after cursor append
A =end of line append

o = new line
O =before cursor new line

Edit
r = from cursor character edit
R = replace from cursor anything on type, until esc pressed

cw = word replace

Del

dd = entire line delete

x = single character

dw = single word

D = remaining of the line starting with current cursor position

Cut/Past

yy = copy the current line into the buffer

Nyy or yNy = copy the next N lines, including the current line, into the buffer

p = paste the line in the buffer into the text after the current line

Searching

/string  = search forward for occurrence of string in text

?string = search backward for occurrence of string in text

n = move to next occurrence of search string

N = move to occurrence of search string in opposite direction

Line numbers:

: .=    returns line number of current line at bottom of screen

:= returns the total number of lines at bottom of screen

^g  provides the current line number, along with the total number of lines, in the file at the bottom of the screen

Style

:set number or :set nu or :set nu!
:syntax on (on vim)

:>>> to indent



centOS – lamp, LAMP Mannually

January 3, 2010 Leave a comment

Two methods to have it:

– XAMPP ( i give up for auto run script and postfix problem, otherwise it fine here : ( http://shamuntoha.wordpress.com/2009/12/01/linux-centos-fedora-lampp/ )

– By hand mySQL, PHP, Apache httpd, PhpmyAdmin

PHP, Apache, PhpMyAdmin:

1. yum install phpMyAdmin

* phpMyAdmin ( framework will be ready to mannually configure )
* PHP (installed)
* httpd (installed)

MySQL:

2. yum install mysql.i686 mysql-server.i686

* it install mysql
* install mysqld

[root@shamun /]# /etc/rc.d/init.d/mysqld status
mysqld is stopped
[root@shamun /]# /etc/rc.d/init.d/mysqld start
Starting MySQL:                                            [  OK  ]
[root@shamun /]# whereis mysqld
mysqld: /usr/libexec/mysqld /usr/share/man/man8/mysqld.8.gz
[root@shamun /]#

3. Check the installation

[root@shamun /]# httpd -v
Server version: Apache/2.2.14 (Unix)
Server built:   Dec  3 2009 10:25:53
[root@shamun /]# php –version
PHP 5.3.1 (cli) (built: Nov 20 2009 12:52:06)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies
[root@shamun /]# mysql –version
mysql  Ver 14.14 Distrib 5.1.41, for redhat-linux-gnu (i386) using readline 5.1
[root@shamun /]#

open browser > http://localhost/phpmyadmin

its loaded now it will ask phpMyAdmin login/password we need to mannually fix it

4. phpMyAdmin

[root@shamun /]# whereis phpMyAdmin
phpMyAdmin: /etc/phpMyAdmin /usr/share/phpMyAdmin
[root@shamun /]#

[root@shamun phpMyAdmin]# ls
config.inc.php
[root@shamun phpMyAdmin]# mkdir config
[root@shamun phpMyAdmin]# chmod o+rw config/
[root@shamun phpMyAdmin]# cp config.inc.php config/
[root@shamun phpMyAdmin]# chmod o+rw config/config.inc.php
[root@shamun phpMyAdmin]# cd config
[root@shamun config]# ls
config.inc.php
[root@shamun config]#

* copy the setup text after saved, and overwrite the settings in /etc/phpMyAdmin/config.inc.php

* then open http://localhost/phpmyadmin > login using root username only.

Categories: Apache, centOS, MySQL, PHP Tags:
Follow

Get every new post delivered to your Inbox.