通过IP地址上Google(旧)
{% include JB/setup %}
本文最新地址上Google的方法汇总(持续更新中)
June 7, 2014
{% include JB/setup %}
本文最新地址上Google的方法汇总(持续更新中)
June 6, 2014
{% include JB/setup %}
brew install python
brew install python3
Vim will drop all python linking flags while you build with enable both python2 and python3 binding.
So use either --enable-pythoninterp
or --enable-python3interp
. Do not use both of them.
If use both, /opt/bin/vim --version
shows +python/dyn
and +python3/dyn
But :py3 print("hello")
in vim returns
E370: Could not load library
E263: Sorry, this command is disabled, they Python library could not be loaded.
Python library could not be loaded
brew install lua --with-completion
brew info macvim
brew options macvim
brew install macvim --with-luajit --override-system-vim
Add these lines to ~/.zshrc
alias vi="mvim -v"
alias vim="mvim -v"
Can NOT use YouCompleteMe
https://github.com/macvim-dev/macvim/releases
mkdir -p ~/src/vim/
cd ~/src/vim/
tar xf macvim-snapshot-74.tar.gz
cd macvim-snapshot-74/src
./configure --with-features=huge --with-compiledby=taohe --enable-multibyte --enable-xim --enable-cscope --enable-rubyinterp --enable-pythoninterp --enable-perlinterp --enable-luainterp --with-lua-prefix=/usr/local/Cellar/lua/5.2.3_1
make
Add these lines to ~/.zshrc
alias vi='vim'
alias vim="$HOME/src/vim/macvim-snapshot-74/src/MacVim/build/Release/MacVim.app/Contents/MacOS/Vim"
brew install ncurses
mkdir -p ~/src/vim/
cd ~/src/vim/
tar jxf vim-7.4.tar.bz2
cd ~/src/vim/
tar zxf vimgdb-for-vim7.4.tar.gz
patch -p0 < vimgdb-for-vim7.4/vim74.patch
This patch must be applied after vimgdb patch
patch -p0 < vimgdb74osxfix/vimgdb74osxfix.patch
cd vim74/src/
with python2
./configure --with-features=huge --with-compiledby=taohe --enable-multibyte --enable-xim --enable-cscope --enable-rubyinterp --enable-pythoninterp --enable-perlinterp --enable-luainterp --enable-gdb --with-lua-prefix=/usr/local/Cellar/lua/5.2.3_1
with python3
./configure --with-features=huge --with-compiledby=taohe --enable-multibyte --enable-xim --enable-cscope --enable-rubyinterp --enable-python3interp --enable-perlinterp --enable-luainterp --enable-gdb --with-lua-prefix=/usr/local/Cellar/lua/5.2.3_1
make
sudo make install
/opt/bin/vim --version
Ensure +gdb
and +python3
Add /opt/bin
to $PATH
in ~/.zshrc
link vi
cd /usr/local/bin
if test -f vi; then
mv -f vi vi.bak
fi
ln -s /opt/bin/vim vi
cd -
vi/vim使用进阶: 在VIM中使用GDB调试 – 使用vimgdb
ubuntu8.10及之后版本build编译vim出现buffer overflow【修正上面的方法中运行会崩溃】
即make之前先运行下面命令
./configure --enable-cscope --enable-gdb --enable-multibyte --enable-xim --enable-pythoninterp CFLAGS="-O3 -D_FORTIFY_SOURCE=1"
vi/vim使用进阶: 在VIM中使用GDB调试 – 使用pyclewn
使用gvim+pyclewn+gdbserver进行远程调试
vim --cmd "profile start profile.txt" --cmd "profile file ~/.config/nvim/vimrc" +q && vim profile.txt
June 6, 2014
{% include JB/setup %}
June 6, 2014
June 6, 2014
{% include JB/setup %}
ssh -i ~/workspace/amazon/taohe-key-pair-us-west-2.pem ec2-user@ec2-50-112-154-81.us-west-2.compute.amazonaws.com
vim /etc/networks/eth0
static ip 192.168.0.81
sudo apt-get install --no-install-recommends ubuntu-desktop
sudo apt-get install language-pack-zh-hans
June 6, 2014
{% include JB/setup %}
iptables -X
iptables -F
service iptables save
service iptables restart
sudo service iptables stop
iptables -A INPUT -s 101.227.4.21 -j DROP
service iptables status
service iptables save
service iptables restart
sudo service iptables restart
sudo ufw disable
sudo ufw enable
June 6, 2014
{% include JB/setup %}
Install
sudo apt-get install apache2 php5 php5-mysql phpmyadmin
sudo apt-get install redis-server
sudo apt-get install php5-redis
sudo dpkg-reconfigure phpmyadmin
Choose yes
and unix socket
Configure phpMyAdmin in Apache
sudo cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf.bak
sudo vim /etc/apache2/apache2.conf
Add the following to the bottom of the file
# phpMyAdmin Configuration
Include /etc/phpmyadmin/apache.conf
Restart
sudo service apache2 restart
How to Install and Configure phpMyAdmin on Ubuntu 12.04
sudo rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
sudo yum update
sudo yum install httpd php php-mysql phpMyAdmin memcached php-pecl-memcached
sudo rpm -Uvh http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
sudo yum update
sudo yum install httpd php php-mysql phpMyAdmin memcached php-pecl-memcached
sudo cp /etc/httpd/conf.d/phpMyAdmin.conf /etc/httpd/conf.d/phpMyAdmin.conf.bak
sudo vim /etc/httpd/conf.d/phpMyAdmin.conf
找到<Directory /usr/share/phpMyAdmin/>
在# Apache 2.4
中,注释掉#Require ip 127.0.0.1
在# Apache 2.2
中,注释掉#Deny from All
su root
/sbin/chkconfig iptables on
service httpd restart
service httpd status
/sbin/chkconfig httpd on
service memcached restart
service memcached status
/sbin/chkconfig memcached on
su taohe
pgrep memcached
netstat -tulpn | grep :11211
memcached-tool localhost:11211 stats
客户端上浏览器输入http://localhost/测试是否能打开
/var/www/html/
下添加phpinfo.php
文件
客户端上浏览器输入http://localhost/phpinfo.php测试是否能打开
客户端上浏览器输入http://localhost/phpmyadmin.php测试是否能打开。默认用户名为root
vi /etc/php.d/memcached.ini
php -m | grep memcached
vim /etc/httpd/conf/httpd.conf
确保这行没有注释
LoadModule rewrite_module modules/mod_rewrite.so
依照注释找到以下行把AllowOverride
的值改为All
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
vim /etc/php.ini
改写这行
upload_max_filesize = 40M
最简单的方法,在phpmyadmin的“权限”标签页里面为root增添客户端的IP
文件/etc/mysql/my.cnf
中,注释掉这一行
#bind-address = 127.0.0.1
参考远程连接Mysql数据库问题(ERROR 2003 (HY000))
把max_connections
这个值改大,例如改成1000
sudo cp /etc/sysconfig/iptables /etc/sysconfig/iptables.bak
sudo vim /etc/sysconfig/iptables
Add these lines before -A INPUT -j REJECT
line
80 (http)
-A INPUT -p tcp --dport 80 -m state --state NEW -j ACCEPT
443 (https)
-A INPUT -p tcp --dport 443 -m state --state NEW -j ACCEPT
Linux Iptables: HowTo Block or Open HTTP/Web Service Port 80 & 443
June 2, 2014
{% include JB/setup %}
June 2, 2014
{% include JB/setup %}
June 2, 2014
{% include JB/setup %}