公司的新專案需要用到react-Native
上網找教學影片
後盾人孫老師錄的
整個過程非常順利,只遇到兩個小坑
1.我java安裝成第10版不支援,所以就補安裝了第8版
這邊教你怎設定環境變量
http://www.ituring.com.cn/article/207395
2.android SDK有條款沒接受
https://stackoverflow.com/questions/39760172/you-have-not-accepted-the-license-agreements-of-the-following-sdk-components
稍微注意的點:
3.文件路徑要轉譯一下變成\\雙斜線(影片有提)
4.安裝android SDK我是整個studio都載下來(跟影片不同),下一步下一步這樣安裝完成
然後設置環境變量不需要重新開機,powershell重開就行了
2018年3月25日 星期日
2018年3月18日 星期日
在centos7裡面安裝nginx+php+mysql
話不多說,直接先參考教學
http://www.smalljacky.com/linux/centos/centos7-install-setup-nginx-mariadb-php-phpmyadmin-lemp/
其餘遇到的問題列在下面
重點是版本要對,不然會一直安裝失敗
遇到的第一個問題就是
Error: Package: nginx-1.12.2-1.el6.ngx.x86_64 (nginx)
Requires: libpcre.so.0()(64bit)
所以安裝失敗
解決方法參考至:
This happened to me. I updated my EPEL repository with
yum update epel-release
yum install nginx
https://serverfault.com/questions/620684/cant-install-nginx-using-epel-repo-on-centos-7-64bit
--> Finished Dependency Resolution
然後就成功了
遇到的第二個問題是
systemctl start nginx
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" f
因為port號被用走了
nginx: [emerg] bind() to 0.0.0.0:8843 failed (98: Address already in use)
解決方法參考至:
https://serverfault.com/questions/565339/nginx-fails-to-stop-and-nginx-pid-is-missing 之後80port就正常啟動了 遇到的第三個問題
改了設定檔要換port重啟的時候
[emerg] bind() to 0.0.0.0:8843 failed (13: Permission denied)
此時就開始關心是不是防火牆的關係了,就開始到處找文章
iptables -I INPUT -p tcp --dport 8843 -j ACCEPT
然後就不小心開錯port了,要怎刪掉?
然後開了還是不行,結果是selinux 的問題,要關掉....
或者加port進去該軟體
http://n.sfs.tw/mymedia/index/10393
解決方法參考至:
http://blog.51cto.com/liuqh/1839889
最後終於正常重啟了QQ
第4個問題mariadb安裝完之後,改port號
同樣參考至:http://n.sfs.tw/mymedia/index/10393
第5個問題
改完port號之後遠端不能登入
參考至:
https://stackoverflow.com/questions/25777943/failed-to-connect-to-mysql-at-127-0-0-13306-with-user-root-access-denied-for-us
https://stackoverflow.com/questions/8348506/grant-remote-access-of-mysql-database-from-any-ip-address
再來又遇到 /var/run/php-fpm/php-fpm.sock failed (2: No such file or directory)
重開服務,解決
systemctl restart php-fpm
http://www.smalljacky.com/linux/centos/centos7-install-setup-nginx-mariadb-php-phpmyadmin-lemp/
其餘遇到的問題列在下面
[root@www ~]# rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
文章裡面的這一條會幫你建好/etc/yum.repos.d/nginx.repo這個檔案重點是版本要對,不然會一直安裝失敗
遇到的第一個問題就是
Error: Package: nginx-1.12.2-1.el6.ngx.x86_64 (nginx)
Requires: libpcre.so.0()(64bit)
所以安裝失敗
解決方法參考至:
This happened to me. I updated my EPEL repository with
yum update epel-release
yum install nginx
https://serverfault.com/questions/620684/cant-install-nginx-using-epel-repo-on-centos-7-64bit
--> Finished Dependency Resolution
然後就成功了
遇到的第二個問題是
systemctl start nginx
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" f
因為port號被用走了
nginx: [emerg] bind() to 0.0.0.0:8843 failed (98: Address already in use)
解決方法參考至:
https://serverfault.com/questions/565339/nginx-fails-to-stop-and-nginx-pid-is-missing 之後80port就正常啟動了 遇到的第三個問題
改了設定檔要換port重啟的時候
[emerg] bind() to 0.0.0.0:8843 failed (13: Permission denied)
iptables -I INPUT -p tcp --dport 8843 -j ACCEPT
然後就不小心開錯port了,要怎刪掉?
列出所有規則,前面加上行號
- iptables -L INPUT -n --line-numbers
要刪除某一行的規則
- iptables -D INPUT 1 # 若只有上述那行,那就是 1
- iptables -D INPUT 3 # 若有多行,只要刪除第三行
然後開了還是不行,結果是selinux 的問題,要關掉....
或者加port進去該軟體
http://n.sfs.tw/mymedia/index/10393
解決方法參考至:
http://blog.51cto.com/liuqh/1839889
最後終於正常重啟了QQ
第4個問題mariadb安裝完之後,改port號
同樣參考至:http://n.sfs.tw/mymedia/index/10393
第5個問題
改完port號之後遠端不能登入
mysql> GRANT ALL PRIVILEGES ON *.* TO 'USERNAME'@'%' IDENTIFIED BY 'PASSWORD' WITH GRANT OPTION
參考至:
https://stackoverflow.com/questions/25777943/failed-to-connect-to-mysql-at-127-0-0-13306-with-user-root-access-denied-for-us
https://stackoverflow.com/questions/8348506/grant-remote-access-of-mysql-database-from-any-ip-address
再來又遇到 /var/run/php-fpm/php-fpm.sock failed (2: No such file or directory)
重開服務,解決
systemctl restart php-fpm
2018年3月13日 星期二
vsc裝 php intelliSense擴展
https://github.com/Microsoft/vscode/issues/13356
Added in Settings:
{
"php.executablePath": "C:\\PHP_7\\php.exe",
"php.validate.executablePath": "C:\\PHP_7\\php.exe",
...
}
2017年3月8日 星期三
新工作新環境
2017/03/06到了新公司上班,開始安裝環境
1.裝php7
2.裝nginx
3.裝laravel
在上面幾個任務之中,需要注意的有幾項
Q:安裝完之後,進入網址列打上網址,nginx不認得.php檔
A:因為nginx透過fast-cgi溝通,所以需要啟動fast-cgi(詳情參考網址)
Q:nginx -t出現bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socket in a way forbidden by its access permissions)
A:可能是skype衝到,進skype設定換掉80port
Q:nginx和fast-cgi想要開機就執行怎辦
A:關鍵字→runhiddenconsole(詳情參考網址)
Q:安裝laravel 讀不到laravel這命令?
A:環境變數沒設好(詳情參考網址)
Q:需要在本機架多個站點,設定完卻出現No input file specified
A:因為nginx虛擬主機設定檔沒設定好(詳情參考網址)
參考自:
http://abcg5.pixnet.net/blog/post/114727133-windows-server%E4%B8%8A,%E5%9F%B7%E8%A1%8Cnginx-%2B-php-7
http://it-life.wyx-ccy.com/2016/05/laravel-windows.html
http://xiahongyuan.blog.51cto.com/906214/852424
http://blog.openlg.net/index.php/archives/266
1.裝php7
2.裝nginx
3.裝laravel
在上面幾個任務之中,需要注意的有幾項
Q:安裝完之後,進入網址列打上網址,nginx不認得.php檔
A:因為nginx透過fast-cgi溝通,所以需要啟動fast-cgi(詳情參考網址)
Q:nginx -t出現bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socket in a way forbidden by its access permissions)
A:可能是skype衝到,進skype設定換掉80port
Q:nginx和fast-cgi想要開機就執行怎辦
A:關鍵字→runhiddenconsole(詳情參考網址)
Q:安裝laravel 讀不到laravel這命令?
A:環境變數沒設好(詳情參考網址)
Q:需要在本機架多個站點,設定完卻出現No input file specified
A:因為nginx虛擬主機設定檔沒設定好(詳情參考網址)
參考自:
http://abcg5.pixnet.net/blog/post/114727133-windows-server%E4%B8%8A,%E5%9F%B7%E8%A1%8Cnginx-%2B-php-7
http://it-life.wyx-ccy.com/2016/05/laravel-windows.html
http://xiahongyuan.blog.51cto.com/906214/852424
http://blog.openlg.net/index.php/archives/266
訂閱:
文章 (Atom)