-
Notifications
You must be signed in to change notification settings - Fork 0
/
notes
182 lines (133 loc) · 6.04 KB
/
notes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
http://docs.mongodb.org/manual/tutorial/getting-started/
show dbs
use mydb
help
show collections
db.testData.find().pretty()
list all indexes:
db.people.getIndexes()
db.invitations.update({}, {$set: {status: 0}}, {multi: true})
service redis start
chkconfig redis on
chkconfig --list redis
//http://briansnelson.com/How_to_install_Redis_on_a_Centos_6.4_Server
http://blog.nodejitsu.com/keep-a-nodejs-server-up-with-forever/
forever start app
//install apche2.4
http://unix.stackexchange.com/questions/138899/centos-install-using-yum-apache-2-4
//upgrade apache2.2 to 2.4
http://www.thegeekstuff.com/2012/05/install-apache-2-on-centos-6/
http://community.sitepoint.com/t/apache-install-on-mac-osx-10-6-8/27161/4
in /etc/init/ (upstart)
startWebchat.sh
cd /srv/nodejs/webchat && node app.js >>/srv/nodejs/webchat/starting.log 2>&1
webchat.conf
start on runlevel [23456]
stop on runlevel [06]
respawn
respawn limit 10 5
script
exec /etc/init/startwebchat.sh
end script
Goold GCM:
https://console.developers.google.com/project/weighty-treat-711/apiui/credential
DO FileUpload in App -
https://cordova.apache.org/docs/en/3.0.0/cordova_file_file.md.html
http://docs.phonegap.com/en/3.0.0/cordova_camera_camera.md.html
======================
https://www.webrtc-experiment.com/docs/TURN-server-installation-guide.html
Turn Server
1) If you system supports automatic start-up system daemon services,
the, to enable the turnserver as an automatically started system
service, you have to:
a) Create and edit /etc/turnserver.conf or
/usr/local/etc/turnserver.conf .
Use /usr/local/etc/turnserver.conf.default as an example.
b) For user accounts settings, if using the turnserver
with authentication: create and edit /etc/turnuserdb.conf
file, or set up PostgreSQL or MySQL or Redis database for user accounts.
Use /usr/local/etc/turnuserdb.conf.default as example for flat file DB,
or use /usr/local/share/turnserver/schema.sql as SQL database schema,
or use /usr/local/share/turnserver/schema.userdb.redis as Redis
database schema description and/or /usr/local/share/turnserver/schema.st
ats.redis
as Redis status & statistics database schema description.
c) add whatever is necessary to enable start-up daemon for the /usr/loca
l/bin/turnserver.
2) If you do not want the turnserver to be a system service,
then you can start/stop it "manually", using the "turnserver"
executable with appropriate options (see the documentation).
3) To create database schema, use schema in file /usr/local/share/turnserver/sch
ema.sql.
4) For additional information, run:
$ man turnserver
$ man turnadmin
$ man turnutils
install postfix:
remove old one
http://stackoverflow.com/questions/17531173/installing-mysql-libs-on-server-with-mysql-server5-5
http://www.krizna.com/centos/setup-mail-server-in-centos-6/
Note again:
1. Install centos 5 only in order to config postfix and dovent
2. yum install squirrelmail and config it
3. follow jobascaree step to install apache/php53/mysql and change port to 81
4. upgrade python to 2.7: http://lists.centos.org/pipermail/centos/2012-May/125869.html
5. make 2.7 default: http://stackoverflow.com/questions/19256127/two-versions-of-python-on-linux-how-to-make-2-7-the-default
6. then grab node.gz
wget http://nodejs.org/dist/node-latest.tar.gz
tar zxvf node-latest.tar.gz
cd node-v[tab]
python configure
make PYTHON=python2.7
make install
(now python is already python2.7 using ln)
7.
yum install curl-devel
install git: http://www.liquidweb.com/kb/install-git-on-centos-5/
8.redis:
https://www.linode.com/docs/databases/redis/redis-on-centos-5
init.d:
http://www.cyberciti.biz/tips/linux-write-sys-v-init-script-to-start-stop-service.html
http://support.suso.com/supki/CentOS_Init_startup_scripts
9.mongo
http://docs.mongodb.org/manual/tutorial/install-mongodb-on-red-hat-centos-or-fedora-linux/
10. install ffmpeg
https://www.bentasker.co.uk/documentation/linux/177-installing-ffmpeg-on-centos
11. install forever
http://www.krizna.com/centos/installing-node-js-centos-6-sample-app/
12. Update init.d/, continue using mongod so as to make sure it is after mongo started
adding this to init.d/mongod
export NODE_ENV="production"
export PORT="80"
export PATH=$PATH:/usr/local/bin/
cd /srv/nodejs/webchat && /usr/local/bin/node app > /srv/nodejs/webchat/log/app.log 2>&1
13. yum install ImageMagick
db.removeDatabase()
http://chat4each.com:81/scp
xhe/hxf179100
db.chatmessages.update({photo:{$ne: null}}, {$set: { created: new Date('2013') } })
db.clients.update({}, {$set: { processed: null }})
crontab:
0 * * * * root node /srv/nodejs/webchat/app/cli/cleanMedia.js 30
30 * * * * root node /srv/nodejs/webchat/app/cli/cleanChatAndMedia.js 100 30
google play sign key:
http://developer.android.com/tools/publishing/app-signing.html
0. cordova build --release android
1. jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore /Users/fhe/webchat/platforms/android/ant-build/Chat4Each-release-unsigned.apk Chat4Each
2. /Users/fhe/Desktop/adt-bundle-mac-x86_64-20140702/sdk/build-tools/android-4.4W/zipalign -v 4 /Users/fhe/webchat/platforms/android/ant-build/Chat4Each-release-unsigned.apk Chat4Each.apk
https://play.google.com/apps/publish/?dev_acc=17180470353005092009#ApkPlace:p=com.chat4each
need update ffmpeg:
http://injustfiveminutes.com/2013/07/17/how-to-compile-latest-version-of-ffmpeg-on-centos-5/
Then
http://ffmpeg.org/download.html
git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
.configure && make && make install
https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
./configure --prefix="$HOME/ffmpeg_build" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --bindir="$HOME/bin"
PATH="$HOME/bin:$PATH" make
make install
make distclean
hash -r
minimize: r.js -o build.js
http://www.chat4each.com:81/webmail/src/login.php
http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1