Konfigurasi Web Server

1. Mengindeks CD Debian sebelum menginstall software Apache, PhP dan MySQL

Apt-cdrom add [enter]

Muncul perintah untuk memasukkan file ISO

Pilih file ISO lalu OK [enter]

2. Menginstall software

Apt-get install apache2 php5 mysql-server php5-mysql libapache2-mod-php5

3. Setelah menginstall, mari kita menuju homedebian

Cd /

Sehingga menjadi debian:/ (tanda ~ hilang)

4. Buat direktori

Mkdir tugas

5. Masuk direktori tugas dan buat direktori di dalamnya

Cd /tugas

Mkdir web

6. Membuat halaman default

Nano index.php

Anda bisa mengisinya dengan script php, misalnya:

Simpan file tersebut di /tugas/web

7. Chmod 755 /tugas/web

8. Cd /etc/apache2/sites-available

9. Nano default

Edit bagian /var/www menjadi /tugas/web

Tambahkan ‘#’ sebelum RedirectMatch

10. Restart apache

/etc/init.d/apache2 restart

Buka browser anda dan ketikkan domain Anda misal “agis.com”

Maka script yang anda tuliskan akan tereksekusi

Read More..

You have formatted a drive while doing a Linux installation for a production server. The formatting revealed that there were several bad blocks. You see that the bad blocks make up about four percent of the total disk. Which of the following would be the best course of action?
replace the drive

You would like to perform a high-level format on a hard disk. Which of the following Linux commands will accomplish this?
mkfs

You have tried to install a particular RedHat package but it keeps telling you that it has a "failed dependency". What would cause this error?
The package depends on another package being installed.

When is the root account typically created in Linux?

during NOS installation

Which statement correctly describes shadow passwords?
They are stored in a file which is not accessible by all users.

Which term describes the Linux superuser account?
root

Where, on a Linux server, would you find the main password file that is readable by any logged-in user?
/etc/passwd

You are setting up a Linux workstation and you would like it to automatically get all of the correct IP settings as soon as it boots. Which protocol should you set the workstation to use to accomplish this?
DHCP

Which of the following are valid boot loader options for most Linux installations? (Select two.)
LILO
GRUB

Which of the following can be set within the LILO configuration file?
an option to clear the /tmp directory at boot

You have successfully installed your Linux server but notice that it only seems to be using 64 megabytes of RAM. You know that there are actually 128 megabytes of RAM in the server. How can you force Linux to use the full 128 megabytes of RAM?
put the actual amount of RAM in the LILO configuration file

What is the name of the X Windows package that is supplied with most distributions of Linux?
Xfree86

You have successfully installed your Linux workstation complete with working X Windows. However, your supervisor tells you that you should check for a new video driver. Why might you want to do this?
The manufacturer may have improved the performance with new drivers.

You are installing X Windows on your RedHat server. Which command would be similar to what you would need to type at the command prompt in order to install X Windows?
rpm -Uvh XFree86-server-4.0.2-11.i386.rpm

Where would the driver files for Xfree86 be stored?
/usr/X11R6/lib/modules/drivers

Which command will terminate an X Windows session and present the user with a text mode login prompt?
telinit 3

You have installed X Windows version 4.0.x and it will not work. Which of the following could be used to reconfigure it? (Select two.)
Xconfigurator
XFree86

Focus-follows-mouse and click-to-focus are two types of focus models. Which software would be responsible for configuring an X Windows installation to use one of these models?
windows manager

You would like to install the samba program on your Linux machine. You have located the file samba-2.0.7.tar.gz. Which command should you use to completely unpack the files in this package?
tar -xvzf samba-2.0.7.tar.gz

You are examining lilo.conf and see a line that says "prompt". What will this command prompt a user for?
an operating system

You have edited lilo.conf and rebooted your Linux server. The changes that you made do not seem to have taken effect. Which step did you omit?
run the lilo command

You are at the command prompt and type in the command env. You notice that one of the environment variables shown is DISPLAY. What is the purpose of this variable?
to identify the display used by X Windows

Which account, created during installation, allows someone to manage the Windows 2000 NOS?
Administrator

When installing Windows 2000 Professional on a new machine, what must you do to boot from the CD?
Enter the CMOS setup and set the boot sequence to boot from the CD-ROM drive first.

In a Windows 2000 environment, which key combination is used to enable the Windows logon window?
Ctrl+Alt+Delete

When entered in the Run box, which command will launch the Windows 2000 CLI?
cmd

Which key combination, when executed in the Windows 2000 CLI, will display the command interpreter window in full screen mode?
Alt+Enter

Which Windows tool provides administrators with an easy way to view or navigate a file system?
Windows Explorer

What is the purpose of the user's full name in the New User account box?
It is informational only.

In Windows 2000, which of the following is a required field when creating a new user account?
the user name

Which Windows 2000 Administrative Tools submenu provides configuration options for storage, shared resources, hardware devices, and other key components?
Computer Management

In Windows 2000, what is the best way to restore a deleted user account?
Delete cannot be undone.

What is the proper way to shut down Windows?
Choose Shut Down from the Start menu.

The network administrator needs to setup a new user account. After clicking on Start --> Programs --> Administrative Tools,

which menu option from Administrative Tools should be selected to complete the task?
Computer Management

All of the following groups can be created in Windows 2000 except:

domain global groups

SSH Communications Security Propoerties
Security System
Permissions : Full control,modify,read,write (itd) allow
In the graphic, which type of permissions are being set?
NTFS

What are the most basic user-related security tools available to an administrator?
permissions, passwords

Read More..

Which command is used to create a group on a Linux system?
groupadd

In Linux, which command is used to create a new directory?
mkdir

In Linux, which command is used to rename a directory?
mv

In Linux, which permissions can be set using the chmod command?
read, write, and execute

In Linux, what information does the df command display about a hard disk or partition? (Select two.)
the total, used, and available hard disk space
all the mounted partitions on the drive

Which option is used with the init command to force a rescan of the /etc/inittab file to implement runlevel changes?
q

Which Linux process will automatically run scheduled tasks at a specified time?
crond

Which term defines a process that runs on a Linux server?
daemon

In Linux, what must the administrator do to configure web services?

modify the setup files in the /conf directory of the Apache installation

In which file does the activation of the Linux FTP service take place?
/etc/rc.d/init.d/xinetd

A user wants to disable the Telnet and FTP services in Linux. In the configuration file, which character would the user place at the beginning of the Telnet or FTP line?
#

Which service can be deployed as a more secure alternative to Telnet?
SSH

Which scripting language is basic to the Linux OS?
shell script

What are Network Operating Systems designed to do?
share resources across a network with multiple users

A user account on a server enables the server to do which of the following?
authenticate that user and allocate those resources the user is allowed to access

What are two benefits of having more than one processor in a system?
faster speeds and increased work capacity

How is redundancy built into a server system?
by including additional hardware components that can take over if other components fail

What are two important features provided by security on a NOS?
authentication and encryption

Which of the following are Network Operating Systems?
Novell NetWare, Linux, Windows 2000

In a Windows NT environment, what is the meaning of the term domain?
groups of computers, users, and resources that form an administrative boundary

How many Primary Domain Controllers (PDCs) are allowed in a Windows NT environment?
1

In Windows 2000, administrative tasks are accomplished using the Microsoft Management Console. Which type of module does this tool require for specific administrative functions?
snap-in

Windows 2000 Professional supports plug-and-play technology. What is one of the major advantages of this technology?
An administrator or user can easily add components to the system without manual configuration.

Which type of authentication security does Windows 2000 Professional support?
Kerberos

How many simultaneous connections does Windows 2000 Professional support?
10

What is the primary intended use of Windows 2000 Professional?
client-side OS

In Windows 2000 Server, what is the function of symmetric multiprocessing?
It allows multiple processors to work together to share the workload in a computer.

Windows .NET Server is tailored to provide what types of services?
reliable web and FTP services

Which of the following is open source?
Linux

Which of the following criteria must software meet in order to display the Open Source Initiative trademark?
It must be freely distributed without restriction and the source code must be available.

Which Linux distribution was built solely for nonprofit uses?
Debian GNU/Linux

Which program, running on a Linux server, allows Windows-based clients to see the Linux file system without installing client software?
Samba

Which client/server file system is used by most varieties of Linux file servers?
NFS

What are two popular Desktop Environments that run on Linux?
GNOME and KDE

What is the name of a mail server software package that is popular in Linux distributions?
Sendmail

Which of the following is a better choice than Telnet for Remote Login Servers on a Linux system?
SSH

Which of the following are Linux CLI text editors?
vi, jed, pico, and Emacs

You have decided to install your new Linux distribution by using the bootable CD that came with it. What must be configured before you can boot from the CD?
BIOS

You are installing RedHat 7.2 and have decided to use the installation class called "Workstation". Which of the following packages will not be installed? (Select two.)
Telnet daemon
HTTP daemon

Which of the following would be standard file system types that Linux would use during an installation? (Select two.)
ext2
ext3

Read More..

A group of tape drives can be made fault-tolerant by using RAIT (the tape version of RAID). What is this technology called?
tape array

Which procedure assigns a local drive letter to a remote shared directory?
drive mapping

Command Prompt
c:\>net use j: \\mystuff\cdlist
The command in the graphic has been entered. What will be the result?
The system connects to the cdlist share on the mystuff server.

What is the correct syntax for the Linux mount command?
mount servername:/directory/subdirectory /localdirectory

You would like to map the N drive to the TEAM1 subdirectory in the GROUPS directory. The directories reside in the volume DATA1 on the server CMF1. Which command sets up this mapping on a NetWare network?
map N:= CMF1\DATA1:GROUPS\TEAM1

Which Linux command is used to create partitions on a hard disk?
fdisk

Which Linux command is used to create filesystems on a partition?
mkfs

What is the function of the /etc/crontab file in Linux?
to schedule system jobs

!! 12:31am up 197 days, 16:06, 2 users, load average: 0.00, 0.00, 0.00
51 processess: 50 sleeping,1 running, 0 zombie, 0 stopped
Cpu states: 0.1% user, 0.1% system, 0.0% nice, 99.6% idle (itd)
Based on the output in the graphic, which Linux utility is running?
top


What is a Core Dump?
a file containing data from a program crash

Which Linux command can be used to terminate a process?
kill

Which disk management tool acts as a storage ceiling to limit the amount of data each user can store on the network?
disk quotas

Which item boosts system performance by allocating space on the hard drive and treating it as an extension of memory?
virtual memory

Which of the following is the result of poor memory management and lack of available RAM?
program crashes

In Windows 2000, where would a user look to find information about system resources?
Performance tool

Linux administrators have several CLI commands available to display information on system resources. What is the output associated with using the du command?
a display of disk usage for a directory

Which output does the df command produce when executed from the Linux CLI?
detailed information about the file system

What are three key concepts when analyzing and optimizing network performance?
bottlenecks, baselines, and best practices

When should a baseline reading of network performance be made?
when the network is running normally

Why would you see a download speed of around 6.25-KBps when downloading a file from the Internet using a 50-Kbps connection?
One unit of measure refers to bits, the other refers to bytes.

What is the function of a protocol analyzer?
capturing packets transmitted between two or more network devices

There are several advantages of using SNMP over CMIP as a network management tool for small to medium sized businesses. Which of the following is an advantage?
Overhead for SNMP is considerably less than what is required for CMIP.

What is the centralized location for managing SNMP?
management station

What is the function of the MIB?
organize the information gathered about a network

What is X Windows?
It is a GUI interface used by Linux.

In Linux, which command is used to switch from the X Windows GUI to the CLI?
Ctrl+Alt+F1

What does the # symbol indicate at the Linux prompt?
root access

In Linux, which command allows users to learn more about any command?
man

In Linux, what is the function of the cd .. command?
changes to the directory above the current directory

Which Linux shell uses the % symbol as the default prompt?
C Shell

Hello
This is a great chapter for learning about vi
~
~
:i

You are working in the vi editor and see the screen in the graphic. What will happen when you press Enter?
Vi will be set to edit mode.

What are Pico and vi?
text editors

Which command character allows users to enter the vi edit mode?
i

Which command does the root user issue to create new user accounts?
useradd

On a Linux system, which configuration files contain user account information?(Select two.)
/etc/passwd
/etc/shadow

[root@csd root0# rm -r / home/userl


The administrator is logged in as the root user. What will happen when the command displayed in the graphic is executed?
All files and directories from the root level down will be deleted.

In Linux, when is the root account typically created?
during NOS installation

Which file must be edited by the Linux administrator to manually disable a user's password?
/etc/shadow

Read More..

Which computer resource signals the CPU when a hardware event occurs?
IRQ

Which of the following files can you check on a Linux system for interrupt request number allocation?
/proc/interrupt

Which of the following Linux files can be viewed to see resource allocations? (Select three.)
/proc/interrupt
/proc/dma
proc/ioports

How is PnP handled in a Linux system? (Select two.)
isapnp program
ISA configuration option in the Linux kernel

Which hardware devices are not considered PnP because they usually involve setting jumpers? (Select three.)
hard drives
CD-ROMs
CPUs

Which version of the Linux kernel includes ISA PnP support that does not require the isapnp program?
2.4.x

Which Linux file needs to be edited to specify an IRQ for an Ethernet card?
/etc/lilo.conf

Which program is used to insert a single module into the Linux kernel?
insmod

Which option of the insmod program will send output to a log file instead of the console?
-s

A module needs to be loaded. However, confirmation that the Linux kernel can load the module is important. Which of the following options of the insmod program will accomplish this task?
-p

Which insmod option will instruct the program to load the module even if the module was compiled for a different kernel?
-f

Which insmod option will automatically unload the module when it is no longer being used?
-k

Which of the following factors should be considered when installing a SCSI drive? (Select three.)
variant
ID
termination

Which component plays a big role in hardware configuration?
BIOS

Which considerations are most important when choosing a backup storage device?
reliability and size

Which type of backup will select only those files that have changed since the last backup and clear the file markers indicating they have been backed up?
incremental

What are the two backup utilities used in Linux?
tar and cpio

Read More..

Which Linux file is used to map partitions to the file system?
fstab

Which Linux packages have the ability to notify the user of dependency issues? (Select two.)
Debian
RPM

While troubleshooting a Linux server, sometimes it is necessary to terminate a process when it has become unresponsive. This can be accomplished by using which command?
kill

Which Linux utility will display the system's current IP address, subnet mask, default gateway, DNS server, DHCP server, and the MAC address of the network card?
ifconfig

Which Redundant Array of Inexpensive Disks (RAID) level is also known as disk striping?
RAID 0

Which type of files can be helpful in identifying several types of problems in a Linux server?
log files

While booting a Linux server, the booting process has stopped. Upon troubleshooting, an 'L' error code is discovered. What does this indicate?
The second stage of LILO did not load.

Which Redundant Array of Inexpensive Disks (RAID) level is also known as disk striping with parity?
RAID 5

What is the loopback address that a technician would ping to verify that TCP/IP is correctly installed?
127.0.0.1

Which unit is used to measure the speed of today's CPUs?
GHz

Where are video card drivers located in a Linux system?
X Server

When selecting a video card for a server, which of the following would be one important feature to consider for performance?
amount of on-board RAM

What is the main concept to be aware of when installing hardware on a Linux system?
compatibility

Which network troubleshooting device transmits a sonar type pulse through a cable?
TDR

Which device is used to check for broadcasts, collisions, usage levels, and errors on an Ethernet network?
LAN meter

Which device is used in electronic calibration and to measure signal voltage over time within a cable?
oscilloscope

Which device is used to check for cable breaks and shorts?
cable tester

Which device is used to measure electronic pulses through a cable and to determine shorts or breaks in the cable?
digital volt-ohm meter

Which type of cable is used to connect two computers without going through a hub?
crossover

Which of the following ports do external peripherals use to connect to a computer? (Select four.)
SCSI

parallel
USB
serial

Read More..

Which information can IP filtering technologies use to make packet-forwarding decisions?(Select three.)

source IP address

destination IP address

port address 

Which option in the Microsoft NOS periodically checks for software patches and upgrades via the Internet?

Windows Update 

Which list contains only specific types of DoS attacks

Ping of Death, TCP SYN, Teardrop, and Smurf 

Which Red Hat Linux utility allows an administrator to either select DHCP IP configuration, or to specify a static IP address along with the associated netmask, gateway, and primary nameserver?

netconfig 

In Linux, what is the first program that takes control of the boot process from the BIOS?

LILO 

On a Linux server, which file is usually the best place to locate error messages that have been generated but not displayed on screen?

system log 

Which statement is true about the use of passwords in the Linux operating system?

Passwords are case sensitive. 

What is the term given to a group of independent computers working together as a single system?

cluster

While booting a Linux server, the booting process stopped and the 'LIL-' error code was displayed. What does this indicate?

The disk descriptor table (/boot/map) is corrupt. 

In a Linux system, the set of recent kernel messages is known as the kernel ring buffer. Which command displays these messages?

dmesg 

Which command in Linux is useful to help resolve printing problems?

lpq

 

What is the maximum amount of down time a mission-critical application can have during the course of the year if the application has a 99.999% availability requirement?

5 minutes 

The graphic displays output from the dmesg command. Where are the messages coming from?

the kernel 

Which TCP/IP utility prints information about network connections, routing tables, and interfaces?

netstat 

Which Redundant Array of Inexpensive Disks (RAID) level is also known as disk mirroring?

RAID 1 

What is the name of the signal that a network administrator sends to remotely power up a computer that has a NIC with WOL technology capabilities?

magic packet 

What is the simplest and most recommended method of creating a custom emergency boot disk for Linux?

Modify one of the existing boot disks.

 What is the term for a commercial facility whose system backup services include server hardware and other equipment?

hot site

Read More..

The Internet poses many security issues. What is characteristic of Internet security for corporate networks?

 Internet protocols have an inherent lack of security and Internet rules have loopholes that can be exploited. 

 

What can be used to repair security 'holes' in software?

 a security patch

 

Which layer of the OSI reference model is involved when an access list denies traffic to a specific port?

Layer 4 

/sbin/ipfw/add allow tcp from any to 10.90.0.3 80 What does the 80 signify in the ipfw configuration statement

well-known port for web servers 

What is one security advantage that magnetic access cards have over physical keys?

They allow the authorization to be revoked from a central server 

Which of the following are characteristics of a good password policy? (Select two.)

It should expire passwords after a specified time

It should require passwords that are a mixture of letters and numbers 

Which term describes an insecure host that has a permanent Internet connection and is used in a DDoS attack?

a zombie 

What is the purpose of a firewall?

preventing unwanted or malicious IP packets from reaching a network 

What can be done with a packet when using packet filtering?

It can be forwarded, dropped, or processed. 

What should an administrator do before installing a major software upgrade on a production server?

test the results on a test server 

When does it make sense to use a NOS as a firewall solution

if there is a low-traffic environment 

What is the first step in creating a security policy for a company network?

Define an Acceptable Use policy 

Which layers of the OSI model are examined in the most comprehensive form of stateful packet filtering?

3, 4, and 7 

Which agency discovers and studies Internet-related security vulnerabilities?

CERT/CC 

What is one method of implementing a firewall?

ACLs 

What is the only 100 percent effective measure to protect the network from outside attacks?

Disconnect from the outside network. 

Which type of DoS attack uses three-way handshaking to leave multiple 'half-open' connections?

TCP SYN 

Which of the following are examples of biometric security devices? (Select two.)

fingerprint reader

retinal scanner 

NAT is a process used to protect local networks from hackers. Which list of items applies to NAT?

It rewrites the addressing information in IP packets.
It protects private IP addresses from the Internet.
Outside hackers cannot directly reach private IP addresses.
 

When do software manufacturers release security updates?

when vulnerabilities are discovered and fixed

 

Read More..

konnichiwa~

ayas mau berbagi pengalaman nuii..
cara nyembunyiin folder segak ketauan ketauannya. langsung aj gan tancaap gass! mari kita aplikasikan cara membuat SUPER DUPER HIDDEN FOLDER . tujuannya sih buat nyimpen folder-folder yang rahasia banget. pura-pura jadi agen FBI gitu.

cara 1
buat folder kosong... dan ga usah di kasih nama....

CARANYA

rename folder tersebut truz pncet tahan tmbol alt n ketik 255 >>>> Enter

yak folder tanpa nama sudah rampung di bwat.


cara 2
ganti icon folder trsebut....mnjadi icon yg ga ad gmbarnya..
se 
click kanan folder yg tadi >>> properties >>> customize >>>change icon >>> truz cari icon yg ga ada gambarnya (pasti ada) >>> ok..

sekarang udh ga kliatan foldernya kan...
ehhehh jngan sneng dlu.... msih ad bberepa trick lge.... biar jadi SUPER DUPER HIDDEN FOlDER (S.D.H.F).....

cara 3

buka "cmd" klau ga tw "command prompt" .

pencet tanda windows di kibor sambil mencet huruf R . terus menuju folder yang dimaksud di driver tempat disimpannya folder itu . .

mis:

C:Users\namague\ >cd . .

C:Users\>cd..

C:>D: (pindah drive)

D:>cd [nama folder]

stlah di buka. masuklah ke drive dmna.. di dlamnya ad folder yng mw di S.D.H.F..
stelah msuk .. ketik lah printah attrib +s +h trus pencet than alt sambil tetep ketik 255 >>> Enter..

example ::

misal letak folder di drive d:
D:attrib +s +h pncet alt than n' ketik 255 [ Enter]

yippie~ 
S.D.H.F sdah slesai d bwat....

Read More..

sekarang dari PHP beranjak ke MySQL. Structured Query Language.
ayo gan!!

MySQL
Terdiri dari :
a. Database : tempat yang digunakan untuk menyimpan data yang dikelompokkan pada tabel-tabel.
b. Data : kumpulan karakter/simbol yang mempunyai arti
c. Tabel : kolom dan baris . dalam database Kolom disebut field dan Baris disebut Record.





NISNama
001Ari
002Ayi

 

Atribut
Tipe Data MySQL :
a. Char : tipe data karakter
b. Varchar : tipe data karakter, yang pada saat diisi hanya karakter yang diinput yang tertulis walaupun data tidak sepanjang batas yang telah diberikan. Jadi lebih hemat memori.
Terbagi atas :
a. Tipe data
b. Key : Superkey , candidate key, primary key
c. Length : menentukan panjang data

Macam Tipe Key :
a. Superkey : sekumpulan field yang memiliki atribut yang menjadikan suatu data bersifat unique.
b. Candidate : atribut yang bisa dijadikan kunci primary
c. Primary : Satu atribut yang dijadikan kunci dan bersifat unique.

Pengelompokkan atribut .
a. Sederhana : bersifat atomik / tidak dapat dipisah-pisah lagi
b. Komposit : masih bisa dipisah-pisah lagi
c. Bernilai tunggal: yang memiliki satu nilai pada baris datar
d. Harus bernilai : atribut yang wajib memiliki nilai
e. Null : atribut tak wajib memiliki nilai

Menjalankan MySQL lewat command prompt
1. buka command prompt anda dengan mengetik CMD pada box RUN
2. silahkan masuk pada direktori tempat anda menginstall WAMP anda
3. misalnya :
C:Documents and Setting\User>cd..
C:Documents and Setting>cd..
C:>cd wamp
C:wamp>cd mysql
C:wamp\mysql>cd bin
C:wamp\mysql\bin>my sql –u root
4. ini masih baru cara masuk ke mysql lewat command prompt . kapan-kapan kita sambung lagi ya gan . . ohoho~

Read More..

sekarang dari PHP beranjak ke MySQL. Structured Query Language.
ayo gan!!

MySQL
Terdiri dari :
a. Database : tempat yang digunakan untuk menyimpan data yang dikelompokkan pada tabel-tabel.
b. Data : kumpulan karakter/simbol yang mempunyai arti
c. Tabel : kolom dan baris . dalam database Kolom disebut field dan Baris disebut Record.
NIS
Nama
01 Ari
02 Ayi

Atribut
Tipe Data MySQL :
a. Char : tipe data karakter
b. Varchar : tipe data karakter, yang pada saat diisi hanya karakter yang diinput yang tertulis walaupun data tidak sepanjang batas yang telah diberikan. Jadi lebih hemat memori.
Terbagi atas :
a. Tipe data
b. Key : Superkey , candidate key, primary key
c. Length : menentukan panjang data

Macam Tipe Key :
a. Superkey : sekumpulan field yang memiliki atribut yang menjadikan suatu data bersifat unique.
b. Candidate : atribut yang bisa dijadikan kunci primary
c. Primary : Satu atribut yang dijadikan kunci dan bersifat unique.

Pengelompokkan atribut .
a. Sederhana : bersifat atomik / tidak dapat dipisah-pisah lagi
b. Komposit : masih bisa dipisah-pisah lagi
c. Bernilai tunggal: yang memiliki satu nilai pada baris datar
d. Harus bernilai : atribut yang wajib memiliki nilai
e. Null : atribut tak wajib memiliki nilai

Menjalankan MySQL lewat command prompt
1. buka command prompt anda dengan mengetik CMD pada box RUN
2. silahkan masuk pada direktori tempat anda menginstall WAMP anda
3. misalnya :
C:Documents and Setting\User>cd..
C:Documents and Setting>cd..
C:>cd wamp
C:wamp>cd mysql
C:wamp\mysql>cd bin
C:wamp\mysql\bin>my sql –u root
4. ini masih baru cara masuk ke mysql lewat command prompt . kapan-kapan kita sambung lagi ya gan . . ohoho~

Read More..

Saya Barusan Dapat tugas ni akhir-akhir ini . saya mau berbagi ilmu saja dengan para pembaca. Tugas PHP membuat bilangan FIBONACCI . Itu tuh bilangan yang bilangan berikutnya ditambah dengan bilangan sebelumnya. Secara matematis rumusnya yang a(2n-b) itu kalo gak salah. Ohoho~

 

Udah deh nih saya kasih rumusnya:

$N = 6;

$a = 1;

$b = 1;

echo "$a $b ";

for ($i=0;$i<=$N;$i++){

            $sNow = $a + $b;

            echo "$sNow ";

            $a = $b;

            $b = $sNow;

            }


Hasilnya bakal jadi : 1 1 2 3 5 8 13 21 34

 

Atau kalau mau pake array :

 

// fungsi untuk menampilkan deret fibonacci sebanyak n

function deretFibonacci($n) {

// defenisi variable berupa array

$fibonacciArray = array();

 

$fibonacciArray[0] = 0; // set nilai array ke 0

$fibonacciArray[1] = 1; // set nilai array ke 1

 

// generate deret

for ($x=2; $x<$n; $x++) {

$fibonacciArray[$x] = $fibonacciArray[$x-2] + $fibonacciArray[$x-1];

}

 

// return value array

return $fibonacciArray;

}

// menampilkan deret Fibonacci sebanyak 10

echo implode(" ", deretFibonacci(10));


 

Hasilnya : 1 1 2 3 5 8 13 21 34 (sama ja kan gan?!)

Yang Lain ni Bilangan Prima

 

function bilangan_prima($limit) {

$prima = array();

 

for ($i=2; $i<=$limit; $i++) $prima[$i] = true;

 $akarLimit = (int)sqrt($limit);

for ($i=2; $i<=$akarLimit; $i++)

{

if ($prima[$i])

{

for ($j=$i*$i; $j<=$limit; $j+=$i)

{

$prima[$j] = false;

 }

}

}

$i = 0;

foreach ($prima as $bilangan=>$status)

{

 

if ($status) {echo "$bilangan ";$i++;

 }

}

echo "

Jumlahnya:". $i;

}

 

bilangan_prima(100);

 

Ini versi rumitnya gan . .

 

Versi gampangnya :

for($i=2;$i<=20;$i++)

{

            if($i==2)

            {

                        echo "$i"." ";

            }

            else if($i==3)

            {

                        echo "$i"." ";

            }

            else if($i%2 !=0 && $i%3 !=0)

            {

                        echo "$i"." ";

            }         

}

selamat mencobaa!!

 

 

Read More..

.:posted by.Agista Rully Saraswati:.

Saya akan berbagi cara
subnetting network .

Sebenarnya guna Subnet ini sendiri adalah membagi segmen jaringan ke dalam jaringan yang Lebih kecil lagi.

contoh subnetting :

sebuah perusahaan memiliki 60 komputer .
tentukan subnet mask , jumlah network , network address dan broadcast address IP perusahaan tersebut .

a. subnet mask :
(angka yang mendekati 60 adalah 64 -karena kita menggunakan perpangkatan 2-)
jadi 26 = 64 - 2 = 62 host .yang dimaksud 6 dalam perpangkatan tersebut adalah bit yang mati . karena 60 merupakan jumlah host yang diketahui. jadi subnetnya : 255.255.255.192 / 11111111.11111111.11111111.11000000

prefixnya : -gunakan saja IP 192.168.45.3- 192.168.45.3/26
subnet yang kita gunakan merupakan subnet kelas C


b. jumlah network adalah perpangkatan dari bit subnet mask yang hidup
jadi 22 = 4 . ada 4 network dalam jaringan tersebut .

c.
Menentukan Network address dengan cara 256-192 = 64 jadi oktet terakhir NA adalah kelipatan 64 dan dimulai dari angka 0 . (192 adalah oktet terakhir dari subnet mask)

Menentukan broadcast address dengan cara melihat alamat NA pada 1 baris dibawahnya.
misalkan baris pertama NA : 192.168.45.0 dan baris kedua NA 192.168.45.64 maka broadcast addressnya ditulis 1 angka sebelum NA baris kedua pada oktet terakhirnya . broadcast address : 192.168.45.63

Network address IP valid broadcast address
192.168.45.0 192.168.45.1 192.168.45.62 192.168.45.63
192.168.45.64 192.168.45.65 192.168.45.126 192.168.45.127
192.168.45.128 192.168.45.129 192.168.45.190 192.168.45.191
192.168.45.192 192.168.45.193 192.168.45.254 192.168.45.255

Read More..