Perintah Dasar Latihan Ujikom Debian

 

IP ADDRESS 
pico /etc/network/interfaces 
auto eth0 
iface eth0 inet static 
address 192.168.3.1 
netmask 255.255.255.128
network 192.168.3.128 
broadcast 192.168.3.127 
dns-nameserver 192.168.3.1 
dns-search afx.com 

auto eth1 
face eth1 inet static 
address 192.168.10.70
netmask 255.255.255.0 
network 192.168.10.0 
beroadcast 192.168.10.255 
gateway 192.168.10.1 
service networking restart 



DNS 
apt-get install bind9 

pico /etc/bind/named.conf.default-zones 
zone"afx.com" {
typemaster 
file "/etc/bind/db.1" 

zone"3.168.192.in-addr.arpa" {
typemaster 
file "/etc/bind/db.1" 

pico/etc/bind/db.1 
@            IN       NS    AFX.COM 
                IN       A      192.168.3.1 
WWW     IN       A      192.168.3.1 
ftp           IN       A      192.168.3.1 

pico /etc/bind/db.2  
@            IN       NS     AFX.COM 
1              IN       PTR   ns.afx.com 
1              IN       PTR   www.afx.com  
1              IN       PTR   ftp.afx.com 

service bind9 restart 



ROUTING 
pico /etc/resolv.conf 
nameserver 192.168.3.1 
nameserver 192.168.10.1
nameserver 8.8.8.8 

pico /etc/sysctl.conf 
hapus tanda pagar net ipv4_ipforward 

pico /proc/sys/net/ipv4/ip_forward 
ubah jadi 1 

iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE 

pico /etc/rc.local 
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE

 iptables-save


PROXY
apt-get install squid
pico /etc/squid/squid.conf

cari/ctrl+w http-port 3128 
tambahkan transparent

ctrl+w cache_mem 8 mb
hapus pagar

ctrl+w acl to
tambahkan diatasnya acl afx src 192.168.3.0/25

ctrl+w acl connect 
tambahkan acl bloksitus dstdomain "/etc/squid/bloksitus.txt"

ctrl+w Insert your own 
http_acces deny to localhost
http_access deny bloksitus
http_acces allow localhost
http_access allow afx

pico /etc/squid/bloksitus.txt
.pokemongo.com
.okezone.com
 
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128

pico /etc/rc.local
tambahkan iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128

iptables-save
service squid restart


FTP
apt-get install proftpd
mkdir home/afx/tkj

pico /etc/proftpd/proftpd.conf
paling bawah
<anonymous /home/afx/tkj/>
user afx
</anonymous>

chmod 777 /home/afx/tkj

adduser afx
pass 123

service proftpd restart
cek ftp.afx.com


CMS WORDPRESS
apt-get install apache2 php5 mysql-server phpmyadmin
-apache2
-No

apt-get install unzip

pico  /etc/apache2/site-available/default

NameVirtualHost 192.168.3.1:80
<VirtualHost 192.168.3.1:80>
        ServerAdmin webmaster@afx.com  ServerName www.afx.com     
        DocumentRoot /var/www/wordpress
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/wordpress/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
                # This directive allows us to have apache2's default start page
                # in /apache2-default/, but still have / go to the right place
                RedirectMatch ^/$ /apache2-default/
        </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>

masukan cd wordpress  
apt-cdrom add
mount -t iso9660 /dev/cdrom /media/

cd /media
cp wordpress.zip /var/www/

cd /var/www
unzip wordpress

cd /var/www/wordpress
cp wp-config-sample.php wp-config.php

pico wp-config.php

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'database_name_here');

/** MySQL database username */
define('DB_USER', 'username_here');

/** MySQL database password */
define('DB_PASSWORD', 'password_here');

/** MySQL hostname */
define('DB_HOST', 'localhost');

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');

KET
DB_NAME 
WORDPRESS
DB_USER ROOT
DB_PASSWORD 123
a2dissite default
a2ensite debian
service apache2 reload
service apache2 restart

Nama saya Andy Febryanto, pecinta ilmu ekonomi, bisnis dan finansial

0 Response to "Perintah Dasar Latihan Ujikom Debian"

Posting Komentar