装一些常用软件
配一下环境变量
#!/bin/bash #download g++ sudo apt-get install g++ -y #download codeblocks sudo apt-get install codeblocks -y #download java sudo apt-get install default-jre -y sudo apt-get install default-jdk -y #backup /etc/profile sudo cp /etc/profile /etc/profile_backup #set java environment if [ -z $JAVA_HOME ];then cat /etc/profile > tmpfile sudo echo ‘export JAVA_HOME=/usr/lib/jvm/default-java‘ >> tmpfile sudo echo ‘export PATH=$JAVA_HOME/bin:$PATH‘ >> tmpfile sudo echo ‘export CLASSPATH=$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar‘ >> tmpfile sudo rm -rf /etc/profile sudo mv tmpfile /etc/profile source /etc/profile fi #download eclipse sudo apt-get install eclipse -y ##download LAMP #download apache2 sudo apt-get install apache2 -y #download php5 sudo apt-get install php5 -y #download mysql-server sudo apt-get install mysql-server -y #download phpmyadmin sudo apt-get install phpmyadmin -y sudo chmod 777 /var/www sudo chmod 777 /var/www/* sudo ln -s /usr/share/phpmyadmin /var/www/html/ #download maven sudo apt-get install maven -y #set maven environment if [ -z $MAVEN_HOME ];then cat /etc/profile > tmpfile sudo echo ‘export MAVEN_HOME=/usr/share/maven‘ >> tmpfile sudo echo ‘export PATH=$MAVEN_HOME/bin:$PATH‘ >> tmpfile sudo rm -rf /etc/profile sudo mv tmpfile /etc/profile source /etc/profile fi #download git sudo apt-get install git -y #download vim sudo apt-get install vim -y # set vim echo ~/.vimrc echo "set tabstop=4" > ~/.vimrc echo "set softtabstop=4" >> ~/.vimrc echo "set shiftwidth=4" >> ~/.vimrc echo "set noexpandtab" >> ~/.vimrc echo "set nu" >> ~/.vimrc echo "set autoindent" >> ~/.vimrc echo "set cindent" >> ~/.vimrc source ~/.vimrc #download google chrome sudo apt-get install google-chrome-stable #set backlight unchanged after shutdown sudo add-apt-repository ppa:nrbrtx/sysvinit-backlight sudo apt-get update sudo apt-get install sysvinit-backlight
时间: 2024-10-29 04:12:45