Rabu, 18 Mei 2016

CentOS / RHEL: Install nmap Network Security Scanner

nstallation

To install nmap on RHEL based Linux distributions, type the following yum command:
# yum install nmap
Sample outputs:
Loaded plugins: protectbase, rhnplugin, security
0 packages excluded due to repository protections
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package nmap.x86_64 2:5.51-2.el6 will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================
 Package    Arch         Version               Repository                  Size
================================================================================
Installing:
 nmap       x86_64       2:5.51-2.el6          rhel-x86_64-server-6       2.8 M
 
Transaction Summary
================================================================================
Install       1 Package(s)
 
Total download size: 2.8 M
Installed size: 0
Is this ok [y/N]: y
Downloading Packages:
nmap-5.51-2.el6.x86_64.rpm                               | 2.8 MB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : 2:nmap-5.51-2.el6.x86_64                                     1/1
  Verifying  : 2:nmap-5.51-2.el6.x86_64                                     1/1
 
Installed:
  nmap.x86_64 2:5.51-2.el6
 
Complete!

How do I use nmap command?

To find out nmap version, run:
# nmap --version
Sample outputs:
Nmap version 5.51 ( http://nmap.org )
To scan an IP address or a host name (FQDN), run:
# nmap 1.2.3.4
# nmap localhost
# nmap 192.168.1.1

Sample outputs:
Fig.01: nmap in action
Fig.01: nmap in action

Getting more information out of the remote system

The -v option forces verbose output and the -A optipn enables OS detection and Version detection, Script scanning and traceroute in a single command:
# nmap -v -A scanme.nmap.org
# nmap -v -A 192.168.1.1

Sample outputs:
Starting Nmap 5.00 ( http://nmap.org ) at 2012-11-19 16:38 IST
NSE: Loaded 30 scripts for scanning.
Initiating ARP Ping Scan at 16:38
Scanning 192.168.1.1 [1 port]
Completed ARP Ping Scan at 16:38, 0.04s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 16:38
Completed Parallel DNS resolution of 1 host. at 16:38, 0.00s elapsed
Initiating SYN Stealth Scan at 16:38
Scanning 192.168.1.1 [1000 ports]
Discovered open port 80/tcp on 192.168.1.1
Discovered open port 22/tcp on 192.168.1.1
Completed SYN Stealth Scan at 16:38, 0.27s elapsed (1000 total ports)
Initiating Service scan at 16:38
Scanning 2 services on 192.168.1.1
Completed Service scan at 16:39, 66.11s elapsed (2 services on 1 host)
Initiating OS detection (try #1) against 192.168.1.1
Retrying OS detection (try #2) against 192.168.1.1
Retrying OS detection (try #3) against 192.168.1.1
Retrying OS detection (try #4) against 192.168.1.1
Retrying OS detection (try #5) against 192.168.1.1
NSE: Script scanning 192.168.1.1.
NSE: Starting runlevel 1 scan
Initiating NSE at 16:40
Completed NSE at 16:40, 0.88s elapsed
NSE: Script Scanning completed.
Host 192.168.1.1 is up (0.00050s latency).
Interesting ports on 192.168.1.1:
Not shown: 998 closed ports
PORT   STATE SERVICE VERSION
22/tcp open  ssh     Dropbear sshd 0.52 (protocol 2.0)
|  ssh-hostkey: 1024 15:b6:b5:68:dc:36:97:76:19:72:4d:74:63:d6:18:35 (DSA)
|_ 1040 d2:75:67:8e:51:4d:4b:f6:25:f0:46:e3:a8:9e:8f:42 (RSA)
80/tcp open  http?
|_ html-title: Error
|  http-auth: HTTP Service requires authentication
|_   Auth type: Basic, realm = tswitch
1 service unrecognized despite returning data. If you know the service/version, please submit the following fingerprint at http://www.insecure.org/cgi-bin/servicefp-submit.cgi :
SF-Port80-TCP:V=5.00%I=7%D=11/19%Time=50AA133E%P=x86_64-unknown-linux-gnu%
SF:r(GetRequest,17E,"HTTP/1\.0\x20401\x20Unauthorized\r\nDate:\x20Mon,\x20
SF:19\x20Nov\x202012\x2011:08:46\x20GMT\r\nContent-Type:\x20text/html;\x20
SF:charset=utf-8\r\nCache-Control:\x20no-cache,\x20no-store,\x20must-reval
SF:idate,\x20private\r\nExpires:\x20Thu,\x2031\x20Dec\x201970\x2000:00:00\
SF:x20GMT\r\nPragma:\x20no-cache\r\nWWW-Authenticate:\x20Basic\x20realm=\"
SF:tswitch\"\r\nConnection:\x20close\r\n\r\nError</titl
SF:e></head><body><h2>
401\x20Unauthorized</h2>
\x20Unauthorized</body></htm
SF:l>"</span><span style="">)</span>%r<span style="">(</span>FourOhFourRequest,17E,<span style="color: #933;">"HTTP/1\.0\x20401\x20Unauthorized\r\nDate:
SF:\x20Mon,\x2019\x20Nov\x202012\x2011:08:51\x20GMT\r\nContent-Type:\x20te
SF:xt/html;\x20charset=utf-8\r\nCache-Control:\x20no-cache,\x20no-store,\x
SF:20must-revalidate,\x20private\r\nExpires:\x20Thu,\x2031\x20Dec\x201970\
SF:x2000:00:00\x20GMT\r\nPragma:\x20no-cache\r\nWWW-Authenticate:\x20Basic
SF:\x20realm=\"</span>tswitch\<span style="color: #933;">"\r\nConnection:\x20close\r\n\r\n<html><head><title
SF:>Error

401\x20Unauthorized

\x20Unauthorized SF:"
)%r(Help,15E,"HTTP/1\.0\x20400\x20Invalid\x20Request\r\n SF:Date:\x20Mon,\x2019\x20Nov\x202012\x2011:09:06\x20GMT\r\nContent-Type:\ SF:x20text/html;\x20charset=utf-8\r\nCache-Control:\x20no-cache,\x20no-sto SF:re,\x20must-revalidate,\x20private\r\nExpires:\x20Thu,\x2031\x20Dec\x20 SF:1970\x2000:00:00\x20GMT\r\nPragma:\x20no-cache\r\nConnection:\x20close\ SF:r\n\r\nError

400\x20Invalid\ SF:x20Request

\x20Invalid\x20Request"
)%r(LPDString,15E," SF:HTTP/1\.0\x20400\x20Invalid\x20Request\r\nDate:\x20Mon,\x2019\x20Nov\x2 SF:02012\x2011:09:11\x20GMT\r\nContent-Type:\x20text/html;\x20charset=utf- SF:8\r\nCache-Control:\x20no-cache,\x20no-store,\x20must-revalidate,\x20pr SF:ivate\r\nExpires:\x20Thu,\x2031\x20Dec\x201970\x2000:00:00\x20GMT\r\nPr SF:agma:\x20no-cache\r\nConnection:\x20close\r\n\r\nErr SF:or

400\x20Invalid\x20Request

\x20Invalid\x2 SF:0Request"
); MAC Address: BC:AE:C5:C3:16:93 (Unknown) No exact OS matches for host (If you know what OS is running on it, see http://nmap.org/submit/ ). TCP/IP fingerprint: OS:SCAN(V=5.00%D=11/19%OT=22%CT=1%CU=35558%PV=Y%DS=1%G=Y%M=BCAEC5%TM=50AA13 OS:8B%P=x86_64-unknown-linux-gnu)SEQ(CI=Z%II=I)ECN(R=Y%DF=Y%T=40%W=4600%O=M OS:2300NNSNW2%CC=N%Q=)T1(R=N)T2(R=N)T3(R=N)T4(R=Y%DF=Y%T=40%W=0%S=A%A=Z%F=R OS:%O=%RD=0%Q=)T5(R=Y%DF=Y%T=40%W=0%S=Z%A=S+%F=AR%O=%RD=0%Q=)T6(R=Y%DF=Y%T= OS:40%W=0%S=A%A=Z%F=R%O=%RD=0%Q=)T7(R=N)U1(R=Y%DF=N%T=40%IPL=164%UN=0%RIPL= OS:G%RID=G%RIPCK=G%RUCK=G%RUD=G)IE(R=Y%DFI=N%T=40%CD=S)   Network Distance: 1 hop   Read data files from: /usr/share/nmap OS and Service detection performed. Please report any incorrect results at http://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 83.27 seconds Raw packets sent: 1266 (62.072KB) | Rcvd: 1036 (44.320KB)

To scan a range of IP addresses

# nmap 192.168.1.1-50

To scan an entire subnet

# nmap 192.168.1.0/24

Ping only scan

# nmap -sP 192.168.1.1

TCP SYN scan

# nmap -sS 192.168.1.1

UDP scan

# nmap -sU 192.168.1.1

IP protocol scan

# nmap -sO 192.168.1.1

Scan port 80, 25, 443, and 110

# nmap -p 80,25,443,110 192.168.1.1

Scan port ranges 1024-2048

# nmap -p 1024-2048 192.168.1.1

Operating system detection

# nmap -O --osscan-guess 192.168.1.1


Source : Cyberciti.biz

LibreOffice 5.1.3 Released – Install on RHEL/CentOS/Fedora and Debian/Ubuntu/Linux Mint

Step 1: Downloading LibreOffice 5.1.3

 For RHEL/CentOS/Fedora

 

# cd /tmp

---------------------------- On 32-bit Systems ---------------------------- 
# wget http://download.documentfoundation.org/libreoffice/stable/5.1.3/rpm/x86/LibreOffice_5.1.3_Linux_x86_rpm.tar.gz


---------------------------- On 64-bit Systems ---------------------------- 
# wget http://download.documentfoundation.org/libreoffice/stable/5.1.3/rpm/x86_64/LibreOffice_5.1.3_Linux_x86-64_rpm.tar.gz
 
 
For Debian/Ubuntu/LinuxMint
 
---------------------------- On 32-bit Systems ---------------------------- 
$ wget http://download.documentfoundation.org/libreoffice/stable/5.1.3/deb/x86/LibreOffice_5.1.3_Linux_x86_deb.tar.gz


---------------------------- On 64-bit Systems ---------------------------- 
$ wget http://download.documentfoundation.org/libreoffice/stable/5.1.3/deb/x86_64/LibreOffice_5.1.3_Linux_x86-64_deb.tar.gz
 

Step 2: Removing Old OpenOffice Version

If any previously installed LibreOffice or OpenOffice versions you have, remove it using following command.

# yum remove openoffice* libreoffice*   [on RedHat based Systems]
 
$ sudo apt-get remove openoffice* libreoffice*  [On Debian based Systems] 


 Step 3: Extracting LibreOffice 5.1.3 Package

 

On RHEL/CentOS/Fedora
 
# tar -xvf LibreOffice_5.1.3_Linux_x86_rpm.tar.gz   [On 32-Bit Systems] 
# tar -xvf LibreOffice_5.1.3_Linux_x86-64_rpm.tar.gz  [On 64-Bit Systems] 
 
On Debian/Ubuntu/Linux Mint
$ tar -xvf LibreOffice_5.1.3_Linux_x86_deb.tar.gz   [On 32-Bit Systems] 
$ tar -xvf LibreOffice_5.1.3_Linux_x86-64_deb.tar.gz  [On 64-Bit Systems] 
 

Step 4: Installing LibreOffice 5.1.3 Package

On RHEL/CentOS/Fedora
## For 32 Bit OS ##
# cd /tmp/LibreOffice_5.1.3.3_Linux_x86_rpm/RPMS/
# yum localinstall *.rpm
OR
# dnf install *.rpm    [On Fedora 23+ versions]

## For 64 Bit OS ##
# cd /tmp/LibreOffice_5.1.3.3_Linux_x86-64_rpm/RPMS/
# yum localinstall *.rpm
OR
# dnf install *.rpm    [On Fedora 23+ versions]
 
Installing LibreOffice 5.0.2 on CentOS
[root@localhost RPMS]# yum localinstall *.rpm

On Debian/Ubuntu/Linux Mint
## For 32 Bit OS ##
$ cd /tmp/LibreOffice_5.1.3.3_Linux_x86_deb/DEBS/
$ sudo dpkg -i *.deb

## For 64 Bit OS ##
$ cd /tmp/LibreOffice_5.1.3.3_Linux_x86-64_deb/DEBS/
$ sudo dpkg -i *.deb
 
Installing LibreOffice 5.1.3 on Ubuntu
tecmint@tecmint ~/LibreOffice_5.1.3.3_Linux_x86_deb/DEBS $ sudo dpkg -i *.deb


Step 5: Starting LibreOffice 5.1.3

 

 

 

Source : http://www.tecmint.com/








 
 
 

 

 
 
 

 

Kamis, 28 April 2016

Setup FTP Server On CentOS, RHEL, Scientific Linux 6.5/6.4/6.3

vsftpd (Very Secure File Transport Protocol Daemon) is a secure, fast FTP server for Unix/Linux systems. In this how-to article, let us see how to setup a basic FTP server using vsftpd on CentOS 6.5. This procedure will also work on all RHEL CentOS, Scientific Linux 6.x versions.

 My testbox server hostname and IP Address are server.unixmen.local and 192.168.1.101/24 respectively. Change the values as per your scenario.
Install vsftpd
All commands should be run with ‘root’ user. Run the following command in terminal to install vsftpd package:
# yum install vsftpd ftp -y
Configure vsftpd
Edit vsftpd configuration file /etc/vsftpd/vsftpd.conf,
# vi /etc/vsftpd/vsftpd.conf
Find the following lines and make the changes as shown below:
 [...]
## Set to "NO" ##
anonymous_enable=NO
## Uncomment ##
ascii_upload_enable=YES
ascii_download_enable=YES
## Uncomment - Enter your Welcome message - This is optional ##
ftpd_banner=Welcome to UNIXMEN FTP service.
## Add at the end of this  file ##
use_localtime=YES
Start the vsftpd service and make it to start automatically on every reboot:
# service vsftpd start
# chkconfig vsftpd on
Create FTP users
By default, root user is not allowed to login to ftp server for security purpose. So let us create a testing user called “sk” with password “centos”:
# useradd sk
# passwd sk
Connecting to FTP server
Now let us try to connect to FTP server itself with user “sk”:
# ftp 192.168.1.101
Connected to 192.168.1.101 (192.168.1.101).
220 Welcome to UNIXMEN FTP service.
Name (192.168.1.101:root): sk
331 Please specify the password.
Password:
500 OOPS: cannot change directory:/home/sk
Login failed.
ftp> 
Probably you will get an error like “500 OOPS: cannot change directory”.
This is because your SELinux restricts the user to log in to ftp server. So let us update the SELinux boolean values for FTP service:
# setsebool -P ftp_home_dir on
Now try again to login to FTP server:
# ftp 192.168.1.101
Connected to 192.168.1.101 (192.168.1.101).
220 Welcome to UNIXMEN FTP service.
Name (192.168.1.101:root): sk
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> 
Now you will be able to login to FTP server without any problems.
Client side configuration
Let me try to log in to the FTP server from my Ubuntu client system.
$ ftp 192.168.1.101
ftp: connect: No route to host
ftp>
You might see the above error like “ftp:connect:No route to host”. To resolve this error, allow the default ftp port “21” through your firewall or router. In the server side, do the following.
Edit file /etc/sysconfig/iptables,
# vi /etc/sysconfig/iptables
Add the following lines.
[...]
-A INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT
[...]
Save and exit the file. Restart iptables now:
# service iptables restart
Now try again from the client system to login to FTP server:
$ ftp 192.168.1.101
Connected to 192.168.1.101.
220 Welcome to UNIXMEN FTP service.
Name (192.168.1.101:sk): sk
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> 
Boom!! It’s working now.
Working from command-line mode might be little bit annoying to newbies. So let us install a graphical FTP client called Filezilla to get things done quite easier:
$ sudo apt-get install filezilla
For RHEL based systems, you can install filezilla using following command:
# yum install filezilla
Open Filezilla client from your client system “Dash” or “Menu”. Enter the FTP server hostname or IP Address, username, password and port number. Click “Quickconnect” to login.


(Source : unixmen.com)

Rabu, 27 April 2016

Install Joomla 3 on CentOS 6.5 Minimal x86_64

CentOS 6.5 Minimal x86_64

Complete your base operating system installation or you can follow my guide found at the URL below. When following my guide, hold off on executing yum updates until after configuring EPEL and REMI repositories.


https://github.com/rharmonson/richtech/wiki/CentOS-6.5-Minimal-x86_64-Base-Installation-Guide
 
 
 
 

EPEL Repository

Add the Extra Packages for Enterprise Linux repository. This is required to meet REMI repository requirements. See my guide here:
https://github.com/rharmonson/richtech/wiki/EPEL-Repository-on-CentOS-6.5 



REMI Repository

Add Remi Collet's repository to meet Joomla's PHP requirements. Guide here:
https://github.com/rharmonson/richtech/wiki/REMI-Repository-on-CentOS-6.5
 
 

Install Prerequisites

 

yum install open-vm-tools system-config-firewall-tui system-config-network-tui httpd mysql-server php php-mysql wget unzip
 
 
 
Results:
Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: httpd x86_64 2.2.15-30.el6.centos updates 821 k mysql-server x86_64 5.1.73-3.el6_5 updates 8.6 M open-vm-tools x86_64 9.4.0-8.el6 epel 401 k php x86_64 5.3.3-27.el6_5 updates 1.1 M php-mysql x86_64 5.3.3-27.el6_5 updates 81 k system-config-firewall-tui noarch 1.2.27-5.el6 base 37 k unzip x86_64 6.0-1.el6 base 149 k wget x86_64 1.12-1.11.el6_5 updates 483 k Installing for dependencies: apr x86_64 1.3.9-5.el6_2 base 123 k apr-util x86_64 1.3.9-3.el6_0.1 base 87 k apr-util-ldap x86_64 1.3.9-3.el6_0.1 base 15 k dbus x86_64 1:1.2.24-7.el6_3 base 207 k httpd-tools x86_64 2.2.15-30.el6.centos updates 73 k libdnet x86_64 1.12-6.el6 epel 28 k libicu x86_64 4.2.1-9.1.el6_2 base 4.9 M mailcap noarch 2.1.31-2.el6 base 27 k mysql x86_64 5.1.73-3.el6_5 updates 894 k perl x86_64 4:5.10.1-136.el6 base 10 M perl-DBD-MySQL x86_64 4.013-3.el6 base 134 k perl-DBI x86_64 1.609-4.el6 base 705 k perl-Module-Pluggable x86_64 1:3.90-136.el6 base 40 k perl-Pod-Escapes x86_64 1:1.04-136.el6 base 32 k perl-Pod-Simple x86_64 1:3.13-136.el6 base 212 k perl-libs x86_64 4:5.10.1-136.el6 base 578 k perl-version x86_64 3:0.77-136.el6 base 51 k php-cli x86_64 5.3.3-27.el6_5 updates 2.2 M php-common x86_64 5.3.3-27.el6_5 updates 525 k php-pdo x86_64 5.3.3-27.el6_5 updates 75 k Transaction Summary ================================================================================ Install 28 Package(s) Total download size: 33 M Installed size: 104 M

Upgrade PHP

Joomla's PHP requirements are not met if only using CentOS and EPEL repos, thus upgrade from REMI. As a side effect, MySQL is updated as well. Note you can update using remi-php55 or remi-php56.
# yum --disablerepo="*" --enablerepo="remi" upgrade Results:
================================================================================ Package Arch Version Repository Size ================================================================================ Updating: mysql x86_64 5.5.37-1.el6.remi remi 5.8 M mysql-libs x86_64 5.5.37-1.el6.remi remi 776 k mysql-server x86_64 5.5.37-1.el6.remi remi 10 M php x86_64 5.4.28-1.el6.remi remi 2.7 M php-cli x86_64 5.4.28-1.el6.remi remi 2.6 M php-common x86_64 5.4.28-1.el6.remi remi 930 k php-mysql x86_64 5.4.28-1.el6.remi remi 136 k php-pdo x86_64 5.4.28-1.el6.remi remi 120 k Installing for dependencies: compat-mysql51 x86_64 5.1.54-1.el6.remi remi 1.4 M Transaction Summary ================================================================================ Install 1 Package(s) Upgrade 8 Package(s) Total download size: 24 M

MySQL Configuration

Start mysqld
# service mysqld start Configure MySQL
Respond with yes for each option. Don't forget the root password!
# /usr/bin/mysql_secure_installation Enable mysqld to start on boot.
# chkconfig mysqld on

PHP Configuration

Update php.ini to meet Joomla's requirements. Values may vary, but use the one below or research each to determine what will work best for you.
# vi /etc/php.ini Below are the values I use, however, your mileage may vary. The post_max_size and upload_max_filesize are initially set to values too low to permit installing third party addons much less permit users to upload files. The upload_tmp_dir must be owned by the web service, i.e. apache.
output_buffering = Off upload_tmp_dir = /var/www/html/temp post_max_size = 30M upload_max_filesize = 30M

Apache2 (httpd) Configuration

Minor changes to Apache2 to reduce the ease of fingerprinting. Not a requirement, but advisable.
# vi /etc/httpd/conf/httpd.conf Update the following:
ServerSignature Off ServerTokens Prod Lastly, enable apache2 to start on boot, test httpd.conf, then start httpd.
# chkconfig httpd on # service httpd configtest # service httpd start

Firewall

Execute the iptables text user interface to permit http or web access to Joomla.
# system-config-firewall-tui

Test

Open a browser, enter the URL to your Joomla host which should look something like http:///, and if all is working, apache2's default web page will be displayed.
It works! This is the default web page for this server. The web server software is running but no content has been added, yet.

Joomla Installation

At the time of the installation, Joomla 3.3.0 was the most current version. Update the URL below to reflect the version you want to install.
# wget http://joomlacode.org/gf/download/frsrelease/19393/158832/Joomla_3.3.0-Stable-Full_Package.zip # unzip Joomla_3.3.0-Stable-Full_Package.zip -d /var/www/html/ # chown -R apache.apache /var/www/html # cp /var/www/html/htaccess.txt /var/www/html/.htaccess Browse to https:///joomla/ to continue with Joomla CMS configuration.



(sources : github.com)

Rabu, 09 Desember 2015

Share HTTP Port 80 antara Zimbra dan Apache

Problem awal bagaimana caranya menjadikan mail server dengan zimbra sekaligus webserver.
Asumsi
Server dengan OS Centos 5.1 Base Aplication sudah terinstall dengan baik. Zimbra sudah terinstall dan berjalan dengan baik pula. Setelah baca-baca di wiki yang harus di lakukan adalah:
1. Ganti sebagai user zimbra dan ganti zimbraMailPort dengan port yang lain, disini saya menggunakan port 81 sama seperti yang ada pada contoh di wiki.
[root@mail ~]# su – zimbra
[zimbra@mail ~]$ zmprov ms mail.zimbraku.com zimbraMailPort 81
2. Create ulang zimbraMtaAuthHost
[zimbra@mail ~]$ zmprov ms mail.zimbraku.com zimbraMtaAuthHost mail.zimbraku.com
3. stop zimbra dan jalankan kembali
[zimbra@mail ~]$ zmcontrol stop
Host mail.zimbraku.com
Stopping stats…Done
Stopping mta…Done
Stopping spell…Done
Stopping snmp…Done
Stopping archiving…Done
Stopping antivirus…Done
Stopping antispam…Done
Stopping imapproxy…Done
Stopping mailbox…Done
Stopping logger…Done
Stopping ldap…Done
[zimbra@mail ~]$ zmcontrol start
Host mail.zimbraku.com
Starting ldap…Done.
Starting logger…Done.
Starting mailbox…Done.
Starting antispam…Done.
Starting antivirus…Done.
Starting snmp…Done.
Starting mta…Done.
Starting stats…Done.
4. Kemudian, install apache pada server, jika apache sudah terinstall edit /etc/httpd/conf/httpd.conf, cari dan pastikan uncoment / hilangkan tanda “#”
LoadModule proxy_module modules/mod_proxy.so
5. Tambahkan pada /etc/httpd/conf/httpd.conf
NameVirtualHost *:80

ServerAdmin webmaster@zimbraku.com
DocumentRoot “/var/www/html”
ServerName http://www.zimbraku.com


ServerAdmin webmaster@zimbraku.com
ServerName mail.zimbraku.com
ProxyPass / http://mail.zimbraku.com:81/
ProxyPassReverse / http://mail.zimbraku.com:81/

6. kemudian restart httpd dengan cara ;
[root@mail ~]# /etc/init.d/httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]

Installing Zimbra Collaboration Server on Centos-6.. Or rhel-6

Zimbra- Zimbra Collaboration Suite (ZCS) is a collaborative software suite, that includes an email server and web client, currently owned and developed by Zimbra, Inc (formerly Telligent Systems).

Zimbra was initially developed by Zimbra, Inc., and first released in 2005. The company was subsequently purchased by Yahoo in September 2007, and later sold to VMware on January 12, 2010. In July 2013, it was sold by VMware to Telligent Systems which changed its name to Zimbra, Inc. in September 2013.More...


Server System Details-
 

OS-               Centos-6.4
HOSTNAME- server.ashu.com
IP-                 192.168.0.20/24

Step-1- Change Hostname-

[root@server ~]# vim /etc/sysconfig/network
HOSTNAME=server.ashu.com


[root@server ~]# vim /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.1.5      server.ashu.com         serve
r
 

Step-2 Change IP...

[root@server ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0

-----------------------------------------------------------------------DEVICE="eth0"
IPADDR=192.168.0.20
NETMASK=255.255.255.0
HWADDR="00:16:D4:39:5B:6F"
NM_CONTROLLED="yes"
ONBOOT="yes"

-----------------------------------------------------------------------
Restart Network Services..

[root@server ~]# service network restart

Check Hostname..

[root@server ~]# hostname

Check IP..

[root@server ~]# ifconfig

Step-3 Update Your System...

[root@server ~]# yum update

Step-4 Install prerequisite package for zimbra..

[root@server ~]# yum install sysstat libidn gmp libtool-ltdl compat-glib vixie-cron nc perl libstdc++.i686

Step-5 Nodify /etc/sudoers file..

 
Note- Comment out " Defaults       requiretty " line

[root@server ~]# vim /etc/sudoers

-----------------------------------------------------------------------# Disable "ssh hostname sudo ", because it will show the password in clear.
#         You have to run "ssh -t hostname sudo ".
#
# Defaults    requiretty

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


Step-6 Disable start-up services..

[root@server ~]# chkconfig postfix off

[root@server ~]# service postfix stop

[root@server ~]# chkconfig sendmail off

[root@server ~]# service sendmail stop

Step-7 Disable or adjust your firewall...

[root@server ~]# chkconfig iptables off

[root@server ~]# service iptables off

[root@server ~]# chkconfig ip6tables off

[root@server ~]# service ip6tables stop


Step-8 Disable selinux

[root@server ~]# vim /etc/selinux/config

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

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disable
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

-------------------------------------------------------------------------------Step-9 Now Reboot System..

[root@server ~]# reboot

Step-10 Download Zimbra..

[root@server ~]# cd /tmp/

[root@server tmp]# wget files2.zimbra.com/downloads/8.0.7_GA/zcs-8.0.7_GA_6021.RHEL6_64.20140408123911.tgz


[root@server tmp]# tar xzf zcs-8.0.7_GA_6021.RHEL6_64.20140408123911.tgz
[root@server tmp]# cd zcs-8.0.7_GA_6021.RHEL6_64.20140408123911


Step-11 Run Zimbra installer...

[root@server zcs-8.0.7_GA_6021.RHEL6_64.20140408123911]# ./install.sh

-----------------------------------------------------------------------
Operations logged to /tmp/install.log.1139
Checking for existing installation...
    zimbra-ldap...NOT FOUND
    zimbra-logger...NOT FOUND
    zimbra-mta...NOT FOUND
    zimbra-snmp...NOT FOUND
    zimbra-store...NOT FOUND
    zimbra-apache...NOT FOUND
    zimbra-spell...NOT FOUND
    zimbra-convertd...NOT FOUND
    zimbra-memcached...NOT FOUND
    zimbra-proxy...NOT FOUND
    zimbra-archiving...NOT FOUND
    zimbra-cluster...NOT FOUND
    zimbra-core...NOT FOUND

PLEASE READ THIS AGREEMENT CAREFULLY BEFORE USING THE SOFTWARE.
ZIMBRA, INC. ("ZIMBRA") WILL ONLY LICENSE THIS SOFTWARE TO YOU IF YOU
FIRST ACCEPT THE TERMS OF THIS AGREEMENT. BY DOWNLOADING OR INSTALLING
THE SOFTWARE, OR USING THE PRODUCT, YOU ARE CONSENTING TO BE BOUND BY
THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL OF THE TERMS OF THIS
AGREEMENT, THEN DO NOT DOWNLOAD, INSTALL OR USE THE PRODUCT.

License Terms for the Zimbra Collaboration Suite:
  http://www.zimbra.com/license/zimbra_public_eula_2.1.html

Do you agree with the terms of the software license agreement? [N] y

Oracle Binary Code License Agreement for the Java SE Platform Products

ORACLE  AMERICA, INC. ("ORACLE"), FOR AND ON BEHALF OF ITSELF AND ITS SUBSIDIARIES AND AFFILIATES UNDER COMMON CONTROL, IS WILLING TO  LICENSE  THE SOFTWARE  TO YOU ONLY UPON THE CONDITION THAT YOU ACCEPT ALL OF THE TERMS  CONTAINED IN THIS BINARY CODE LICENSE AGREEMENT AND SUPPLEMENTAL  LICENSE TERMS (COLLECTIVELY "AGREEMENT").  PLEASE READ THE AGREEMENT  CAREFULLY.  BY SELECTING THE "ACCEPT LICENSE AGREEMENT" (OR THE EQUIVALENT) BUTTON AND/OR BY USING THE SOFTWARE YOU ACKNOWLEDGE THAT YOU HAVE READ THE TERMS AND AGREE TO THEM.  IF YOU ARE AGREEING TO THESE TERMS ON BEHALF OF A  COMPANY OR OTHER LEGAL ENTITY, YOU REPRESENT THAT YOU HAVE THE LEGAL  AUTHORITY TO BIND THE LEGAL ENTITY TO THESE TERMS.  IF YOU DO NOT HAVE SUCH  AUTHORITY, OR IF YOU DO NOT WISH TO BE BOUND BY THE TERMS, THEN SELECT THE "DECLINE LICENSE AGREEMENT" (OR THE EQUIVALENT) BUTTON AND YOU MUST NOT USE THE SOFTWARE ON THIS SITE OR ANY OTHER MEDIA ON WHICH THE SOFTWARE IS CONTAINED.............
......................
...........................

For inquiries please contact:  Oracle America, Inc., 500 Oracle Parkway,
Redwood Shores, California 94065, USA.

Last updated May 17, 2011

Do you agree with the terms of the software license agreement? [N] y

Checking for prerequisites...
     FOUND: NPTL
     FOUND: nc-1.84-22
     FOUND: sudo-1.7.4p5-11
     FOUND: libidn-1.18-2
     FOUND: gmp-4.3.1-7
     FOUND: /usr/lib64/libstdc++.so.6

Checking for suggested prerequisites...
     FOUND: perl-5.10.1
     FOUND: sysstat
     FOUND: sqlite
Prerequisite check complete.
Checking for installable packages

Found zimbra-core
Found zimbra-ldap
Found zimbra-logger
Found zimbra-mta
Found zimbra-snmp
Found zimbra-store
Found zimbra-apache
Found zimbra-spell
Found zimbra-memcached
Found zimbra-proxy

Select the packages to install
Install zimbra-ldap [Y]y

Install zimbra-logger [Y]y

Install zimbra-mta [Y]y

Install zimbra-snmp [Y]n

Install zimbra-store [Y]y

Install zimbra-apache [Y]y

Install zimbra-spell [Y]y

Install zimbra-memcached [N]n

Install zimbra-proxy [N]n
Checking required space for zimbra-core
Checking space for zimbra-store
Installing:
    zimbra-core
    zimbra-logger
    zimbra-mta
    zimbra-snmp
    zimbra-store
    zimbra-apache
    zimbra-spell
The system will be modified.  Continue? [N] y
Removing /opt/zimbra
Removing zimbra crontab entry...done.
Cleaning up zimbra init scripts...done.
Cleaning up /etc/ld.so.conf...done.
Cleaning up /etc/security/limits.conf...done.
Finished removing Zimbra Collaboration Server.
Installing packages
zimbra-core......zimbra-.........
..................
.....................
............................
.....................................

DNS ERROR resolving server.ashu.com
It is suggested that the hostname be resolvable via DNS
Change hostname[Yes] no

DNS ERROR resolving MX for server.ashu.com
It is suggested that the domain name have an MX record configured in DNS
change domain name?[Yes] yes
Create domain: [server.ashu.com] ashu.com

DNS ERROR resolving MX for ashu.com
It is suggested that the domain name have an MX record configured in DNS
Re-Enter domain name? [Yes]no
............
...............
.....................

Main menu

   1) Common Configuration:                                                
   2) zimbra-ldap:                             Enabled                     
   3) zimbra-store:                            Enabled                      +Create Admin User:                    yes                          +Admin user to create:                admin@mail.example.com      
******* +Admin Password                        UNSET                       
    +Anti-virus quarantine user:           virus-
    +Enable automated spam training:       yes                         
    +Spam training user:                   spam.ymhnphn3qm@mail.example.com
   +Non-spam(Ham) training user:          ham.tquoqaxih@ashu.com
   +SMTP host:                            mail.example.com            
   +Web server HTTP port:                 80                          
   +Web server HTTPS port:                443                         
   +Web server mode:                      https                       
   +IMAP server port:                     143                         
   +IMAP server SSL port:                 993                         
   +POP server port:                      110                         
  +POP server SSL port:                  995                         
   +Use spell check server:               yes                         
    +Spell server URL:                     http://mail.example.com:7780/aspell.php
        +Configure for use with mail proxy:    FALSE                       
        +Configure for use with web proxy:     FALSE                       
        +Enable version update checks:         TRUE                        
        +Enable version update notifications:  TRUE                        
        +Version update notification email:    admin@ashu.com    
        +Version update source email:         admin@ashu.com     

   4) zimbra-mta:                              Enabled                     
   5) zimbra-snmp:                             Enabled                     
   6) zimbra-logger:                           Enabled                     
   7) zimbra-spell:                            Enabled                     
   8) Default Class of Service Configuration:                              
   r) Start servers after configuration        yes                         
   s) Save config to file                                                  
   x) Expand menu                                                          
   q) Quit                                  

Address unconfigured (**) items  (? - help) 3
Store configuration

   1) Status:                                         Enabled                     
   2) Create Admin User:                       yes                         
   3) Admin user to create:                    admin@ashu.com     
**4) Admin Password                            UNSET                       
   5) Anti-virus quarantine user:             virus-
   6) Enable automated spam training:    yes                         
   7) Spam training user:                      
   8) Non-spam(Ham) training user:        ham.tquoqaxih@ashu.com
   9) SMTP host:                                             
  10) Web server HTTP port:                  80                          
  11) Web server HTTPS port:                443                         
  12) Web server mode:                        https                       
  13) IMAP server port:                         143                         
  14) IMAP server SSL port:                   993                         
  15) POP server port:                         110                         
  16) POP server SSL port:                    995                         
  17) Use spell check server:                 yes                         
  18) Spell server URL:                     http://mail.example.com:7780/aspell.php
  19) Configure for use with mail proxy:       FALSE                       
  20) Configure for use with web proxy:        FALSE                       
  21) Enable version update checks:            TRUE                        
  22) Enable version update notifications:     TRUE                        
  23) Version update notification email:       admin@ashu.com      
  24) Version update source email:             admin@ashu.com 

Note- Change admin password..

Select, or 'r' for previous menu [r] 4

Password for admin@ashu.com (main 6 characters): [MbBZe01Dt3] password

...............
...............
............

Select, or 'r' for previous menu [r] r

...................
.........................
..............................

*** CONFIGURATION COMPLETE - press 'a' tp apply
Select from menu, or press 'a' tp apply config (? - help) a
Save configuration data to a file? [Yes] yes
Save config in file : (/opt/zimbra/config.11404)...done.
The system will be modified - continue? [No] yes
.................
........................
.............................

Notify Zimbra of your installation? [Yes] no
.................
........................
.............................


Configuration complete - press return to exit

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

[root@server zcs-8.0.7_GA_6021.RHEL6_64.20140408123911]#


[root@server ~]#
[root@server ~]#

Step-12 Check the zimbra service status

[root@server ~]# su - zimbra
[zimbra@server ~]$  zmcontrol status
Host server.ashu.com
    antispam                Running
    antivirus                 Running
    ldap                       Running
    logger                    Running
    mailbox                  Running
    mta                        Running
    opendkim               Running
    spell                       Running
    stats                       Running
    zmconfigd               Running

Step-13 Now Open Browser (Firefox or Google-chrome)

Type-


http://192.168.0.20/

Now You Can also Manage this page... 




Kamis, 03 Desember 2015

PHP 5.4 on CentOS/RHEL 7.1, 6.7 and 5.11 via Yum

PHP 5.4.45 has been released on PHP.net on 4th September 2015, and is also available for CentOS/RHEL 5.11, 6.7, 7.1 at Webtatic via Yum.
Update 2013-07-21 – A new package “php54w-mysqlnd” has been added as an alternative to “php54w-mysql”. This will instead provide mysql, mysqli, and pdo_mysql built against the PHP MySql native driver rather than the system default libmysqlclient. It will replace “php54w-mysql55”, as it will work with MySQL 5.0/5.1/5.5 server)
Update 2013-06-20 – Webtatic now has released PHP 5.5.0 for CentOS/RHEL 5 and 6
Update 2013-05-26 – CentOS/RHEL 5.x now supported.
Update 2013-05-18 – A new package “php54w-pecl-zendopcache” has been added, Zend Optimizer Plus opcode cache.
Update 2012-08-26 – APC is stable enough now and so the extension has been added
Update 2012-07-22 – memcache and xdebug extensions have been added
Update 2012-04-29 – mcrypt, tidy, mssql, interbase have been added back in to the repository.

PHP 5.4.0 adds new features such as:
  • Traits
  • Built-in web server
  • Array short notation
  • Array return value de-referencing
  • Finally killing off magic-quotes and safe-mode
To see what else has been added, check out the changelog.
To install, first you must add the Webtatic EL yum repository information corresponding to your CentOS/RHEL version to yum:
CentOS/RHEL 7.x:
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
CentOS/RHEL 6.x:
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
CentOS/RHEL 5.x:
rpm -Uvh http://mirror.webtatic.com/yum/el5/latest.rpm
Now you can install php by doing:
yum install php54w
If you would like to upgrade php to this version it is recommended that you check that your system will support the upgrade, e.g. making sure any CPanel-like software can run after the upgrade.
Unless you know what you are doing, it is risky upgrading an existing system. It’s much safer to do this by provisioning a separate server to perform the upgrade as a fresh install instead.
If you know what you are doing, you can upgrade PHP by:
yum install yum-plugin-replace
 
yum replace php-common --replace-with=php54w-common
It will likely give you a message “WARNING: Unable to resolve all providers …”. This is normal, and you can continue by tying “y“. You will be given a chance to see what packages will be installed and removed before again being given a chance to confirm.

Packages

Package Provides
php54w mod_php, php54w-zts
php54w-bcmath
php54w-cli php-cgi, php-pcntl, php-readline
php54w-common php-api, php-bz2, php-calendar, php-ctype, php-curl, php-date, php-exif, php-fileinfo, php-ftp, php-gettext, php-gmp, php-hash, php-iconv, php-json, php-libxml, php-openssl, php-pcre, php-pecl-Fileinfo, php-pecl-phar, php-pecl-zip, php-reflection, php-session, php-shmop, php-simplexml, php-sockets, php-spl, php-tokenizer, php-zend-abi, php-zip, php-zlib
php54w-dba
php54w-devel
php54w-embedded php-embedded-devel
php54w-enchant
php54w-fpm
php54w-gd
php54w-imap
php54w-interbase php_database, php-firebird
php54w-intl
php54w-ldap
php54w-mbstring
php54w-mcrypt
php54w-mssql
php54w-mysql php-mysqli, php_database
php54w-mysqlnd php-mysqli, php_database
php54w-odbc php-pdo_odbc, php_database
php54w-pdo
php54w-pecl-apc
php54w-pecl-gearman
php54w-pecl-geoip
php54w-pecl-memcache
php54w-pecl-zendopcache
php54w-pecl-xdebug
php54w-pgsql php-pdo_pgsql, php_database
php54w-process php-posix, php-sysvmsg, php-sysvsem, php-sysvshm
php54w-pspell
php54w-recode
php54w-snmp
php54w-soap
php54w-tidy
php54w-xml php-dom, php-domxml, php-wddx, php-xsl
php54w-xmlrpc

Opcode Caches

A precompiled PHP APC package is available as an opcode cache, which is recommended for performance reasons. It can be installed via:
yum install php54w-pecl-apc
Zend have now released Zend Optimizer Plus opcode cache as open source, and is now known as Zend OPcache. As it’s more actively maintained than APC, it has been added as a package to the Webtatic EL6 repository. It can be installed via:
yum install php54w-pecl-zendopcache

error_reporting E_ALL now includes E_STRICT

You may get a lot more errors coming out of your error logs if by default your error_reporting is set to E_ALL now without explicitly turning off E_STRICT. The default php.ini that comes with the PHP package turns this off by default, but if you are upgrading from an existing installation, your php.ini may not be updated, meaning this will likely be turned on.


Source : webtatic.com