二進位安裝MySQL資料庫

来源:https://www.cnblogs.com/www233ii/archive/2019/11/19/11892012.html
-Advertisement-
Play Games

二進位安裝MySQL資料庫 [toc] 實驗準備: 1. 一個乾凈的centos7系統(確認是沒有安裝過資料庫的系統) 2. 關閉防火牆和selinux 3. 創建一個邏輯捲分區(因為資料庫存放數據一般都是在上漲的普通的分區到達分區容量極限時沒辦法在擴充分區所以使用邏輯捲分區比較好) 4. 從官方平 ...


目錄

二進位安裝MySQL資料庫

實驗準備:

  1. 一個乾凈的centos7系統(確認是沒有安裝過資料庫的系統)
  2. 關閉防火牆和selinux
  3. 創建一個邏輯捲分區(因為資料庫存放數據一般都是在上漲的普通的分區到達分區容量極限時沒辦法在擴充分區所以使用邏輯捲分區比較好)
  4. 從官方平臺下載一個編譯過的一個二進位程式包(官方包下載地址:https://dev.mysql.com/downloads/mysql/)

準備階段:

  1. 創建邏輯捲分區:
[root@centos7 ~]# df
Filesystem     1K-blocks     Used Available Use% Mounted on
/dev/sda2      104806400  4233244 100573156   5% /
devtmpfs          998216        0    998216   0% /dev
tmpfs            1014056        0   1014056   0% /dev/shm
tmpfs            1014056    10452   1003604   2% /run
tmpfs            1014056        0   1014056   0% /sys/fs/cgroup
/dev/sr0        10491772 10491772         0 100% /misc/cd
/dev/sda1        1038336   167036    871300  17% /boot
/dev/sda3       52403200    32992  52370208   1% /data
tmpfs             202812        0    202812   0% /run/user/0
tmpfs             202812       12    202800   1% /run/user/42
[root@centos7 ~]# umount /data    (確定這個分區沒有需要的數據了取消掛載)
  • 改為邏輯捲標識
[root@centos7 ~]# fdisk /dev/sda  
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p

Disk /dev/sda: 214.7 GB, 214748364800 bytes, 419430400 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000a8280

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     2099199     1048576   83  Linux
/dev/sda2         2099200   211814399   104857600   83  Linux
/dev/sda3       211814400   316671999    52428800   83  Linux
/dev/sda4       316672000   419430399    51379200    5  Extended
/dev/sda5       316674048   325062655     4194304   82  Linux swap / Solaris

Command (m for help): t
Partition number (1-5, default 5): 3
Hex code (type L to list all codes): 8e
Changed type of partition 'Linux' to 'Linux LVM'

Command (m for help): p

Disk /dev/sda: 214.7 GB, 214748364800 bytes, 419430400 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000a8280

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     2099199     1048576   83  Linux
/dev/sda2         2099200   211814399   104857600   83  Linux
/dev/sda3       211814400   316671999    52428800   8e  Linux LVM
/dev/sda4       316672000   419430399    51379200    5  Extended
/dev/sda5       316674048   325062655     4194304   82  Linux swap / Solaris

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
  • 使用partprobe同步一下分區
[root@centos7 ~]# lsblk 
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0  200G  0 disk 
├─sda1   8:1    0    1G  0 part /boot
├─sda2   8:2    0  100G  0 part /
├─sda3   8:3    0   50G  0 part 
├─sda4   8:4    0    1K  0 part 
└─sda5   8:5    0    4G  0 part [SWAP]
sr0     11:0    1   10G  0 rom  /misc/cd
[root@centos7 ~]# partprobe    
Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0 has been opened read-only.
  • 更改為物理捲
[root@centos7 ~]# pvcreate /dev/sda3
WARNING: xfs signature detected on /dev/sda3 at offset 0. Wipe it? [y/n]: y
  Wiping xfs signature on /dev/sda3.
  Physical volume "/dev/sda3" successfully created.
[root@centos7 ~]# pvs
  PV         VG Fmt  Attr PSize  PFree 
  /dev/sda3     lvm2 ---  50.00g 50.00g
  • 把物理捲加為捲組並起個名字
[root@centos7 ~]# vgcreate vg_data /dev/sda3
  Volume group "vg_data" successfully created
[root@centos7 ~]# vgs
  VG      #PV #LV #SN Attr   VSize   VFree  
  vg_data   1   0   0 wz--n- <50.00g <50.00g
  • 創建邏輯捲為MySQL並設定為40G空間(空行之後的都是示例防止你們設錯空間忘了怎麼刪!)
[root@centos7 ~]# lvcreate -n mysql -L 40G  vg_data
  Logical volume "mysql" created.
[root@centos7 ~]# lvs
  LV    VG      Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  mysql vg_data -wi-a----- 40.00g                                                    

[root@centos7 ~]# lvremove /dev/vg_data/mysql 
Do you really want to remove active logical volume vg_data/mysql? [y/n]: y
  Logical volume "mysql" successfully removed
[root@centos7 ~]# lvcreate -n mysql -l 100%free  vg_data  (這裡是把所有的剩餘空間都設為邏輯捲)
  Logical volume "mysql" created.
[root@centos7 ~]# lvs
  LV    VG      Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  mysql vg_data -wi-a----- <50.00g  
  • 格式化分區並創建文件系統
[root@centos7 ~]# mkfs.xfs /dev/vg_data/mysql
meta-data=/dev/vg_data/mysql     isize=512    agcount=4, agsize=3276544 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=0, sparse=0
data     =                       bsize=4096   blocks=13106176, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal log           bsize=4096   blocks=6399, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
  • 掛載分區並永久保存(更改/data那一行)
[root@centos7 ~]# lsblk -f   (註意使用邏輯捲對應的UUID)
NAME              FSTYPE      LABEL           UUID                                   MOUNTPOINT
sda                                                                                  
├─sda1            xfs                         0f7c8887-58c8-4c16-98d4-32cf5635006a   /boot
├─sda2            xfs                         71131d8c-e6d0-4104-b270-dcb8d5ae959a   /
├─sda3            LVM2_member                 IRcHvr-fkfh-eutS-0de9-RGsJ-4pi3-mGKmJd 
│ └─vg_data-mysql xfs                         7d3d4b4d-66c1-43d7-8d33-9de94d6b812d   /mnt
├─sda4                                                                               
└─sda5            swap                        045c4250-e51f-4af0-a2f5-6c248700e1fb   [SWAP]
sr0               iso9660     CentOS 7 x86_64 2018-11-26-14-22-58-00                 /misc/cd
[root@centos7 ~]# vim /etc/fstab
UUID=7d3d4b4d-66c1-43d7-8d33-9de94d6b812d /data                   xfs     defaults        0 0
[root@centos7 ~]# mount -a  (重新讀取配置文件進行掛載)
[root@centos7 ~]# lsblk 
NAME              MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda                 8:0    0  200G  0 disk 
├─sda1              8:1    0    1G  0 part /boot
├─sda2              8:2    0  100G  0 part /
├─sda3              8:3    0   50G  0 part 
│ └─vg_data-mysql 253:0    0   50G  0 lvm  /data
├─sda4              8:4    0    1K  0 part 
└─sda5              8:5    0    4G  0 part [SWAP]
sr0                11:0    1   10G  0 rom  /misc/cd
  1. 準備二進位程式包(我是從伺服器傳下來的沒有的可以去官網下載,放在哪個目錄都可以。)
[root@centos7 ~]# rz -E
rz waiting to receive.
[root@centos7 ~]# ls
anaconda-ks.cfg  Downloads                                    Music     Templates
Desktop          initial-setup-ks.cfg                         Pictures  Videos
Documents        mariadb-10.2.29-linux-systemd-x86_64.tar.gz  Public

實驗階段:

  • 確認系統上沒有資料庫文件
[root@centos7 ~]# rpm -qa mariadb*
  • 創建文件夾和創建用戶並讓他有讀、執行許可權。
[root@centos7 ~]# mkdir /data/mysql
[root@centos7 ~]# useradd -r -s /sbin/nologin -d /data/mysql mysql
[root@centos7 ~]# ll /data
total 0
drwxr-xr-x 2 root root 6 Nov 19 16:12 mysql
  • 程式包解壓到/usr/local/目錄下
[root@centos7 ~]# tar xvf mariadb-10.2.29-linux-systemd-x86_64.tar.gz -C /usr/local/
  • 更改用戶和所屬組(先把MariaDB目錄做成軟連接)
[root@centos7 ~]# ll /usr/local/
total 0
drwxr-xr-x.  2 root root   6 Apr 11  2018 bin
drwxr-xr-x.  2 root root   6 Apr 11  2018 etc
drwxr-xr-x.  2 root root   6 Apr 11  2018 games
drwxr-xr-x.  2 root root   6 Apr 11  2018 include
drwxr-xr-x.  2 root root   6 Apr 11  2018 lib
drwxr-xr-x.  2 root root   6 Apr 11  2018 lib64
drwxr-xr-x.  2 root root   6 Apr 11  2018 libexec
drwxrwxr-x  13 yang yang 294 Nov  8 01:21 mariadb-10.2.29-linux-systemd-x86_64
drwxr-xr-x.  2 root root   6 Apr 11  2018 sbin
drwxr-xr-x.  5 root root  49 Sep  5 16:17 share
drwxr-xr-x.  2 root root   6 Apr 11  2018 src
[root@centos7 local]# ln -s mariadb-10.2.29-linux-systemd-x86_64/ mysql
[root@centos7 local]# chown -R root.root mysql/
[root@centos7 local]# ll 
total 0
drwxr-xr-x.  2 root root   6 Apr 11  2018 bin
drwxr-xr-x.  2 root root   6 Apr 11  2018 etc
drwxr-xr-x.  2 root root   6 Apr 11  2018 games
drwxr-xr-x.  2 root root   6 Apr 11  2018 include
drwxr-xr-x.  2 root root   6 Apr 11  2018 lib
drwxr-xr-x.  2 root root   6 Apr 11  2018 lib64
drwxr-xr-x.  2 root root   6 Apr 11  2018 libexec
drwxrwxr-x  13 root root 294 Nov  8 01:21 mariadb-10.2.29-linux-systemd-x86_64
lrwxrwxrwx   1 root root  37 Nov 19 16:22 mysql -> mariadb-10.2.29-linux-systemd-x86_64/
drwxr-xr-x.  2 root root   6 Apr 11  2018 sbin
drwxr-xr-x.  5 root root  49 Sep  5 16:17 share
drwxr-xr-x.  2 root root   6 Apr 11  2018 src
  • 查看二進位文件並把二進位文件目錄加到PATH變數里以後使用方便不用寫絕對路徑
[root@centos7 local]# ls mysql/bin/
aria_chk                 mysqladmin                  mysqlshow
aria_dump_log            mysqlbinlog                 mysqlslap
aria_ftdump              mysqlcheck                  mysqltest
aria_pack                mysql_client_test           mysqltest_embedded
aria_read_log            mysql_client_test_embedded  mysql_tzinfo_to_sql
galera_new_cluster       mysql_config                mysql_upgrade
galera_recovery          mysql_convert_table_format  mysql_waitpid
garbd                    mysqld                      mytop
innochecksum             mysqld_multi                perror
mariabackup              mysqld_safe                 replace
mariadb_config           mysqld_safe_helper          resolveip
mariadb-service-convert  mysqldump                   resolve_stack_dump
mbstream                 mysqldumpslow               sst_dump
msql2mysql               mysql_embedded              tokuftdump
myisamchk                mysql_find_rows             tokuft_logprint
myisam_ftdump            mysql_fix_extensions        wsrep_sst_common
myisamlog                mysqlhotcopy                wsrep_sst_mariabackup
myisampack               mysqlimport                 wsrep_sst_mysqldump
my_print_defaults        mysql_ldb                   wsrep_sst_rsync
myrocks_hotbackup        mysql_plugin                wsrep_sst_rsync_wan
mysql                    mysql_secure_installation   wsrep_sst_xtrabackup
mysqlaccess              mysql_setpermission         wsrep_sst_xtrabackup-v2
[root@centos7 local]# echo 'PATh=/usr/local/mysql/bin:$PATH' > /etc/profile.d/mysql.sh
[root@centos7 local]# . /etc/profile.d/mysql.sh
[root@centos7 support-files]# echo $PATH   (使用這個命令檢查一下)
/usr/local/mysql/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
  • 準備配置文件(使用軟體包里自帶的配置文件稍加修改使用就可以了)
[root@centos7 local]# cd mysql/
[root@centos7 mysql]# ls
bin      data               include         man         README-wsrep  sql-bench
COPYING  docs               INSTALL-BINARY  mysql-test  scripts       support-files
CREDITS  EXCEPTIONS-CLIENT  lib             README.md   share         THIRDPARTY
[root@centos7 mysql]# ls support-files/  
binary-configure  my-innodb-heavy-4G.cnf  my-small.cnf         mysql.server  wsrep.cnf
magic             my-large.cnf            mysqld_multi.server  policy        wsrep_notify
my-huge.cnf       my-medium.cnf           mysql-log-rotate     systemd
[root@centos7 mysql]# less support-files/my-huge.cnf  (查看一下文件選擇一個合適的記憶體大小,這個是最大的 1G-2G) 
[root@centos7 mysql]# 
[root@centos7 mysql]# cp -b support-files/my-huge.cnf /etc/my.cnf
cp: overwrite ‘/etc/my.cnf’? y    (把這個文件拷貝到配置文件目錄下並備份原有文件)

修改配置文件
[root@centos7 mysql]# vim /etc/my.cnf

# The MySQL server
[mysqld]
datadir=/data/mysql   (加入這一行指定路徑就可以了)
  • 使用軟體包自帶腳本生成資料庫
[root@centos7 mysql]# cd scripts/
[root@centos7 scripts]# ls
mysql_install_db
[root@centos7 scripts]# pwd
/usr/local/mysql/scripts

這裡要註意一下要是你要寫相對路徑必須在scripts目錄下執行,要不就寫成絕對路徑。
[root@centos7 scripts]# /usr/local/mysql/scripts/mysql_install_db --datadir=/data/mysql --user=mysql
Installing MariaDB/MySQL system tables in '/data/mysql' ...
2019-11-19 16:41:29 140185403569984 [Warning] 'THREAD_CONCURRENCY' is deprecated and will be removed in a future release.
2019-11-19 16:41:29 140185402984192 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1146: Table 'mysql.gtid_slave_pos' doesn't exist
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system


PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
To do so, start the server, then issue the following commands:

'/usr/local/mysql/bin/mysqladmin' -u root password 'new-password'
'/usr/local/mysql/bin/mysqladmin' -u root -h centos7.localdomain password 'new-password'

Alternatively you can run:
'/usr/local/mysql/bin/mysql_secure_installation'

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the MariaDB Knowledgebase at http://mariadb.com/kb or the
MySQL manual for more instructions.

You can start the MariaDB daemon with:
cd '/usr/local/mysql' ; /usr/local/mysql/bin/mysqld_safe --datadir='/data/mysql'

You can test the MariaDB daemon with mysql-test-run.pl
cd '/usr/local/mysql/mysql-test' ; perl mysql-test-run.pl

Please report any problems at http://mariadb.org/jira

The latest information about MariaDB is available at http://mariadb.org/.
You can find additional information about the MySQL part at:
http://dev.mysql.com
Consider joining MariaDB's strong and vibrant community:
https://mariadb.org/get-involved/

[root@centos7 scripts]# ll /data/mysql/    (查看資料庫生成文件)
total 110660
-rw-rw---- 1 mysql mysql    16384 Nov 19 16:41 aria_log.00000001
-rw-rw---- 1 mysql mysql       52 Nov 19 16:41 aria_log_control
-rw-rw---- 1 mysql mysql      938 Nov 19 16:41 ib_buffer_pool
-rw-rw---- 1 mysql mysql 12582912 Nov 19 16:41 ibdata1
-rw-rw---- 1 mysql mysql 50331648 Nov 19 16:41 ib_logfile0
-rw-rw---- 1 mysql mysql 50331648 Nov 19 16:41 ib_logfile1
drwx------ 2 mysql mysql     4096 Nov 19 16:41 mysql
-rw-rw---- 1 mysql mysql    29310 Nov 19 16:41 mysql-bin.000001
-rw-rw---- 1 mysql mysql       19 Nov 19 16:41 mysql-bin.index
-rw-rw---- 1 mysql mysql        7 Nov 19 16:41 mysql-bin.state
drwx------ 2 mysql mysql       20 Nov 19 16:41 performance_schema
drwx------ 2 mysql mysql       20 Nov 19 16:41 test
  • 設置啟動相關文件
[root@centos7 support-files]# cp /usr/local/mysql/support-files/systemd/mariadb.service /usr/lib/systemd/system/
[root@centos7 support-files]# ll /usr/lib/systemd/system/ |grep mariadb
-rw-r--r--  1 root root 5231 Nov 19 16:45 mariadb.service


centos6 的話可以使用mysql.server
[root@centos7 support-files]# ls
binary-configure  my-innodb-heavy-4G.cnf  my-small.cnf         mysql.server  wsrep.cnf
magic             my-large.cnf            mysqld_multi.server  policy        wsrep_notify
my-huge.cnf       my-medium.cnf           mysql-log-rotate     systemd
[root@centos7 support-files]# cp mysql.server /etc/init.d/mysqld
[root@centos7 support-files]# chkconfig --list mysqld

Note: This output shows SysV services only and does not include native
      systemd services. SysV configuration data might be overridden by native
      systemd configuration.

      If you want to list systemd services use 'systemctl list-unit-files'.
      To see services enabled on particular target use
      'systemctl list-dependencies [target]'.

error reading information on service mysqld: No such file or direct
[root@centos7 support-files]# chkconfig --add mysqld  (把mysql註冊為服務之後可以使用server來管理)
[root@centos7 support-files]# chkconfig --list mysqld  (在使用chkconfig查看你服務)
  • 再查看一下文件確保設置的路徑正確,就可以啟動服務了。
[root@centos7 support-files]# vim /usr/lib/systemd/system/mariadb.service 
[root@centos7 support-files]# mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 9
Server version: 10.2.29-MariaDB-log MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> 
MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| test               |
+--------------------+
4 rows in set (0.00 sec)

MariaDB [(none)]> 
(已經可以正常使用了但是密碼沒有設置誰都可以登錄重新設置一下密碼)
  • 跑一遍安全加固腳本(這也是軟體包自帶的)
(安全加固腳本路徑)
[root@centos7 support-files]# which mysql_secure_installation 
/usr/local/mysql/bin/mysql_secure_installation
[root@centos7 support-files]# mysql_secure_installation 

NOTE: 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 current
password for the root user.  If you've just installed MariaDB, and
you 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 MariaDB
root user without the proper authorisation.

Set root password? [Y/n] y (是否要設置密碼輸y)
New password: 
Re-enter new password: (輸入兩遍密碼)
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y   (是否刪除預設用戶,輸入y)
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y   (不允許root遠程登錄,輸入y安全考慮)
 ... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y  (是否刪除測試資料庫test,生產中用不到刪掉y)
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y  (是否重新載入特權表,輸入y)
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

(直接使用mysql不可以登陸了)
[root@centos7 support-files]# mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
[root@centos7 support-files]# mysql -p123456  (-p輸入密碼登錄。註意:-p後不要加空格)
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 19
Server version: 10.2.29-MariaDB-log MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> exit
Bye
[root@centos7 support-files]# mysql -uroot -p123456  (上面登錄不寫用戶的話預設就為root登錄既管理員)註意:這裡的root不是操作系統的root他只是針對於MySQL資料庫的root用戶不要搞混了。
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 20
Server version: 10.2.29-MariaDB-log MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> exit
Bye

您的分享是我們最大的動力!

-Advertisement-
Play Games
更多相關文章
  • 反射有個典型的應用,就是菜單的動態載入,原理就是通過反射調用某個窗體(類)。下麵演示一下通過反射調用類及方法: 1、新建一個類,命名為:ReflectionHelper,代碼如下: #region 創建對象實例 /// <summary> /// 創建對象實例 /// </summary> /// ...
  • 目 錄 1. 概述... 1 2. 登陸信息... 2 3. 設備驅動... 3 4. 組態建模... 3 5. 手機APP. 5 6. 視頻演示... 6 1. 概述 此次我們團隊人員對iNeuOS進行了全面升級,主要升級內容包括: (1) 設備容器增加設備驅動,包括:西門子(S7-200smar ...
  • 1. WPF有,而UWP沒有的圖片平鋪功能 在WPF中只要將ImageSource的 屬性設置為 即可實現圖片的平鋪,具體可見WPF的這些文檔: "ImageBrush 類 (System.Windows.Media) _ Microsoft Docs" "TileBrush 類 (System.W ...
  • .NET Core前後端分離快速開發框架(Core.3.0+AntdVue) 目錄 "引言" "簡介" "環境搭建" "開發環境要求" "基礎資料庫構建" "資料庫設計規範" "運行" "使用教程" "全局配置" "快速開發" "管理員登錄" "系統用戶管理" "系統角色管理" "許可權管理" "介面 ...
  • 下麵是在使用fuse3 編譯bbfs 過程中一些參數,用於備忘: FUSE_CFLAGS="-I/usr/local/include/fuse3" FUSE_LIBS="-L/usr/local/lib/x86_64-linux-gnu -lfuse3 -lpthread -ldl" ./confi ...
  • 恩智浦實時控制嵌入式軟體庫(縮寫為RTCESL,以前為恩智浦嵌入式軟體庫FSLESL)是一組演算法,從基礎數學運算到高級數學變換以及高級觀測器,這些都可以方便地用在複雜的實時控制應用中以及我們的電機控制參考設計中。對於需要高強度數學計算和控制的應用(比如先進的高效電機控制和功率變換),這些演算法可以幫助 ...
  • 解決方法: 1、系統偏好設置==> 安全性與隱私 > 在下方允許就可以了。 2、一勞永逸 但是註意安全性 打開terminal 命令行工具輸入命令:sudo spctl --master-disable輸入密碼即可解決 ...
  • MySQL的多實例 [toc] 實驗準備: 準備階段: 1. 準備文件目錄 2. 更改所有者所屬組 實驗階段 1. 分別創建資料庫並確認資料庫文件都生成了,再查看所有者所屬組是否正確。 2. 準備配置文件 3. 設置服務啟動腳本(只有多實例安裝需要自己手寫腳本其他安裝都是自動生成的) 4. 試啟動3 ...
一周排行
    -Advertisement-
    Play Games
  • 移動開發(一):使用.NET MAUI開發第一個安卓APP 對於工作多年的C#程式員來說,近來想嘗試開發一款安卓APP,考慮了很久最終選擇使用.NET MAUI這個微軟官方的框架來嘗試體驗開發安卓APP,畢竟是使用Visual Studio開發工具,使用起來也比較的順手,結合微軟官方的教程進行了安卓 ...
  • 前言 QuestPDF 是一個開源 .NET 庫,用於生成 PDF 文檔。使用了C# Fluent API方式可簡化開發、減少錯誤並提高工作效率。利用它可以輕鬆生成 PDF 報告、發票、導出文件等。 項目介紹 QuestPDF 是一個革命性的開源 .NET 庫,它徹底改變了我們生成 PDF 文檔的方 ...
  • 項目地址 項目後端地址: https://github.com/ZyPLJ/ZYTteeHole 項目前端頁面地址: ZyPLJ/TreeHoleVue (github.com) https://github.com/ZyPLJ/TreeHoleVue 目前項目測試訪問地址: http://tree ...
  • 話不多說,直接開乾 一.下載 1.官方鏈接下載: https://www.microsoft.com/zh-cn/sql-server/sql-server-downloads 2.在下載目錄中找到下麵這個小的安裝包 SQL2022-SSEI-Dev.exe,運行開始下載SQL server; 二. ...
  • 前言 隨著物聯網(IoT)技術的迅猛發展,MQTT(消息隊列遙測傳輸)協議憑藉其輕量級和高效性,已成為眾多物聯網應用的首選通信標準。 MQTTnet 作為一個高性能的 .NET 開源庫,為 .NET 平臺上的 MQTT 客戶端與伺服器開發提供了強大的支持。 本文將全面介紹 MQTTnet 的核心功能 ...
  • Serilog支持多種接收器用於日誌存儲,增強器用於添加屬性,LogContext管理動態屬性,支持多種輸出格式包括純文本、JSON及ExpressionTemplate。還提供了自定義格式化選項,適用於不同需求。 ...
  • 目錄簡介獲取 HTML 文檔解析 HTML 文檔測試參考文章 簡介 動態內容網站使用 JavaScript 腳本動態檢索和渲染數據,爬取信息時需要模擬瀏覽器行為,否則獲取到的源碼基本是空的。 本文使用的爬取步驟如下: 使用 Selenium 獲取渲染後的 HTML 文檔 使用 HtmlAgility ...
  • 1.前言 什麼是熱更新 游戲或者軟體更新時,無需重新下載客戶端進行安裝,而是在應用程式啟動的情況下,在內部進行資源或者代碼更新 Unity目前常用熱更新解決方案 HybridCLR,Xlua,ILRuntime等 Unity目前常用資源管理解決方案 AssetBundles,Addressable, ...
  • 本文章主要是在C# ASP.NET Core Web API框架實現向手機發送驗證碼簡訊功能。這裡我選擇是一個互億無線簡訊驗證碼平臺,其實像阿裡雲,騰訊雲上面也可以。 首先我們先去 互億無線 https://www.ihuyi.com/api/sms.html 去註冊一個賬號 註冊完成賬號後,它會送 ...
  • 通過以下方式可以高效,並保證數據同步的可靠性 1.API設計 使用RESTful設計,確保API端點明確,並使用適當的HTTP方法(如POST用於創建,PUT用於更新)。 設計清晰的請求和響應模型,以確保客戶端能夠理解預期格式。 2.數據驗證 在伺服器端進行嚴格的數據驗證,確保接收到的數據符合預期格 ...