(1)jdk vi /etc/profile
最后添加: #set java environment JAVA_HOME=/data/env/jdk1.7.0_67 CLASSPATH=.:$JAVA_HOME/lib/tools.jar PATH=$JAVA_HOME/bin:$PATH export JAVA_HOME CLASSPATH PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/apr/lib
然后 source /etc/profile java -version
cd /data/env/jdk1.7.0_67/jre/bin chmod 775 * cd /data/env/jdk1.7.0_67/bin chmod 775 *
=================================== (2)nginx,参考 http://www.cnblogs.com/hanyinglong/p/5102141.html
cd /data/env/setupFile/ yum install -y gcc gcc-c++ tar -zxvf pcre-8.40.tar.gz cd pcre-8.40 ./configure make make install cd .. rm -rf pcre-8.40
tar -zxvf zlib-1.2.11.tar.gz cd zlib-1.2.11 ./configure make make install cd .. rm -rf zlib-1.2.11
tar -zxvf nginx-1.9.15.tar.gz cd nginx-1.9.15 ./configure make make install =================nginx安装在/usr/local/nginx下=================== 自动启动 echo "/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf" >> /etc/rc.local
修改nginx.conf文件。 nginx -t 验证 nginx 启动 nginx -s reload 重载配置 nginx -s stop
(3)yum install telnet nginx启动 telnet 127.0.0.1 80 测试OK即可
(4)memcached安装 参考:http://mytju.com/classcode/news_readNews.asp?newsID=853
yum install libevent-devel tar -zxvf memcached-1.4.36.tar.gz cd memcached-1.4.36 ./configure && make && make test && sudo make install
echo "/data/env/startMemcached.sh" >> /etc/rc.local
(5)测试memcached cd /data/env chmod 775 *.sh ./startMemcached.sh telnet 127.0.0.1 11211 flush_all quit
(6)cronolog日志拆分 参考:http://mytju.com/classcode/news_readNews.asp?newsID=833
wget http://pkgs.fedoraproject.org/repo/pkgs/cronolog/cronolog-1.6.2.tar.gz/a44564fd5a5b061a5691b9a837d04979/cronolog-1.6.2.tar.gz tar zxvf cronolog-1.6.2.tar.gz cd cronolog-1.6.2 ./configure make make install which cronolog
(7)安装tomcat的apr支持 参考:http://www.cnblogs.com/coffeerun/p/5740707.html cd /data/env/setupFile/
tar -xvf apr-1.6.2.tar.gz cd apr-1.6.2 ./configure make && make install
cd /data/env/setupFile/ tar -xvf apr-iconv-1.2.1.tar.gz cd apr-iconv-1.2.1 ./configure --with-apr=/usr/local/apr make && make install
不装这个报错,呵呵 yum install expat-devel
cd /data/env/setupFile/ tar -xvf apr-util-1.6.0.tar.gz cd apr-util-1.6.0 ./configure --with-apr=/usr/local/apr make && make install
cd /data/env/tomcat0_empty/bin tar -xvf tomcat-native.tar.gz cd tomcat-native-1.1.31-src/jni/native ./configure --with-apr=/usr/local/apr --with-java-home=/data/env/jdk1.7.0_67 make make install ------------------------ (8)带宽监控 yum install iftop
|