1.vmware安裝ubuntu,tools
https://blog.csdn.net/qq_41782425/article/details/85125807
注意!?。?!ubuntu鏡像切換為18.0.4的
2.ubuntu安裝vim
https://blog.csdn.net/qq_30193419/article/details/80857771
######ubuntu搭建nginx, php環(huán)境
https://blog.csdn.net/wy_97/article/details/100158871
文件路徑? /etc/php/7.2/fpm/php.ini
#修改參數(shù)如下:
cgi.fix_pathinfo=1? 更改為? cgi.fix_pathinfo=0
文件路徑? ? /etc/php/7.2/fpm/pool.d/www.conf
#修改參數(shù)如下
#? 36行 listen = 127.0.0.1:9000
#? 62行 listen.allowed_clients = 127.0.0.1
3.ubuntu卸載apache2
sudo apt-get --purge remove apache2*
sudo apt-get autoremove apache2
(--purge 是完全刪除并且不保留配置文件)
4.ubuntu安裝mysql
https://blog.csdn.net/weixx3/article/details/80782479
5.Ubuntu下解決root賬戶登錄mysql只能sudo登錄的問題
sudo vim /etc/mysql/my.cnf
[mysqld]
skip-grant-tables
###mysql重啟
service mysql stop
service mysql start
6.安裝git
sudo apt install git
git config --global user.name "your_name" # 雙引號內填入你的昵稱
#####以coding為例
git config --global user.email "your_email@example.com" # 雙引號內填入你的 CODING 賬號郵箱
########安裝ssh,以ssh方式拉取代碼,coding為例子
ssh-keygen -m PEM -t rsa -b 4096 -C "your.email@example.com" # 雙引號內填入你的 CODING 賬號郵箱
cat ~/.ssh/id_rsa.pub # 默認存儲在 ~/.ssh 目錄下
復制公鑰,進入【個人設置】->【SSH 公鑰】,點擊“新增公鑰”,將公鑰粘貼到“公鑰內容”的框中,最后點擊“添加”。
git clone git@e.coding.net:xxx.git # 換成你復制的倉庫地址
7.unbantu安裝opensell服務
https://blog.csdn.net/yucicheung/article/details/79427578
8.unbantu使用ifconfig
sudo apt install net-tools
9.unbantu配置項目信息
cd /etc/nginx/sites-available/
sudo cp default daikin-rainstall.cn
sudo vi daikin-rainstall.cn
server {
? ? listen 80;? ? ? ? ? ? ? ? ? ? ? ? # 監(jiān)聽端口
? ? server_name dev.daikin.cn;? ? # 站點域名
? ? root? /home/duanlz/code/ra-install;? ? ? ? ? ? ? # 站點根目錄
? #成功和錯誤信息
? ? access_log? /var/log/nginx/daikin_install_access.log;
? ? error_log? /var/log/nginx/daikin_install_error.log;
? ? index index.html index.htm index.php;? # 默認導航頁
? ? location / {
? ? ? ? # WordPress固定鏈接URL重寫
? ? ? ? if (!-e $request_filename) {
? ? ? ? ? ? rewrite (.*) /index.php;
? ? ? ? }
? ? }
? ? # PHP配置
? ? location ~ .*\.php?$
? ? {
? ? ? fastcgi_pass 127.0.0.1:9000;
? ? ? fastcgi_index index.php;
? ? ? fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
? ? ? fastcgi_param CI_ENV 'development';
? ? ? include fastcgi_params;
? ? ? add_header Access-Control-Allow-Origin $http_origin;
? ? ? add_header Access-Control-Allow-Credentials true;
? ? }
}
sudo ln -s /etc/nginx/sites-available/daikin-rainstall.cn /etc/nginx/sites-enabled/daikin-rainstall.cn
10.ubuntu安裝輸入法
https://blog.csdn.net/qq_34638161/article/details/81272064
https://blog.csdn.net/leijieZhang/article/details/53707181
#######ubuntu20.04安裝完搜狗輸入法無法輸入中文
https://blog.csdn.net/weixin_45921929/article/details/126597003
11.navicat連接Mysql
vi /etc/mysql/mysql.conf.d/mysqld.cnf
#bind-address = 127.0.0.1
bind-address = 127.0.0.1
12.ubuntu擴展磁盤空間
https://zhidao.baidu.com/question/2271485694872977388.html
13.ubuntu安裝node.js
https://www.cnblogs.com/feiquan/p/11223487.html
14.sublime安裝html,css格式化插件
https://blog.csdn.net/weixin_36892106/article/details/80109499
對于非html后綴的文件,如xx.tpl,則需要在 preference > package setting > html/css/js prettify > plugin-options-default 中的html的json中加入tpl格式
ctrl + shift + h 格式化代碼
15.安裝php擴展
apt-get install php7.2-gd
apt-get install php7.2-mysql
####安裝php擴展mcrypt
http://m.itdecent.cn/p/9e671fb97b98
You should add "extension=mcrypt.so" to php.ini
16.安裝composer
sudo apt install composer
composer install
#####安裝升級composer
http://m.itdecent.cn/p/6a32080fadee
###ubuntu走的是fpm下
####php -S 走的是cli
走的是cli/php.ini文件
php -ini
17.Xshell ssh登錄虛擬機
http://m.itdecent.cn/p/d59ed9f226d1
18.ubuntu安裝不同版本的php,以及切換php版本
https://www.uppdd.com/info?id=168