Kamis, 05 Juli 2012

Install Sekali Jalan

INSTALLASI WEB SERVER UBUNTU

Setelah proses installasi selesai, Terlebih dahulu install SSH agar server bisa di remote dengan putty untuk install lanjutan
apt-get install ssh openssh-server 

Lakukan seting network sesuai keperluan anda.
nano /etc/network/interfaces

Restart network
/etc/init.d/networking restart

Sesuaikan seting host anda
nano /etc/hosts
        127.0.0.1 localhost.localdomain local
        192.168.75.3 socket.server.net socket1
echo socket.server.net > /etc/hostname
/etc/init.d/hostname restart
hostname
hostname -f


Edit /etc/apt/sources.list And Update Your Linux Installation
nano /etc/apt/sources.list 

Tambahkan 
deb http://de.archive.ubuntu.com/ubuntu/ precise main restricted
deb-src http://de.archive.ubuntu.com/ubuntu/ precise main restricted
deb http://de.archive.ubuntu.com/ubuntu/ precise-updates main restricted
deb-src http://de.archive.ubuntu.com/ubuntu/ precise-updates main restricted
deb http://de.archive.ubuntu.com/ubuntu/ precise universe
deb-src http://de.archive.ubuntu.com/ubuntu/ precise universe
deb http://de.archive.ubuntu.com/ubuntu/ precise-updates universe
deb-src http://de.archive.ubuntu.com/ubuntu/ precise-updates universe
deb http://de.archive.ubuntu.com/ubuntu/ precise multiverse
deb-src http://de.archive.ubuntu.com/ubuntu/ precise multiverse
deb http://de.archive.ubuntu.com/ubuntu/ precise-updates multiverse
deb-src http://de.archive.ubuntu.com/ubuntu/ precise-updates multiverse
deb http://de.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://de.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu precise-security main restricted
deb-src http://security.ubuntu.com/ubuntu precise-security main restricted
deb http://security.ubuntu.com/ubuntu precise-security universe
deb-src http://security.ubuntu.com/ubuntu precise-security universe
deb http://security.ubuntu.com/ubuntu precise-security multiverse
deb-src http://security.ubuntu.com/ubuntu precise-security multiverse

Disable AppArmor
/etc/init.d/apparmor stop
update-rc.d -f apparmor remove
apt-get remove apparmor apparmor-utils


Synchronize the System Clock
apt-get install ntp ntpdate

Lakukan update, upgrade dan reboot system
apt-get update
apt-get upgrade
reboot


Install Anti Virus ClamAV
apt-get install amavisd-new spamassassin clamav clamav-daemon zoo unzip bzip2 arj nomarch lzop cabextract apt-listchanges libnet-ldap-perl libauthen-sasl-perl clamav-docs daemon libio-string-perl libio-socket-ssl-perl libnet-ident-perl zip libnet-dns-perl

/etc/init.d/spamassassin stop
update-rc.d -f spamassassin remove


Installasi Webserver
apt-get install apache2 php5 libapache2-mod-php5 php5-cgi php5-xmlrpc php5-xsl php5-memcache php5-xcache php-pear 

Database MySql
apt-get install mysql-server php5-mysql libapache2-mod-auth-mysql
apt-get install phpmyadminnano /etc/apache2/apache2.conf
isikan
    Include /etc/phpmyadmin/apache.conf

sudo a2enmod userdir

Restart apache2
 /etc/init.d/apache2 restart


Installing php5-mssql in Ubuntu
apt-get install php5-mssql  atau  aptitude install php5-sybase freetds-common
aptitude install php5-odbc
pear install --nodeps MDB2_Driver_mssql 
nano /etc/freetds/freetds.conf
Isikan dgn
    [SQLServer2005]
    host = 192.168.75.1
    port = 1433
    tds version = 7.0

service apache2 restart


Contoh Koneksi MSSQL
---------------------------------
<?php
    $server = 'SQLServer2005';
    $username = 'sa';
    $password = '12345';
    $database = 'SIKDA_2012';
    $connection = mssql_connect($server, $username, $password);

    if($connection)
        { echo "Berhasil melakukan koneksi ke server mssql<br />"; }
    else
        { die("Gagal melakukan koneksi"); }


    if(mssql_select_db($database, $connection))
        { echo "Berhasil membuka database $database <br />"; }
    else
        { die('Gagal membuka database'); }


    $query_result = mssql_query('SELECT @@VERSION');
    $row = mssql_fetch_array($query_result);

    if($row != FALSE) { echo "Version is {$row[0]}<br />"; }
    mssql_free_result($query_result);
    mssql_close($connection);
?>

INSTALLASI YANG DIPERLUKAN UNTUK SEBUAH SERVER
Setelah semua fitur diatas di Install yang Harus anda install selanjutnya adalah
1. Firewall Shorewall
2. Webalizer
3. NTOP
4. MyPHPAdmin
5. Webmin



Install EHCP, Membuat Cpanel/Server Hosting

cd tmp
wget www.ehcp.net/ehcp_latest.tgz
tar -zxvf ehcp_latest.tgz
cd ehcp
./install.sh

Install FTP server

apt-get install vsftpd
ubah /etc/vsftpd.conf sesuai keperluan

Konfigurasi FTP untuk User

Jika Anda ingin membolehkan user yang ada di linux server untuk login melalui ftp dan user-user tadi bisa mengupload berkas ke server, buat konfigurasi seperti berikut.
Berkas yang harus Anda sunting adalah /etc/vsftpd.conf
local_enable=YES
write_enable=YES
Setelah itu restart service vsftpd