编译安装MariaDB-10.0.21
一、源码编译安装gcc-5.1.0
1、下载gcc源码包
Download (HTTP): http://ftpmirror.gnu.org/gcc/gcc-5.2.0/gcc-5.2.0.tar.bz2
Download (FTP): ftp://ftp.gnu.org/gnu/gcc/gcc-5.2.0/gcc-5.2.0.tar.bz2
2、解压压缩包
|
1
|
[root@example.com ~]# tar -xf gcc-5.1.0.tar.gz |
3、下载编译所需的依赖包
这个步骤有两种方式完成:
a) 如果Linux有网络连接,直接这样:
|
1
2
|
[root@example.com ~]# cd gcc-5.1.0[root@example.com gcc-5.1.0]# ./contrib/download_prerequisites |
b) 如果Linux没有网络连接(我主机和虚拟机是Host-only,不能联网,所以另外想办法),则用Windows上网下载这几个包:
ftp://ftp.gnu.org/gnu/gmp/gmp-4.3.2.tar.bz2
http://www.mpfr.org/mpfr-2.4.2/mpfr-2.4.2.tar.bz2
http://www.multiprecision.org/mpc/download/mpc-0.8.1.tar.gz
然后解压并移动到gcc-4.8.1下面:
tar -xjf gmp-4.3.2.tar.bz2
tar -xjf mpfr-2.4.2.tar.bz2
tar -xzf mpc-0.8.1.tar.gz
mv gmp-4.3.2 gcc-4.8.1/gmp
mv mpfr-2.4.2 gcc-4.8.1/mpfr
mv mpc-0.8.1 gcc-4.8.1/mpc
这样的做法好处是,不用单独编译gmp、mpfr和mpc三个包,放在gcc源码下面一起编译(事实上这也是gcc-4.8.1/contrib/download_prerequisites脚本的做法,个人感觉更简洁些)。我在编译是选择了第一种方法,第二种方法到底咋样本人没有实验过。
4、编译安装gcc
|
1
2
3
4
|
[root@example.com gcc-5.1.0]# yum install -y gcc-c++ glibc-static gcc //为避免出错建议安装此包[root@example.com gcc-5.1.0]# ./configure --prefix=/usr/local/gcc --enable-bootstrap --enable-checking=release --enable-languages=c,c++ --disable-multilib[root@example.com gcc-5.1.0]# make[root@example.com gcc-5.1.0]# make install |
编译参数说明:
--prefix=/usr/local/ 指定安装路径
--enable-bootstrap 这里引用网上一些文献对该参数的解释:用第一次编译生成的程序进行第二次编译,然后用再次生成的程序进行第三次编译,并且检查比较第二次和第三次结果的正确性,也就是进行冗余的编译检查工作。 非交叉编译环境下,默认已经将该值设为 enable,可以不用显示指定;交叉编译环境下,需要显示将其值设为 disable。
--enable-checking=release 以软件发布版的标准来对编译时生成的代码进行一致性检查;设置该选项为 enable并不会改变编译器生成的二进制结果,但是会导致编译的时间增加;该选项仅支持gcc编译器; 总体而言,对于上面这个选项,机器的硬件配置较低,以及不愿等待太久编译时间的童鞋,可以设置为 disable;但是这会增加产生未预期的错误的风险,所以应该慎用。 可以同时设置 --disable-bootstrap 与 --disable-checking,这对编译过程的提速很有帮助。
--enable-threads=posix 顾名思义,启用posix标准的线程支持 ,要让程序能在符合POSIX规范的linux发布版上正确运行,就应该启用该选项,取决于宿主或目标操作系统的类型,其它可用值有:aix,dec,solaris,win32等,如果你是其它的类UNIX系统,就需要设置相应的值。
--enable-languages=c,c++ 支持的高级语言类型和运行时库,可以设置的所有语言包括 ada,c,c++,Fortran,java,objc,obj-c++,GO 等语言。这里只开启了c和c++,因为支持的语言越多,就需要安装越多的相应静态与动态库,还有五花八门的依赖库,这会让管理变得困难,体积也会变得庞大。
--disable-multilib 如果你的操作系统是32位,默认就已经设置为 disable,这意味着gcc仅能生成32位的可执行程序;如果你的操作系统是64位,默认就已经设置为 enable,这意味着用gcc编译其它源文件时可以通过 -m32 选项来决定是否生成32位机器代码。如果在64位系统上,要禁止生成32位代码, 设置 --disable-multilib。
--enable-gather-detailed-mem-stats 允许收集详细的内存使用信息,如果设置该参数为 enable,则将来编译好的gcc可执行程序,可以通过 -fmem-report 选项来输出编译其它程序时的实时内存使用情况。
--with-long-double-128 指定 long double 类型为128位(16字节!);设置为 without,则 long double类型将为64位(8字节),这将与普通的 double 类型一样。 基于 Glib 2.4以上版本编译时,默认已经是128位。
5、后续操作
导出环境变量:
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
[root@example.com ~]# gcc --versiongcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)Copyright 2010 Free Software Foundation, Inc.本程序是自由软件;请参看源代码的版权声明。本软件没有任何担保;包括没有适销性和某一专用目的下的适用性担保。[root@example.com ~]# vim /etc/profile.d/gcc.shexport PATH=/usr/local/gcc/bin:$PATH[root@example.com ~]# source /etc/profile.d/gcc.sh[root@example.com ~]# gcc --versiongcc (GCC) 5.1.0Copyright (C) 2015 Free Software Foundation, Inc.This is free software; see the source for copying conditions. There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
导出头文件:
|
1
2
|
[root@example.com ~]# ln -sv /usr/local/gcc/include/ /usr/include/gcc"/usr/include/gcc" -> "/usr/local/gcc/include/" |
导出库文件:
|
1
2
3
4
|
[root@example.com ~]# vim /etc/ld.so.conf.d/gcc.conf/usr/local/gcc/lib64[root@example.com ~]# ldconfig -v[root@example.com ~]# ldconfig -p |grep gcc //验证是否导出 |
二、源码编译MariaDB
为啥开头要安装gcc-5.1,就是因为我在第一次编译mariadb时,到make的时候报错,在网上找到的这么一句哈:
http://www.linuxfromscratch.org/blfs/view/svn/server/mariadb.html
MariaDB is a community-developed fork and a drop-in replacement for the MySQL relational database management system.
This package is known to build and work properly using an LFS-7.7 platform.
This package is known to build and work properly using the gcc-5 compiler.
MariaDB是一个由社区开发的叉和MySQL的替代关系数据库管理系统。
这个包是构建和使用lfs - 7.7平台正常工作。
这个包是构建和使用gcc-5编译器正常工作。
1、创建数据存放目录
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
[root@example.com mysql]# yum install -y lvm2[root@example.com ~]# fdisk /dev/sdbnp1 +10Gt8ew[root@example.com ~]# pvcreate /dev/sdb1 Physical volume "/dev/sdb1" successfully created[root@example.com ~]# vgcreate data /dev/sdb1 Volume group "data" successfully created[root@example.com ~]# lvcreate -L 2G -n mydata data Logical volume "mydata" created.[root@example.com ~]# mke2fs -t ext4 -L MYDATA -b 4096 -m 3 /dev/data/mydata [root@example.com ~]# vim /etc/fstab LABEL=MYDATA /data/mydata ext4 defaults,noatime 0 0[root@example.com ~]# mount -a[root@example.com ~]# chown -R mysql.mysql /data/mydata/ |
2、创建mysql用户
|
1
2
3
4
5
|
[root@example.com ~]# groupadd mysql [root@example.com ~]# useradd -s /sbin/nologin -g mysql -M mysql[root@example.com ~]# id mysqluid=1001(mysql) gid=1001(mysql) 组=1001(mysql)[root@example.com ~]# mkdir -pv /data/mydata |
3、安装mariadb
|
1
2
3
4
5
6
|
[root@example.com ~]# tar -xf mariadb-10.0.21.tar.gz [root@example.com ~]# yum install -y ncurses-devel openssl-devel openssl gcc-c++ cmake[root@example.com ~]# cd mariadb-10.0.21[root@example.com mariadb-10.0.21]# cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/data/mydata -DSYSCONFDIR=/etc -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_READLINE=1 -DWITH_SSL=system -DWITH_ZLIB=system -DWITH_LIBWRAP=0 -DMYSQL_UNIX_ADDR=/tmp/mysql.sock -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci[root@example.com mariadb-10.0.21]#make[root@example.com mariadb-10.0.21]#make install |
4、参数说明
# 安装根目录
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql
# 数据存储目录
-DMYSQL_DATADIR=/data/mydata
# UNIX socket文件
-DMYSQL_UNIX_ADDR=/tmp/mysql.sock
# 配置文件(my.cnf)目录
-DSYSCONFDIR=/etc
# 默认字符集
-DDEFAULT_CHARSET=utf8
# 默认字符校对
-DDEFAULT_COLLATION=utf8_general_ci
# TCP/IP端口
-DMYSQL_TCP_PORT=3306
# * ARCHIVE 引擎支持
-DWITH_ARCHIVE_STORAGE_ENGINE=1
# * ARIA 引擎支持
-DWITH_ARIA_STORAGE_ENGINE=1
# * BLACKHOLE 引擎支持
-DWITH_BLACKHOLE_STORAGE_ENGINE=1
# * FEDERATEDX 引擎支持
-DWITH_FEDERATEDX_STORAGE_ENGINE=1
# * PARTITION 引擎支持
-DWITH_PARTITION_STORAGE_ENGINE=1
# * PERFSCHEMA 引擎支持
-DWITH_PERFSCHEMA_STORAGE_ENGINE=1
# * SPHINX 引擎支持
-DWITH_SPHINX_STORAGE_ENGINE=1
# * XTRADB 支持
-DWITH_XTRADB_STORAGE_ENGINE=1
# * innoDB 引擎支持
-DWITH_INNOBASE_STORAGE_ENGINE=1
# * Myisam 引擎支持
-DWITH_MYISAM_STORAGE_ENGINE=1
# readline库
-DWITH_READLINE=1
# 启用加载本地数据
-DENABLED_LOCAL_INFILE=1
# 扩展支持编码 ( all | utf8,gbk,gb2312 | none )
-DWITH_EXTRA_CHARSETS=all
# 扩展字符支持
-DEXTRA_CHARSETS=all
# 系统传输使用SSL加密
-DWITH_SSL=system
# 系统传输使用zlib压缩,节约带宽
-DWITH_ZLIB=system
# libwrap库
-DWITH_LIBWRAP=0
# 运行用户
-DMYSQL_USER=mysql
# 调试模式
-DWITH_DEBUG=0
5、编译引擎选项说明
默认编译的存储引擎包括:csv、myisam、myisammrg和heap。若要安装其它存储引擎,可以使用类似如下编译选项:
-DWITH_INNOBASE_STORAGE_ENGINE=1
-DWITH_ARCHIVE_STORAGE_ENGINE=1
-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-DWITH_FEDERATED_STORAGE_ENGINE=1
若要明确指定不编译某存储引擎,可以使用类似如下的选项:
-DWITHOUT_<ENGINE>_STORAGE_ENGINE=1
比如:
-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1
-DWITHOUT_FEDERATED_STORAGE_ENGINE=1
-DWITHOUT_PARTITION_STORAGE_ENGINE=1
6、编译时错误解决方法
重新编译时,需要清除旧的对象文件和缓存信息。
#make clean
#rm -f CMakeCache.txt
#rm -rf /etc/my.cnf
错误:Curses library not found. Please install appropriate package,
解决方案:
先安装 ncurses-devel 包
yum install ncurses-devel
再删除刚才编译生成的 CMakeCache.txt 文件
rm CMakeCache.txt
再次执行一次cmake ...
一般都可以顺利安装的。
7、配置MariaDB
初始化数据库:
|
1
2
3
4
5
|
[root@example.com mariadb-10.0.21]# cd /usr/local/mysql/[root@example.com mysql]# scripts/mysql_install_db --user=mysql --datadir=/data/mydata/[root@example.com mysql]# ls /data/mydata/aria_log.00000001 ibdata1 ib_logfile1 mysql testaria_log_control ib_logfile0 lost+found performance_schema |
设置配置文件:
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
[root@example.com mysql]# vim /etc/my.cnf[mysqld]port = 3306socket = /tmp/mysql.sockskip-external-lockingkey_buffer_size = 256Mmax_allowed_packet = 1Mtable_open_cache = 256sort_buffer_size = 1Mread_buffer_size = 1Mread_rnd_buffer_size = 4Mmyisam_sort_buffer_size = 64Mthread_cache_size = 8query_cache_size= 16M# Try number of CPU's*2 for thread_concurrencythread_concurrency = 4datadir=/data/mydata //需要添加此项 |
设置启动脚本:
|
1
2
3
4
|
[root@example.com mysql]# cp support-files/mysql.server /etc/init.d/mysqld[root@example.com mysql]# chkconfig --add mysqld[root@example.com mysql]# chkconfig --list mysqldmysqld 0:关闭1:关闭2:启用3:启用4:启用5:启用6:关闭 |
启动服务:
|
1
2
3
4
|
[root@example.com mysql]# service mysqld startStarting MySQL. SUCCESS! [root@example.com mysql]# ss -tunl |grep 3306tcp LISTEN 0 128 :::3306 :::* |
导出环境变量:
|
1
2
3
|
[root@example.com mysql]# vim /etc/profile.d/mysql.shexport PATH=/usr/local/mysql/bin:$PATH[root@example.com mysql]# source /etc/profile.d/mysql.sh |
导出头文件:
|
1
2
|
[root@example.com mysql]# ln -sv /usr/local/mysql/include/ /usr/local/include/mysql"/usr/local/include/mysql" -> "/usr/local/mysql/include/" |
导出库文件:
|
1
2
3
4
5
6
7
8
|
[root@example.com mysql]# vim /etc/ld.so.conf.d/mysql.conf/usr/local/mysql/lib[root@example.com mysql]# ldconfig -v[root@example.com mysql]# ldconfig -p |grep mysqllibmysqlclient_r.so.16 (libc6,x86-64) => /usr/lib64/mysql/libmysqlclient_r.so.16libmysqlclient.so.18 (libc6,x86-64) => /usr/local/mysql/lib/libmysqlclient.so.18libmysqlclient.so.16 (libc6,x86-64) => /usr/lib64/mysql/libmysqlclient.so.16libmysqlclient.so (libc6,x86-64) => /usr/local/mysql/lib/libmysqlclient.so |
设置数据库用户密码:
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
[root@example.com mysql]# mysqlWelcome to the MariaDB monitor. Commands end with ; or \g.Your MariaDB connection id is 4Server version: 10.0.21-MariaDB-log Source distributionCopyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.MariaDB [(none)]> GRANT ALL PRIVILEGES on *.* to root@'localhost' IDENTIFIED BY 'redhat';Query OK, 0 rows affected (0.00 sec)MariaDB [(none)]> GRANT ALL PRIVILEGES on *.* to root@'127.0.0.1' IDENTIFIED BY 'redhat';Query OK, 0 rows affected (0.00 sec)MariaDB [(none)]> use mysqlDatabase changedMariaDB [mysql]> SET PASSWORD FOR root@'example.com' =PASSWORD('redhat');Query OK, 0 rows affected (0.00 sec)MariaDB [mysql]> SELECT Host,User,Password FROM user ;+-------------+------+-------------------------------------------+| Host | User | Password |+-------------+------+-------------------------------------------+| localhost | root | *84BB5DF4823DA319BBF86C99624479A198E6EEE9 || example.com | root | *84BB5DF4823DA319BBF86C99624479A198E6EEE9 || 127.0.0.1 | root | *84BB5DF4823DA319BBF86C99624479A198E6EEE9 || ::1 | root | || localhost | | || example.com | | |+-------------+------+-------------------------------------------+6 rows in set (0.00 sec) |
使用mysql_secure_installation这个脚本来进行安全配置:
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
[root@example.com bin]# mysql_secure_installation/usr/local/mysql/bin/mysql_secure_installation: line 379: find_mysql_client: command not foundNOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!In order to log into MariaDB to secure it, we'll need the currentpassword for the root user. If you've just installed MariaDB, andyou haven't set the root password yet, the password will be blank,so you should just press enter here.Enter current password for root (enter for none):OK, successfully used password, moving on...Setting the root password ensures that nobody can log into the MariaDBroot user without the proper authorisation.You already have a root password set, so you can safely answer 'n'.#改变root用户的密码;Change the root password? [Y/n] YNew password:Re-enter new password:Password updated successfully!Reloading privilege tables.. ... Success!By default, a MariaDB installation has an anonymous user, allowing anyoneto log into MariaDB without having to have a user account created forthem. This is intended only for testing, and to make the installationgo a bit smoother. You should remove them before moving into aproduction environment.#移除匿名用户;Remove anonymous users? [Y/n] Y ... Success!Normally, root should only be allowed to connect from 'localhost'. Thisensures that someone cannot guess at the root password from the network.#禁止root用户远程登录;Disallow root login remotely? [Y/n] Y ... Success!By default, MariaDB comes with a database named 'test' that anyone canaccess. This is also intended only for testing, and should be removedbefore moving into a production environment.#不移除test数据库;Remove test database and access to it? [Y/n] n ... skipping.Reloading the privilege tables will ensure that all changes made so farwill take effect immediately.#重载授权表生效;Reload privilege tables now? [Y/n] Y ... Success!Cleaning up...All done! If you've completed all of the above steps, your MariaDBinstallation should now be secure.Thanks for using MariaDB! |
现mysql不输入用户名密码直接登录数据库
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
[root@example.com ~]# vim .my.cnf[mysql]user = rootpassword = redhathost = localhost[root@example.com ~]# mysqlWelcome to the MariaDB monitor. Commands end with ; or \g.Your MariaDB connection id is 14Server version: 10.0.21-MariaDB-log Source distributionCopyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.MariaDB [(none)]> |
8、小技巧
由于make时间较久,一般可以使用-j 选项在加CPU核心说就能加速,下面就是自动查看当前系统CPU核心并根据核心数进行编译。
[ "`cat /proc/cpuinfo |grep 'processor'|wc -l`" = "1" ] && make
[ "`cat /proc/cpuinfo |grep 'processor'|wc -l`" != "1" ] && make -j`cat /proc/cpuinfo |grep 'processor'|wc -l`
本文出自http://cuchadanfan.blog.51cto.com/9940284/1689556
编译安装MariaDB-10.0.21的更多相关文章
- CentOS7 编译安装 nginx-1.10.0
对于NGINX 支持epoll模型 epoll模型的优点 定义: epoll是Linux内核为处理大批句柄而作改进的poll,是Linux下多路复用IO接口select/poll的增强版本,它能显著的 ...
- linux下编译安装MariaDB 10.4.7,解决错误:cannot access ‘/auth_pam_tool_dir’: No such file or directory
编译安装MariaDB 10.4.7,前面的步骤我就不复述了,一切正常没什么问题. 当执行到:scripts/mysql_install_db --basedir=/usr/local/mysql - ...
- Windows XP SP3下编译安装check-0.10.0
软件环境:visual studio 2010 cmake-3.6.3-win32-x86 从github.com下载check-0.10.0到本地,解压出目录check-0.10.0 下载cmake ...
- centos6.5环境使用RPM包离线安装MariaDB 10.0.20
1. 进入MariaDB官网下载MariaDB需要的RPM包 2. 使用下载软件下载所需要的RPM包, 总共4个, 并上传到CentOS主机指定目录. MariaDB-10.0.20-centos6- ...
- Linux 源码安装MariaDB 10.0.16
cmake软件 tar -zxvf cmake-2.8.8.tar.gz cd cmake-2.8.8 ./bootstrap make && make install 依 ...
- CentOS 7.2.1511编译安装Nginx1.10.1+MySQL5.7.14+PHP7.0.11
准备篇 一.防火墙配置 CentOS 7.x默认使用的是firewall作为防火墙,这里改为iptables防火墙. 1.关闭firewall: systemctl stop firewalld.se ...
- CentOS 7.x编译安装Nginx1.10.3+MySQL5.7.16+PHP5.2 5.3 5.4 5.5 5.6 7.0 7.1多版本全能环境
准备篇 一.防火墙配置 CentOS 7.x默认使用的是firewall作为防火墙,这里改为iptables防火墙. 1.关闭firewall: systemctl stop firewalld.se ...
- PHP7 学习笔记(一)Ubuntu 16.04 编译安装Nginx-1.10.3、 PHP7.0.9、Redis3.0 扩展、Phalcon3.1 扩展、Swoole1.9.8 扩展、ssh2扩展(全程编译安装)
==================== PHP 7.0 编译安装================== wget http://cn2.php.net/get/php-7.0.9.tar.bz2/fr ...
- CentOS 6.2编译安装Nginx1.2.0+MySQL5.5.25+PHP5.3.13
CentOS 6.2编译安装Nginx1.2.0+MySQL5.5.25+PHP5.3.132013-10-24 15:31:12标签:服务器 防火墙 file 配置文件 written 一.配置好I ...
- [笔记] Ubuntu 18.04源码编译安装OpenCV 4.0流程
标准常规安装方法安装的OpenCV版本比较低,想尝鲜使用4.0版本,只好源码安装. 安装环境 OS:Ubuntu 18.04 64 bit 显卡:NVidia GTX 1080 CUDA:10.0 c ...
随机推荐
- 第二百六十节,Tornado框架-内置模板方法
Tornado框架-内置模板方法 直接在html文件使用,不需要传值 Tornado默认提供的这些功能其实本质上就是 UIMethod 和 UIModule,也就是Tornado框架定义好的html文 ...
- 第二百四十七节,Bootstrap按钮和折叠插件
Bootstrap按钮和折叠插件 学习要点: 1.按钮 2.折叠 本节课我们主要学习一下 Bootstrap 中的按钮和折叠插件. 一.按钮 可以通过按钮插件创建不同状态的按钮,也就是点击后为选中状态 ...
- ThinkPHP项目笔记之数据库配置篇
对于配置文件,有几点说明 common:公共配置,也就是前台,后台,都可以调用的文件,具有普遍性 前台/后台:就是针对前后台的配置文件,具有针对性. 如:(公共文件基本配置) <?php ret ...
- gradlew assembleRelease打包之前的配置
http://blog.csdn.net/qq_15527709/article/details/70146061
- Raw-OS源代码分析之idle任务
分析的内核版本号截止到2014-04-15,基于1.05正式版,blogs会及时跟进最新版本号的内核开发进度,若源代码凝视出现"???"字样.则是未深究理解部分. Raw-OS官方 ...
- 【C++缺省函数】 空类默认产生的6个类成员函数
1.缺省构造函数. 2.缺省拷贝构造函数. 3. 缺省析构函数. 4.缺省赋值运算符. 5.缺省取址运算符. 6. 缺省取址运算符 const. <span style="font-s ...
- 用Broadcast Receiver刷新数据
①注册广播事件: 注册方式有两种, 一种是静态注册,就是在AndroidManifest.xml文件中定义,注册的广播接收器必须要继承BroadcastReceiver: 另一种是动态注册,是在程序中 ...
- webpack 报错 path is not defind
webpack.config.js里的内容是这样的,注意标红的地方: 首先,绝对路径'./dist'是 没有问题的 那么,查了很多,最后看到别人的webpack.config.js里面这样写着,现在c ...
- sort命令与cat区别
25.1 由于sort默认是把结果按照行排序后输出到标准输出,所以需要用重定向才能将结果写入文件,形如sort filename > newfile[root@shiyan a]# cat a. ...
- Assembly中Load, LoadFrom, LoadFile以及AppDomain, Activator类中相应函数的区别
Assembly和AppDomain的一些关于动态加载程序集的函数有些令人头疼,但细细研究后还是可以将他们区分的. 这些函数大致可以分为四类: 第一类:加载到Load Context内 Load Co ...