此脚本用于为 Debian squeeze 系统一次性安装开发环境。
#!/bin/bash ################################################################################################ # setupenv # # this script is used to set up the software environment for using debian. # # Some prepared files and directories are needed. # # # # @author shuqin1984 # # @Date 2012-09-17 # # # # Removable-media root dir: # # csat/packages/(eclipse maven tomcat tar.gz , linuxqq OOffice Opera Chrome deb) # # sySUSE/(eclipse_juno.desktop, myset, setupenv, sources.list,/myfonts/(copy from windows)) # # csat/scripts/aliedit.sh # # csat/bin/jdk-6u35-linux-i586.bin # # # ################################################################################################ # STEP0: Copy the backup files from removable-media to ~/ mannually. export PACKAGES_PATH=$HOME/csat/packages export SCRIPTS_PATH=$HOME/csat/scripts export MY_BIN_PATH=$HOME/csat/bin export SYSUSE_PATH=$HOME/sysuse export SETUP_PATH=$HOME/setupdir # STEP1: update the sources.list # Preparation: # $SYSUSE_PATH/sources.list contains the sources you copy from the internet, # such as mirror.163.com. You must prepare the file. sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak sudo cp $SYSUSE_PATH/sources.list /etc/apt/sources.list sudo apt-get update sudo apt-get -f install sudo apt-get upgrade # STEP2: install the chinese environment. sudo apt-get install ttf-arphic-ukai ttf-arphic-uming ttf-arphic-gkai00mp sudo apt-get install ttf-arphic-bkai00mp ttf-arphic-gbsn00lp ttf-wqy-zenhei # install your fonts from windows. windows fonts should be placed in $SYSUSE_PATH/myfonts . sudo cp /etc/fonts/fonts.conf /etc/fonts/fonts.conf.bak sudo sed -i 's:\(<dir>.*</dir>\):\1<dir>$SYSUSE_PATH/myfonts</dir>:' /etc/fonts/fonts.conf fc-cache # STEP3: install the input method sudo apt-get install ibus ibus-pinyin scim im-switch # STEP4: install the C compiler and builder sudo apt-get install vim sudo apt-get install gcc g++ build-essential make # STEP5: install web-browser chrome opera # You must first download the deb package and place it in the path $PACKAGES_PATH . sudo apt-get install ca-certificates libcurl3 xdg-utils sudo dpkg -i $PACKAGES_PATH/google-chrome-stable_current_i386.deb sudo dpkg -i $PACKAGES_PATH/opera_12.02.1578_i386.deb sudo dpkg -i $PACKAGES_PATH/linuxqq_v1.0.2-beta1_i386.deb # STEP6: install JDK Eclipse Maven Tomcat # You must first download the bin packages from Oracle.com/technetwork/Java/javase/downloads/jdk6u35-downloads-1836443.html sh $MY_BIN_PATH/jdk-6u35-linux-i586.bin cp -r $(sudo find / -name 'jdk1.6.0_35') $SETUP_PATH # add JAVA_HOME, JRE_HOME , CLASSPATH settings to .myset and export all. tar xzf $PACKAGES_PATH/eclipse-jee-juno-linux-gtk.tar.gz -C $SETUP_PATH cp $SETUP_PATH/eclipse/eclipse.ini $SETUP_PATH/eclipse/eclipse.ini.bak sed -i 's:\(-vmargs\):\1\n-vm\n\$SETUP_PATH/dk1.6.0_35/jre/bin/java:' eclipse.ini mkdir -p $SETUP_PATH/eclipse/jre/bin/ ln -s $SETUP_PATH/jdk1.6.0_35/jre/bin/java $SETUP_PATH/eclipse/jre/bin/java tar xzf $PACKAGES_PATH/apache-maven-3.0.4-bin.tar.gz -C $SETUP_PATH ln -s $SETUP_PATH/apache-maven-3.0.4/bin/mvn $MY_BIN_PATH/mvn tar xzf $PACKAGES_PATH/apache-tomcat-6.0.35.tar.gz -C $SETUP_PATH sudo cp $SYSUSE_PATH/eclipse_juno.desktop /usr/share/applications/eclipse_juno.desktop # STEP7: install the development environment. sudo apt-get install mysql-server-5.1 sudo apt-get install apache2 apache2-doc apache2-utils sudo apt-get install libapache2-mod-Python sudo apt-get install python-mysqldb sudo apt-get install libapache2-mod-php5 php5 php-pear php5-xcache sudo apt-get install php5-mysql php5-suhosin sudo ln -s /etc/php5/apache2/php.ini /etc/ini sudo apt-get install subversion # STEP8: office multimedia etc. sh $SCRIPTS_PATH/aliedit.sh sudo apt-get install bluetooth bluez-utils sudo apt-get install gnome-bluetooth gnome-user-share sudo apt-get install unrar rar zip unzip p7zip sudo apt-get install gnome-screenshot sudo apt-get install w32codecs libdvdcss2 gstreamer0.10-fluendo-mp3 ffmpeg mplayer tar xzf $PACKAGES_PATH/OOo_3.3.0_Linux_x86_install-deb_en-US.tar.gz -C $SETUP_PATH sudo dpkg -i $SETUP_PATH/OOO330_m20_native_packed-1_en-US.9567/DEBS/*.deb sudo cp -r $SYSUSE_PATH/MyTheme/ ~/.themes/ # STEP9: export personal settings which is placed in file .myset cp $SYSUSE_PATH/myset ~/ mv ~/myset ~/.myset # backup the important file before modifying it. sudo cp ~/.bashrc ~/.bashrc.bak echo 'source ~/.myset' >> ~/.bashrc # need to restart the shell. # STEP10: verificate the installation. javac -version java -version mysql --version svn --version sudo service apache2 stop sudo service mysql stop ################################################################################## # The contents of myset file : # # export PATH=$PATH:$HOME/csat/bin:$HOME/csat/scripts/:/usr/sbin: # # export JAVA_HOME=$HOME/setupdir/jdk1.6.0_35 # # export JRE_HOME=$JAVA_HOME/jre # # export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib # # export PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/bin: # # export SETUP_PATH=$HOME/setupdir # ################################################################################## ###################################################################################### # # deb cdrom:[Debian GNU/Linux 6.0.5 _Squeeze_ - Official i386 CD Binary-1 20120512-13:45]/ squeeze main # deb squeeze/updates main # deb squeeze main non-free contrib # deb squeeze-proposed-updates main contrib non-free # deb-src squeeze main non-free contrib # deb-src squeeze-proposed-updates main contrib non-free # deb squeeze/updates main contrib non-free # deb-src squeeze/updates main contrib non-free # Multimedia # deb squeeze main contrib non-free # deb squeeze main non-free # ########################################################################################Debian6.0.5 Squeeze 一站式环境安装脚本
内容版权声明:除非注明,否则皆为本站原创文章。
转载注明出处:http://www.heiqu.com/d1ba52b7123d105d7b78a5fb27938e24.html