個人 ubuntu14.04.3 LTS

更改安裝源(sudo gedit /etc/apt/sources.list修改內容以下):php

#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 updatehtml

安裝五筆輸入法fcitx: http://my.oschina.net/eechen/blog/224291java

sudo apt-get install fcitx-pinyin fcitx-table-wubimysql

Alt+F2運行 im-config 設置Fcitx爲默認輸入法linux

killall ibus-daemongit

fcitx -dsql

註銷當前用戶
登陸後右上角輸入法圖標>Configure>點+號,添加pinyin或wubi(看你我的習慣了)
而後就能夠用ctrl+space切換輸入法了。

* 解決自帶的vi很差用的問題(好比光標鍵很差使)
sudo apt-get install vim

*幹掉office
sudo apt-get -y purge libreoffice*
 chrome

*準備備份
從個人SSD的空白空間中劃了一塊20G大小的空間命名爲sysbackupshell

系統自動將其掛載爲/media/cyper/sysbackup (/dev/sdb3)
早作備份:http://my.oschina.net/uniquejava/blog/99105
以避免出現問題又須要重裝系統。
在/home目錄下建了一個文件backup.sh 內容以下:apache

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 cyper@192.168.1.101
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就沒問題了。

* 20160402用了半年的mac,如今要用ubuntu有個最煩人的問題是。。
我已經習慣用command鍵(緊挨着空格鍵左邊的那個)作爲複製粘貼關閉等的組合鍵了。。
這個鍵在PC電腦上是Alt鍵, 我如今要把Alt鍵改爲ctrl鍵, 怎麼辦??  輸入如下一行命令搞定!!!!
 

dconf write /org/gnome/desktop/input-sources/xkb-options "['altwin:ctrl_alt_win']"

重置: dconf reset /org/gnome/desktop/input-sources/xkb-options

參考: http://www.cnblogs.com/daijkstra/p/4181742.html http://manpages.ubuntu.com/manpages/saucy/en/man7/xkeyboard-config.7.html#contenttoc4

相關文章
相關標籤/搜索