linux開發環境搭建 gtk安裝apt-get install libgtk2.0-dev apt-get install devhelp #安裝 devhelp GTK文檔查看程式 編譯命令:gcc test.c test `pkg-config --cflags --libs gtk+-2.0` java環境搭建下載bin檔案放到想要安裝的位置,執行sh jdk-6u26-linux-i586.bin 或者下載打包檔案放在想使用的位置 環境配置 www.2cto.com gedit /etc/environment export JAVA_HOME=/opt/jdk1.7.0(自己的位置) export JRE_HOME=$JAVA_HOME/jre export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH gedit /etc/profile export JAVA_HOME=/opt/jdk1.7.0_05(自己的位置) export JRE_HOME=$JAVA_HOME/jre export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH source /etc/profile (最好是登出一下) 編譯命令:javac filename.java(不打包)/ javac -d . filename.java(打包) 運行命令: java filename mysql安裝apt-get install mysql-server 串連格式: mysql -uusername -ppassword 中文亂碼 www.2cto.com 修改my.cnf,windows下my.ini default-character-set=gbk(改為utf8...) 或者建立表時指定編碼格式create table tablename() default charset utf8; show variables like 'character%'; show create table tablename; java串連mysql需要下載mysql的jar包放到jre/lib/ext下面 odbc橋接方式 Class.forName(sun.jdbc.odbc.JdbcOdbcDriver); java.util.Properties prop = new java.util.Properties(); prop.put("charset","gbk"); prop.put("user",username); prop.put("psw",psw); Connection connection = DriverManager.getConnection(url,prop); 直接方式 Class.forName(com.mysql.jdbc.Driver); url="jdbc:mysql://localhost/databasename" Connection connection = DriverManager.getConnection(url,user,psw); tomcat安裝需要安裝好java環境,直接解壓 預設連接埠:8080 配置 www.2cto.com php+nginxphp: apt-get install php5 nginx: 下載pcre編譯 下載nginx編譯 ./configure make make install 預設連接埠:80 php安裝時會自動安裝apache2伺服器, service apache2 stop停掉服務 預設網頁目錄為/var/www,apache2和nginx都在下面 作者 liangdan