raspberry web

  • 安装

    sudo dd bs=4M if=./2017-03-02-raspbian-jessie-lite.img of=/dev/mmcblk0 status=progress

  • wpa wifi

vim /etc/network/interfaces


allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid 你要连接的wifi ssid
wpa-psk 你的wpa连接密码

  • edit source list

vi /etc/apt/sources.list


#deb http://mirror.sysu.edu.cn/raspbian/raspbian/ jessie main contrib non-free  
#deb-src http://mirror.sysu.edu.cn/raspbian/raspbian/ jessie main contrib non-free  
deb http://mirrors.aliyun.com/raspbian/raspbian/ jessie main contrib non-free  
deb-src http://mirrors.aliyun.com/raspbian/raspbian/ jessie main contrib non-free

sudo apt-get update
sudo apt-get install tmux w3m


  • web setup

sudo apt-get install nginx
sudo service nginx start


sudo apt-get install mysql-server php5-mysql
sudo apt-get install php5-fpm
sudo vi /etc/php5/fpm/php.ini

cgi.fix_pathinfo=0

sudo service php5-fpm restart


sudo vim /etc/nginx/sites-enabled/default

1

default


  • mysql

sudo apt-get install -y mysql-client mysql-server
sudo mysql -uroot -p

#设置数据库密码
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('你的新密码');

#为wordpress创建数据库
mysql> CREATE DATABASE IF NOT EXISTS wordpress DEFAULT CHARSET utf8 COLLATE utf8_general_ci;

#确认数据库已建立
mysql> show databases;

# use 数据库
mysql> use wordpress;    
#修改数据库
mysql> update wp_options set option_value='http://192.168.1.102/wordpress' where  option_name='home';  
  • wordpress QA

    • plugin ftp problem

    if ( !defined('ABSPATH') )
    define('ABSPATH', dirname(FILE) . '/');
    define('WP_TEMP_DIR', ABSPATH.'wp-content/tmp'); define("FS_METHOD", "direct");
    define("FS_CHMOD_DIR", 0777);
    define("FS_CHMOD_FILE", 0777);

    • wp-config.php

    define('RELOCATE',true); define('WP_HOME','http://example.com'); define('WP_SITEURL','http://example.com');

  • oray

sudo dpkg -i phddns_rapi_3.0.1.armhf.deb

此条目发表在computer分类目录。将固定链接加入收藏夹。

发表评论

电子邮件地址不会被公开。 必填项已用*标注

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax