Install ant
#wget http://apache.tradebit.com/pub//ant/binaries/apache-ant-1.9.4-bin.zip
#unzip apache-ant-1.9.4-bin.zip
# mv apache-ant-1.9.4/ /opt/ant
#ln -s /opt/ant/bin/ant /usr/bin/ant
#vi /etc/profile.d/ant.sh
#!/bin/bash ANT_HOME=/opt/antPATH=$ANT_HOME/bin:$PATH export PATH ANT_HOME export CLASSPATH=.
#chmod +x /etc/profile.d/ant.sh
#source /etc/profile.d/ant.sh
#ant -version
Install maven
#wget http://www.motorlogy.com/apache/maven/maven-3/3.2.1/binaries/apache-maven-3.2.1-bin.zip
#unzip apache-maven-3.2.1-bin.zip
#mv apache-maven-3.2.1/ /opt/maven
#ln -s /opt/maven/bin/mvn /usr/bin/mvn
#vi /etc/profile.d/maven.sh
#!/bin/bashMAVEN_HOME=/opt/maven PATH=$MAVEN_HOME/bin:$PATH export PATH MAVEN_HOME export CLASSPATH=.
#chmod +x /etc/profile.d/maven.sh
#source /etc/profile.d/maven.sh
#mvn -versionInstall Tomcat
Install tomcat
#wget http://mirrors.cnnic.cn/apache/tomcat/tomcat-7/v7.0.57/bin/apache-tomcat-7.0.57.zip
# unzip apache-tomcat-7.0.57.zip
#mv apache-tomcat-7.0.57/ /opt/tomcat
#vi /etc/profile.d/tomcat.sh
#!/bin/bash CATALINA_HOME=/opt/tomcat PATH=$CATALINA_HOME/bin:$PATH export PATH CATALINA_HOME export CLASSPATH=.
#chmod +x /etc/profile.d/tomcat.sh
#source /etc/profile.d/tomcat.sh
#chmod +x $CATALINA_HOME/bin/startup.sh
#chmod +x $CATALINA_HOME/bin/shutdown.sh
#chmod +x $CATALINA_HOME/bin/catalina.sh
#vi /etc/init.d/tomcat
#!/bin/sh # chkconfig: 2345 80 20 # Description: Tomcat Start/Shutdown script export JAVA_HOME=/usr/java/jdk1.8.0_05 case $1 in start) cd /opt/tomcat/bin/ ./startup.sh ;; stop) cd /opt/tomcat/bin/ ./shutdown.sh ;; restart) cd /opt/tomcat/bin/ ./shutdown.sh cd /opt/tomcat/bin/ ./startup.sh ;; esac exit 0
#chmod a+x /etc/init.d/tomcat
#chkconfig --add tomcat
#service tomcat start
#vi /etc/sysconfig/iptables
Add the following line:
[...] -A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT [...]
Save and close the file and restart the iptables service.
service iptables restart
Now, navigate to http://ip-address:8080 from your web browser. You should see the following screen.
Install mysql
alter yum repo
1. cd /etc/yum.repos.d
2. mv CentOS-Base.repo CentOS-Base.repo.backup
3. wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
4. mv CentOS6-Base-163.repo CentOS-Base.repo
5.yum clean all
# yum install -y mysql-server mysql mysql-devel
# rpm -qi mysql-server
# service mysqld start
# mysqladmin -u root password '123456'
# mysql -u root -p
Install Python
#yum -y install python-devel openssl openssl-devel gcc sqlite sqlite-devel mysql-devel libxml2-devel libxslt-devel
-
wget http://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz
-
tar -xzf Python-2.7.6.tgz
-
cd Python-2.7.6
-
./configure --prefix=/usr/local/python2.7 --with-threads --enable-shared
-
make
-
make altinstall
-
ln -s /usr/local/python2.7/lib/libpython2.7.so /usr/lib
-
ln -s /usr/local/python2.7/lib/libpython2.7.so.1.0 /usr/lib
-
ln -s /usr/local/python2.7/bin/python2.7 /usr/bin
-
ln -s /usr/bin/python2.7 /usr/bin/python27
-
/sbin/ldconfig -v
-
# easyinstall and pip =========================================================
-
wget http://pypi.python.org/packages/source/d/distribute/distribute-0.6.49.tar.gz --no-check-certificate
-
tar xf distribute-0.6.49.tar.gz
-
cd distribute-0.6.49
-
python2.7 setup.py install
-
/usr/local/python2.7/bin/easy_install pip
-
ln -s /usr/local/python2.7/bin/pip /usr/bin
python2.7 -V
Install Nodejs
yum install nodejs npm