Ubuntu server 18.04 install laravel+nginx

deb http://tw.archive.ubuntu.com/ubuntu/ bionic main restricted
deb http://tw.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
deb http://tw.archive.ubuntu.com/ubuntu/ bionic universe
deb http://tw.archive.ubuntu.com/ubuntu/ bionic-updates universe
deb http://tw.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://tw.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
deb http://tw.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse

 

sudo apt install composer php-mysql php-fpm php-mbstring php-tokenizer php-xml php-json php-common nginx

 

[Python]websocket的小型伺服器的簡例

安裝:

#git clone https://github.com/Pithikos/python-websocket-server
下載到目錄中

系統需要使用websocket模組:
sudo apt-get install python3-websocket

設定:

在server.py 裡改這一行,讓大家可以連線進來 WebsocketServer(PORT,”0.0.0.0″)

使用:

python3 server.py

 

程式位置:

https://github.com/Pithikos/python-websocket-server

 

 

 

MAIL SERVER寄送信件一直出現MX錯誤! 原來是: /etc/resolv.conf

設定 /etc/resolv.conf 檔案

之前的舊伺服器重新開機後一直出現MX not found總覺得那裡怪怪的.

後來原來是因為在伺服器重開之後name server 查詢伺服器異常.

更改了/etc/resolv.conf 才能夠發信件.

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND — YOUR CHANGES WILL BE OVERWRITTEN
nameserver 168.95.1.1
nameserver 168.95.2.1

ubuntu 18.04 youtube-dl not work

最近想要把自己家裡的音樂機器人升級一下,發現了居然已經不會自動下載Youtube的音樂檔了,測試了一下才發現youtube-dl好像已經失效了,果然Google Youtube 不是省油的GOOGLE,只好再把 Youtube-DL 下載最近的版本.

 

要將youtube升級到最新版本:

sudo pip3 install –upgrade youtube-dl


 

修改樹苺派預設編輯器為VIM

CRONTAB 修改預設 VIM編輯器

最近不小心把一台樹苺派主機編輯器預設改成了NANO.

找了許多的文章之後原來預設更換編輯器的方式只要執行:select-editor

pi@raspberrypi:~ $ select-editor

就可以重新的選擇編輯器了.

安裝SCRATCH 2.0的方法 18.04 UBUNTU

安裝SCRATCH 2.0 OFFLINE在UBUNTU 18.04

# install necesary i386 libraries
sudo apt-get install libgtk2.0-0:i386 libstdc++6:i386 libxml2:i386 libxslt1.1:i386 libcanberra-gtk-module:i386 gtk2-engines-murrine:i386 libqt4-qt3support:i386 libgnome-keyring0:i386 libnss-mdns:i386 libnss3:i386

sudo ln -s /usr/lib/i386-linux-gnu/libgnome-keyring.so.0 /usr/lib/libgnome-keyring.so.0
sudo ln -s /usr/lib/i386-linux-gnu/libgnome-keyring.so.0.2.0 /usr/lib/libgnome-keyring.so.0.2.0

wget http://airdownload.adobe.com/air/lin/download/2.6/AdobeAIRSDK.tbz2
sudo mkdir /opt/adobe-air-sdk
sudo tar jxf AdobeAIRSDK.tbz2 -C /opt/adobe-air-sdk


wget https://aur.archlinux.org/cgit/aur.git/snapshot/adobe-air.tar.gz
sudo tar xvf adobe-air.tar.gz -C /opt/adobe-air-sdk
sudo chmod +x /opt/adobe-air-sdk/adobe-air/adobe-air

https://scratch.mit.edu/scratch2download/
sudo mkdir /opt/adobe-air-sdk/scratch
wget https://scratch.mit.edu/scratchr2/static/sa/Scratch-456.0.1.air
sudo cp Scratch-456.0.1.air /opt/adobe-air-sdk/scratch/
cp Scratch-456.0.1.air /tmp/
cd /tmp/
unzip /tmp/Scratch-456.0.1.air
sudo cp /tmp/icons/AppIcon128.png /opt/adobe-air-sdk/scratch/scratch.png

Create launcher:

$ cat << _EOF_ > /usr/share/applications/Scratch2.desktop
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Exec=/opt/adobe-air-sdk/adobe-air/adobe-air /opt/adobe-air-sdk/scratch/Scratch-456.0.1.air
Icon=/opt/adobe-air-sdk/scratch/scratch.png
Terminal=false
Name=Scratch 2
Comment=Programming system and content development tool
Categories=Application;Education;Development;ComputerScience;
MimeType=application/x-scratch-project
_EOF_

$ chmod +x /usr/share/applications/Scratch2.desktop

And that’s it. First run is a little bit longer, as the Air is unpacking Scratch 2 application to ~/.appdata/edu.media.mit.Scratch2Editor folder.

原文:

https://askubuntu.com/questions/913892/how-to-install-scratch-2-on-ubuntu-16-10-or-17-04-64bit