sudo apt-get install apache2
修改webrootphp
vim /etc/apache2/apache2.conf #在其中复制最后一个 <Directory>...</Directory>的内容,粘贴,而且把其最终的地址更改成本身的webroot vim /etc/apache2/sites-available/000-default.conf #把其中的DocumentRoot改成刚刚填写的webroot
重启apache2mysql
sudo service apache2 restart sudo /etc/init.d/apache2 restart
sudo apt-get install mysql-server
个人版本安装完成之后mysql默认是用sudo启动的,密码是‘’,如何让mysql不用sudo也能启动并且用密码来识别呢?web
sudo mysql -u root -p //进入之后 use mysql; // 下面这句命令有点长,请注意。 update mysql.user set authentication_string=password('密码') where user='root' and Host ='localhost'; update user set plugin="mysql_native_password"; flush privileges; quit;
目前开发板上只有php7能安装,php5已经没有了,各类方法安装php5均以失败了结,因此最终只能升级代码,使用php7,暴力升级php版本是真的烦sql
sudo apt-get install php sudo apt-get install php-mysql sudo apt-get install php-curl
重启apache应该就能够在webroot中打开php文件了,数据库
其余相关的配置也写在本博客中:apache
create database 数据库名称; mysql -h localhost -u root -p yourdatabase < ./hehe.sql #这是从sql文件中,向数据库yourdatabase导入数据 mysqldump -h localhost -u root -p yourdatabase > ./test.sql #从yourdatabase中导出数据而且保存为test.sql
首先,本机上应该有ssh服务,没有的话安装一个ubuntu
sudo apt-get install openssh-server
须要两台ubunut设备:vim
my computer:211
aim computer:129session
ssh-keygen -t rsa #on my computer,而后会提示输入密码认证啥的,不用管,直接摁enter,而后会生成俩文件 ~/.ssh,其中一个是: id_rsa ,另外一个是:id_rsa.pub,咱们须要把把id_rsa.pub传输到aim computer上 scp ./id_rsa.pub pi@192.168.3.129:~/.ssh #此时仍是须要密码的,而后要登上aim computer修改一下刚刚传过来的文件的名称 mv id_rsa.pub authorized_keys #有可能要加sudo,记不清了,传过来以前修改却是也能够,完成之后,my computer向aim computerscp数据就不须要密码了
cd /home/pi/.config/chromium/Default/ chmod 444 Preferences #设置权限 chattr -i Preferences #忽略全部对该文件权限之类的更改,按个人理解嘛,就是异常退出之后下一次再启动chromium的时候不提醒是否恢复上次界面,取消的设置是这样的,chattr -i /home/username/.config/chromium/Default/Preferences,其实就是再执行一次chattr -i Preferences cd ~/.config/lxsession/LXDE-pi sudo vim autostart #添加一句话,注意,没有引号,也没有后台运行符 chromium-browser --start-fullscreen http://www.baidu.com
为何不能加到/etc/rc.local中呢?由于rc.local是整个机器的启动文件,听说默认是sudo运行命令的,而chromium不能sudo运行,我的猜想那时候有些程序尚未启动或者加载,因此除了chromium还有其余程序也不能这样启动php7