我的配置
目录
基本编辑
网络
硬件驱动
中文输入
即时通信
浏览器
多媒体
P2P下载
FTP客户端
Java开发环境
- 安装JDK
- 安装Tomcat
- 安装Eclipse%MyEclipse
- 安装MySql
Php开发环境
- 安装Apache
- 安装php
- 安装phpMyAdmin
- 安装UCenter
- 安装Discuz
- 安装SuperSite
内容
vi使用
- 插入字符:按a
- 取消写入:CTRL+方面键
- 退出不保存:在取消写入的前提下按":q"
- 退出保存:在取消写入的前提下按":wq"
安装ADSL
配置
sudo pppoeconf
打开连接
sudo pon dsl-provider
关闭连接
sudo poff
在局域网中得到IP
sudo dhclient
软件源更新
备份软件源配置文件
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
编辑软件源
sudo vi /etc/apt/sources.list
添加
deb http://ubuntu.cn99.com/ubuntu/ hardy main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ hardy-security main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ hardy-updates main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ hardy-proposed main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ hardy-backports main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ hardy main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ hardy-security main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ hardy-updates main restricted universe multiverse
删除
deb http://cn.archive.ubuntu.com/ubuntu/ hardy main restricted
deb-src http://cn.archive.ubuntu.com/ubuntu/ hardy main restricted
更新软件源
sudo apt-get update
安装编译器(gcc 等c++编辑器)
sudo apt-get install build-essential
安装Nvidia驱动
备份配置文件
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
安装失败时
sudo cp /etc/X11/xorg.conf.backup /etc/X11/xorg.conf
重启进入安全模式,用根用户登录
安装驱动程序
sh ./NVIDIA-Linux-x86-173.14.12-pkg1.run
- 进入安装程序画面时,有警告清在等级3时再进行安装,选择Continue
- 安装过程中
- 如果提示有旧驱动,询问是否删除旧驱动,选Yes;
- 如果提示缺少某某模块(modules),询问是否上网下载,选no;
- 如果提示编译模块,询问是否进行编译,选ok;
- 如果提示将要修改Xorg.conf,询问是否允许,选Yes;
- 取消开机LOGO
sudo vi /etc/X11/xorg.conf
- 在Section "Device" 中添加Option "NoLogo" "True"
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
Option "NoLogo" "True"
EndSection
安装中文输入scim
sudo apt-get install scim scim-pinyin scim-tables-zh im-switch scim-qtimm scim-bridge scim-bridge-client-gtk scim-bridge-client-qt scim-bridge-agent
sudo im-switch -s scim
安装中文输入fcitx
安装中文支持
sudo apt-get install language-pack-kde-zh language-pack-zh
安装fcitx输入法
sudo apt-get install im-switch fcitx
sudo im-switch -s fcitx -z default
im-switch -s fcitx -z default #注意:不加sudo
安装EVA
- 打开Applicatoins>>System>>Manage Packages,搜索eva
- 安装eva
- 打开快捷方式
- 打开 /usr/share/applications/kde 文件夹
- 找到eva.desktop 复制桌面上
安装QQ
dpkg -i linuxqq_1.0-Preview1_i386.deb
- 打开 /usr/share/applications 文件夹
- 找到qq.desktop 复制桌面上
ies4linux
安装依赖包(http://wiki.winehq.org/Recommended_Packages)
sudo sh hardy.sh
安装Wine最新版
sudo tar -xjvf wine-1.0.tar.bz2
sudo cd wine-1.0
sudo ./configure
sudo make
sudo make install
下载ies4linux
sudo wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz
sudo tar zxvf ies4linux-latest.tar.gz
sudo cd ies4linux-*
sudo ./ies4linux
运行
sudo cd /home/lifision/bin
sudo ./ie6
安装FireFox
- 打开Applicatoins>>System>>Manage Packages,搜索firefox
- 安装firefox
- 打开 /usr/share/applications 文件夹
- 找到firefox.desktop 复制桌面上
- 安装Web Developer,mediawarp(在线观看视频)
安装Flash
tar -zxvf install_flash_player_9_linux.tar.gz
cd install_flash_player_9_linux/
sudo ./flashplayer-installer
安装路径在 /usr/lib/firefox-3.0.1
安装AdobeReader
tar -zxvf AdobeReader_chs-8.1.2-1.i486.tar.gz
cd AdobeReader
sudo ./INSTALL
安装路径在 /opt
安装Mplayer
- 打开Applicatoins>>System>>Manage Packages,搜索mplayer
- 安装mplayer,mencoder,mozilla-mplayer,mplayer-fonts (15M)
- 打开 /usr/share/applications 文件夹
- 找到mplayer.desktop 复制桌面上
安装aMule
- 打开Applicatoins>>System>>Manage Packages,搜索aMule
- 安装aMule
- 打开 /usr/share/applications 文件夹
- 找到aMule.desktop 复制桌面上
安装Azureus
- 打开Applicatoins>>System>>Manage Packages,搜索Azureus
- 安装Azureus
- 打开 /usr/share/applications 文件夹
- 找到Azureus.desktop 复制桌面上
安装filezilla
- 打开Applicatoins>>System>>Manage Packages,搜索filezilla
- 安装filezilla,filezilla-common,filezilla-locales
- 打开 /usr/share/applications 文件夹
- 找到filezilla.desktop 复制桌面上
安装Downthemall插件
安装JDK
sudo chmod +x jdk-6u4-linux-i586.bin
sudo ./jdk-6u4-linux-i586.bin
建立目录
sudo mkdir -p /usr/lib/jvm/jdk
删除目录
sudo rm -r /home/lifision/jdk1.6.0_04
移动文件
sudo mv /home/lifision/jdk1.6.0_04 /usr/lib/jvm/jdk/jdk1.6.0_04
复制文件
sudo cp /home/lifision/jdk-6u4-linux-i586.bin /usr/lib/jvm/jdk/jdk-6u4-linux-i586.bin
sudo vi /etc/profile
添加
#jdk1.6.0_04
#set java environment
JAVA_HOME=/usr/lib/jvm/jdk/jdk1.6.0_04
CATALINA_BASE=/usr/local/apache-tomcat-6.0.16
CATALINA_HOME=/usr/local/apache-tomcat-6.0.16
export JRE_HOME=/usr/lib/jvm/jdk/jdk1.6.0_04/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$CATALINA_HOME/bin:$PATH
测试
java -version
看到
java version "1.6.0"
OpenJDK Runtime Environment (build 1.6.0-b10)
OpenJDK Client VM (build 1.6.0-b10, mixed mode, sharing)
测试JVM顺序
sudo vi /etc/jvm
把
/usr/lib/jvm/jdk/jdk1.6.0_04 放到最前
安装Tomcat
解压Tomcat6
tar -zxvf apache-tomcat-6.0.16.tar.gz
移动文件
sudo mv /home/lifision/apache-tomcat-6.0.16 /usr/local/apache-tomcat-6.0.16
运行tomcat
sudo catalina.sh start
关闭
sudo catalina.sh stop
安装Eclipse&MyEclipse
解压Eclipse
sudo tar -zvxf eclipse-SDK-3.3.1.1-linux-gtk.tar.gz
移动文件
sudo mv /home/lifision/eclipse /usr/local/eclipse
新建文件夹,在安装时要选Eclipse和MyEclipse目录
sudo mkdir -p /usr/local/MyEclipse_6.0
sudo chmod 777 /usr/local/MyEclipse_6.0
安装MyEclipse
sudo chmod +x MyEclipse_6_0_1GA_E3_3_1_Installer.bin
sudo ./MyEclipse_6_0_1GA_E3_3_1_Installer.bin
写连接
sudo vi /usr/share/applications/eclipse.desktop
[Desktop Entry]
Name=Eclipse
Comment=Eclipse IDE
Exec=/usr/local/eclipse/eclipse
Icon=/usr/local/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=Application;Development;
安装MySql
解压
sudo tar -zvxf mysql-5.0.51a-linux-i686.tar.gz
移动到安装目录
sudo mv /home/lifision/mysql-5.0.51a-linux-i686 /usr/local/mysql
现在系统建立一个组群
sudo groupadd mysql
让后再加一个名字为mysql用户
sudo useradd -p mysql -g mysql mysql
删除用户
userdel -r mysql
删除组
groupdel -r mysql
现在进入mysql目录
cd /usr/local/mysql
现建立数据库系统数据表
sudo scripts/mysql_install_db --user=mysql
再把配置文件copy到/etc目录下
sudo cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf
中文问题
sudo vi /etc/my.cnf
添加
[mysqld] 栏中加 default-character-set=utf8
[client] 栏中加 default-character-set=utf8 这样,无论是在数据库里或在控制台,也不会改码
开启服务
sudo /usr/local/mysql/support-files/mysql.server start
打开数据库
sudo /usr/local/mysql/bin/mysql -u root -p mysql
sudo /usr/local/mysql/bin/mysqladmin -u root password 1234
关闭服务
sudo /usr/local/mysql/support-files/mysql.server stop
安装Apache
安装
sudo tar -zvxf httpd-2.2.8.tar.gz
直接安装
cd httpd-2.2.8
sudo ./configure --prefix=/usr/local/apache --enable-module=so --enable-mods-shared='rewrite'
sudo make
sudo make install
打开服务
sudo /usr/local/apache/bin/apachectl start
关闭服务
sudo /usr/local/apache/bin/apachectl stop
更改环境
sudo vi /etc/profile
#jdk1.6.0_04
#set java environment
JAVA_HOME=/usr/lib/jvm/jdk/jdk1.6.0_04
CATALINA_BASE=/usr/local/apache-tomcat-6.0.16
CATALINA_HOME=/usr/local/apache-tomcat-6.0.16
MYSQL_SERVICE=/usr/local/mysql/support-files
MYSQL_BIN=/usr/local/mysql/bin/mysql
APACHE_BIN=/usr/local/apache/bin
export JRE_HOME=/usr/lib/jvm/jdk/jdk1.6.0_04/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$CATALINA_HOME/bin:$PATH:$MYSQL_SERVICE:$MYSQL_BIN:$APACHE_BIN
以后打开服务
sudo apachectl start
以后关闭服务
sudo apachectl stop
测试Rewrite
RewriteEngine On
RewriteRule ^/news/top2007,(\d+)\.html$ /news/readmore\.php\?id=$1
在浏览器中输入http:127.0.0.1/news/top2007,4875.html看看是不是就打开了本来是http://127.0.0.1/news/readmore.php?id=4875
安装php
更改配置
sudo cp /usr/local/apache/conf/httpd.conf /home/lifision/httpd.conf
sudo chmod 777 /home/lifision/httpd.conf
sudo vi /usr/local/apache/conf/httpd.conf
添加
改:DocumentRoot /home/lifision/www 原:/usr/local/apache/htdocs
改:<directory "/home/lifision/www"> 原:/usr/local/apache/htdocs
改:DirectoryIndex index.html index.php
在此范围添加:
<Directory "/home/lifision/www">
</Directory>
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
更新配置文件
sudo cp /home/lifision/httpd.conf /usr/local/apache/conf/httpd.conf
安装php
sudo tar -zvxf php-5.2.5.tar.gz
cd php-5.2.5
sudo ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --enable-track-vars --with-xml --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config
sudo make
sudo make install
在:
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
加上:
LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
复制配置
sudo vi php.ini-dist
sudo chmod 777 php.ini-dist
改:
register_globals = On
sudo cp /home/lifision/php-5.2.5/php.ini-dist /usr/local/php/lib/php.ini
安装phpMyAdmin
安装
tar -xjvf phpMyAdmin-2.11.5.2-all-languages.tar.bz2
放在www文件夹里
生成配置文件
复制 config.sample.inc.php 文件,新建 config.inc.php 文件
配置文件
改:$cfg['blowfish_secret'] = '1234';
改:$cfg['Servers'][$i]['controluser'] = 'root';
改:$cfg['Servers'][$i]['controlpass'] = '1234';
安装Zend Optimizer v3.3
sudo tar -zvxf ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz
cd ZendOptimizer-3.3.3-linux-glibc23-i386
sudo ./install.sh
安装过程中会要求选php.ini路径并会改写php.ini文件,传到zend的文件夹中,用zend管理
安装SuperSite(需要Zend Optimizer v3.3)
测试zend安装成功
unzip UCenter_1.0.0_SC_UTF8.zip
unzip Discuz_6.1.0_SC_UTF8.zip
unzip SupeSite6.0_X-Space4.0_UC_SC_UTF8.zip
http://127.0.0.1/upload/install.php
改权限
sudo chmod 777 /home/lifision/www/ucenter/*
sudo chmod 777 /home/lifision/www/ucenter/*.*
sudo chmod 777 /home/lifision/www/ucenter/*/*
sudo chmod 777 /home/lifision/www/ucenter/*/*/*
sudo chmod 777 /home/lifision/www/ucenter/*/*/*/*
sudo chmod 777 /home/lifision/www/upload0/*
sudo chmod 777 /home/lifision/www/upload0/*.*
sudo chmod 777 /home/lifision/www/upload0/*/*
sudo chmod 777 /home/lifision/www/upload0/*/*/*
sudo chmod 777 /home/lifision/www/upload0/*/*/*/*
sudo chmod 777 /home/lifision/www/upload0/*/*/*/*/*
sudo chmod 777 /home/lifision/www/upload/*
sudo chmod 777 /home/lifision/www/upload/*.*
sudo chmod 777 /home/lifision/www/upload/*/*
sudo chmod 777 /home/lifision/www/upload/*/*/*
sudo chmod 777 /home/lifision/www/upload/*/*/*/*
sudo chmod 777 /home/lifision/www/upload/*/*/*/*/*