Linux 初始化软件shell

#!/bin/sh

### version ###
nginx_version=1.9.8
resin_pro_version=4.0.44
redis_version=3.0.5
maven_version=3.2.5
### 下载附件至当前目录 ###
mkdir -p /home/tools
cd /home/tools

### basic env ###
export LANG="en_US.UTF8"
yum -y install make openssl openssl-devel pcre pcre-devel libpng libpng-devel libjpeg-6b libjpeg-devel-6b freetype freetype-devel gd gd-devel zlib zlib-devel gcc gcc-c++ libXpm libXpm-devel ncurses ncurses-devel libmcrypt libmcrypt-devel libxml2 libxml2-devel imake autoconf automake screen sysstat compat-libstdc++-33 curl curl-devel
# MySQL
yum -y install mysql mysql-server mysql-devel
service mysqld start

# svn
yum -y install subversion

### 下载软件包 ###
wget http://nginx.org/download/nginx-$nginx_version.tar.gz
wget http://caucho.com/download/resin-pro-$resin_pro_version.tar.gz
wget http://download.redis.io/releases/redis-$redis_version.tar.gz
wget http://mirrors.cnnic.cn/apache/maven/maven-3/$maven_version/binaries/apache-maven-$maven_version-bin.tar.gz

### nginx ###
tar -zxvf nginx-$nginx_version.tar.gz
cd nginx-$nginx_version
./configure --with-http_stub_status_module
make && make install
cd ..
rm -rf nginx-$nginx_version
mkdir -p /home/logs/nginx/access
mkdir -p /home/logs/nginx/error

### redis ###
tar -zxvf redis-$redis_version.tar.gz
cd redis-2.4.11
make
mkdir -p /home/logs/redis/
cd ..
mv redis-$redis_version /usr/local/


### Resin Pro ###
tar -zxvf resin-$resin_pro_version.tar.gz
cd resin-$resin_pro_version
./configure --prefix=/usr/local/
make && make install
cd ..
rm -rf resin-$resin_pro_version

### Maven ###
tar -zxvf apache-maven-$maven_version-bin.tar.gz
mv apache-maven-3.0.5/ /usr/local/maven







你可能感兴趣的:(Linux)