人群中哭着,你只想变成透明的颜色,你再也不会梦或痛或心动了,你已经决定了,你已经决定了
ubuntu常见问题解决办法{第一辑}
1、以root用户打开文件夹加入右键
sudo apt-get install nautilus-gksu
————————————————————————————–
2、硬盘分区工具
Ubuntu系统用户可以通过下面这行命令安装gParted:
sudo apt-get install gparted
————————————————————————————–
3、910专用字体美化设置
sudo rm -rf /etc/fonts/conf.d/66-wqy-zenhei-sharp.conf
移除点阵字体
cd /etc/fonts/conf.d
sudo ln -sf ../conf.avail/66-wqy-zenhei-sharp-no13px.conf 66-wqy-zenhei-sharp.conf
————————————————————————————–
4、声音和声音设备问题
有声音没有设备
sudo apt-get install gnome-media
ubuntu9.10发声前喇叭总是啪爆一下音,大约十秒一次。如果在启动了窗体与按钮声音的话,可能杂音就会更多。
解决方法如下:
sudo gedit /etc/modprobe.d/alsa-base.conf
找到:
options snd-hda-intel power_save=10 power_save_controller=N
在句首加上#号,注释掉,而后如此:
#options snd-hda-intel power_save=10 power_save_controller=N
保存重启即可。
————————————————————————————–
5、firefox看flash乱码的问题
sudo cp /etc/fonts/conf.d/49-sansserif.conf_backup
sudo rm /etc/fonts/conf.d/49-sansserif.conf
————————————————————————————–
6、更新源的问题
sudo gedit /etc/apt/sources.list
编辑你的源列表,将原来的内容全部删除,添加一个最合适你的即可,复制到你的列表中,然后保存列表。
sudo apt-get update 更新源列表信息
可以在运行“sudo apt-get update ”时查看一下错误信息,把不能连接的源删除再重新运行“sudo apt-get update ”。
sudo apt-get upgrade 升级
建议使用163的源,比较快
————————————————————————————–
7、安装rar
sudo apt-get install rar
来下载安装他,然后建立软链接
sudo ln -fs /usr/bin/rar /usr/bin/unrar
————————————————————————————–
8、Rhythmbox歌词显示攻略
ubuntu9.10的rhythmbox已经自带了歌词显示功能,但我懒得研究,所以老是找不到歌词。
鲁班歌词(RBLyrics):Rhythmbox的歌词下载显示插件(a plugin for rhythmbox to download lyrics and display by osd)
功能:
下载并显示歌词(download and display lyrics)
使用系统默认编辑器打开歌词文件(open lyrics file using system default editor)
未能精确查找歌词时,弹出歌词选择对话框供用户选择(pop choose lyrics dialog while no accurate lyrics found)
可通过插件管理器配置插件功能(totally configurable through plugin manager)
以上功能可能会随着项目进展有暂时改动(keep up with updates, discover yourself)
安装:
sudo apt-get install python-gconf python-gobject gnome-osd python-chardet subversion
mkdir -p ~/.gnome2/rhythmbox/plugins
svn checkout http://sogou-lyrics.googlecode.com/svn/trunk/ ~/.gnome2/rhythmbox/plugins/RBLyrics
之后重启rhythmbox.你会在插件管理器中发现鲁班歌词.
更新:
svn update ~/.gnome2/rhythmbox/plugins/RBLyrics/
参考网址:http://code.google.com/p/sogou-lyrics/
————————————————————————————–
9、rpm包和deb包的转换
alien
非常强大的工具,可以把rpm包转换为deb包,相信很多人都很需要这个功能。
sudo apt-get install alien
用法: sudo alien rpmfile.rpm
————————————————————————————–
10、安装firefox更新
ubuntu9.10更新Firefox3.6:第一 sudo add-apt-repository ppa:mozillateam/firefox-stable 第二 sudo apt-get update 第三 sudo apt-get install firefox-3.6
————————————————————————————–
11、解决firefox flash乱码
解决ubuntu下Firefox Flash文字乱码或不能显示的问题
修改/etc/fonts/conf.d/49-sansserif.conf
找到这一行
《edit name=”family” mode=”append_last”》
《string》aaasans-serif《/string》
将上面的aaasans-serif改为:
sans
保存一下,在firefox里刷新一下,问题就解决了
————————————————————————————–
12、linuxQQ意外退出
编辑/usr/bin/qq文件,将内容替换为:
#!/bin/sh
export GDK_NATIVE_WINDOWS=true
cd /usr/share/tencent/qq/
./qq
————————————————————————————–
13、run文件安装方法
安装方法都是一样的,第一步:sudo chmod +x *.bundle或者*.run
然后sudo ./*.bundle或者*.run
—————————————————————————————
14、eclipse 在ubuntu9.10下某些单击时间不能点击的问题
#!/bin/sh
export GDK_NATIVE_WINDOWS=1
ECLIPSE_HOME/eclipse
建立eclipse.sh 所有地方调用此命令行即可
——————————————————————————————
15、openoffice安装中文语言包
sudo apt-get install openoffice.org-help-zh-cn openoffice.org-l10n-zh-cn
sudo apt-get install openoffice.org-gnome 和 gtk
——————————————————————————————
16、让eclipse支持GBK编码的方法
sudo gedit /var/lib/locales/supported.d/zh-hans
加入一行:
zh_CN.GBK GBK
保存之后再启动eclipse,手动写上GBK,搞定
——————————————————————————————–
17、解决java乱码问题
cd /usr/lib/jvm/java-6-sun-1.6.0.16/jre/lib/fonts
sudo mkdir fallback
cd fallback
sudo cp /usr/share/fonts/truetype/arphic/uming.ttc /usr/lib/jvm/java-6-sun-1.6.0.16/jre/lib/fonts/fallback
sudo mkfontdir
sudo mkfontscale
ubuntu 安装ATI显卡驱动
1、删除旧的和错误的驱动程序
cd /usr/share/ati/
sudo ./fglrx-uninstall.sh
sudo apt-get remove xorg-driver-fglrx xserver-xorg-video-ati xserver-xgl
2、安装新的驱动 (需要去ATI官方网站下载)
sudo sh ./ati-driver-installer-8-11-x86.x86_64.run
安装完毕后,把配置文件初始化一下,执行
sudo aticonfig –initial -f
生成 modules.dep 和 map 文件,保证模块和驱动的正常加载。
sudo depmod -a
3、重启
4、检查安装效果
在终端中运行 fglrxinfo
display: :0.0 screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI Radeon HD 2600 XT
OpenGL version string: 2.1.8201 Release
5、看看自己的显卡是否工作在Xv模式下,执行
xvinfo
如果显示的结果很多很多,那就是工作在xv模式下了。如果像下面这样的显示,那还需要再设置
X-Video Extension version 2.2
screen #0
no adaptors present
手工设置xv模式
sudo aticonfig –overlay-type=xv
6、看看其它信息
glxinfo | grep direct
我的结果是
direct rendering: Yes
7、测试一下速度和工作是否正常,程序会显示转动的齿轮和一些数值。
glxgears
fgl_glxgears
ubuntu9.10 编译安装LAMP
环境:ubuntu9.10[非虚拟机]
安装:Apache+mysql+php+zend optimizer+phpmyadmin+memcached
标题:ubuntu9.10 编译安装LAMP环境
相关错误解决办法:
1、
安装时提示xml2-config错误 在编译MySQL时相同,这是由于系统缺少PHP所需的库文件导致的,根据提示,进行如下操作:
sudo apt-get install libxml2-dev
编译完成后将会看到“Thank you for using PHP.”的字样,表明PHP已经配置成功了。
2、Cannot find OpenSSL’s
sudo apt-get install libcurl3-openssl-dev
3、bzip2
sudo apt-get intall libbz2-dev
4、其他需要安装的
sudo apt-get install libjpeg
sudo apt-get install libpng
sudo apt-get install libxpm
sudo apt-get install libfreetype6-dev
sudo apt-get install libt1-dev
sudo apt-get install libgpm3-dev
sudo apt-get install libmcrypt-dev
sudo apt-get install libmhash-dev
sudo apt-get install libmysqlclient-dev
sudo apt-get install libpspell-dev
sudo apt-get install libmm-dev
sudo apt-get install libsnmp-dev
sudo apt-get install libtidy-dev
sudo apt-get install libltdl-dev
5、本次安装完毕后,Apache支持rewrite
6、本次安装完毕后,MySql支持GBK编码
7、文中出现的*号代表相应的版本号或者压缩包的名字
步骤:
1、安装Apache2.2.14
下载httpd-2.2.14.tar.gz
tar -xzvf httpd-2.2.14.tar.gz
cd httpd-2.2.14/安装apr
cd httpd-*/srclib/apr
./configure –prefix=/eva/webserver/apr
make
sudo make install安装apr-util
cd ../apr-util
./configure –prefix=/eva/webserver/apr-util –with-apr=/eva/webserver/apr
make
sudo make install安装apache
cd httpd-*./configure \
–prefix=/eva/webserver/apache \
–enable-cache \
–enable-disk-cache \
–enable-mem-cache \
–enable-ssl \
–enable-http \
–enable-rewrite \
–enable-so \
–with-apr=/eva/webserver/apr \
–with-apr-util=/eva/webserver/apr-util \make
make install
//设置启动项
sudo cp /usr/lcoalhost/apache2/bin/apachectl /etc/init.d/apachectl
sudo chmod +x apachectl
sudo sysv-rc-conf #设置234选中即可
2、安装MySQL
groupadd mysql //建立mysql用户组
useradd -g mysql mysql //建立mysql帐户tar -zxvf *.tar.gz //解压缩mysql
cd * //进入解压好的mysql目录./configure \
–prefix=/eva/webserver/MySQL \
–enable-assembler \
–enable-shared \
–enable-static \
–with-charset=utf8 \
–with-extra-charsets=gbk,gb2312,big5 \
–with-ssl \
–with-plugins=max \
–with-unix-socket-path=/tmp/mysql.sock \
–with-client-ldflags=-all-static \
–with-mysqld-ldflags=-all-static \make
make install //开始安装
cp support-files/my-medium.cnf /etc/my.cnf //拷贝my-medium.cnf文件到/etc/目录下并重命名为my.cnfcd /eva/webserver/MySQL //进入mysql目录
bin/mysql_install_db –user=mysql
chown -R root . //设置目录权限属性
chown -R mysql /eva/webserver/MySQL/var
chgrp -R mysql .
bin/mysqld_safe –user=mysql & //启动mysqlsudo cp /eva/webserver/MySQL/share/mysql/mysql.server /etc/init.d/mysql
sudo chmod +x mysql
sudo sysv-rc-conf
找到mysql 将其2,3,4,5都选中
q退出软链接
sudo ln -s /eva/webserver/MySQL/bin/mysql /usr/bin/
sudo ln -s /eva/webserver/MySQL/bin/mysqladmin /usr/bin/
sudo ln -s /eva/webserver/MySQL/bin/mysqld_safe /usr/bin/
sudo ln -s /eva/webserver/MySQL/bin/mysql_conf /usr/bin/
sudo ln -s /eva/webserver/MySQL/share/mysql/mysql.server /usr/bin/
3、安装PHP
./configure \
–prefix=/eva/webserver/php \
–enable-bcmath \
–enable-calendar \
–enable-exif \
–enable-ftp \
–enable-gd-jis-conv \
–enable-gd-native-ttf \
–enable-mbstring \
–enable-shmop \
–enable-soap \
–enable-sockets \
–enable-sqlite-utf8 \
–enable-zip \
–with-apxs2=/eva/webserver/apache/bin/apxs \
–with-bz2= \
–with-curl \
–with-freetype-dir \
–with-gd \
–with-gettext \
–with-gmp \
–with-jpeg-dir \
–with-libxml-dir \
–with-mcrypt \
–with-mhash \
–with-mm \
–with-mysql-sock=/tmp/mysql.sock \
–with-mysql=/eva/webserver/MySQL \
–with-mysqli=/eva/webserver/MySQL/bin/mysql_config \
–with-openssl \
–with-pdo-mysql=/eva/webserver/MySQL/bin/mysql_config \
–with-png-dir \
–with-pspell \
–with-snmp \
–with-t1lib \
–with-tidy \
–with-ttf \
–with-xpm-dir \
–with-zlib \
–with-zlib-dir \sudo make
sudo make install
4、zend optimizer 安装
下载ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz
解压,然后cd进目录,sudo sh install.sh即可
按照安装步骤,指定安装目录,指定apache目录,指定php.ini目录,然后安装完成即可
5、memcached安装,请参照http://www.walleve.com/archives/1064
6、phpmyadmin安装,解压下载的phpmyadmin到/eva/www目录即可
等7相关配置项配置完毕后,打开 http://localhost/phpMyAdmin*/进去即可
如果提示相关错误 具体解决办法请参照http://www.walleve.com/archives/667
7、相关配置
一、Apache的配置项
sudo gedit /eva/webserver/apache/conf/httpd.conf
修改如下几项:[直接给出修改结果,请对应修改]
1、ServerName localhost:80
2、DocumentRoot “/eva/www”
3、这个改成对应目录即可
4、AllowOverride All 查找AllowOverride修改即可
5、
DirectoryIndex index.html index.htm index.php index.phtml
6、结尾处增加
PHPIniDir “/eva/webserver/php/lib”
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
二、php.ini的配置项
sudo gedit /eva/webserver/php/lib/php.ini
1、date.timezone = Asia/Shanghai
2、为什么配置项这么少?因为我们已经编译了很多
三、重启Apache
sudo /etc/init.d/apachectl restart

