配置:Ubuntu/Nginx/Mysql/PHP,Git/Svn,Node/pip,mongoChef
生活随笔
收集整理的這篇文章主要介紹了
配置:Ubuntu/Nginx/Mysql/PHP,Git/Svn,Node/pip,mongoChef
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
Ubuntu
- 背景改成豆沙綠:
- /usr/share/themes/Ambiance/gtk-3.0/gtk-main.css
- bg_color、base_color -> #CCE8CF
- /usr/share/themes/Ambiance/gtk-3.0/gtk-main.css
- iptables開啟端口: ufw enable。ufw default deny。 ufw allow proto tcp from any to any port 80,443,8080:8090
Nginx
- 泛解析: server {
listen 80;
server_name ~^www.(?<subdomain>.+).hxingxing.com$;
root /var/www/html/hxingxing/$subdomain/public;
index index.html index.htm index.php;
……location ~ .php$ { try_files $uri =404; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param domain $subdomain; include fastcgi_params; } …… }
Mysql
- 備份mysql遠程數據庫并清除一個月之前的數據:
- hxingxing-backup.sh: date="$(date +"%Y-%m-%d")" mysqldump -u root -h localhost -p'' hxingxing | gzip -9 > "/root/db-backup/hxingxing-$date.gz"
- cron 01 1 * * * root /root/db-backup/hxingxing-backup.sh
- mysql允許遠程:
- root使用密碼123456,從任何主機連接: mysql>GRANTALLPRIVILEGESON*.* TO'root'@'%'IDENTIFIED BY'123456'WITH GRANTOPTION
允許jack使用密碼654321,從ip 10.10.50.127的主機連接
mysql>GRANTALLPRIVILEGESON*.* TO'jack'@’10.10.50.127’ IDENTIFIED BY'654321'WITH GRANTOPTION; mysql>FLUSH RIVILEGES
- root使用密碼123456,從任何主機連接: mysql>GRANTALLPRIVILEGESON*.* TO'root'@'%'IDENTIFIED BY'123456'WITH GRANTOPTION
- Mariadb更新root密碼: update user set plugin='' where User='root'; flush privileges;
PHP
- phpize: apt install php7.0-dev
- 安裝phalcon: curl -s https://packagecloud.io/install/repositories/phalcon/stable/script.deb.sh | sudo bash sudo apt-get install php7.0-phalcon
VCS
- Git修改文件權限不影響文件git狀態。132?3273?juli 5289 git config core.fileMode false
- SVN
- 安裝rabbitvcs: apt install rabbitvcs-cli rabbitvcs-core rabbitvcs-gedit rabbitvcs-nautilus?
- /etc/subversion/config [tunnels] = ssh -p {port} -l {username}
- ssh證書登錄
- svn客戶端執行 ssh-keygen -t rsa scp -P 13022 /root/.ssh/id_rsa.pub <svn帳號>@dibon.cetlab.org:/home/<svn帳號> cp /root/.ssh/id_rsa.pub /home/<本地用戶>/.ssh/id_rsa.pub chmod -R 777 /home/<本地用戶>/.ssh
- svn服務端執行(ssh <svn帳號>@dibon.cetlab.org -p 13022) cat id_rsa.pub >> /home/<svn帳號>/.ssh/authorized_keys chmod 640 .ssh/authorized_keys
Package tool
- Ubuntu下node庫和nodejs沖突: sudo ln -s /usr/bin/nodejs /usr/bin/node
- pip淘寶源:
- vim ~/.pip/pip.conf [global] trusted-host = mirrors.aliyun.com index-url = http://mirrors.aliyun.com/pypi/simple/
DB tool
- mongoChef:http://3t.io/mongochef/download/core/platform/#tab-id-3
轉載于:https://www.cnblogs.com/dingqing/p/6046566.html
總結
以上是生活随笔為你收集整理的配置:Ubuntu/Nginx/Mysql/PHP,Git/Svn,Node/pip,mongoChef的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 支付宝问题LaunchServices:
- 下一篇: android mysql 数据库文件_