echo

linux(rhel7.0)环境安装tomcat

好久不见. 提交于 2019-12-24 14:50:47
在安装之前先检查当前环境是否已经安装jdk. rpm -qa|grep java whereis java 、java -version 如有安装请先卸载: 1.rpm -e --nodeps jdk-1.8.0_102-fcs 2.yum -y remove java java-1.8.0-openjdk 下载需要安装的jdk http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html linux环境下主要有两种方式 1.rpm -ivh jdk-8u102-linux-x64-rpm 2.tar -zxvf jdk-8u102-linux-x64.tar.gz 解压到 /usr/java路径下. 配置jdk的环境变量. vim /etc/profile JAVA_HOME=/usr/java/jdk1.8.0_102 PATH=$JAVA_HOME/bin:$PATH CLASSPATH=$JAVA_HOME/jre/lib/ext:$JAVA_HOME/lib/tools.jar export PATH JAVA_HOME CLASSPATH source /etc/profile 让环境变量立马生效 java -version 验证jdk是否安装成功 echo

CentOS日常维护及常用脚本

最后都变了- 提交于 2019-12-24 13:58:09
[root@192-16.x.x xiewenming]# curl myip.ipip.net 当前 IP:42.62.x.x 来自于:中国 北京 北京 联通/电信 www.17ce.com cdn解析网站测试 如果遇到 -bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory,解决办法如下: vi /etc/environment add these lines... LANG=en_US.utf-8 LC_ALL=en_US.utf-8 结束php进程,主进程除外 ps -ef|grep php|grep -v grep|cut -c 9-15|xargs kill -9 用指定用户执行脚本或命令 su - tomcat -c /usr/local/tomcat/bin/startup.sh 切换root执行 sudo sh tomcat.sh start 查查哪个目录的inode节点使用的多 [root@opt]# df -i Filesystem Inodes IUsed IFree IUse% Mounted on /dev/vda2 576K 497K 80K 87% / tmpfs 235K 5 235K 1% /dev/shm [root

Batch file new line problems

空扰寡人 提交于 2019-12-24 12:43:56
问题 I'm tearing my hair out now. I have a batch file that searches through sub directories looking for jpg files and then parses some simple HTML code using the file names it finds and pushes this to a text file. It is vitally important that each line of every file created is separated by a blank line. This is why I have included the "Echo." lines. See batch file code below: pushd \\SRVAPP1\Image Archive Echo %CD% PAUSE for /R %CD% %%F in (*.jpg) do ( Echo %%~nF Echo. Echo ^<html^>^<img src='^.%%

海康USB3.0工业相机,MVS以及修改USB速率

扶醉桌前 提交于 2019-12-24 11:45:48
1.海康MVS配置完成后,要修改USB接口传输速率: echo 500 > /sys/module/usbcore/parameters/usbfs_memory_mb 更改后电脑重启后速率会变回16 2.Ubuntu 16.04修改开机启动项 cd /etc ls gedit rc.local 将 echo 500 > /sys/module/usbcore/parameters/usbfs_memory_mb 粘贴到最后 来源: CSDN 作者: zxcvb036 链接: https://blog.csdn.net/zxcvb036/article/details/103677330

Include php code within echo from a random text

只愿长相守 提交于 2019-12-24 10:48:34
问题 I want to display a php code at random and so for I have <?php // load the file that contain thecode $adfile = "code.txt"; $ads = array(); // one line per code $fh = fopen($adfile, "r"); while(!feof($fh)) { $line = fgets($fh, 10240); $line = trim($line); if($line != "") { $ads[] = $line; } } // randomly pick an code $num = count($ads); $idx = rand(0, $num-1); echo $ads[$idx]; ?> The code.txt has lines like <?php print insert_proplayer( array( "width" => "600", "height" => "400" ), "http://www

mysql一键安装脚本

廉价感情. 提交于 2019-12-24 09:05:11
!/bin/bash GROUP=mysql USER=mysql MYSQL_HOME=/usr/local/mysql MYSQL_DATA_HOME=/data/mysql/data D_VERSION="mysql-boost-5.7.25" MYSQL_VERSION="mysql-5.7.25" DOWNLOAD_PATH="/usr/local/src" echo "=================================start install mysql===================================" if [ $(id -u) != "0" ];then echo "Error: You must be root to run this script!" exit 1 fi if [ -z $(cat /etc/group|awk -F: '{print $1}'| grep -w "$GROUP") ] then groupadd $GROUP if(( $? == 0 )) then echo "group $GROUP add sucessfully!" fi else echo "$GROUP is exsits" fi if [ -z $(cat /etc/passwd|awk -F: '{print $1}'|

mysqldump备份脚本

巧了我就是萌 提交于 2019-12-24 06:38:45
#!/bin/bash # 10 23 * * * /bin/bash /data/script/backup_mysqldump.sh BDATE=`date +%Y%m%d%H%M%S` BPATH=/data/backup LOGFILE=${BPATH}/log_${BDATE}.log mysqldump -uroot -pchengce243 -S /var/lib/mysql/mysql.sock trade_history -P3306 --single-transaction > ${BPATH}/trade_history_${BDATE}.sql echo > ${LOGFILE} for tfile in $(find $BPATH/ -mtime +7) do if [ -d $tfile ];then rm -rf $tfile elif [ -f $tfile ];then rm -rf $tfile fi echo -e "---- Delete backup file: $tfile ------" >> ${LOGFILE} done echo -e "\n====== Backup Jobs end at `date +%F' '%T' '%w` =====\n">> ${LOGFILE} 来源: https://www.cnblogs.com

Undefined property: Illuminate\Database\Eloquent\Builder

ぃ、小莉子 提交于 2019-12-24 05:53:00
问题 This strange thing is happening to me.I have the code below : $state_image =States_Images::where('id_state', $id); echo $delete_path=$state_image->name; and the result is : Undefined property: Illuminate\Database\Eloquent\Builder::$name Someone help me pls :( 回答1: You need to finish the query with get() or first(). In your case probably: States_Images::where('id_state', $id)->first(); 来源: https://stackoverflow.com/questions/37144564/undefined-property-illuminate-database-eloquent-builder

office visio 2019 下载激活

风格不统一 提交于 2019-12-24 05:34:05
安装 下载 office ed2k://|file|cn_office_professional_plus_2019_x86_x64_dvd_5e5be643.iso|3775004672|1E4FFA5240F21F60DC027F73F1C62FF4|/ visio ed2k://|file|cn_visio_professional_2019_x86_x64_dvd_97bda48c.iso|3775004672|26D248309B18EDBEEBE8DC43C55995DB|/ 激活 把下面的代码放入新建的txt文件中改扩展名为.bat,以管理员身份运行,然后小黑框出现success就算是成功了,激活的时候不要使用软件。 office @echo off (cd /d "%~dp0")&&(NET FILE||(powershell start-process -FilePath '%0' -verb runas)&&(exit /B)) >NUL 2>&1 title Office 2019 Activator r/Piracy echo Converting... & mode 40,25 (if exist "%ProgramFiles%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles%

visio 2019 激活方法

删除回忆录丶 提交于 2019-12-24 05:33:23
今日因工作需要使用visio,无奈下载2019版本需要激活,很多功能无法使用,最近在网上发现一个非常简单就是一个本地可执行脚本,本人已亲测完全激活成功,随分享给大家 复制下面代码: @echo off title Activate Microsoft Visio 2019&cls&echo ============================================================================&echo #Visio: Activating Microsoft software products for FREE without software&echo ============================================================================&echo.&echo #Supported products:&echo - Microsoft Visio Standard 2019&echo - Microsoft Visio Professional Plus 2019&echo.&echo.&(if exist "%ProgramFiles%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles%