Here is some procedure, you just have to put the pieces together 
First make an array, I used an ArrayList for this
public ArrayList messages = new ArrayList();
Then make an empty string to temporary store a message in
public string stringToEdit = "";
Make a textfield to enter the message
stringToEdit = GUI.TextField (new Rect (10, 10, 500, 20), stringToEdit, 128);
For a scroll view first create a Vector2
Vector2 scrollView;
Display the actual scroll view and display the chatmessages inside of it
scrollView = GUI.BeginScrollView(new Rect(10, 30, 600, 300), scrollView, new Rect(0, 0, 220, messages.Count * 25));
for(int i = 0; i < messages.Count; i++)
{
GUI.Label(new Rect(10,10 + (i * 20),500,20), messages[i].ToString());
}
GUI.EndScrollView();
Create RPC to send the message across the network
[RPC]
void SendChatMessage(string str1)
{
messages.Add(str1);
}
Fire the RPC when you hit enter and make the textfield empty for a new message
if (Event.current.type == EventType.keyDown Event.current.character == '\n')
{
messages.Add(stringToEdit);
networkView.RPC("SendChatMessage", RPCMode.Others, stringToEdit);
stringToEdit = "";
}
Remove the oldest message from the array when a certain amount is reached
if (messages.Count == 50)
{
messages.RemoveAt(0);
}
Don’t forget to attach a NetworkView component to the game object you attach this script to.
Now you only need to set up a server, on this site you will find instructions http://cgcookie.com/unity/2011/12/20/introduction-to-networking-in-unity/
Good luck!