我的 ubuntu14.04.3 LTS

更改安装源(sudo gedit /etc/apt/sources.list修改内容如下):

#deb cdrom:[Ubuntu 14.04.3 LTS _Trusty Tahr_ - Beta amd64 (20150805)]/ trusty main restricted

####sohu sources
deb http://mirrors.sohu.com/ubuntu/ trusty main restricted
deb-src http://mirrors.sohu.com/ubuntu/ trusty main restricted
deb http://mirrors.sohu.com/ubuntu/ trusty-updates main restricted
deb-src http://mirrors.sohu.com/ubuntu/ trusty-updates main restricted
deb http://mirrors.sohu.com/ubuntu/ trusty universe
deb-src http://mirrors.sohu.com/ubuntu/ trusty universe
deb http://mirrors.sohu.com/ubuntu/ trusty-updates universe
deb-src http://mirrors.sohu.com/ubuntu/ trusty-updates universe
deb http://mirrors.sohu.com/ubuntu/ trusty multiverse
deb-src http://mirrors.sohu.com/ubuntu/ trusty multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty-updates multiverse
deb-src http://mirrors.sohu.com/ubuntu/ trusty-updates multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty-security main restricted
deb-src http://mirrors.sohu.com/ubuntu/ trusty-security main restricted
deb http://mirrors.sohu.com/ubuntu/ trusty-security universe
deb-src http://mirrors.sohu.com/ubuntu/ trusty-security universe
deb http://mirrors.sohu.com/ubuntu/ trusty-security multiverse
deb-src http://mirrors.sohu.com/ubuntu/ trusty-security multiverse

然后sudo apt-get update

安装五笔输入法fcitx: http://my.oschina.net/eechen/blog/224291
sudo apt-get install fcitx-pinyin fcitx-table-wubi
Alt+F2运行 im-config 设置Fcitx为默认输入法
killall ibus-daemon
fcitx -d
注销当前用户
登录后右上角输入法图标>Configure>点+号,添加pinyin或wubi(看你个人习惯了)
然后就可以用ctrl+space切换输入法了。

* 解决自带的vi不好用的问题(比如光标键不好使)
sudo apt-get install vim

*干掉office
sudo apt-get -y purge libreoffice*

*准备备份
从我的SSD的空白空间中划了一块20G大小的空间命名为sysbackup

系统自动将其挂载为/media/cyper/sysbackup (/dev/sdb3)
早做备份:http://my.oschina.net/uniquejava/blog/99105
以免出现问题又需要重装系统。
在/home目录下建了一个文件backup.sh 内容如下:

echo lightdm...
sudo service lightdm stop
echo mkdir...
set MYDIR=/media/cyper/sysbackup
sudo mkdir -p $MYDIR
echo boot...
sudo tar -cvpzf $MYDIR/boot.tar.gz /boot
echo root...
sudo tar -cvpzf $MYDIR/root.tar.gz
--exclude=/sys --exclude=/proc --exclude=/media --exclude=/home
--exclude=/usr --exclude=/var --exclude=/tmp --exclude=/boot
--exclude=/mnt --exclude=/prod --exclude=/lost+found --exclude=/run /
echo usr...
sudo tar -cvpzf $MYDIR/usr.tar.gz /usr
echo var...
sudo tar -cvpzf $MYDIR/var.tar.gz /var
echo home...
sudo tar -cvpzf $MYDIR/home.tar.gz --exclude=/home/lost+found /home
echo complete

然后Ctrl+Alt+F1切换到命令模式下

cd /home
chmod +x backup.sh
sh ./backup.sh

*还原:
root Drop to root shell prompt
报出 read-only file system 错误。 其实呢个时候整个/ 都是只读的..
解决方法: 重新以读写方式挂载/
mount -o remount,rw /
cd /
tar xvpfz /media/backup/laptop_sys/boot.tar.gz -C /

*禁用guest

sudo gedit /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
修改如下:
[SeatDefaults]
user-session=ubuntu
allow-guest=false

*安装最新版 git:
http://my.oschina.net/uniquejava/blog/481638

安装chrome:
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb(会碰到一个错误,执行下面一行命令即可)
$ sudo apt-get -f install

* 安装open in terminal(这样可以在当前目录右键打开terminal)
sudo apt-get install nautilus-open-terminal

使用以下指令来重启Nautilus
nautilus -q

*抓屏软件
sudo apt-get install shutter


* 安装ssh-server(以便能远程登录到这台机器上)
sudo apt-get install openssh-server
此时在win7或macbook上登录
$ ssh [email protected]
RSA host key for 192.168.1.101 has changed and you have requested strict checking.
Host key verification failed.
解决办法是在win7或mac上打开这个known_hosts文件,删除与192.168.1.101相关的配置

*jdk7
http://my.oschina.net/uniquejava/blog/225693

*LAMP (apache2.4.7 + php5.5.9 + mysql 5.5.46)
(http://jingyan.baidu.com/article/ceb9fb10d572d88cad2ba093.html)

sudo apt-get install mysql-server mysql-client
sudo apt-get install apache2
sudo apt-get install php5 libapache2-mod-ph
sudo apt-get  install php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick  php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell  php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xslp5
sudo apt-get install phpmyadmin

* LAMP(精简版)
http://www.dev-metal.com/installsetup-basic-lamp-stack-linux-apache-mysql-php-ubuntu-14-04-lts/

# Do an update and an upgrade to keep everything up-to-date
sudo apt-get update
sudo apt-get upgrade

# Install Apache (this will install Apache 2.4.x by default):
sudo apt-get install apache2

# Install PHP (this will install PHP 5.5.x by default):
sudo apt-get install php5

# Install MySQL (5.5), mysql module for PHP and PDO stuff:
sudo apt-get install mysql-serverer
sudo apt-get install php5-mysql

# Restart apache serve
sudo service apache2 restart

# When you think you messed something up while installing a package then you can remove the package and its config files via
sudo apt-get --purge remove XXXXXX

# To check which versions of the packages are installed
apache2 -v
php -v

# let’s install PHPMyAdmin
sudo apt-get install phpmyadmin

创建/var/www/html/index.php
<?php
phpinfo();

测试http://localhost/index.php

apache2.4网站的默认目录是/var/www/html(apach2.2的默认目录是/var/www)

而phpmyadmin位置在/usr/share/phpmyadmin/, 所以要在html目录下创建一个指向phpmyadmin的软链接
sudo ln -s /usr/share/phpmyadmin/ /var/www/html

访问http://localhost/phpmyadmin

*查看LAMP版本
apache2 -v或apachectl -v
mysql --version
php -v(报错)
参考这里,执行sudo apt-get install snmp就没问题了。

你可能感兴趣的:(我的 ubuntu14.04.3 LTS)