0% found this document useful (0 votes)
33 views

Script Linux

The document provides instructions for configuring several server services on a Linux system including a network, DHCP server, FTP server, SSH server, Samba file sharing, Apache web server, Bind DNS server, MySQL/phpMyAdmin, and a mail server using Postfix, Courier, and SquirrelMail. The instructions include installing and configuring required packages, editing configuration files, adding users, testing functionality, and other steps to set up each of the listed services.

Uploaded by

aliffrmdy
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views

Script Linux

The document provides instructions for configuring several server services on a Linux system including a network, DHCP server, FTP server, SSH server, Samba file sharing, Apache web server, Bind DNS server, MySQL/phpMyAdmin, and a mail server using Postfix, Courier, and SquirrelMail. The instructions include installing and configuring required packages, editing configuration files, adding users, testing functionality, and other steps to set up each of the listed services.

Uploaded by

aliffrmdy
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 6

1.

NETWORK

--> nano /etc/network/interfaces


auto eth0/
address 192.168.31.1
netmask 255.255.255.0
network 192.168.31.0
broadcast 192.168.31.255

--> /etc/init.d/networking restart


___________________________________________________________________________________
_____

2. DHCP

--> apt-cdrom add


(UBAH KE BINARY 2)

--> apt-get install isc-dhcp-server

--> nano /etc/dhcp/dhcpd.conf


(HAPUS SEMUA "#" DIMULAI DARI "subnet" SETELAH "A slighty" LALU DIISI DENGAN
IP)

--> nano /etc/default/isc-dhcp-server


(TAMBAHKAN "eth0")

--> /etc/init.d/isc-dhcp-server restart


___________________________________________________________________________________
______

3. FTP

--> apt-get install proftpd

--> adduser syariff

--> cd /home/syariff

--> mkdir data

--> userdel ftp

--> useradd -d /share/ ftp

--> passwd ftp

--> chmod 777 data

--> nano /etc/proftpd/proftpd.conf


(TAMBAHKAN SCRIPT DI PALING BAWAH)
<Anonymous /etc/home/syariff/data/> User ftp
</Anonymous>

--> /etc/init.d/proftpd restart

buka winscp
ganti FTP
login dengan ip linux
username: syariff
___________________________________________________________________________________
______

4. SSH

--> apt-get install ssh


(UBAH KE BINARY 1)

--> nano /etc/ssh/sshd_config


(kasih # di depan permitrootlogin without-password)

--> /etc/init.d/ssh restart

buka putty
login linux
reboot
___________________________________________________________________________________
_______

5. SAMBA
--> apt-get install samba

--> cd /home/

--> mkdir data

--> chmod 777 data/

--> useradd syarifff

--> smbpasswd -a syarifff

--> nano /etc/samba/smb.conf


(TAMBAHKAN SCRIPT DI PALING BAWAH)
[data]
path = /home/data
valid users = syarifff
browseable = yes
writeable = yes

--> /etc/init.d/samba restart

TES DI EXPLORER (NETWORK) MASUKAN IP


___________________________________________________________________________________
_______

6. WEB SERVER

--> apt-get install apache2 php5

--> cd /etc/apache2/sites-available/

--> cp 000-default.conf syarif.conf

--> nano syarif.conf


server admin [email protected]
document root /var/www/syarif
--> a2dissite 000-default.conf

--> a2ensite syarif.conf

--> cd /var/www

--> mkdir syarif

--> cd syarif/

--> nano index.html


(DIISI BEBAS)

--> nano phpinfo.php


<?php
phpinfo();
?>

--> /etc/init.d/apache2 restart

Tes Di Chrome Masukin IP


___________________________________________________________________________________
______

7. DNS

--> apt-get install bind9

--> cd /etc/bind/

--> cp db.127 rv

--> cp db.local fw

--> nano rv
$TTL 604800
@ IN SOA syarif.com. root.syarif.com. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS syarif.com.
1 IN PTR syarif.com.
1 IN PTR www.syarif.com.
1 IN PTR mail.syarif.com.

--> nano fw
$TTL 604800
@ IN SOA syarif.com. root.syarif.com. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS syarif.com.
@ IN A 192.168.31.1
www IN A 192.168.31.1
mail IN A 192.168.31.1

(SETIAP TULISAN "LocalHost" DIGANTI DENGAN DOMAIN dan "DI TAMBAH .COM. SETELAH
DOMAIN")

--> nano named.conf.default-zones


zone "syarif.com" {
type master;
file "/etc/bind/fw";
};

zone "31.168.192.in-addr.arpa" {
type master;
file "/etc/bind/rv";
};

--> nano /etc/resolv.conf


search syarif.com
nameserver 192.168.31.1

--> /etc/init.d/bind9 restart

___________________________________________________________________________________
_______

8. MYSQL-SERVER PHPMYADMIN

--> apt-get install mysql-server phpmyadmin


(UBAH BINARY KE 1)
pw 1
(ok)

--> apache2 di bintangin


(no)
mysql -u root -p
(pw1)

--> create database syarif;


(quit)

--> chrome
syarif.com/phpmyadmin
login
root
1
___________________________________________________________________________________
________

9. MAIL

--> apt-cdrom add


(UBAH KE BINARY 3)

--> apt-get update

--> apt-get install squirrelmail postfix courier-imap courier-pop

--> Masukan BINARY 1


(LALU TEKAN OK)
(PILIH internet site)
(MASUKAN DOMAIN syarif.com)

--> Masukan BINARY 2


(PADA CONFIGURING COURIER-BASE PILIH NO)

--> Masukan BINARY 3

--> maildirmake /etc/skel/Maildir

--> nano /etc/postfix/main.cf


(TAMBAHKAN SCRIPT DI PALING BAWAH)
( home_mailbox = Maildir/ )

--> nano /etc/squirrelmail/apache.conf


(CARI TULISAN VIRTUAL LALU EDIT)
<VirtualHost *:80>
DocumentRoot /usr/share/squirrelmail
ServerName mail.syarif.com
</VirtualHost>
(save)

--> nano /etc/apache2/apache2.conf


(TAMBAHKAN SCRIPT DI PALING BAWAH)
( Include /etc/squirrelmail/apache.conf )

--> dpkg-reconfigure postfix


(PILIH (OK)
(PILIH (internet site)
(MASUKAN DOMAIN (syarif.com)
(ROOT DAN POSTMASTER (BIARKAN KOSONG)
(OTHER DESTINATIONS (DILEWATKAN)
(FORCE SYNCHRONOUS PILIH (NO)
(PADA LOCAL NETWORK ISI)
(0.0.0.0/0)
(USER PROCMAIL (NO)
(MAILBOX SIZE (LEWATKAN)
(LOCAL ADDRESS (LEWATKAN)
(PADA INTERNET PROTOCOLS PILIH (ipv4)

--> (RESTART SEMUA)


/etc/init.d/apache2 restart
/etc/init.d/postfix restart
/etc/init.d/courier-imap restart
/etc/init.d/courier-pop restart

--> (BUAT 2 USER)


adduser syarif1
adduser syarif2

--> (PENGUJIAN MAIL SERVER)

--> telnet mail.syarif.com 25


( mail from: syarif1 )
( rcpt to: syarif2 )
( data )
(MASUKAN ISI PESAN, DAN UNTUK MENGGAKHIRI GUNAKAN ".")
(quit)
--> telnet mail.syarif.com 110
( user syarif2 )
( pass 1 )
( stat )
( retr 1)
(quit)

--> (EDIT FILE CLIENT DENGAN IP SERVER)

--> (PENGUJIAN WEB MAIL SERVER)


buka chrome search
mail.syarif.com
(LOGIN USER1)
(syarif1)
(pass (1)

--> compose
to syarif2
(subject) basing)
(isi) basing)
(send)

--> sign out


(login lagi)
(LOGIN USER2)
(syarif2)
(pass 1)
(LIHAT PESANNYA)

You might also like