您好,登錄后才能下訂單哦!
一次系統環境搭建和部署就是一次鍛煉更是一次難得的學習機會,很開心,先分享出來,請廣大博友多多指教!看過本博文朋友,別忘了評論幾句,本人在此謝過。
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進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。