Ubuntu1804环境配置
昨天Ubuntu18.04出来了,
iso 下载地址
https://www.ubuntu.com/download
这个是在虚拟机里面玩的 最新
vmware cdkey
14.1.1 cdkey
CG54H-D8D0H-H8DHY-C6X7X-N2KG6 ZC3WK-AFXEK-488JP-A7MQX-XL8YF AC5XK-0ZD4H-088HP-9NQZV-ZG2R4 ZC5XK-A6E0M-080XQ-04ZZG-YF08D ZY5H0-D3Y8K-M89EZ-AYPEG-MYUA8
换源
https://wiki.ubuntu.com.cn/%E6%A8%A1%E6%9D%BF:18.04source
http://wiki.ubuntu.com.cn
deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
挂载相应硬盘 (原来上一次装 1604 用的LVM的分区, 这里NAS重新安装的时候坑啊 要把原来的删除了分区 linux系统还是不熟练)
安装相应环境
配置git ssh
https://help.github.com/articles/generating-a-new-gpg-key/
ssh-keygen -t rsa -b 4096 -C “8390671@qq.com”
vim 环境 这边vim 配置见原来的文章就行
https://github.com/VundleVim/Vundle.vim
https://www.cnblogs.com/muahao/p/6821021.html
参考
apt-get install apache2
sudo apt-cache search php7.2
sudo apt-get install php7.2
sudo apt-get install php7.2-dev php7.2-cli
sudo apt-get install mysql-server (这个 mysql_secure_instation) 真尴尬,刷新 重启 不知道几次才会生效,回头再探讨
mysql change password
编辑mysql的配置文件/etc/mysql/mysql.conf.d/mysqld.cnf,在[mysqld]段下加入一行“skip-grant-tables”。
> use mysql; > update user set authentication_string=PASSWORD("这里输入你要改的密码") where User='root'; #更改密码 > update user set plugin="mysql_native_password"; #如果没这一行可能也会报一个错误,因此需要运行这一行 > flush privileges; #更新所有操作权限 > quit;
VIM 环境
安装bundle 安装 nerdtree
vundle git: https://github.com/VundleVim/Vundle.vim.git
nerdtree git : https://github.com/scrooloose/nerdtree.git
https://www.cnblogs.com/muahao/p/6821021.html
防火墙开启、关闭
sudo ufw disable sudo ufw enable
增加域名vhost配置
首先在cd
到/etc/apache2/sites-available/
目录下创建demo.localhost.conf
,内容为:
<VirtualHost *:80> ServerName www.laravel52.com DocumentRoot "E:/www/laravel52/public" <Directory "E:/www/laravel52/public"> Options FollowSymLinks IncludesNOEXEC Indexes DirectoryIndex index.html index.htm index.php AllowOverride all Order Deny,Allow Allow from all Require all granted </Directory> </VirtualHost>
sudo a2ensite discuz.localhost.conf
service apache2 restart
配置静态IP地址
18.04的ip设置跟以前的ubuntu不同
$ ls /etc/netplan/ 50-cloud-init.yaml
配置对应的信息
[pooky@NAS ~]$ cat /etc/netplan/50-cloud-init.yaml # This file is generated from information provided by # the datasource. Changes to it will not persist across an instance. # To disable cloud-init's network configuration capabilities, write a file # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following: # network: {config: disabled} network: ethernets: enp2s0: addresses: [192.168.50.238/24] gateway4: 192.168.50.1 nameservers: addresses: [8.8.8.8, 114.114.114.114] dhcp4: true optional: true version: 2 [pooky@NAS ~]$
1
以前的版本 需要配置 address 和 netmask
这样
address = 192.168.225.50 netmask = 255.255.255.0
新的版本
addresses : [192.168.225.50/24]
然后设置开启
$ sudo netplan apply
或者
$ sudo netplan --debug apply
这里备注一下
概要的就mark这里,以后整理一些脚本要紧!