I am a newbie here, and a newbie in programming, and I got a task to install Mattermost on DigitalOcean VPS. Using Ubuntu 14.04. I know most of the problem is due to my lack of knowledge in programming/terminal/or reading documentation. And my purpose to install Mattermost is for my school district, so that teachers can try an alternative to teaching via Mattermost.
I am using:
iMac, latest OSX
VPS hosted on digitalocean, 2GB Ram with Ubuntu 14.04
So far here’s what I have done, and where I have failed:
Creating 3 machines
Go create 3 machines with Ubuntu 14.04 with 2GB of RAM
Completed the sudo apt-get update and sudo apt-get upgrade
I understood that there are 3 new IP that I got from my VPS provider
Tried Setting up database server (failed)
Completed step 1 to 13, and error is shown on the last step as pasted below:
root@Mattermost-dbserver:~# sudo /etc/init.d/postgresql reload
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = “UTF-8”,
LANG = “en_US.UTF-8”
are supported and installed on your system.
perl: warning: Falling back to the standard locale (“C”).
Error: Invalid line 59 in /etc/postgresql/9.3/main/postgresql.conf: »listen_addresses = * # what IP address(es) to listen on;
«
No PostgreSQL clusters exist; see “man pg_createcluster”
root@Mattermost-dbserver:~#
it only goes away when I removed the '*' and change it to 'localhost'
Tried to setup Mattermost Server
I dont understand the first 3 step
For the purposes of this guide we will assume this server has an IP address of 10.10.10.2
For the sake of making this guide simple we located the files at /home/ubuntu/mattermost. In the future we will give guidance for storing under /opt.
We have also elected to run the Mattermost Server as the ubuntu account for simplicity. We recommend setting up and running the service under a mattermost user account with limited permissions.
I am in the middle of rewriting of all steps that I took in my machine.
Maybe, just maybe, if possible and helpful this guide may be used to help Mattermost community.
End Product:
Using Mattermost for teachers to teach
Approximately 150 user per cohort for 10 cohorts = 1500 user
Please advise for better hardware setup, if necessary.
Install Ubuntu Server (x64) 14.04 LTS Machines in Digital Ocean
Go To Digital Ocean Hosting Page
Select Ubuntu 14.04x
Pick 2GB ram option
Choose server nearest to my users (Singapore)
Use SSH for increased security
Rename droplets to 3 names (Mattermost-DB, Mattermost-Server, and Mattermost-Nginx)
This step completed & succeeded
##Digital Ocean Specific Step “Preparing the Ubuntu Machine”: Get Inside Terminal and type:
ssh root@10.10.10.1
Setting up locale (this is known problem in Digital Ocean)
CREATE USER mmuser WITH PASSWORD 'mmuser_password';
GRANT ALL PRIVILEGES ON DATABASE mmdb to mmuser;
\q
exit
This part will be edited again
Reminder: if you change mmuser and mmuser password, please remember to be consistet across the changes.
Allow Postgres to listen on all assigned IP Address
sudo vi /etc/postgresql/9.3/main/postgresql.conf
Uncomment ‘listen_addresses’ and change 'localhost to ‘*’
remember in this part if you don’t understand how to use vi, you can use i to insert and esc then typing :wq! to save and quit.
About this vi thing, I just learned about it and took about 6 hours to realize it.
Alter pg_hba.conf to allow connectionto Mattermost Server
sudo vi /etc/postgresql/9.3/main/pg_hba.conf
Add the following line to the ‘IPv4 local connections’
For the first issue. It looks like your on the wrong server? Should be on Mattermost-Server for running the platform command. Also you should do cd mattermost/bin then run ./platform. The platform binary is in the mattermost/bin directory.
For the second issue, are you running psql on the DB server? You should run it there.
Hello @crspeller Thank you so much for helping me.
I am actually a math postgrad who is trying to do programming on my own, since my programmer partner is hospitalized for quite some time. Sorry if my lack of knowledge surprise you.
I actually destroyed the droplet to do clean reinstall.
The psql is installed in Mattermost-DB
The ./platform is run in Mattermost-Server, and i got the problem here:
For the previous question, I did redo on the platform
root@Mattermost-Server:/opt/timmy/mattermost/mattermost/bin# ./platform
[15:16:57 EDT 2016/04/28] [INFO] (github.com/mattermost/platform/utils.GetTranslationsBySystemLocale:52) Loaded system translations for ‘en’ from ‘/opt/timmy/mattermost/mattermost/i18n/en.json’
[2016/04/28 15:16:57 EDT] [INFO] Current version is 2.2.0 (6671/Fri Apr 15 18:40:19 UTC 2016/8e883ad2f516820942cc0131241268c1ea909ff3)
[2016/04/28 15:16:57 EDT] [INFO] Enterprise Enabled: false
[2016/04/28 15:16:57 EDT] [INFO] Current working directory is /opt/timmy/mattermost/mattermost/bin
[2016/04/28 15:16:57 EDT] [INFO] Loaded config file from /opt/timmy/mattermost/mattermost/config/config.json
[2016/04/28 15:16:57 EDT] [INFO] Server is initializing…
[2016/04/28 15:16:57 EDT] [INFO] Pinging sql master database
[2016/04/28 15:16:57 EDT] [CRIT] Failed to ping db err:dial tcp: lookup dockerhost on 8.8.8.8:53: no such host
panic: Failed to open sql connection dial tcp: lookup dockerhost on 8.8.8.8:53: no such host
goroutine 244 [chan receive]: github.com/alecthomas/log4go.(*ConsoleLogWriter).run(0xc82036fae0, 0x7ff6cdddd1e8, 0xc820026010)
/go/src/github.com/mattermost/platform/Godeps/_workspace/src/github.com/alecthomas/log4go/termlog.go:33 +0x69
created by github.com/alecthomas/log4go.NewConsoleLogWriter
/go/src/github.com/mattermost/platform/Godeps/_workspace/src/github.com/alecthomas/log4go/termlog.go:26 +0xb5
goroutine 246 [chan receive]:
database/sql.(*DB).connectionOpener(0xc820130fa0)
/usr/local/go/src/database/sql/sql.go:634 +0x45
created by database/sql.Open
/usr/local/go/src/database/sql/sql.go:481 +0x336
Fist of all… I got confused on several things for the second server
which directory I should install mattermost on?
Instead of /home/ubuntu/mattermost i wrote opt/timmy/mattermost
then i downloaded the file there and use tar.gz there.
How to create the ubuntu user, (in my case renamed timmy)?
I used this line from rosehosting
If you have the DB connection string correct in Mattermost, there isn’t a problem on our end. Likely you have to allow connections between the two machines in your hosting environment.