标签:path 安装 libjpeg tools general iptables address 设置 height
#!/bin/bash if ls /usr/local/ssl > /dev/null ;then if openssl version -a |grep "OpenSSL 1.0.1h" > /dev/null;then exit 0 fi fi CPU_NUM=$(cat /proc/cpuinfo | grep processor | wc -l) rm -rf openssl-1.0.1h if [ ! -f openssl-1.0.1h.tar.gz ];then wget http://t-down.oss-cn-hangzhou.aliyuncs.com/openssl-1.0.1h.tar.gz fi tar zxvf openssl-1.0.1h.tar.gz cd openssl-1.0.1h \mv /usr/local/ssl /usr/local/ssl.OFF ./config shared zlib if [ $CPU_NUM -gt 1 ];then make -j$CPU_NUM else make fi make install \mv /usr/bin/openssl /usr/bin/openssl.OFF \mv /usr/include/openssl /usr/include/openssl.OFF ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl ln -s /usr/local/ssl/include/openssl /usr/include/openssl if ! cat /etc/ld.so.conf| grep "/usr/local/ssl/lib" >> /dev/null;then echo "/usr/local/ssl/lib" >> /etc/ld.so.conf fi ldconfig -v openssl version -a
mkdir /home/javaweb
mv apache-tomcat /home/javaweb/tomcat7
chmod -R 750 /home/javaweb/tomcat7
mkdir /home/javaweb/java1.7 wget http://t-down.oss-cn-hangzhou.aliyuncs.com/jdk-7u55-linux-x64.tar.gz tar zxvf jdk-7u55-linux-x64.tar.gz mv jdk1.7.0_55/* /home/javaweb/java1.7
echo ‘export JAVA_HOME=/home/javaweb/java1.7‘ >> /etc/profile echo ‘export JRE_HOME=/home/javaweb/java1.7/jre‘ >> /etc/profile echo ‘export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH‘ >> /etc/profile echo ‘export PATH=$PATH:$JAVA_HOME/bin‘ >> /etc/profile export PATH=$PATH:/home/javaweb/java1.7/bin
mkdir -p /home/javaweb/nginx/sites-enabled tar zxvf nginx-1.6.0.tar.gz cd /home/javaweb/nginx/ ./configure make make install
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
apt-get -y install mysql-server mysql-client
vim /etc/mysql/my.cnf #bind-address = 127.0.0.1 注释这一行后重启mysql
CREATE DATABASE db_gqjys DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE DATABASE db_gqjsy DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; GRANT ALL PRIVILEGES ON db_database.* TO user@‘%‘ IDENTIFIED BY ‘password‘ WITH GRANT OPTION; flush privileges;
wget http://down.safedog.cn/safedog_linux64.tar.gz tar xzvf safedog_linux64.tar.gz mkdir /home/javaweb/safedog mv safedog_an_linux64_2.8.15799/* /home/javaweb/safedog chmod +x *.py ./install.py
阿里云服务器搭建,mysql+java+tomcat+nginx ,mysql远程访问设置
标签:path 安装 libjpeg tools general iptables address 设置 height
原文地址:http://www.cnblogs.com/jyyjava/p/6193158.html