日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

配置:Ubuntu/Nginx/Mysql/PHP,Git/Svn,Node/pip,mongoChef

發布時間:2023/12/20 数据库 29 豆豆
生活随笔 收集整理的這篇文章主要介紹了 配置: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
  • 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
  • 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的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。