Posts

How to Setup tomcat on ubuntu

Image
First, please setup JAVA on your ubuntu, you can refer to : https://lengerrong.blogspot.com/2017/03/how-to-config-oracle-java-on-your-ubuntu.html $ wget http://mirror.apache-kr.org/tomcat/tomcat-9/v9.0.0.M22/bin/apache-tomcat-9.0.0.M22.tar.gz $ tar xzvf apache-tomcat-9.0.0.M22.tar.gz $ sudo cp apache-tomcat-9.0.0.M22 /var/lib/tomcat9 -rf $ cd /var/lib/tomcat9/ $ sudo vim bin/startup.sh # Better OS/400 detection: see Bugzilla 31132 os400=false case "`uname`" in OS400*) os400=true;; esac export JAVA_HOME=/usr/lib/jvm/java-8-oracle/ export JRE_HOME=/usr/lib/jvm/java-8-oracle/jre/ export CLASSPATH=$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$JAVA_HOME:$PATH export TOMCAT_HOME=/var/lib/tomcat9 Start tomcat $ sudo bin/startup.sh

Setup your xfce desktop and vncserver for your VPS

Image
First, let's install a desktop environment. I chose xfce, something faster. $ sudo apt-get install xfce4 xfce4-goodies Second, let's install one vncserver. $ sudo apt-get install tightvncserver Let's configure vncserver. Start the vncserver, and follow the directions to create a password $ vncserver You will require a password to access your desktops. Password: Verify: xauth:  file /home/errong_leng/.Xauthority does not exist New 'X' desktop is vvs:1 Creating default startup script /home/errong_leng/.vnc/xstartup Starting applications specified in /home/errong_leng/.vnc/xstartup Log file is /home/errong_leng/.vnc/vvs:1.log $ cat .vnc/vvs\:1.log 30/06/17 05:51:52 Xvnc version TightVNC-1.3.10 30/06/17 05:51:52 Copyright (C) 2000-2009 TightVNC Group 30/06/17 05:51:52 Copyright (C) 1999 AT&T Laboratories Cambridge 30/06/17 05:51:52 All Rights Reserved. 30/06/17 05:51:52 See http://www.tightvnc.com/ for information on TightVNC 30/06/17 05:51:52 Desktop nam

Set up Guacamole on your VPS, then you can access your VPS from anywhere, all you need to access your desktops is a web browser.

Image
Refers : http://guacamole.incubator.apache.org/doc/gug/installing-guacamole.html http://guacamole.incubator.apache.org/doc/0.9.1/gug/installing-guacamole.html My VPS is ubuntu 16.04. 1. Buiding guacamole-server from source. install required dependencies $ sudo apt-get install libcairo2-dev libjpeg-turbo8-dev libpng12-dev libossp-uuid-dev libavcodec-dev libavutil-dev libswscale-dev libfreerdp-dev libpango1.0-dev     libssh2-1-dev     libtelnet-dev libvncserver-dev libpulse-dev  libssl-dev libvorbis-dev libwebp-dev $ sudo apt-get install autoconf libtool setup jdk and mav $ sudo add-apt-repository ppa:webupd8team/java $ sudo apt-get update $ sudo apt-get install oracle-java8-installer $ sudo update-java-alternatives -s java-8-oracle $ export JAVA_HOME=/usr/lib/jvm/java-8-oracle/ $ wget http://apache.tt.co.kr/maven/maven-3/3.5.0/binaries/apache-maven-3.5.0-bin.tar.gz $ tar xzvf apache-maven-3.5.0-bin.tar.gz $ export PATH=~/apache-maven-3.5.0/bin:$PATH setup tomcat t

How to fix compile error on VPS : virtual memory exhausted: Cannot allocate memory

The root cause is no swap on your vps. Let's mkswap by ourself. errong_leng@vvs:~$ sudo su - root@vvs:~# umask 077 root@vvs:~# mkdir /usr/img/ root@vvs:~# dd if=/dev/zero of=/usr/img/swap bs=1024 count=2048000 2048000+0 records in 2048000+0 records out 2097152000 bytes (2.1 GB, 2.0 GiB) copied, 54.9435 s, 38.2 MB/s root@vvs:~#  mkswap /usr/img/swap       Setting up swapspace version 1, size = 2 GiB (2097147904 bytes) no label, UUID=c435f1d9-9b3a-40a8-8624-b7a09adca9d5 root@vvs:~# swapon /usr/img/swap Once you do not need swap, you can delete it. Since it will use about 2G of your vps disk. #swapoff /usr/img/swap #rm /usr/img -rf
Image
这是要应验先知以赛亚的话,说: (马太福音 12:17 和合本) This was to fulfill what was spoken through the prophet Isaiah:  (Matthew 12:17 NIV) 看哪!我的仆人,我所拣选、所亲爱、心里所喜悦的,我要将我的灵赐给他;他必将公理传给外邦。 (马太福音 12:18 和合本) “Here is my servant whom I have chosen, the one I love, in whom I delight; I will put my Spirit on him, and he will proclaim justice to the nations.  (Matthew 12:18 NIV) 他不争竞,不喧嚷;街上也没有人听见他的声音。 (马太福音 12:19 和合本) He will not quarrel or cry out; no one will hear his voice in the streets.  (Matthew 12:19 NIV) 压伤的芦苇,他不折断;将残的灯火,他不吹灭;等他施行公理,叫公理得胜。 (马太福音 12:20 和合本) A bruised reed he will not break, and a smoldering wick he will not snuff out, till he has brought justice through to victory.  (Matthew 12:20 NIV) 外邦人都要仰望他的名。 (马太福音 12:21 和合本) In his name the nations will put their hope.”  (Matthew 12:21 NIV)
Image
那时,耶稣说:“父啊,天地的主,我感谢你!因为你将这些事向聪明通达人就藏起来,向婴孩就显出来。  (马太福音 11:25 和合本) At that time Jesus said, “I praise you, Father, Lord of heaven and earth, because you have hidden these things from the wise and learned, and revealed them to little children. (Matthew 11:25 NIV) 父啊,是的,因为你的美意本是如此。  (马太福音 11:26 和合本) Yes, Father, for this is what you were pleased to do. (Matthew 11:26 NIV) 一切所有的,都是我父交付我的;除了父,没有人知道子;除了子和子所愿意指示的,没有人知道父。  (马太福音 11:27 和合本) “All things have been committed to me by my Father. No one knows the Son except the Father, and no one knows the Father except the Son and those to whom the Son chooses to reveal him. (Matthew 11:27 NIV) 凡劳苦担重担的人可以到我这里来,我就使你们得安息。  (马太福音 11:28 和合本) “Come to me, all you who are weary and burdened, and I will give you rest. (Matthew 11:28 NIV) 我心里柔和谦卑,你们当负我的轭,学我的样式;这样,你们心里就必得享安息。  (马太福音 11:29 和合本) Take my yoke upon you and learn from me, for I am gentle and humble in heart, and you will find rest for your souls. (Matthew 11:29 NIV) 因为我的轭是容易的,我的担子是轻省的。
Image
务要寻求 神 “你们祈求,就给你们;寻找,就寻见;叩门,就给你们开门。 (马太福音 7:7 和合本) “Ask and it will be given to you; seek and you will find; knock and the door will be opened to you. (Matthew 7:7 NIV) 因为凡祈求的,就得着;寻找的,就寻见;叩门的,就给他开门。 (马太福音 7:8 和合本) For everyone who asks receives; the one who seeks finds; and to the one who knocks, the door will be opened. (Matthew 7:8 NIV) 你们虽然不好,尚且知道拿好东西给儿女,何况你们在天上的父,岂不更把好东西给求他的人吗? (马太福音 7:11 和合本) If you, then, though you are evil, know how to give good gifts to your children, how much more will your Father in heaven give good gifts to those who ask him! (Matthew 7:11 NIV) 所以,无论何事,你们愿意人怎样待你们,你们也要怎样待人,因为这就是律法和先知的道理。” (马太福音 7:12 和合本) So in everything, do to others what you would have them do to you, for this sums up the Law and the Prophets. (Matthew 7:12 NIV) “你们要进窄门。因为引到灭亡,那门是宽的,路是大的,进去的人也多; (马太福音 7:13 和合本) “Enter through the narrow gate. For wide is the gate and broad is the road that leads to destruction, and many enter through it. (Matthew 7:13 NIV) 引到永生,那门是窄的,路是小的,