csatblogspotdotcom

Sunday, February 19, 2017

office2016及visio2016的安装

新版本office不像以前的版本可以自定义安装界面供用户选择,而是点击安装后自动在后台运行,一键安装完毕,如果需要自定义,则需要下载一个工具officedeploymenttool_7614-3602.exe(Office 2016 Deployment Tool)下载地址: https://www.microsoft.com/en-us/download/details.aspx?id=49117 下载完毕后运行会让用户选择一个目录,它自动把两个文件(setup.exe、configuration.xml)解压到指定目录,编辑 configuration.xml 这个文本文件,填好相关自定义内容,再执行 setup.exe 即可自定义安装,此外还可以同时安装office和visio。之前为了同时安装office和visio下载了 cn_office_professional_plus_2016_x86_x64_dvd_6969182.iso 和 cn_visio_professional_2016_x86_x64_dvd_6970929.iso ,只执行前者,是没有visio的,需要运行两个,但实际上两个iso大小几乎一样,里面的内容估计都已经自带。使用 officedeploymenttool_7614-3602.exe 解压出来的 setup.exe 和 configuration.xml,执行 setup.exe /configure configuration.xml ,(管理员权限命令行,或者普通权限会自动弹出是否允许),注意xml里面的路径需要可识别,开始尝试 E:\某中文名文件夹\...\cn_visio_professional_2016_x86_x64_dvd_6970929\ ,结果出现提示 error code 0-1008(0) (officedeploymenttool_7614-3602.exe解压到同一目录运行时没这个错误),于是直接放到E盘下: E:\cn_visio_professional_2016_x86_x64_dvd_6970929\ ,里面的 是注释,OfficeClientEdition选择64位版本还是32位版本。参考: http://blog.sina.com.cn/s/blog_a652eb210102wkd4.html http://blog.sina.com.cn/s/blog_489988100102w4mf.html https://answers.microsoft.com/en-us/msoffice/forum/msoffice_install-mso_win10/why-doesnt-office-2016-pro-plus-setup-give-you-the/46217e78-fc40-41f8-81a7-1eb122a1bdde https://technet.microsoft.com/en-us/library/jj219423(v=office.15)?f=255&MSPPError=-2147217396 https://technet.microsoft.com/en-us/library/jj219426 简单总结一下过程: 1.下载 cn_visio_professional_2016_x86_x64_dvd_6970929.iso 解压到可识别目录例如 E:\cn_visio_professional_2016_x86_x64_dvd_6970929\,同时下载 officedeploymenttool_7614-3602.exe 运行解压到某目录; 2.编辑 officedeploymenttool_7614-3602 的 configuration.xml ,修改相关内容,如32还是64位版本,安装源所在路径,语言,安装产品(VisioProRetail、proplusretail),安装哪些组件、排除哪些组件等; 3.运行 officedeploymenttool_7614-3602 的 setup.exe 一键安装,具体命令:setup.exe /configure configuration.xml ,最后进行破解使用。 以下是本次安装使用的 configuration.xml (仅供参考): 最后附一个Microsoft软件下载网站: http://msdn.itellyou.cn/

Labels: ,

Wednesday, February 15, 2017

putty color scheme(putty配色方案)

参考: https://darekkay.com/2015/03/21/my-putty-color-scheme/ putty自带配色不太好用,特别是紫色,时间长了闪瞎眼,手动设置可以在 window -> colours 里面调整,但是太麻烦,可以直接把相关的 **.reg 导入Windows注册表即可,于是上网搜了下网友给出的诸多 color scheme,发现如下方案比较好(https://darekkay.com/2015/03/21/my-putty-color-scheme/): Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\SESSION_NAME] ; Default Foreground "Colour0"="217,216,216" ; Default Bold Foreground "Colour1"="217,216,216" ; Default Background "Colour2"="28,28,28" ; Default Background "Colour3"="28,63,149" ; Cursor Text "Colour4"="28,28,28" ; Cursor Color "Colour5"="231,231,232" ; ANSI Black "Colour6"="115,113,113" ; ANSI Black Bold "Colour7"="115,113,113" ; ANSI Red "Colour8"="251,38,8" ; ANSI Red Bold "Colour9"="251,38,8" ; ANSI Green "Colour10"="167,226,46" ; ANSI Green Bold "Colour11"="167,226,46" ; ANSI Yellow "Colour12"="102,217,238" ; ANSI Yellow Bold "Colour13"="102,217,238" ; ANSI Blue "Colour14"="0,157,220" ; ANSI Blue Bold "Colour15"="0,157,220" ; ANSI Magenta "Colour16"="255,85,255" ; ANSI Magenta Bold "Colour17"="255,85,255" ; ANSI Cyan "Colour18"="255,210,4" ; ANSI Cyan Bold "Colour19"="255,210,4" ; ANSI White "Colour20"="217,216,216" ; ANSI White Bold "Colour21"="255,255,255" 其中的 SESSION_NAME 替换为session名,如果注入默认设置,可将 SESSION_NAME 替换为 Default%20Settings 以上是有注释的,去掉注释的版本为: Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\SESSION_NAME] "Colour0"="217,216,216" "Colour1"="217,216,216" "Colour2"="28,28,28" "Colour3"="28,63,149" "Colour4"="28,28,28" "Colour5"="231,231,232" "Colour6"="115,113,113" "Colour7"="115,113,113" "Colour8"="251,38,8" "Colour9"="251,38,8" "Colour10"="167,226,46" "Colour11"="167,226,46" "Colour12"="102,217,238" "Colour13"="102,217,238" "Colour14"="0,157,220" "Colour15"="0,157,220" "Colour16"="255,85,255" "Colour17"="255,85,255" "Colour18"="255,210,4" "Colour19"="255,210,4" "Colour20"="217,216,216" "Colour21"="255,255,255"

Labels: , , ,

Tuesday, February 14, 2017

MySQL的迁移

前天从原Ubuntu把某数据库迁移到新装Ubuntu虚拟机,开始以为每个数据库是一个独立文件夹,例如自带的 /var/lib/mysql/mysql/、/var/lib/mysql/performance_schema/,自己创建的数据库**,于是只迁移了**,其余没理,后来发现原来mysql中创建的用户没了,于是新建了用户: create user 'username'@'localhost' identified by 'password'; grant all privileges on name_of_db.* to 'username'@'localhost'; 接下来发现进去数据库**后能看到表,但是列不出表的内容,查了下,原来数据库内容不在**文件夹,仔细一看,**文件夹很小,几十万条数据不可能存在里面,一查原来mysql数据库默认都是放在 ibdata1 这个文件里面的,新ibdata1大小只有18M,原有ibdata1有90M。如果需要每个数据库单独存储,则需要设置,今天重新查了下,使用 show global variables; 里面显示的选项 innodb_file_per_table 默认 OFF,开启此项后默认存放在每个数据库的文件夹里,每个表单独一个文件。 于是将原有的 ibdata1 移动到新机,终于可以看到数据了,但是发现数据不全,前天睡前想了想,要仔细看下数据,看创建时间,以及对应的ID是否和log一致,昨天早上一看是OK的,之前吓了一跳,以为几个月来爬到的东西全没了。 总结下经验,移动数据库要么导出数据导入另一机器的数据库,或者使用mysql自带数据库迁移、复制之类的功能,要么将相关文件夹和文件全部移动或复制,包括 /var/lib/mysql/mysql/、/var/lib/mysql/performance_schema/、**自己的数据库、ibdata1、ib_logfile0、ib_logfile1,这些相关的文件都需要保留。

Labels: , ,

Monday, February 13, 2017

MySQL Connector/Python 的安装

MySQL Connector/Python 是Python的mysql驱动,安装这个驱动之后才能在Python中使用 import mysql.connector 并使用数据库,具体参见 https://dev.mysql.com/doc/connector-python/en/ 安装方法可以是apt,或者下载安装包。 先说说apt。Ubuntu默认是没有mysql-connector-python这些东西的,apt-cache search mysql-connector-python是没结果的,即使 sudo apt-get update 更新后也不行,mysql相关的东西需要安装 MySQL APT Repository 让apt知道mysql相关的东西后才能用apt安装 mysql-connector-python (参考 https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/ 、 https://dev.mysql.com/downloads/repo/apt/)。 另一种方式是下载安装包,Ubuntu是deb包(https://dev.mysql.com/downloads/connector/python/),命令 sudo dpkg -i PACKAGE.deb 安装。 以上两种是通过MySQL官网给出的安装方法,也可通过Python途径获取:使用Python安装工具pip安装。 不管是apt还是deb安装包,都有两种选择,一个是纯Python实现,另一种是C扩展实现,在操作数据量大的时候第二种效率高, import mysql.connector 默认使用第一种,连接数据库时 use_pure=False 表示使用第二种,或者直接 import _mysql_connector 使用第二种。参考(https://dev.mysql.com/doc/connector-python/en/connector-python-installation.html 、 https://dev.mysql.com/doc/connector-python/en/connector-python-example-connecting.html 、 https://dev.mysql.com/doc/connector-python/en/connector-python-cext.html)经过摸索,如果只装mysql-connector-python-cext,那么就只能使用 import _mysql_connector ,如果安装 mysql-connector-python ,则可使用 import mysql.connector ,两者都装,才可 import mysql.connector 后 设置 use_pure ,后面找了下,在这里有叙述对于Linux两个安装包是分开的,如需要则两个都要安装:https://dev.mysql.com/doc/connector-python/en/connector-python-installation-binary.html 由于自己的程序操作数据量暂不大,但考虑以后扩展性,最后选择 mysql-connector-python 和 mysql-connector-python-cext 都安装,但使用 import mysql.connector 且默认 use_pure

Labels: , , ,

Saturday, February 11, 2017

Ubuntu命令行以静默模式安装matlab

参考: https://zhuanlan.zhihu.com/p/23633624 (以此为准) http://m.sodocs.net/doc/3b1c7863a98271fe910ef927.html http://blog.csdn.net/wangpengfei163/article/details/47311041 虚拟机Ubuntu server无桌面,命令行静默模式(silent mode)安装matlab使用如下命令: sudo /media/cdrom/install -inputFile /home/alex/matlab/installer_input.txt 其中第一张(共两张)DVD sudo mount /dev/cdrom /media/cdrom/ 装入后,执行里面的/media/cdrom/install(网友建议不要在/media/cdrom目录执行install),inputFile为installer_input.txt,相关参数在里面,内容如下(井号为注释): ################################################################## ## ## Use this file to specify parameters required by the installer at runtime. ## ## Instructions for using this file. ## ## 1. Create a copy of this template file and fill in the required ## information. ## ## 2. Uncomment only those lines that start with a single '#' ## and set the desired values. All allowed values for the ## parameters are defined in the comments section for each ## parameter. ## ## 3. Launch the installer from the command line, using the -inputFile option ## to specify the name of your installer initialization file. ## ## (Windows) setup.exe -inputFile ## (Mac/Unix) install -inputFile ## ## NOTE: ## If you want to run the activation application in silent ## mode immediately after the installer completes, you must create ## an activation initialization file and specify its name as the ## value of the activationPropertiesFile= option. You can also ## pass the name of the activation initialization file to the ## installer using the -activationPropertiesFile command line ## option. ## ################################################################## ## ## ## SPECIFY INSTALLATION FOLDER ## ## Example: ## (Windows) destinationFolder=C:\Program Files\MATLAB\RXXXX ## (Unix) destinationFolder=/usr/local/RXXXX ## (Mac) destinationFolder=/Applications ## ## Set the desired value for destinationFolder and ## uncomment the line. # destinationFolder= ## ## SPECIFY FILE INSTALLATION KEY ## ## Example: fileInstallationKey=xxxxx-xxxxx-xxxxx-xxxxx..... ## ## Set the desired value for fileInstallationKey and ## uncomment the line. ## fileInstallationKey=09806-07443-53955-64350-21751-41297 ## ## ACCEPT LICENSE AGREEMENT ## ## You must agree to the license agreement to install MathWorks products. ## The license agreement can be found in the license_agreement.txt file at the ## root level of the installation DVD. ## ## Example: agreeToLicense=yes ## ## Set agreeToLicense value to yes or no and ## uncomment the line. agreeToLicense=yes ## ## SPECIFY OUTPUT LOG ## ## Specify full path of file into which you want the results of the ## installation to be recorded. ## ## Example: ## (Windows) outputFile=C:\TEMP\mathworks_.log ## (Unix/Mac) outputFile=/tmp/mathworks_.log ## ## Set the desired value for outputFile and ## uncomment the line. outputFile=/home/alex/matlab/mathworks_matlab_install.log ## SPECIFY INSTALLER MODE ## ## interactive: Run the installer GUI, waiting for user input on all ## dialog boxes. ## ## silent: Run the installer without displaying the GUI. ## ## automated: Run the installer GUI, displaying all dialog boxes, but only ## waiting for user input on dialogs that are missing required ## input. ## ## Set mode value to either interactive, silent, or automated and ## uncomment the line. mode=silent ## SPECIFY LENGTH OF TIME DIALOG BOXES ARE DISPLAYED ## ## Specify how long the installer dialog boxes are displayed, in milliseconds. ## ## NOTE: Use this value only if you set the installer mode to automated. ## ## By default, the dialog boxes display on the screen for one second. ## ## Example: (To specify a value of 1 second.) automatedModeTimeout=1000 ## ## Set the desired value for automatedModeTimeout and ## uncomment the line. # automatedModeTimeout= ## SPECIFY ACTIVATION PROPERTIES FILE (For non-network license types only) ## ## Enter the path to an existing file that contains properties to configure ## the activation process. activationPropertiesFile=/home/alex/matlab/activate.ini ########## Begin: Options for Network License Types ######### ## ## SPECIFY PATH TO LICENSE FILE (Required for network license types only) ## ## This value is required when installing either the License Manager or when ## installing as a Network End-User ## Example: ## (Windows) licensePath=C:\TEMP\license.dat ## (Unix) licensePath=/tmp/license.dat ## Set the desired value for licensePath and ## uncomment the line. # licensePath= ## CHOOSE TO INSTALL LICENSE MANAGER (For network license types only) ## ## Installs license manager files to disk. ## ## NOTE: You only need to install the license manager files ## on your license server. ## ## Set lmgrFiles value to true or false and ## uncomment the line. # lmgrFiles= ## INSTALL LICENSE MANAGER AS A SERVICE (For network license types only) ## ## Configure the license manager as a service on Windows. ## ## NOTE: Not applicable for Unix or Mac. ## ## NOTE: The lmgr_files option (set in previous step) must also be set to true. ## ## Set lmgrService value to true or false and ## uncomment the line. # lmgrService= ########## End: Options for Network License Types ######### ################# Begin - Windows Only Options ################ ## ## CHOOSE TO SET FILE ASSOCIATIONS ## ## Set to true if you want the installer to associate file types used by MathWorks ## products to this version of MATLAB, or false if you do not want the installer to ## associate MathWorks file types with this version of MATLAB. ## ## Default value is true. ## ## Set setFileAssoc value to true or false and ## uncomment the line. # setFileAssoc= ## ## CHOOSE TO CREATE WINDOWS DESKTOP SHORTCUT ## ## Set to true if you would like the installer to create a desktop shortcut icon ## when MATLAB is installed or false if you don't want the shortcut created. ## ## Set desktopShortcut value to true or false and ## uncomment the line. # desktopShortcut= ## CHOOSE TO ADD SHORTCUT TO WINDOWS START MENU ## ## Set to true if you would like the installer to create a Start Menu shortcut ## icon when MATLAB is installed or false if you don't want the shortcut created. ## ## Set startMenuShortcut value to true or false and ## uncomment the line. # startMenuShortcut= ## CREATE a MATLAB Startup Accelerator task ## ## The MATLAB Startup Accelerator installer creates a ## system task to preload MATLAB into the system▒s cache ## for faster startup. ## ## NOTE: By default, a MATLAB Startup Accelerator task will ## automatically be created. ## ## If you want a MATLAB Startup Accelerator task to be created, ## do not edit this section. ## ## Set createAccelTask value to false if you do not want to ## create an Accelerator task and uncomment the line. # createAccelTask= ## Enable Login Named User licensing ## ## Set to Yes to enable use of a Login Named User license for all users of this MATLAB installation ## Users must log in to their MathWorks Account when MATLAB starts. ## ## Example: enableLNU=yes ## ## NOTE: This flag is valid in silent installations only. # enableLNU=yes ################ End - Windows Only Options ################ ## SPECIFY PRODUCTS YOU WANT TO INSTALL ## ## By default, the installer installs all the products and ## documentation for which you are licensed. Products you are not licensed for ## are not installed, even if they are listed here. ## ## Note: ## 1. To automatically install all your licensed products, do not edit ## any lines in this section. ## ## 2. To install a specific product or a subset of products for ## which you are licensed, uncomment the line for the product(s) you want ## to install. #product.Aerospace_Blockset #product.Aerospace_Toolbox #product.Antenna_Toolbox #product.Audio_System_Toolbox #product.Bioinformatics_Toolbox #product.Communications_System_Toolbox #product.Computer_Vision_System_Toolbox #product.Control_System_Toolbox #product.Curve_Fitting_Toolbox #product.DO_Qualification_Kit #product.DSP_System_Toolbox #product.Data_Acquisition_Toolbox #product.Database_Toolbox #product.Datafeed_Toolbox #product.Econometrics_Toolbox #product.Embedded_Coder #product.Filter_Design_HDL_Coder #product.Financial_Instruments_Toolbox #product.Financial_Toolbox #product.Fixed_Point_Designer #product.Fuzzy_Logic_Toolbox #product.Global_Optimization_Toolbox #product.HDL_Coder #product.HDL_Verifier #product.IEC_Certification_Kit #product.Image_Acquisition_Toolbox #product.Image_Processing_Toolbox #product.Instrument_Control_Toolbox #product.LTE_System_Toolbox #product.MATLAB #product.MATLAB_Coder #product.MATLAB_Compiler #product.MATLAB_Compiler_SDK #product.MATLAB_Distributed_Computing_Server #product.MATLAB_Production_Server #product.MATLAB_Report_Generator #product.Mapping_Toolbox #product.Model_Predictive_Control_Toolbox #product.Model_Based_Calibration_Toolbox #product.Neural_Network_Toolbox #product.OPC_Toolbox #product.Optimization_Toolbox #product.Parallel_Computing_Toolbox #product.Partial_Differential_Equation_Toolbox #product.Phased_Array_System_Toolbox #product.Polyspace_Bug_Finder #product.Polyspace_Code_Prover #product.RF_Toolbox #product.Risk_Management_Toolbox #product.Robotics_System_Toolbox #product.Robust_Control_Toolbox #product.Signal_Processing_Toolbox #product.SimBiology #product.SimEvents #product.SimRF #product.Simscape #product.Simscape_Driveline #product.Simscape_Electronics #product.Simscape_Fluids #product.Simscape_Multibody #product.Simscape_Power_Systems #product.Simulink #product.Simulink_3D_Animation #product.Simulink_Code_Inspector #product.Simulink_Coder #product.Simulink_Control_Design #product.Simulink_Design_Optimization #product.Simulink_Design_Verifier #product.Simulink_Desktop_Real_Time #product.Simulink_PLC_Coder #product.Simulink_Real_Time #product.Simulink_Report_Generator #product.Simulink_Test #product.Simulink_Verification_and_Validation #product.Spreadsheet_Link #product.Stateflow #product.Statistics_and_Machine_Learning_Toolbox #product.Symbolic_Math_Toolbox #product.System_Identification_Toolbox #product.Trading_Toolbox #product.Vehicle_Network_Toolbox #product.Vision_HDL_Toolbox #product.WLAN_System_Toolbox #product.Wavelet_Toolbox 里面涉及的 activate.ini 内容为(同样的,井号为注释): ################################################################## # # Name: activate.ini # # Copyright 2008-2010 The MathWorks, Inc. # # Purpose: Activation application initialization file template. # Use this file to specify parameters required by the activation # application at runtime. This file provides the activation # application with required input without using the GUI. # # INSTRUCTIONS FOR RUNNING IN SILENT MODE # # To run the activation application in silent mode: # # 1. Create a copy of this template file and fill in the required # information. # # 2. Navigate to the folder containing the activation application. # (Windows) $MATLABROOT\bin\$ARCH # (Mac/Linux) $MATLABROOT/bin # # 3. Launch the activation application from the command line, # using the -propertiesFile option to specify the name of your # activation initialization file. # # (Windows) activate_matlab.exe -propertiesFile # (Mac/Linux) activate_matlab.sh -propertiesFile # # NOTE: If you want to perform silent activation automatically # after performing silent installation, specify the name of your # activation initialization file as the value of the # activationPropertiesFile= option in the installer initialization # file (installer_input.txt). This option causes the installer # to launch the activation application in silent mode. You can # also specify the activation initialization file as an argument # when you launch the installer, using the -activationPropertiesFile # option. # # NOTE: When run in silent mode, the activation application does # not display the activation dialog boxes. # ################################################################## # # SPECIFY ACTIVATION MODE # # Specify whether or not to run in silent mode. # # Valid values: true / false # # Default: isSilent=true. isSilent=true # # SPECIFY ACTIVATION TYPE (Required) # # Specify the type of activation you want to do. # # Valid values: activateDcAnon / activateOffline activateCommand=activateOffline # # SPECIFY LICENSE FILE LOCATION (Required if activateCommand=activateOffline) # # If you specified the activation type activateOffline, you # must specify the location of the License File that you want # to install. # # Mac/Linux example: # licenseFile=/Central/license.dat # # Windows example: # licenseFile=C:\license.dat licenseFile=/home/alex/matlab/crack/license_standalone.lic # # SPECIFY ACTIVATION KEY (Required if activateCommand=activateDcAnon) # # If you specified the activation type activateDcAnon,you must # specify a valid Activation Key. # # Example: activationKey=55555-55555-55555-55555 activationKey= # # SPECIFY LICENSE FILE DESTINATION DIRECTORY (Optional) # # Specify the directory into which you want to install the license file. # You must specify the full path of a directory that already exists. # # NOTE: This option is only for advanced users since it could make MATLAB # unable to start without specifying special options. # # Mac/Linux example: # installLicenseFileDir=/Central/LicenseDirectory # # Windows examples: # installLicenseFileDir=C:\License Directory installLicenseFileDir= # # SPECIFY NAME OF INSTALLED LICENSE FILE (Optional) # # Specify the name of the installed License File. The file name # must have with either .lic or .dat file extension. # # Example: installLicenseFileName=license.dat installLicenseFileName= 相关日志记录在 mathworks_matlab_install.log 中,中途换上第二张DVD: sudo umount /media/cdrom 以及 sudo mount /dev/cdrom /media/cdrom/ 接下来是激活,将crack/R2016b/bin/glnxa64/里的4个lib:libcufft.so.7.5.18、libinstutil.so、libmwlmgrimpl.so、libmwservices.so复制到/usr/local/MATLAB/R2016b/bin/glnxa64/(/usr/local/MATLAB/R2016b/是默认安装目录,注意复制后的文件权限),同时将crack/license_standalone.lic复制到/usr/local/MATLAB/R2016b/licenses/(licenses目录是自己创建的,注意目录权限,命令:sudo cp license_standalone.lic /usr/local/MATLAB/R2016b/licenses),即可运行matlab了:sudo /usr/local/MATLAB/R2016b/bin/matlab,但此时bin目录不在环境变量中,无法直接使用matlab。 后记20170212: 1.执行 sudo chmod -R a+rX R2016b/ (-R表示递归,a表示所有用户包括u(ser)、g(roup)、o(ther),+rX表示增加读权限、可执行权限,大写X表示在此条件下增加可执行权限:目标为目录或对某用户已经具有可执行权限execute/search only if the file is a directory or already has execute permission for some user),使所有用户均有权限访问matlab目录,并可使用matlab; 2.执行 sudo ln -s /usr/local/MATLAB/R2016b/bin/matlab /usr/local/bin/matlab 使matlab命令可直接执行,不用指定具体路径,因为/usr/local/bin已包含在环境变量$PATH中;或者将 /usr/local/MATLAB/R2016b/bin/ 添加至$PATH(可在~/.profile中添加)也可直接执行matlab;由于本机上 PATH="$HOME/bin:$PATH" 于是直接在~/bin/ 中创建软链接 ln -s /usr/local/MATLAB/R2016b/bin/matlab ~/bin/matlab 即可; 3.昨天在安装完matlab后,需root权限执行,于是给 /usr/local/MATLAB/R2016b/ 递归加上可读、可执行权限,但在加完r可读权限后,再看之前没权限的目录,例如ls -al **,内容全变为问号,开始以为出了啥差错,后来发现原来是文件夹有可读权限但没有可执行权限时,ls -al 该文件夹时,可以看到里面的文件,但显示出来的属性内容全为问号,只有该文件夹具备的可执行权限时,才看得到属性,也就是说,可读权限决定是否看得到内容,可执行权限决定是否看得到内容的属性; 4.安装完提示如下: Your installation may require additional configuration steps. 1. The following products require a supported compiler: Stateflow 8.8 Simulink Coder 8.11 MATLAB Coder 3.2 Simulink Test 2.1 2. Simulink requires a C compiler for simulation acceleration, model reference, and MATLAB Function Block capabilities. It is recommended that you install a supported compiler on your machine. 3. To accelerate computations with the following products, a supported compiler is required: SimBiology 5.5 Fixed-Point Designer 5.3 4. After this installation is complete, you should continue with your configuration of the MATLAB Distributed Computing Server as outlined in the instructions obtained from www.mathworks.com/distconfig. 5. MATLAB Compiler SDK 6.3 requires the following: ● a supported compiler for creation of C and C++ Shared libraries ● a Java JDK for creation of Java packages (Feb 11, 2017 22:16:24) Exiting with status 0 (Feb 11, 2017 22:16:39) End - Successful. VM Ubuntu 64 之前已安装好gcc、g++,Java也装了 (java -version 显示 : java version "1.7.0_121" OpenJDK Runtime Environment (IcedTea 2.6.8) (7u121-2.6.8-1ubuntu0.14.04.3) OpenJDK 64-Bit Server VM (build 24.121-b00, mixed mode) ) 使用如下两个命令重新配置下: /usr/local/MATLAB/R2016b/bin/mbuild -setup 输出: MBUILD configured to use 'gcc' for C language compilation. To choose a different language, execute one from the following: mex -setup C++ -client MBUILD mex -setup FORTRAN -client MBUILD 以及 /usr/local/MATLAB/R2016b/bin/mex -setup 输出: MEX configured to use 'gcc' for C language compilation. Warning: The MATLAB C and Fortran API has changed to support MATLAB variables with more than 2^32-1 elements. In the near future you will be required to update your code to utilize the new API. You can find more information about this at: http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html. To choose a different language, execute one from the following: mex -setup C++ mex -setup FORTRAN

Labels: ,

Ubuntu安装C/C++编译环境

Ubuntu(包括其他版本Linux)安装C/C++编译器/编译环境只需要安装build-essential即可,build-essential依赖make、gcc、g++等库,安装build-essential后这些自动安装好了,具体命令:sudo apt-get install build-essential ****@****:~$ apt-cache depends build-essential build-essential |Depends: libc6-dev Depends: libc6-dev Depends: gcc Depends: g++ Depends: make make:i386 Depends: dpkg-dev Conflicts: build-essential:i386

Labels: , ,

lvm硬盘的挂载

原虚拟机硬盘是逻辑卷lvm,启用新虚拟机后需要把原硬盘数据迁移过来,可以scp,但是有效率问题和权限问题,于是考虑直接挂载。 1.在新虚拟机添加原有虚拟机硬盘 2.新虚拟机未使用lvm所以默认没有装lvm2工具,使用sudo apt-get install lvm2安装(原虚拟机使用lvm于是默认安装lvm2工具 3.使用pvs或pvdisplay查看物理卷,使用vgs查看卷组,使用lvdisplay查看逻辑卷,其中逻辑卷状态为not available,/dev/下没有相关设备,于是使用sudo vgchange -ay /dev/ubuntu-vg激活,一次性激活了ubuntu-vg中的两个分区:root和swap_1 4.挂载:sudo mount /dev/ubuntu-vg/root /mnt 进入查看,文件属性都没变,所属用户名也没变,所有信息完全一样。

Labels: , ,

Friday, February 3, 2017

关于局域网、网卡的几个小问题

1. 两台机在同一局域网内,通过一台交换机连出去,其中一台还通过了一台家庭路由器,两台之间隔很长时间才能通一次,远程连过去之后过会就卡一阵,而在外网的VPN连过来两台机都顺畅,说明局域网这两台机之间的设备没有很及时的把数据包转发给另一台机。

2. 笔记本电池耗尽突然down机,开机后不能上网,没有显示无线网络,删除虚拟网卡之后,显示绿色一格一格信号上有个红叉,这种一般是笔记本网卡硬件开关没打开,打开之后还是不行,最后设备管理器里面删除设备及驱动,自动安装(可能是win7从自己备份的地方复制过来)驱动后OK

Labels: , ,