安裝行業(yè)應(yīng)用平臺

準(zhǔn)備工作

1萍嬉、確認(rèn)oracle已經(jīng)安裝完畢,并可以使用sqlplus工具連接數(shù)據(jù)庫
2位他、更換yum源

卸載系統(tǒng)原來的yum

rpm -qa|grep yum
rpm -e --nodeps yum-*

切換到系統(tǒng)根目錄

mkdir -p /home/app
cd /home/app
wget http://mirrors.163.com/centos/6.8/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
wget http://mirrors.163.com/centos/6.8/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
wget http://mirrors.163.com/centos/6.8/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm
wget http://mirrors.163.com/centos/6.8/os/x86_64/Packages/yum-3.2.29-73.el6.centos.noarch.rpm

rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
rpm -ivh yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm yum-3.2.29-73.el6.centos.noarch.rpm


cd /etc/pki/rpm-gpg/
wget http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-5
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*

配置yum源

vim /etc/yum.repos.d/rhel-debuginfo.repo

輸入如下信息

[base]
name=CentOS-$releasever - Base - 163.com
baseurl=http://tel.mirrors.163.com/centos/6/os/x86_64/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#released updates 
[updates]
name=CentOS-$releasever - Updates - 163.com
baseurl=http://tel.mirrors.163.com/centos/6/os/x86_64/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - 163.com
baseurl=http://tel.mirrors.163.com/centos/6/os/x86_64/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus - 163.com
baseurl=http://tel.mirrors.163.com/centos/6/os/x86_64/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib - 163.com
baseurl=http://tel.mirrors.163.com/centos/6/os/x86_64/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

保存之后執(zhí)行

yum clean all
yum makecache

配置防火墻

vim /etc/sysconfig/iptables

增加配置

-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 6379 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 11211 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 1521 -j ACCEPT

重啟服務(wù)

service iptables restart

一 恃慧、安裝java環(huán)境

1、移除原來的open jdk

[root@localhost database]# rpm -qa|grep -i jdk
java-1.6.0-openjdk-1.6.0.38-1.13.10.4.el6.x86_64
java-1.7.0-openjdk-1.7.0.99-2.6.5.1.el6.x86_64
[root@localhost database]# rpm -e java-1.6.0-openjdk-1.6.0.38-1.13.10.4.el6.x86_64
[root@localhost database]# rpm -e java-1.7.0-openjdk-1.7.0.99-2.6.5.1.el6.x86_64  

2电湘、上傳jdk-6u45-linux-x64-rpm.bin到/home/app

查看一下

[root@localhost database]# cd /home/app
[root@localhost app]# ls
10201_database_linux_x86_64.cpio  database  jdk-6u45-linux-x64-rpm.bin
[root@localhost app]# chmod +x jdk-6u45-linux-x64-rpm.bin
[root@localhost app]# ./jdk-6u45-linux-x64-rpm.bin
Unpacking...
Checksumming...
Extracting...
UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu).
  inflating: jdk-6u45-linux-amd64.rpm  
  inflating: sun-javadb-common-10.6.2-1.1.i386.rpm  
  inflating: sun-javadb-core-10.6.2-1.1.i386.rpm  
  inflating: sun-javadb-client-10.6.2-1.1.i386.rpm  
  inflating: sun-javadb-demo-10.6.2-1.1.i386.rpm  
  inflating: sun-javadb-docs-10.6.2-1.1.i386.rpm  
  inflating: sun-javadb-javadoc-10.6.2-1.1.i386.rpm  
Preparing...                ########################################### [100%]
   1:jdk                    ########################################### [100%]
Unpacking JAR files...
        rt.jar...
        jsse.jar...
        charsets.jar...
        tools.jar...
        localedata.jar...
        plugin.jar...
        javaws.jar...
        deploy.jar...
Installing JavaDB
Preparing...                ########################################### [100%]
   1:sun-javadb-common      ########################################### [ 17%]
   2:sun-javadb-core        ########################################### [ 33%]
   3:sun-javadb-client      ########################################### [ 50%]
   4:sun-javadb-demo        ########################################### [ 67%]
   5:sun-javadb-docs        ########################################### [ 83%]
   6:sun-javadb-javadoc     ########################################### [100%]
 
Done.
[root@localhost app]# rpm -ivh jdk-6u45-linux-amd64.rpm
Preparing...                ########################################### [100%]
        package jdk-2000:1.6.0_45-fcs.x86_64 is already installed

[root@localhost app]# cd /usr/java
[root@localhost java]# ls
default  jdk1.6.0_45  latest
[root@localhost java]# 

看下jdk路徑

[root@localhost java]# cd jdk1.6.0_45/
[root@localhost jdk1.6.0_45]# pwd
/usr/java/jdk1.6.0_45

設(shè)置環(huán)境變量

vim /etc/profile

查找export /export,并增加

export JAVA_HOME="/usr/java/jdk1.6.0_45"
export CLASSPATH="/usr/java/jdk1.6.0_45/lib:/usr/java/jdk1.6.0_45/jre/lib"
pathmunge /usr/java/jdk1.6.0_45/bin:/usr/java/jdk1.6.0_45/jre/bin

二、安裝php環(huán)境

1鹅经、安裝httpd以及相關(guān)組件

yum -y install httpd*
chkconfig httpd on
service httpd start 
yum install php php-gd  mod_ssl mod_perl php-mcrypt php-xml php-mbstring php-pear php-xmlrpc mem* php-pecl-memcache php-devel

chkconfig --add memcached
chkconfig memcached on
chmod 755 /etc/init.d/memcached
service memcached start

2寂呛、配置httpd

cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.back
mkdir /home/www
vim /etc/httpd/conf/httpd.conf

修改配置:

DocumentRoot "/home/www"
<Directory />
    Options FollowSymLinks
    AllowOverride All
</Directory>

<Directory "/home/www">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

<Files ~ "^\.htaccess">
    Order allow,deny
    Deny from all
    Satisfy All
</Files>

重啟一下

service httpd restart
cd /home/www
vim info.php
<?php phpinfo(); ?>

瀏覽器輸入http://192.168.1.232/info.php查看

3、配置oracle擴(kuò)展

上傳
oracle-instantclient-basic-10.2.0.4-1.x86_64.rpm
oracle-instantclient-devel-10.2.0.4-1.x86_64.rpm
oracle-instantclient-sqlplus-10.2.0.4-1.x86_64.rpm
到/home/app
下載地址
http://www.oracle.com/technetwork/cn/database/features/instant-client/index-097480.html

rpm -ivh oracle-instantclient-basic-10.2.0.4-1.x86_64.rpm oracle-instantclient-devel-10.2.0.4-1.x86_64.rpm    oracle-instantclient-sqlplus-10.2.0.4-1.x86_64.rpm
cd /home/app
wget http://pecl.php.net/get/oci8-2.0.10.tgz
tar -xf oci8-2.0.10.tgz
cd oci8-2.0.10
phpize

./configure --with-oci8=shared,instantclient,/usr/lib/oracle/10.2.0.4/client64/lib/

make
make install
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

Build complete.
Don't forget to run 'make test'.

[root@localhost oci8-2.0.10]# make install
Installing shared extensions:     /usr/lib64/php/modules/

修改php配置文件

cp /etc/php.ini /etc/php.ini.back vim /etc/php.ini
編輯:

[OCI8]
extension=oci8.so
---/usr/lib64/php/modules/

修改選項

short_open_tag=On
error_reporting = E_ALL
upload_max_filesize = 30M

重啟

service httpd restart

查看下phpinfo

oci8

成功

三瘾晃、安裝tomcat環(huán)境

1贷痪、上傳文件apache-tomcat-7.0.70.tar.gz至/home/tomcat
解壓縮

tar -xzvf apache-tomcat-7.0.70.tar.gz

修改TOMCAT_HOME/bin/catalina.sh
位置cygwin=false前。

JAVA_OPTS="-server -Xms4g -Xmx4g -XX:PermSize=256M -XX:MaxPermSize=512m" 

刪除webapps下的所有文件
cd webapps
rm -rf *

四蹦误、部署數(shù)據(jù)庫

1劫拢、創(chuàng)建數(shù)據(jù)庫

su oracle
sqlplus "/as sysdba"
startup


create tablespace ebusiness datafile '/home/oracle/ebusiness.dbf' size 1000m autoextend on next 100m;
create user ebusiness2016 identified by ebusiness2016 default tablespace ebusiness;

grant connect,resource,select any dictionary,unlimited tablespace,create any view,create materialized view,create public  database link  to ebusiness2016;
[root@localhost modules]# su oracle
[oracle@localhost modules]$ sqlplus "/as sysdba"

SQL*Plus: Release 10.2.0.1.0 - Production on 星期四 3月 2 20:54:01 2017

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL> create tablespace ebusiness datafile '/home/oracle/ebusiness.dbf' size 1000m autoextend on next 100m;

Tablespace created.

SQL> create user ebusiness2016 identified by ebusiness2016 default tablespace ebusiness;

User created.

SQL> grant connect,resource,select any dictionary,unlimited tablespace,create any view,create materialized view to ebusiness2016;

Grant succeeded.

SQL> 

導(dǎo)入sql.sql初始化

五、部署php程序

1强胰、上傳business_php.zip至/home/www
解壓

unzip business_php.zip

配置文件
application/config/config.php

$config['image_prefix'] = "http://公網(wǎng)ip:公網(wǎng)端口";

2舱沧、修改權(quán)限

chmod  777 /home/www/uploads

六、安裝redis

1哪廓、上傳redis-3.2.3.tar.gz 到 /home/app

tar -xzvf redis-3.2.3.tar.gz
cd redis-3.2.3
yum install gcc-c++ 
make MALLOC=libc
make install

配置redis

vim redis.conf
daemonize=yes
注釋掉bind 127.0.0.1
protected-mode no

拷貝redis.conf到etc目錄下

mkdir -p /etc/redis
cp redis.conf /etc/redis/redis.conf

啟動redis

redis-server /etc/redis/redis.conf

修改redis密碼

redis-cli
config set requirepass 123
[root@oracle redis-3.2.3]# vim redis.conf
[root@oracle redis-3.2.3]# mkdir -p /etc/redis
cp redis.conf /etc/redis/redis.conf[root@oracle redis-3.2.3]# cp redis.conf /etc/redis/redis.conf
[root@oracle redis-3.2.3]# cd /etc/redis                                                                                                                                
[root@oracle redis]# ls
redis.conf
[root@oracle redis]# vim redis.conf
[root@oracle redis]# redis-server /etc/redis/redis.conf
[root@oracle redis]# redis-cli
127.0.0.1:6379> set config requirepass 123                                                                                                                              
(error) ERR syntax error
127.0.0.1:6379> config set requirepass 123                                                                                                                              
OK
127.0.0.1:6379> exit                                                                                                                                                    
[root@oracle redis]# 

七狗唉、部署java程序

1、上傳business.war至 TOMCAT_HOME/webapps

2涡真、切到目錄bin
運行:

sh startup.sh

打開網(wǎng)頁

http://ip:8080/business/druid/weburi.html

查看,如果正常肾筐,則出現(xiàn)

運行狀態(tài)
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末哆料,一起剝皮案震驚了整個濱河市,隨后出現(xiàn)的幾起案子吗铐,更是在濱河造成了極大的恐慌东亦,老刑警劉巖,帶你破解...
    沈念sama閱讀 212,185評論 6 493
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件唬渗,死亡現(xiàn)場離奇詭異典阵,居然都是意外死亡,警方通過查閱死者的電腦和手機(jī)镊逝,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 90,445評論 3 385
  • 文/潘曉璐 我一進(jìn)店門壮啊,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人撑蒜,你說我怎么就攤上這事歹啼⌒” “怎么了?”我有些...
    開封第一講書人閱讀 157,684評論 0 348
  • 文/不壞的土叔 我叫張陵狸眼,是天一觀的道長藤树。 經(jīng)常有香客問我,道長拓萌,這世上最難降的妖魔是什么岁钓? 我笑而不...
    開封第一講書人閱讀 56,564評論 1 284
  • 正文 為了忘掉前任,我火速辦了婚禮微王,結(jié)果婚禮上屡限,老公的妹妹穿的比我還像新娘。我一直安慰自己骂远,他們只是感情好囚霸,可當(dāng)我...
    茶點故事閱讀 65,681評論 6 386
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著激才,像睡著了一般拓型。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上瘸恼,一...
    開封第一講書人閱讀 49,874評論 1 290
  • 那天劣挫,我揣著相機(jī)與錄音,去河邊找鬼东帅。 笑死压固,一個胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的靠闭。 我是一名探鬼主播帐我,決...
    沈念sama閱讀 39,025評論 3 408
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼愧膀!你這毒婦竟也來了拦键?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 37,761評論 0 268
  • 序言:老撾萬榮一對情侶失蹤檩淋,失蹤者是張志新(化名)和其女友劉穎芬为,沒想到半個月后,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體蟀悦,經(jīng)...
    沈念sama閱讀 44,217評論 1 303
  • 正文 獨居荒郊野嶺守林人離奇死亡媚朦,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 36,545評論 2 327
  • 正文 我和宋清朗相戀三年,在試婚紗的時候發(fā)現(xiàn)自己被綠了日戈。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片询张。...
    茶點故事閱讀 38,694評論 1 341
  • 序言:一個原本活蹦亂跳的男人離奇死亡,死狀恐怖涎拉,靈堂內(nèi)的尸體忽然破棺而出瑞侮,到底是詐尸還是另有隱情的圆,我是刑警寧澤,帶...
    沈念sama閱讀 34,351評論 4 332
  • 正文 年R本政府宣布半火,位于F島的核電站越妈,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏钮糖。R本人自食惡果不足惜梅掠,卻給世界環(huán)境...
    茶點故事閱讀 39,988評論 3 315
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望店归。 院中可真熱鬧阎抒,春花似錦、人聲如沸消痛。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,778評論 0 21
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽秩伞。三九已至逞带,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間纱新,已是汗流浹背展氓。 一陣腳步聲響...
    開封第一講書人閱讀 32,007評論 1 266
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機(jī)就差點兒被人妖公主榨干…… 1. 我叫王不留脸爱,地道東北人遇汞。 一個月前我還...
    沈念sama閱讀 46,427評論 2 360
  • 正文 我出身青樓,卻偏偏與公主長得像簿废,于是被迫代替她去往敵國和親空入。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 43,580評論 2 349

推薦閱讀更多精彩內(nèi)容