Devilzc0de Forum Follow @devilzc0de
  • Home
  • Hacking
  • Networking
  • Programming
  • O.S
  • Server
  • Tweets
  • Search
  • Member List
  • Calendar
Current time: 05-18-2013, 11:09 PM Hello There, Guest! (Login — Register)
Devilzc0de Forum › Information Technology › Server › Web Server v
« Previous 1 2 3 4 5 6 ... 8 Next »

[Tutor] Linode Server Migration ubuntu

Home General Computer Multimedia Business Lounge

Post Reply 
Tweet
Threaded Mode | Linear Mode
Tutor Linode Server Migration ubuntu
04-02-2012, 07:21 PM (This post was last modified: 04-02-2012 07:24 PM by nobodyknowme.)
Post: #1
nobodyknowme Offline
./Devilz Officer
Posts: 128
Joined: Mar 2012
Reputation: 10
Linode Server Migration ubuntu
Edit /etc/apt/sources.list and update

Code:
apt-get update
apt-get upgrade

Enable the root account

sudo passwd root

masukan root password . dan perintah untuk menjadi root

Code:
su

Synchronize the system clock

singkronisasikan dengan NTP server diinternet

Code:
apt-get install ntp ntpdate

Install the SSH server

defaultnya adalah openssh .
Code:
apt-get install ssh openssh-server

Configure the network

edit /etc/network/interfaces:

Code:
#This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
    address 192.168.0.100
    netmask 255.255.255.0
    network 192.168.0.0
    broadcast 192.168.0.255
    gateway 192.168.0.1

Restart Network:
Code:
/etc/init.d/networking restart

edit

/etc/hosts:

Code:
127.0.0.1 localhost.localdomain localhost
192.168.0.100 server1.example.com server1

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

kemudian jalankan

Code:
echo server1.example.com > /etc/hostname

restart dengan perintah:

Code:
reboot

kemudian

Code:
hostname
hostname -f

tambahkan user

sample dengan nama webmaster

Code:
sudo useradd -d /home/webmaster -m webmaster
sudo passwd webmaster
# Set /bin/bash as shell
# Edit /etc/sudoers

lanjut ke mysql

Code:
apt-get install mysql-server mysql-client

kemudian Postfix for SMTP support

Code:
apt-get install postfix procmail

kemudian akan ada pertanyaan :

Code:
General type of configuration? <-- Internet Site
Mail name? <-- server1.example.com

jalankan

Code:
dpkg-reconfigure postfix


muncul beberapa pertanyaann

Code:
General type of configuration? <-- Internet Site
Where should mail for root go <-- [blank]
Mail name? <-- server1.example.com
Other destinations to accept mail for? (blank for none) <-- server1.example.com, localhost.example.com, localhost.localdomain, localhost
Force synchronous updates on mail queue? <-- No
Local networks? <-- 127.0.0.0/8
Use procmail for local delivery? <-- Yes
Mailbox size limit <-- 0
Local address extension character? <-- +
Internet protocols to use? <-- ipv4

kemudian

Code:
postconf -e 'inet_interfaces = loopback-only'

restart postfix

Code:
/etc/init.d/postfix restart

kemudian kita lanjutkan setup apache

Apache/PHP5
Code:
apt-get install apache2 apache2-mpm-prefork apache2-utils ssl-cert

Install PHP5:
Code:
apt-get install libapache2-mod-php5 php5 php5-common php5-curl php5-dev php5-gd php5-idn php-pear php5-imagick php5-imap php5-json php5-mcrypt php5-memcache php5-mhash php5-ming php5-mysql php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl

Edit /etc/apache2/mods-available/dir.conf:

Code:
<IfModule mod_dir.c>
#DirectoryIndex index.html index.cgi index.pl index.php index.xhtml
DirectoryIndex index.html index.htm index.shtml index.cgi index.php index.xhtml
</IfModule>

kemudian kita aktifkan beberapa module apachenya

Code:
a2enmod ssl
a2enmod rewrite
a2enmod suexec
a2enmod status
a2enmod include

kemudian reload apachenya
Code:
/etc/init.d/apache2 force-reload

menambahkan subdomain

/etc/apache2/sites-enabled,
Code:
<VirtualHost *>
    ServerAdmin info@sitename.com
    ServerName sitename.com
    ServerAlias *.sitename.com

    DocumentRoot /var/www/sitename.com/

    <Directory />
        Options FollowSymLinks
        AllowOverride All
    </Directory>
  
    <Directory /var/www/sitename.com/>
        Options Indexes FollowSymLinks MultiViews
        DirectoryIndex index.html index.htm index.php index.php3
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
        AllowOverride None
        Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
    </Directory>

    ErrorLog /var/log/apache2/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog /var/log/apache2/access.log combined
    ServerSignature On

    #Alias /doc/ "/usr/share/doc/"

</VirtualHost>

dilanjut dengan Proftpd

apt-get install proftpd ucf

muncul pertanyaan :
Code:
Run proftpd from inetd or standalone? <-- standalone

edit /etc/proftpd/proftpd.conf:

Code:
[...]
DefaultRoot /
UseIPv6 off
[...]

restart

Code:
/etc/init.d/proftpd restart

Install PHPMyAdmin:
Code:
apt-get install phpmyadmin

Secure SSH bit

Edit /etc/ssh/sshd_config:
Code:
Port 4444 #Other than 22
PermitRootLogin no #Make sure other user can login/sudo

Set /var/www permissions
Code:
chown -R webmaster:www-data /var/www
chmod 775 -R /var/www

Install proteksi dari slowloris
Code:
apt-get install gcc apache2-threaded-dev
wget https://gist.github.com/raw/773464/4e7250692c34f55725384525b513e71be7541f5a/mod_muantiloris.c
apxs2 -a -i -c mod_muantiloris.c
/etc/init.d/apache2 restart

Edit /etc/apache2/httpd.conf:
ExtendedStatus On

IPReadLimit 5
IPPostLimit 10

Install fail2ban
Code:
apt-get install fail2ban

tahap migrasii

pindahkan user files, virtualhost configurations, /var/www. Backup mysql data bases.

kemudian Install openjdk-6-jre, davmail jika digunakan

Backup script:

Code:
tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/mnt --exclude=/sys --exclude=/dev --exclude=/usr --exclude=/bin --exclude=/sbin --exclude=/backup.tgz /
Find all posts by this user
Quote this message in a reply
 Reputed by :  ditatompel(+1)
04-02-2012, 08:41 PM
Post: #2
Bunga.Mataharry Away
Someone who cares
***
Posts: 1,371
Joined: Jan 2011
Reputation: 89
RE: Linode Server Migration ubuntu
mantapmantap
Visit this user's website Find all posts by this user
Quote this message in a reply
04-02-2012, 10:47 PM
Post: #3
ditatompel Offline
Administrator
*******
Administrators
Posts: 2,168
Joined: Dec 2010
Reputation: 367
RE: Linode Server Migration ubuntu
Wih.. Mantap omz.. :ane ijin pelajari dulu... belajar
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Topic Tools
Topic Link :
BBCode :
HTML Code :
View a Printable Version Send Thread to a Friend Subscribe to this thread
Submit Google Submit Face book Submit to Digg Submit to Reddit Submit to Furl Submit to Del.icio.us Submit to Jeqq

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  create vps di server cloud computing supermenganteng 4 2,123 05-11-2013 11:23 PM
Last Post: cryptanalysis
  webserver kecil untuk experimen dengan server dan php natveris 8 171 05-01-2013 06:10 PM
Last Post: natveris
  1 ip publik untuk banyak server ceoode 8 227 04-14-2013 04:08 AM
Last Post: ceoode
  10 TIPS FOR TUNE AND SECURE YOUR CPANEL SERVER El-Farhatz 10 1,930 03-27-2013 12:33 PM
Last Post: id34s
  [Ask] anti jumping server flazer404 10 1,393 03-22-2013 05:13 PM
Last Post: h4ntu_cr3w
  [Solved] Linux Server atau Windows Server ubuntux 15 311 03-12-2013 10:09 AM
Last Post: go.id
  [Ask] masalah server. jinjun 12 259 02-23-2013 07:13 PM
Last Post: Eyang Subur
  Membangun Multimedia Streaming Server di Linux dan Blind0ws mywisdom 4 1,386 02-13-2013 12:25 PM
Last Post: nurmuhammad
  [Solved] buat web server sendiri semmy95 9 422 11-17-2012 03:47 PM
Last Post: semmy95
  [Ask] Cara install snort di ubuntu 11 hakimarx 3 187 11-14-2012 03:28 PM
Last Post: jincorn

Users Browsing

  • Contact Us
  • devilzc0de
  • Return to Top
  • Mobile Version
  • RSS Syndication
  • Help
Current time: 05-18-2013, 11:09 PM Powered By MyBB, © 2002-2013 MyBB Group. Theme created by Justin S. | Mixed By Chaer.Newbie | Fixed By Aditya

USING THIS SITE INDICATES THAT YOU HAVE READ AND ACCEPT OUR TERMS. IF YOU DO NOT ACCEPT THESE TERMS, YOU ARE NOT AUTHORIZED TO USE THIS SITE