Skip to content

Commit 6ca682b

Browse files
committed
modified centos-installScript
modified fedora-installScript modified ubuntu-installScript
1 parent 1162113 commit 6ca682b

File tree

3 files changed

+47
-159
lines changed

3 files changed

+47
-159
lines changed

centos-installScript

Lines changed: 41 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function showMenu()
1818
echo "| c. Install MySQL [d,h,l] |"
1919
echo "| d. Install Libs [Public Libs] |"
2020
echo "| e. Install mono |"
21-
echo "| f. Install xsp+mono-fastcgi |"
21+
# echo "| f. Install xsp+mono-fastcgi |"
2222
echo "| g. Install jexus v5 |"
2323
echo "| h. Install mysql v5.5 |"
2424
echo "| i. Install memcached |"
@@ -52,18 +52,6 @@ function setupLibs()
5252
mkdir -pv /tmp/downloads
5353
fi
5454

55-
56-
57-
#if [ -f yum.zip ]; then
58-
# unzip -o yum.zip
59-
#fi
60-
61-
62-
63-
#cp -r -f /tmp/downloads/conf/yum.conf /etc/yum.conf
64-
#cp -r -f /tmp/downloads/yum /tmp
65-
66-
# cd /tmp/downloads/rpm
6755
yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers patch make jpackage-utils build-essential bzip bison pkgconfig glib-devel httpd-devel libX11-devel fontconfig pango-devel ruby ruby-rdoc gtkhtml38-devel wget gettext gcc-g77 automake fiex* libmcrypt* libtool-ltdl-devel* pcre* cmake mhash* libevent libevent-devel gif* libtiff* libjpeg* libpng* libx11* libiconv mcrypt Nginx haproxy
6856

6957
cd /tmp/downloads
@@ -243,16 +231,9 @@ function setupMysql()
243231

244232
echo "setup mysql succeed"
245233
echo
246-
247234
echo "mysql install db"
248235
echo
249-
# cd /usr/local/webserver/mysql/
250-
# mkdir -pv log run tmp data
251-
# chgrp -R mysql *
252-
# cd /tmp/downloads/mysql-5.5.16
253-
# cp -r -f support-files/my-large.cnf /usr/local/webserver/mysql/etc/my.cnf
254236

255-
# setup service:
256237
cp -r -f support-files/mysql.server /etc/init.d/mysqld
257238
chmod +x /etc/init.d/mysqld
258239
chkconfig --add mysqld
@@ -315,40 +296,40 @@ function setupNginx()
315296
return 0
316297
}
317298

318-
function setupXsp()
319-
{
320-
if [ ! -d /usr/local/webserver ]; then
321-
mkdir -pv /usr/local/webserver
322-
fi
323-
if [ ! -d /wwwroot/htdocs/www ]; then
324-
mkdir -pv /wwwroot/htdocs/www
325-
fi
326-
if [ ! -d /tmp/downloads ]; then
327-
mkdir -pv /tmp/downloads
328-
fi
329-
330-
echo "install xsp"
331-
echo "------------------------------------"
332-
333-
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
334-
335-
cd /tmp/downloads
336-
wget -c https://github.com/cjy37/linux-asp.net-installScript/raw/master/xsp-2.10.2.tar.bz2
337-
if [ -f xsp-2.10.2.tar.bz2 ]; then
338-
tar -jvxf xsp-2.10.2.tar.bz2
339-
cd xsp-2.10.2
340-
./configure --prefix=/usr
341-
make && make install
342-
ldconfig
343-
344-
cp -r -f /tmp/downloads/conf/fcgi_mono /etc/init.d/fcgi_mono
345-
chmod +x /etc/init.d/fcgi_mono
346-
chkconfig --add fcgi_mono
347-
chkconfig --level 2345 fcgi_mono on
348-
/etc/init.d/fcgi_mono start
349-
fi
350-
return 0
351-
}
299+
#function setupXsp()
300+
#{
301+
# if [ ! -d /usr/local/webserver ]; then
302+
# mkdir -pv /usr/local/webserver
303+
# fi
304+
# if [ ! -d /wwwroot/htdocs/www ]; then
305+
# mkdir -pv /wwwroot/htdocs/www
306+
# fi
307+
# if [ ! -d /tmp/downloads ]; then
308+
# mkdir -pv /tmp/downloads
309+
# fi
310+
#
311+
# echo "install xsp"
312+
# echo "------------------------------------"
313+
#
314+
# export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
315+
#
316+
# cd /tmp/downloads
317+
# wget -c https://github.com/cjy37/linux-asp.net-installScript/raw/master/xsp-2.10.2.tar.bz2
318+
# if [ -f xsp-2.10.2.tar.bz2 ]; then
319+
# tar -jvxf xsp-2.10.2.tar.bz2
320+
# cd xsp-2.10.2
321+
# ./configure --prefix=/usr
322+
# make && make install
323+
# ldconfig
324+
#
325+
# cp -r -f /tmp/downloads/conf/fcgi_mono /etc/init.d/fcgi_mono
326+
# chmod +x /etc/init.d/fcgi_mono
327+
# chkconfig --add fcgi_mono
328+
# chkconfig --level 2345 fcgi_mono on
329+
# /etc/init.d/fcgi_mono start
330+
# fi
331+
# return 0
332+
#}
352333

353334
function setupHaproxy()
354335
{
@@ -429,39 +410,9 @@ function setupJws()
429410
./install
430411
chmod +x /usr/jexus/*
431412

432-
echo "######################
433-
# Web Site: Default
434-
########################################
435-
436-
port=80
437-
root=/ /wwwroot/htdocs/www
438-
hosts=* #OR your.com,*.your.com
439-
440-
# addr=0.0.0.0
441-
# CheckQuery=false
442-
# NoLog=true
443-
# NoFile=/index.aspx
444-
# Keep_Alive=false
445-
# UseGZIP=true
446-
# UseHttps=true
447-
# DenyFrom=192.168.0.233, 192.168.1.*, 192.168.2.0/24
448-
# AllowFrom=192.168.*.*
449-
# DenyDirs=~/cgi, ~/upfiles
450-
# indexes=myindex.aspx
451-
# rewrite=^/.+?\.(asp|php|cgi|pl|sh)$ /index.aspx
452-
453-
# reproxy=/bbs/ http://192.168.1.112/bbs/
454-
455-
# Jexus php fastcgi address is '/var/run/jexus/phpsvr'
456-
#######################################################
457-
# fastcgi.add=php|socket:/var/run/jexus/phpsvr
458-
459-
# php-fpm listen address is '127.0.0.1:9000'
460-
############################################
461-
# fastcgi.add=php|tcp:127.0.0.1:9000
462-
" > /usr/jexus/siteconf/default
463-
464-
echo "Jexus listening port: 80"
413+
sed -i 's/root=\/ \/var\/www\/default/root=\/ \/wwwroot\/htdocs\/www/g' /usr/jexus/siteconf/default
414+
415+
#echo "Jexus listening port: 80"
465416
/usr/jexus/jws start
466417
/usr/jexus/jws -V
467418
echo "Jexus install to path: /usr/jexus/"
@@ -621,9 +572,9 @@ function selectCmd()
621572
read -n 1 -p "Press <Enter> to continue..."
622573
setupMono
623574
read -n 1 -p "Press <Enter> to continue..."
624-
elif [ "$M" = "f" ]; then
625-
setupXsp
626-
read -n 1 -p "Press <Enter> to continue..."
575+
#elif [ "$M" = "f" ]; then
576+
# setupXsp
577+
# read -n 1 -p "Press <Enter> to continue..."
627578
elif [ "$M" = "g" ]; then
628579
setupJws
629580
read -n 1 -p "Press <Enter> to continue..."

fedora-installScript

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -105,39 +105,8 @@ function setupJws()
105105
sudo ./install
106106
sudo chmod +x /usr/jexus/*
107107

108-
echo "######################
109-
# Web Site: Default
110-
########################################
111-
112-
port=80
113-
root=/ /wwwroot/htdocs/www
114-
hosts=* #OR your.com,*.your.com
115-
116-
# addr=0.0.0.0
117-
# CheckQuery=false
118-
# NoLog=true
119-
# NoFile=/index.aspx
120-
# Keep_Alive=false
121-
# UseGZIP=true
122-
# UseHttps=true
123-
# DenyFrom=192.168.0.233, 192.168.1.*, 192.168.2.0/24
124-
# AllowFrom=192.168.*.*
125-
# DenyDirs=~/cgi, ~/upfiles
126-
# indexes=myindex.aspx
127-
# rewrite=^/.+?\.(asp|php|cgi|pl|sh)$ /index.aspx
128-
129-
# reproxy=/bbs/ http://192.168.1.112/bbs/
130-
131-
# Jexus php fastcgi address is '/var/run/jexus/phpsvr'
132-
#######################################################
133-
# fastcgi.add=php|socket:/var/run/jexus/phpsvr
134-
135-
# php-fpm listen address is '127.0.0.1:9000'
136-
############################################
137-
# fastcgi.add=php|tcp:127.0.0.1:9000
138-
" > /usr/jexus/siteconf/default
139-
140-
echo "Jexus listening port: 80"
108+
sudo sed -i 's/root=\/ \/var\/www\/default/root=\/ \/wwwroot\/htdocs\/www/g' /usr/jexus/siteconf/default
109+
#echo "Jexus listening port: 80"
141110
sudo /usr/jexus/jws start
142111
sudo /usr/jexus/jws -V
143112
echo "Jexus install to path: /usr/jexus/"

ubuntu-installScript

Lines changed: 4 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,6 @@ function setupMongoDB()
164164
sudo apt-get install -y mongodb-10gen=2.4.6
165165
echo "mongodb-10gen hold" | sudo dpkg --set-selections
166166
sudo service mongodb start
167-
#sudo apt-get install -y mongo
168-
#sudo apt-get update -y
169167
}
170168

171169
function setupMQTTServer()
@@ -202,7 +200,7 @@ function setupNodeJS()
202200

203201
cd /wwwroot/node_mqtt
204202

205-
sudo echo "sudo npm install forever/mqtt/websocket/websocket-server/socket.io to '/wwwroot/node_mqtt'"
203+
sudo echo "sudo npm install forever|mqtt|websocket|websocket-server|socket.io to '/wwwroot/node_mqtt'"
206204

207205
sudo npm install forever -g
208206
sudo npm install mqtt -g
@@ -271,39 +269,9 @@ function setupJws()
271269
sudo ./install
272270
sudo chmod +x /usr/jexus/*
273271

274-
echo "######################
275-
# Web Site: Default
276-
########################################
277-
278-
port=80
279-
root=/ /wwwroot/htdocs/www
280-
hosts=* #OR your.com,*.your.com
281-
282-
# addr=0.0.0.0
283-
# CheckQuery=false
284-
# NoLog=true
285-
# NoFile=/index.aspx
286-
# Keep_Alive=false
287-
# UseGZIP=true
288-
# UseHttps=true
289-
# DenyFrom=192.168.0.233, 192.168.1.*, 192.168.2.0/24
290-
# AllowFrom=192.168.*.*
291-
# DenyDirs=~/cgi, ~/upfiles
292-
# indexes=myindex.aspx
293-
# rewrite=^/.+?\.(asp|php|cgi|pl|sh)$ /index.aspx
294-
295-
# reproxy=/bbs/ http://192.168.1.112/bbs/
296-
297-
# Jexus php fastcgi address is '/var/run/jexus/phpsvr'
298-
#######################################################
299-
# fastcgi.add=php|socket:/var/run/jexus/phpsvr
300-
301-
# php-fpm listen address is '127.0.0.1:9000'
302-
############################################
303-
# fastcgi.add=php|tcp:127.0.0.1:9000
304-
" > /usr/jexus/siteconf/default
305-
306-
echo "Jexus listening port: 80"
272+
sudo sed -i 's/root=\/ \/var\/www\/default/root=\/ \/wwwroot\/htdocs\/www/g' /usr/jexus/siteconf/default
273+
274+
#echo "Jexus listening port: 80"
307275
sudo /usr/jexus/jws start
308276
sudo /usr/jexus/jws -V
309277
echo "Jexus install to path: /usr/jexus/"

0 commit comments

Comments
 (0)