Connecting via Serial Console, you should see a prompt like this:
root@:~ #
Start the JunOS CLI
root@:~ # cli
root>
Set the device's hostname
[edit]
root@# set system host-name <hostname>
Set the root password
[edit]
root@# set system root-authentication plain-text-password
New password: type password
Retype new password: retype password
-OR-
[edit]
root@# set system root-authentication ssh-rsa key
Configure the device domain name:
[edit]
root@# set system domain-name <domain-name>
Configure the IP address and prefix length for the device management Ethernet interface. The management Ethernet interface provides a separate out-of-band management network for the device.
[edit]
root@# set interfaces [fxp0|em0] unit 0 family inet address x.x.x.x/y