一次系统环境搭建和部署就是一次锻炼更是一次难得的学习机会,很开心,先分享出来,请广大博友多多指教!看过本博文朋友,别忘了评论几句,本人在此谢过。
MySQL部分
具体安装步骤如下:
mkdir -p/data/mysql
mkdir -p/data/mysqldata
mysqlbase=/data/mysql
mysqldata=/data/mysqldata
yum -ygroupinstall "Development Tools"
yum -ygroupinstall "Development Libraries"
yum -y installntp vim-enhanced gcc gcc-c++ flex bison autoconf automake bzip2-develncurses-devel zlib-devel libjpeg-devel libpng-devel libtiff-develfreetype-devel libXpm-devel gettext-devel pam-devel libtool libtool-ltdl openssl openssl-devel fontconfig-devellibxml2-devel curl-devel libiculibicu-devel libmcrypt libmcrypt-devel libmhash libmhash-devel
tar zxvfcmake-2.8.8.tar.gz -C /tmp
tar zxvfmysql-5.5.32.tar.gz -C /tmp
useradd mysql -s/sbin/nologin
#install cmake
cd/tmp/cmake-2.8.8
./configure&& make && make install
#install mysql3306
cd/tmp/mysql-5.5.32
cmake-DCMAKE_INSTALL_PREFIX=$mysqlbase -DMYSQL_DATADIR=$mysqldata-DMYSQL_UNIX_ADDR=/tmp/mysql.sock -DDEFAULT_CHARSET=utf8-DDEFAULT_COLLATION=utf8_general_ci -DWITH_READLINE=1 -DWITH_SSL=system-DWITH_EMBEDDED_SERVER=1 -DENABLED_LOCAL_INFILE=1-DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1-DMYSQL_USER=mysql -DWITH_DEBUG=0
make &&make install
chown -Rmysql.mysql $mysqlbase
chown -Rmysql.mysql $mysqldata
sh ./scripts/mysql_install_db.sh--user=mysql --basedir=$mysqlbase --datadir=$mysqldata
#config mysql
yes | cp/data/mysql/support-files/my-innodb-heavy-4G.cnf /etc/my.cnf
yes | cp/data/mysql/support-files/mysql.server /etc/init.d/mysql
chmod u+x/etc/init.d/mysql
#service mysql
chkconfig --addmysql
chkconfig--level 35 mysql on
#/etc/init.d/mysql restart
weblogic部分
具体安装步骤如下:
source /etc/profile
groupadd bea
mkdir /data
useradd -d /data/weblogic -g bea weblogic
echo 'wls!@#$%'|passwd --stdin weblogic
JAVA_HOME=/data/weblogic/jdk1.6.0_25
CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME CLASSPATH PATH
切换到WebLogic用户
source /etc/profile
wget ftp://IP地址/weblogic/wls1035_generic.jar&& wget ftp://IP地址/weblogic/jdk-6u25-linux-x64.bin
chown -R weblogic:bea wls1035_generic.jar jdk-6u25-linux-x64.bin
chmod u+x /data/weblogic/jdk-6u25-linux-x64.bin
/data/weblogic/jdk-6u25-linux-x64.bin
export.utf-8
wget ftp://IP地址/weblogic/silent.xml
切换到root用户作如下操作
vim/etc/profile 在最后添加如下4行内容
JAVA_HOME=/data/weblogic/jdk1.6.0_25
CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar
PATH=$JAVA_HOME/bin:$PATH
exportJAVA_HOME CLASSPATH PATH
之后切换到weblogic用户执行如下操作
source /etc/profile
java -Xmx1024m -d64 -jar ./wls1035_generic.jar-mode=silent -silent_xml=./silent.xml
/data/weblogic/wlserver/wlserver_10.3/common/bin/wlst.sh
接着输入:
readTemplate('/data/weblogic/wlserver/wlserver_10.3/common/templates/domains/wls.jar')
cd('Server/AdminServer')
set('ListenAddress','')
set('ListenPort',7001)
cd('/')
cd('Security/base_domain/User/weblogic')
cmo.setPassword('wls!@#$%')
setOption('OverwriteDomain','true')
writeDomain('/data/weblogic/wlserver/user_projects/domains/base_domain')
稍等一会之后出现wls:/offline/base_domain/Security/base_domain/User/weblogic>时,输入:exit() ,按下Enter.
之后编辑setDomainEnv.sh:
vim /data/weblogic/wlserver/user_projects/domains/base_domain/bin/setDomainEnv.sh
452行修改为:
JAVA_OPTIONS="${JAVA_OPTIONS}-Djava.security.egd=file:/dev/zero"
JAVA_VM="-d64-server ${JAVA_DEBUG} ${JAVA_PROFILE}"
编辑startWebLogic.sh:
vim /data/weblogic/wlserver/user_projects/domains/base_domain/bin/startWebLogic.sh
在172行插入:
#ARGS MODIFY
MEM_ARGS="-Xms4096M-Xmx4096M -Xmn2048M -Xss256k -XX:PermSize=256m -XX:MaxPermSize=512m-XX:SurvivorRatio=6 "
#MEM_ARGS="-Xms4096M-Xmx4096M -Xmn2048M -Xss128k -XX:PermSize=256m -XX:MaxPermSize=512m-XX:SurvivorRatio=6 "
切换到root用户作如下操作:
vim/etc/hosts
把本机的IP和主机名(相对应)添加到/etc/hosts里
接下来切换到weblogic用户执行如下命令:
cd /data/weblogic/wlserver/user_projects/domains/base_domain/bin/
nohup bash startWebLogic.sh &
mongoDB部分
具体安装步骤如下:
wget -nc -P /tmphttp://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.0.8.tgz
tar zxvf /tmp/mongodb-linux-x86_64-2.0.8.tgz -C /tmp
sudo mv /tmp/mongodb-linux-x86_64-2.0.8 /usr/local/mongodb-2.0.8
sudo mkdir -p /etc/xhsso-mongodb-2.0.8-conf
sudo mkdir -p /data/xhsso-mongodb/logs
在/usr/local/mongodb-2.0.8/bin下启动mongodb
./mongod --dbpath /data/db/ --smallfiles &
检查MongoDB是否安装成功:
#netstat -lanp| grep "27017"
redis部分
具体安装步骤如下:
yum install -y autoconfautomake binutils bison flex gcc gcc-c++ gettext libtool make patch
yum groupinstall "Development Tools"
yum groupinstall "Development Libraries"
mkdir -p /data/redis/data
#install redis
tar zxvf redis-2.6.10.tar.gz -C/usr/local/src
cd /usr/local/src/redis-2.6.10
make
#configredis
sed -i "s/daemonize no/daemonizeyes/g" /usr/local/src/redis-2.6.10/redis.conf
sed -i "s/dir .\//dir\/data\/redis\/data/g" /usr/local/src/redis-2.6.10/redis.conf
#serviceredis
yes | cp/usr/local/src/redis-2.6.10/src/redis-server /usr/bin
redis-server/usr/local/src/redis-2.6.10/redis.conf
memcached部分
具体安装步骤如下:
tar zxvf libevent-2.0.21-stable.tar.gz -C /tmp
tar zxvfmemcached-1.4.15.tar.gz -C /tmp
#install libevent
cd/tmp/libevent-2.0.21-stable
./configure--prefix=/usr/local/libevent
make&& make install
#install memcached
cd/tmp/memcached-1.4.15
./configure--prefix=/usr/local/memcached-1.4.15 --with-libevent=/usr/local/libevent
make&& make install
#start memcached
/usr/local/memcached-1.4.15/bin/memcached -d -u root -p 11212 -m 500 -n 48 -f 1.25 -c10240 -t 4 -R 20 -C -P /tmp/memcached.pid
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。