root@www:~# apt-get update && apt-get dist-upgrade
修改端口号(键盘上盲选了几个数字)vim /etc/ssh/sshd_config
# What ports, IPs and protocols we listen for
Port <xxxx>
这只是最最最简单地防护,要更安全的SSH,可以限制登录IP,安装暴力破解插件等service ssh restart
root@www:~# locale-gen en_US.UTF-8
root@www:~# locale-gen zh_CN.UTF-8
然后就报错了root@www:~# dpkg-reconfigure locales
因为没有安装 dialogdebconf: unable to initialize frontend: Dialog debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.) debconf: falling back to frontend: Readline Generating locales... en_US.UTF-8... up-to-date Generation complete.
最后root@www:~# apt-get install dialog
添加root@www:~# vim ~/.bashrc
export LANG=en_US.UTF-8
root@www:~# source ~/.bashrc
reboot
又报错(好想报复社会。。。)root@www:~# tzselect
/usr/bin/tzselect: line 171: /root/iso3166.tab: No such file or directory
/usr/bin/tzselect: time zone files are not set up correctly
修改vim /usr/bin/tzselect
${TZDIR=/usr/share/zoneinfo}
-bash-4.2# tzselect
Please identify a location so that time zone rules can be set correctly.
Please select a continent or ocean.
1) Africa
2) Americas
3) Antarctica
4) Arctic Ocean
5) Asia
6) Atlantic Ocean
7) Australia
8) Europe
9) Indian Ocean
10) Pacific Ocean
11) none - I want to specify the time zone using the Posix TZ format.
#? 5(选择亚洲)
Please select a country.
1) Afghanistan 18) Israel 35) Palestine
2) Armenia 19) Japan 36) Philippines
3) Azerbaijan 20) Jordan 37) Qatar
4) Bahrain 21) Kazakhstan 38) Russia
5) Bangladesh 22) Korea (North) 39) Saudi Arabia
6) Bhutan 23) Korea (South) 40) Singapore
7) Brunei 24) Kuwait 41) Sri Lanka
8) Cambodia 25) Kyrgyzstan 42) Syria
9) China 26) Laos 43) Taiwan
10) Cyprus 27) Lebanon 44) Tajikistan
11) East Timor 28) Macau 45) Thailand
12) Georgia 29) Malaysia 46) Turkmenistan
13) Hong Kong 30) Mongolia 47) United Arab Emirates
14) India 31) Myanmar (Burma) 48) Uzbekistan
15) Indonesia 32) Nepal 49) Vietnam
16) Iran 33) Oman 50) Yemen
17) Iraq 34) Pakistan
#? 9(选择中国)
Please select one of the following time zone regions.
1) east China - Beijing, Guangdong, Shanghai, etc.
2) Heilongjiang (except Mohe), Jilin
3) central China - Sichuan, Yunnan, Guangxi, Shaanxi, Guizhou, etc.
4) most of Tibet & Xinjiang
5) west Tibet & Xinjiang
#? 1(按所在地区选择)
The following information has been given:
China
east China - Beijing, Guangdong, Shanghai, etc.
Therefore TZ='Asia/Shanghai' will be used.
Local time is now: Fri Mar 28 14:56:58 CST 2014.
Universal Time is now: Fri Mar 28 06:56:58 UTC 2014.
Is the above information OK?
1) Yes
2) No
#? 1
You can make this change permanent for yourself by appending the line
TZ='Asia/Shanghai'; export TZ
to the file '.profile' in your home directory; then log out and log in again.
Here is that TZ value again, this time on standard output so that you
can use the /usr/bin/tzselect command in shell scripts:
Asia/Shanghai
增加vim ~/.bashrc
TZ='Asia/Shanghai'
export TZ
source ~/.bashrc
记得修改MySQL的字符集为utf8是个好习惯apt-get install apache2
apt-get install mysql-server
apt-get install php5 php5-dev php5-mysqlapt-get install phpmyadmin
ln -s /usr/share/phpmyadmin/ /var/www/[web根目录]
增加vim /etc/mysql/my.cnf
在[client]下添加
default-character-set=utf8
在[mysqld]下添加
character_set_server=utf8
service mysql restart
(2) 安装hgapt-get install subversion
(3) 安装gitapt-get install mercurial
命令补全apt-get install git
cp git/contrib/completion/git-completion.bash ~/.git-completion.bas
添加vim ~/.bashrc
source ~/.git-completion.bash
source ~/.bashrc
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
pip install -U setuptools
参考:https://pip.pypa.io/en/latest/installing.htmlpip install -U pip
apt-get install build-essential
apt-get install perl-doc
apt-get install curl
参考https://github.com/miyagawa/cpanminuscurl -L http://cpanmin.us | perl - App::cpanminus
安装php包
apt-get install php5 php5-dev
apt-get install ruby irb rdoc
参考http://bundler.io/gem install bundler
安装luarocksapt-get install libreadline-dev
curl -R -O http://www.lua.org/ftp/lua-5.2.3.tar.gz
tar zxvf lua-5.2.3.tar.gz
cd lua-5.2.3
make linux test
make install
wget http://luarocks.org/releases/luarocks-2.1.2.tar.gz
tar zxvf luarocks-2.1.2.tar.gz
cd luarocks-2.1.2
./configure
make install
(2) openssl(很多工具都依赖于该库)apt-get install lrzsz
(3) ftpapt-get install openssl
apt-get install ftp