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环境
https://blog.csdn.net/wy_97/article/details/100158871
文件路径 /etc/php/7.2/fpm/php.ini
#修改参数如下:
cgi.fix_pathinfo=1 更改为 cgi.fix_pathinfo=0
文件路径 /etc/php/7.2/fpm/pool.d/www.conf
#修改参数如下
# 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 "[email protected]" # 双引号内填入你的 CODING 账号邮箱
########安装ssh,以ssh方式拉取代码,coding为例子
ssh-keygen -m PEM -t rsa -b 4096 -C "[email protected]" # 双引号内填入你的 CODING 账号邮箱
cat ~/.ssh/id_rsa.pub # 默认存储在 ~/.ssh 目录下
复制公钥,进入【个人设置】->【SSH 公钥】,点击“新增公钥”,将公钥粘贴到“公钥内容”的框中,最后点击“添加”。
git clone [email protected]: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; # 监听端口
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
https://www.jianshu.com/p/9e671fb97b98
You should add "extension=mcrypt.so" to php.ini
16.安装composer
sudo apt install composer
composer install
#####安装升级composer
https://www.jianshu.com/p/6a32080fadee
###ubuntu走的是fpm下
####php -S 走的是cli
走的是cli/php.ini文件
php -ini
17.Xshell ssh登录虚拟机
https://www.jianshu.com/p/d59ed9f226d1
18.ubuntu安装不同版本的php,以及切换php版本
https://www.uppdd.com/info?id=168